GAMS summation Topic is solved

Problems with modeling
Post Reply
rejinsr037
User
User
Posts: 8
Joined: 4 years ago

GAMS summation

Post by rejinsr037 »

123.PNG
123.PNG (6.19 KiB) Viewed 3375 times
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: GAMS summation

Post by Renger »

Hi

Code: Select all

sum(t$(t.val > 2 and t.val<6), Y(i,r,t)
or, if the set consists of strings /a1*a6/;:

Code: Select all

sum(t$(ord(t) > 2 and ord(t)<6), Y(i,r,t);
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
rejinsr037
User
User
Posts: 8
Joined: 4 years ago

Re: GAMS summation

Post by rejinsr037 »

THANK YOU :D :)
Post Reply