Hi there,
How can I use the sum function only from the second or later period (t=2) instead of all t? sum(t, periodutility(t))
Cheers
Sum function from t=2
Re: Sum function from t=2
Assuming that t is an orderd set (https://www.gams.com/latest/docs/UG_OrderedSets.html), you could use the ord operator:
I hope this helps!
Fred
Code: Select all
sum(t$(ord(t)>=2), periodutility(t))
Fred