GAMS summation Topic is solved

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

GAMS summation

Post by rejinsr037 » 4 months ago

123.PNG
123.PNG (6.19 KiB) Viewed 306 times

User avatar
Renger
Posts: 406
Joined: 3 years ago

Re: GAMS summation

Post by Renger » 4 months ago

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 months ago

Re: GAMS summation

Post by rejinsr037 » 4 months ago

THANK YOU :D :)

Post Reply