Consider the following optimization problem \begin{equation*} \begin{split} \text{min} & \sum_{j\in J} c_jx_j \\ & \quad \sum_{j\in J} a_{1j}x_j \leq b_1 \\ & \quad \sum_{j\in J} a_{2j}x_j \leq b_2 \\ & \quad x_j \geq 0 \quad \forall j\in J \end{split} \end{equation*} It is well known that, if we need to impose that just one of these two constraints must be satisfied, then we can use introduce a binary variable $y\in\{0,1\}$ and two upper bounds $M_1$ and $M_2$ so that \begin{equation*} \begin{split} \text{min} & \sum_{j\in J} c_jx_j \\ & \quad \sum_{j\in J} a_{1j}x_j \leq b_1 + M_1y\\ & \quad \sum_{j\in J} a_{2j}x_j \leq b_2 +M_2(1-y)\\ & \quad x_j \geq 0 \quad \forall j\in J \end{split} \end{equation*}
Imagine that, in the initial problem, the constraints are equalities, that is to say, \begin{equation*} \begin{split} \text{min} & \sum_{j\in J} c_jx_j \\ & \quad \sum_{j\in J} a_{1j}x_j = b_1 \\ & \quad \sum_{j\in J} a_{2j}x_j = b_2 \\ & \quad x_j \geq 0 \quad \forall j\in J \end{split} \end{equation*} How can we impose that just one of these constraints holds with binary variables?
Any help would be appreciated.
You can do this by reformulating each equality constraint as two inequality constraints: \begin{align} & \quad \sum_{j\in J} a_{1j}x_j \leq b_1 +M_1y \\ & \quad \sum_{j\in J} a_{1j}x_j \geq b_1 -M_1y \\ & \quad \sum_{j\in J} a_{2j}x_j \leq b_2 +M_2(1-y) \\ & \quad \sum_{j\in J} a_{2j}x_j \geq b_2 -M_2(1-y) \end{align}