Disjunctive Constraints via Big-M

Reformulate logical 'either-or' constraints as linear inequalities using a binary indicator variable and Big-M constants. Covers all sign combinations (\leq and \geq) and selection of the tightest Big-M value.

Step 1 of 157%

Tutorial

Disjunctions and the Big-M Reformulation

A disjunctive constraint requires that at least one of two linear constraints hold. A pure linear program only expresses conjunctions (every constraint must hold simultaneously), so a disjunction like

f1(x)b1ORf2(x)b2f_1(\mathbf{x}) \leq b_1 \quad \text{OR} \quad f_2(\mathbf{x}) \leq b_2

cannot be encoded directly. We introduce a binary indicator y{0,1}y \in \{0,1\} and large constants M1,M20M_1, M_2 \geq 0 that relax whichever constraint is deactivated:

f1(x)b1+M1(1y)f_1(\mathbf{x}) \leq b_1 + M_1(1-y) f2(x)b2+M2yf_2(\mathbf{x}) \leq b_2 + M_2 y y{0,1}y \in \{0,1\}

The indicator yy selects which constraint is active:

  • When y=1y = 1: the first reduces to f1(x)b1f_1(\mathbf{x}) \leq b_1 (active); the second becomes f2(x)b2+M2f_2(\mathbf{x}) \leq b_2 + M_2, which is redundant for M2M_2 large enough.
  • When y=0y = 0: the first is relaxed to f1(x)b1+M1f_1(\mathbf{x}) \leq b_1 + M_1; the second, f2(x)b2f_2(\mathbf{x}) \leq b_2, is enforced.

In either case, at least one of the original constraints holds.

For example, to enforce x1+x24x_1 + x_2 \leq 4 OR x1x21x_1 - x_2 \leq 1, we write

x1+x24+M1(1y)x_1 + x_2 \leq 4 + M_1(1-y) x1x21+M2yx_1 - x_2 \leq 1 + M_2 y y{0,1}.y \in \{0,1\}.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle