I am trying to sum over a subset between $t+1$ and $t+U-1$ as follows $$y_i^t+\sum_{k=t+1}^{t+Ut_i-1}z_i^k\le1$$ but I could not define the condition within sum
.
Here is what I have tried:
y(i,t) + sum(t $(ord(t)=t+1 and ord(t)<= t+gendata(i,"U")-1) ,z(i,j)) =l= 1;
sum((j)$ (ord(j)>= LB AND ord(j)<= UB, ...)
. I recommend that first defining a global set on the planning horizon,set t /1...T/
, thenalias
that by other index like $k$. $\endgroup$