I need to formulate the following as linear constraints using binary variables. Can someone help me out? If A <= 3, then B >= 6, else B <= 4 (Assume A & B are integers) asked 17 Sep '15, 15:10 Shyam 
You want to model \[ (\underline{A} \le A \le 3 \text{ and } 6 \le B \le \overline{B}) \text{ xor } (4 \le A \le \overline{A} \text{ and } \underline{B} \le B \le 4) \] Let \(x=0\) correspond to the left half of the exclusive disjunction and \(x=1\) correspond to the right half. Here's a way to organize the needed constraints so that it is easy to visually check their correctness: \begin{align} 4x + \underline{A} (1x) \le &A \le \overline{A} x + 3 (1x) \\ \underline{B}x + 6 (1x) \le &B \le 4x + \overline{B}(1x) \end{align} answered 17 Sep '15, 17:58 Rob Pratt 
\begin{gather*} A \le 3 + \text{UB}(A) * x\\ B \ge 6  \text{LB}(B) * x\\ B \le 4 + \text{UB}(B) * (1  x)\\ x ~\textrm{binary} \end{gather*} answered 17 Sep '15, 15:39 fbahr ♦ Paul Rubin ♦♦ 1
I think you also need \(A \ge 4  LB(A)*(1  x)\). Otherwise \(A \le 3\) and \(B \le 4\) (with \(x = 1\)) satisfies the constraints.
(17 Sep '15, 18:12)
Paul Rubin ♦♦
