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*}
Now, imagine that we wish that just one of the following sets of constraints \begin{equation*} \left\{\sum_{j\in J} a_{ij}x_j \leq b_i, \quad i\in I\right\}, \quad \left\{\sum_{j\in J} a_{kj}x_j \leq b_k, \quad k\in K\right\}, \end{equation*} with $I\cap K = \emptyset$ is satisfied. How can we formulate the optimization problem?
Any help would be appreciated.
You can modify your special case of $|I|=|K|=1$ to obtain the following formulation of the general case: \begin{align} \sum_{j\in J} a_{ij}x_j &\le b_i + M_i y &&\text{for $i\in I$}\\ \sum_{j\in J} a_{kj}x_j &\le b_k + M_k(1-y) &&\text{for $k\in K$} \end{align}