Error 149 uncontrolled set entered as constant Topic is solved

Problems with syntax of GAMS
Post Reply
silence
User
User
Posts: 19
Joined: 4 years ago

Error 149 uncontrolled set entered as constant

Post by silence »

Hi,I want to build a model of Optimizing valve control,one of equations is to promise that the continuous opening time is equal to emptying time at least。But I meet error 149,please help me how to correct it?
Thanks

Code: Select all

sets
i detention reservoir /Jinlong,Chiao,Shijing,Shangyang/
t time /0*23/
;
Parameters
ton(i) how long to dry the reservoir (hour)
/Jinlong = 7,
 Chiao = 4,
 Shijing = 6,
 Shangyang = 5
/
;
binary variables
qiBiZhangtai(i,t) on or off
kaiFaDongZuo(i,t)  when to turn on
;
Equations
  Lianxuxing(i)
 ;
 Lianxuxing(i)..
sum(t$(ord(t)<=ton(i)),kaiFaDongZuo(i,t)) + sum(t$((ord(t)>=ord(t)-ton(i)+1)and(ord(t)>ton(i))),kaiFaDongZuo(i,t)) =l= qiBiZhangtai(i,t)
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Error 149 uncontrolled set entered as constant

Post by bussieck »

Your equation is controlled by i only. Your right hand side has a symbol (qiBiZhangtai) indexed by i and t. What t?

-Michael
Post Reply