Is it correct to rephrase your question that if V(i,j,t1) is 1, then for all t >= t1, n(i, j, t) is 1?
- I haven’t tested it myself but the logic is as follows.
if any V(i, j, t1) for t1<= t is 1, n(i, j, t1) is 1.
create a variable u(i, j, t) that will store if any v(i, j, t1) for t1<=t is 1. This can be done as follows.
for ord(t) not equal to 1.
u(i, j, t) =g= v(i, j, t);
u(i, j, t) =g= v(i, j, t-1);
u(i, j, t) =l= v(i, j, t) + v(i, j, t-1);
for ord(t) equal to 1.
u(i, j, t) =e= v(i, j, t);
Now we can use u(i, j, t) to define n(i, j, t)
we need the following constraint.
-
con1(i, j, t).. n(i, j, t) =g= 1 - M*(1 - u(i, j, t));
-
con2(i, j, t).. n(i, j, t) =l= M*u(i, j, t);
first constraint is needed to make sure if u(i, j, t) is 1 n(i, j, t) is 1. Second constraint is needed to ensure that if u(i, j, t) is 0 then n(i,j,t1) is 0.