helle,community.
i’m a beginner in gams,please give me ideas.
i want to use an expression as a subscript for binary variables.
Some of the formulas to calculate are as follows:
ΣiΣp Σl wipl*zi<j+6-i>pl≦T (∀j)
Σlzijpl=yjp (∀i,j,p)
itry this,
sets
i /1*6/
p /1*4/
l /0*5/
j /0*9/;
binary variables
y(j,p),z(i,*,p,l);
variables
T;
parameters
Wipl(i,p,l) /omitted/
n /10/
equations
total(j)
zy(i,j,p);
total(j)..sum((i,p,l),Wipl(i,p,l)*z(i,[color=#FF4000]((j+6-i)-n*((j+6-i)/n)[/color],p,l))=l=T;
zy(i,j,p)..sum(l,z(i,j,p,l))=e=y(j,p);
GAMS 24.9.2 r64480 Released Nov 14, 2017 WEX-WEI x86 64bit/MS Windows
There are many errors in the red part. An error($198) occurs even if the red part is a simple formula.