Hello,
i want to define the set q {a+1,…,a+b(c)} with the set a /1*10/ and the parameter b(c) in GAMS.
How can I correctly formulate the set q in GAMS?
regards
Alchimist
Hello,
i want to define the set q {a+1,…,a+b(c)} with the set a /1*10/ and the parameter b(c) in GAMS.
How can I correctly formulate the set q in GAMS?
regards
Alchimist
Simplest approach:
set a /a1*a10/,q(a);
parameter howMany /4/;
q(a)=YES$(ord(a)<=howMany);
parameter someParameter;
someParameter(q)=1;
display a,q,someParameter;
If for some reason this doesn’t fit your scheme, there are other things to do.