Hi,
I would like to define a variable on a set that varies based on another set:
x is my variable that depends on the generator g and on the discretization index q: x(g,q)
q takes values from 1 to n, where n is based on the generator g considered.
For example:
2 generators: set G /A,B/;
For generator A, q has to take values from 1 to 2
For generator B, q has to take values from 1 to 4.
Therefore, I want to define variables x(A,1), x(A,2), x(B,1), x(B,2), x(B,3), x(B,4).
Of course, I can define variables x(g,q) with Set Q/1*4/; and then add a constraint that constraints x(A,3) and x(A,4) to be null but in my real example I am trying to have less binaries as possible for computational reasons.
How to define this kind of variable on GAMS? I was thinking of dynamic sets but without any results.
Could you help me, please?
Best,
Martina