Code: Select all

```
Variable x(mth);
Scalar t(w);
binary variable (y(w,mon))
set i,w,mon;
alias (mon,mth);
....
Ver(i,w,mon).. ord(i)*t(w)-1+(M*Y(w,mon)) =G= sum( mth$(ord(mth) le ord(mon)) ,x(mth))
```

So let's say we have

y(1)=0, y(2)=1, y(3)=0, y(4)=1, y(5)=0

I would need the following sum to be in the equation

.... =G= x(1)+x(2)

.... =G= x(3)+x(4)

.... =G= x(5)

Obviously the equations would change with the y(mon).

Thanks a lot in advance!