As discussed here, the min function, i.e $X = \min\{x_1,x_2\}$, can be linearized as follows:
\begin{align} X & \le x_1 \\ X & \le x_2 \\ X & \ge x_1 - M(1-y) \\ X & \ge x_2 - My. \end{align} In this way, when $x_1<x_2$ then the binary variable $y$ is equal to $1$. However, when $x_1>x_2$ then $y=0$. Nevertheless, for $x_1==x_2$, the binary variable y can either take $0$ or $1$ (free). How can I force $y$ also to be equal to $1$ for $x_1==x_2$ in the above linearization?
In this way, the first 4 constraints entitle X to be the min(x1,x2). Also, for x1>x2, z =1 and for x1<x2, z=0. Moreover, the last constraint forces y to be zero for x1=x2 as well (Not free anymore). Indeed, z is one's complement of the
– SAH Sep 11 '20 at 07:23yin the original question. In my problem, x2 is constant and all variables X,x1, are non-negative. I am not sure if it does anything to do with it. @robpratt