Over a predefined set S /s1*s100/ I need to write something like this M_s - M_shat =g= 0 , where (shat) is any other element in the set (S) except the element (s). How can I do that in GAMS? Thanks.
Asked
Active
Viewed 481 times
1 Answers
1
You could use an alias set and a conditional with the SameAs operator.
Alias(S,SS);
E_M(s,ss)$(not SameAs(s,ss)).. M(s) - M(ss) =G= 0;

Martin Bonde
- 536
- 3
- 11
-
Thanks @Martin for your prompt reply, I'm new in GAMS that is why sometimes I miss such that basic ideas .... Thanks again – Amedeo Mar 25 '17 at 13:23