How can I use IF with looping in GAMS?

Problems with modeling
Post Reply
Agustino
User
User
Posts: 7
Joined: 1 year ago

How can I use IF with looping in GAMS?

Post by Agustino »

Hi! I am a beginner level in this program. I try to improve this loop according to this condition. The details are as follows:
image.png
When CUTI(k) = CUTI(k)-4 then,
If the result shows this CUTI(k) value greater than 0, then print this CUTI(k) value.
If the result shows CUTI(k) value less than 0, then print this CUTI(k) value is added 12 with showing a word "But last year" in display, e.g. 10 But last year

I am not sure this loop is correct and enough to add this condition. Look forward to seeing your recoomendation. :)
Post Reply