Reputation: 93
I have this situation in GAMS:
sets
i index of resource location /i1*i6/
j index of disaster location /j1*j7/
;
...
binary variable x(i,j);
parameter
M(j) /j1 5,j2 4,j3 6,j4 7,j5 6,j6 2,j7 1/
ch(i) /i1 10,i2 5,i3 10,i4 15,i5 6,i6 12/
;
...
equations
...
co8(i)
;
co8(i)..M(j)=l=sum(j,ch(i)*x(i,j));
and co8(i)
give me the error 149 Uncontrolled set entered as constant.
I searched,but I did not find solution. How can I fix it?
thanks
Upvotes: 1
Views: 10620
Reputation: 2292
The j
in M(j)
is not controlled. So, it depends on what you want to do, how to fix this. E.g. if you want a sum over all j
, you should add that sum (sum(j,M(j))
). Or do you want this equation for every j
? Then adjust the declaration and definition accordingly.
Upvotes: 1