Big-M Constraints: Linking Binary to Continuous Variables
How to use a Big-M coefficient to make a binary indicator variable switch a continuous decision variable on or off in an integer program. Covers the basic linking constraint x ≤ My, choosing the tightest valid M, forcing a minimum activity level when the indicator is on, and combining lower and upper linking constraints.
Tutorial
The Big-M Linking Constraint
In integer programming, a binary indicator often controls whether a continuous variable is allowed to take a positive value at all. We want
- may take any value up to its natural upper bound.
A single linear inequality accomplishes this. If is a constant at least as large as the largest possible value of then the Big-M linking constraint
does the job:
- When the constraint becomes Combined with this forces
- When the constraint becomes which is exactly the natural upper bound on
For example, if a factory can produce at most units when running, set and write With the factory produces nothing; with it may produce anywhere from to units.