grid - balance - help with equation definition - error in GAMS

Hi.

I need to define a grid. The grid has knots and at some knots.there is consumption.
The balance of what is transferred into a knot must be equal to the sum of what is going away plus consumption (if any).

I have the sets
i /K1, K2, K3, K4, K5/
j /K1, K2, K3, K4, K5/

Which means from and to a knot.

My equation to get the balance working:
eq1… sum(i, transportation(i,j)) =e= sum(j, transportation) + consumption(i,j)

But this gives me either uncontrolled set entered as constant or … is already under control.

Could you help me to define that equation correctely?

Thank you


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

Τη Τρίτη, 2 Ιουλίου 2013 9:23:52 π.μ. UTC+3, ο χρήστης rasa...@gmail.com έγραψε:

Hi.

I need to define a grid. The grid has knots and at some knots.there is consumption.
The balance of what is transferred into a knot must be equal to the sum of what is going away plus consumption (if any).

I have the sets
i /K1, K2, K3, K4, K5/
j /K1, K2, K3, K4, K5/




Which means from and to a knot.

My equation to get the balance working:
eq1… sum(i, transportation(i,j)) =e= sum(j, transportation) + consumption(i,j)

But this gives me either uncontrolled set entered as constant or … is already under control.

Could you help me to define that equation correctely?

Thank you


If you check this balance for every bus you must put eq1(i), and declare this with the same name


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

Thank you.
Could you tell me what you mean by “declare this with the same name”?
I still don’t understand it :frowning:

Am Dienstag, 2. Juli 2013 19:49:37 UTC+2 schrieb saosan:



Τη Τρίτη, 2 Ιουλίου 2013 9:23:52 π.μ. UTC+3, ο χρήστης rasa...@gmail.com έγραψε:

Hi.

I need to define a grid. The grid has knots and at some knots.there is consumption.
The balance of what is transferred into a knot must be equal to the sum of what is going away plus consumption (if any).

I have the sets
i /K1, K2, K3, K4, K5/
j /K1, K2, K3, K4, K5/




Which means from and to a knot.

My equation to get the balance working:
eq1… sum(i, transportation(i,j)) =e= sum(j, transportation) + consumption(i,j)

But this gives me either uncontrolled set entered as constant or … is already under control.

Could you help me to define that equation correctely?

Thank you


If you check this balance for every bus you must put eq1(i), and declare this with the same name


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

I made a mistake… It is called transport(i,j), I forgot that.
But I am still getting set is under control already with eq1(i) or uncontrolled set entered as constant.

Am Dienstag, 2. Juli 2013 19:49:37 UTC+2 schrieb saosan:



Τη Τρίτη, 2 Ιουλίου 2013 9:23:52 π.μ. UTC+3, ο χρήστης rasa...@gmail.com έγραψε:

Hi.

I need to define a grid. The grid has knots and at some knots.there is consumption.
The balance of what is transferred into a knot must be equal to the sum of what is going away plus consumption (if any).

I have the sets
i /K1, K2, K3, K4, K5/
j /K1, K2, K3, K4, K5/




Which means from and to a knot.

My equation to get the balance working:
eq1… sum(i, transportation(i,j)) =e= sum(j, transportation) + consumption(i,j)

But this gives me either uncontrolled set entered as constant or … is already under control.

Could you help me to define that equation correctely?

Thank you


If you check this balance for every bus you must put eq1(i), and declare this with the same name


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\

I mean that at equation you should write eq(i) before to declare the equation. Generally, if you check one constraint for every i so you should be eq(i) etc


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

\