GAMS summation Topic is solved

Problems with modeling
Post Reply
rejinsr037
User
User
Posts: 8
Joined: 1 month ago

GAMS summation

Post by rejinsr037 » 1 month ago

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

User avatar
Renger
Posts: 360
Joined: 2 years ago

Re: GAMS summation

Post by Renger » 1 month 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: The lazy economist

rejinsr037
User
User
Posts: 8
Joined: 1 month ago

Re: GAMS summation

Post by rejinsr037 » 1 month ago

THANK YOU :D :)

Post Reply