I’m new to GAMS and since last few days I’m trying code an equation but finding it difficult to do so. In the equation j is an element which belong to intersection of 2 multidimensional sets i.e. JP(jp) and JS(js). Below I’m attaching an image of the equation.
Also, the code that I have developed for the above equation is as follows:
Constraints8(s,p).. sum(j,Y(s,j,p)) =e= 1;
Please help if you know how to code this thing. It would be really helpful. Thanks.
Not sure if it is relevant, but I also note that your equation is defined over p^in _p. If this is by any chance a subset of set P, you can define it as
set
p_in(p);
and then assign relevant elements to it.
Hope this helps!
Thanks a lot for your suggestions, it worked. Also, I forgot to mention that P^in(P) is a subset of P but you have already assumed it correctly. Thank you for helping me out.