GAMS Sum over a subset Topic is solved

Problems with syntax of GAMS
Post Reply
scouser_s
User
User
Posts: 8
Joined: 4 years ago

GAMS Sum over a subset

Post by scouser_s »

I have the following sets, variables, and parameters in a GAMS model.
image.png
Any help is much appreciated.
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: GAMS Sum over a subset

Post by Renger »

Hi
You can use a condition to sum:

Code: Select all

sum(t$(t.val < h.val+1), ...)
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
scouser_s
User
User
Posts: 8
Joined: 4 years ago

Re: GAMS Sum over a subset

Post by scouser_s »

Thank you!
Post Reply