I have 4 variables. Xl6, Xs6, Pl6, Ps6. I have a constant C as well.
Xl6 and Xs6 are binary whereas Pl6 and Ps6 are integers. Also, all variables can take only positive values.
I have to implement following constraints in an MIP:
If Xl6 == 0 then Pl6 == 0 else Pl6 > 0
If Xs6 == 0 then Ps6 == 0 else Ps6 > 0
Another set of if-else constraints are:
if Xl6 == 1 and Xs6 == 1 then Pl6 + Ps6 >= C
elif Xl6 == 1 and Xs6 == 0 then Pl6 >= C
elif Xl6 == 0 and Xs6 == 1 then Ps6 >= C
Also, we have another constraint that Xl6 and Xs6 both can't be zero at the same time
. This has been implemented as Xl6 + Xs6 >= 1
.
How can we formulate above set of conditions as linear constraints?