Hi,
I just started using GAMS and need help regarding following issue:
t /t1*t24/
b(t) is a binary variable.
Now I want the variable s(t) to count how many times in a row b has been = 1. It should reset when b turns 0 again. For example:
t b s
t1 0 0
t2 1 1
t3 1 2
t4 0 0
t5 1 1
t6 1 2
t7 1 3
t8 1 4
t9 0 0
...
Would be great if you could help me to find an equation which gives me s(t) as shown.
Thanks in advance!
