Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在预定义的集合 S /s1*s100/ 上,我需要编写类似 M_s - M_shat =g= 0 的内容,其中 (shat) 是集合 (S) 中除元素 (s) 之外的任何其他元素。我怎样才能在 GAMS 中做到这一点?谢谢。
您可以将别名集和条件与 SameAs 运算符一起使用。
Alias(S,SS); E_M(s,ss)$(not SameAs(s,ss)).. M(s) - M(ss) =G= 0;