Dealing with big-M constraints
Dealing with big-M constraints
Big-M constraints are a regular source of instability for optimization
problems. They are so named because they typically involve a large
coefficient that is chosen to be larger than any reasonable value
that a continuous variable or expression may take. Here's a simple
example:

Big-M constraints are typically used to propagate the implications of a binary, on-off decision to a continuous variable. For example, a big-M might be used to enforce the condition that an edge can only admit flow if you pay the fixed charge associated with opening the edge, or a facility can only produce products if you build it. In our example, note that the








However, if the modeler has additional information that the
variable will never be larger than
, then you could reformulate
the earlier constraint as:

And now,


For cases when it is not possible to either rescale variable
or tighten its bounds, an SOS constraints or an indicator constraint
(of the form
) may produce more accurate
solutions, but often at the expense of additional processing time.