Hi everyone,
I am using intlinprog to solve an optimization problem where I have to define 24 real values P1, P2, .... P24 (zero or positive, limited by a real upper bound).
These P values are variables of the intlinprog (with other binary variables and other stack variables used for other purposes) and the optimizer can decide to keep the same value for consecutive instants or change (increase or decrease).
I need to implement constraints which define abs(Pi+1 - Pi) >= 1000, while keeping the possibility that Pi+1 can be also = Pi.
I have tried to implement 4 kind of constraints by binary variables b and big M, but it doesn't work. I copy here the structure.
it is clear that if bi = 1, first and second constraints cannot be respected at the same time.
Please help me to find a way:
I need the constraints to allow to have (Pi+1 = Pi) or (Pi+1~=Pi) with a limit on minimum delta in the second case.
Thanks a lot.