Hi,
I’m trying to create a constraint over a period of 28 days for a number of agents. I have a binary variable y(i,l) i - agent l - day, indicating wether agent i works on day l or not. I want to add a constraint that ensures that the least number of days is 2. Is there anyone who could help me please?
Im trying to do it like this for now (just to give you an idea of what I’m trying to accomplish):
CONSECWORKDAYSMINFIRST(I,L) … Y(I,“2”)(Y(I,"1") = 1) =E= 1; CONSECWORKDAYSMIN(I,L) .. Y(I,L)(Y(I,L-1) = 0 AND Y(I,L+1) = 0) =E= 0;
Im working with an minlp solver and I’m not allowed to use the if operator in a constraint on non-pre-set variables.