Page 1 of 1

How can I connect two indexs (i1,i2) and then put it in GAMS coding?

Posted: Tue Dec 27, 2022 5:38 pm
by Agustino
:D

Re: How can I connect two indexs (i1,i2) and then put it in GAMS coding?

Posted: Wed Dec 28, 2022 8:34 am
by bussieck
1) Use an alias (https://www.gams.com/latest/docs/UG_Set ... mesForASet): alias (i,i1,i2). Declare everything with i and use it in the algebra as needed.
2) Use not sameas(i1,i2) (https://www.gams.com/latest/docs/UG_Con ... eywdSameas) in a $ condition (https://www.gams.com/latest/docs/UG_Con ... rCondition): sum((j,i1,i2)$(not sameas(i1,i2)), ...)

-Michael

Re: How can I connect two indexs (i1,i2) and then put it in GAMS coding?

Posted: Wed Jan 25, 2023 10:51 am
by Agustino
Thank a lot 😇