I have an equality constraint like z(Ax-y)=0, where z>=0 ,and x is binary variable, and y is bounded variable Lx<=y<=Ux. How can it be linearized? Thanks in advance.
asked
zun |

If \(y_1\),\(y_2\) are binary and \(M\) is enough big then linear constraints are as follows. \[\begin{cases} & -M\cdot y_1 & \leq z &\leq M\cdot y_1 \\ & -M\cdot y_2 & \leq A\cdot x - y &\leq M\cdot y_2 \\ & y_1+y_2 & \leq 1 & \end{cases}\]
answered
Slavko |

We create constraints that exlude the possibility that both are non-zero. We have two cases, x=0 or x=1. If z is bounded by M it can be done by adding the constraint z<=M(1-x) If x=0 then we have no requirements on z, and as x=0 imply L If x=1 we obtain z<=M(1-1)=0 so z=0 as we had z>=0. This also implies z(Ax-y)=0. So if the constraint is included the equality constraint is satisfied.
answered
RuneR |