Mixed-Integer Programming — Exact optimization over continuous and integer decisions

Decision Sciences
Introduced by
Ralph Gomory (branch-and-bound cuts, 1958); Land & Doig (branch-and-bound, 1960)
Year
1958–1960
Type
Mathematical optimization
Family
Simulation / optimization

What does it do?

Mixed-Integer Programming (MIP) is a mathematical optimization framework in which some decision variables must take integer values, while others may be continuous.

It extends linear programming and is used in operations research, logistics, scheduling, resource allocation and engineering design, wherever indivisible quantities such as yes/no decisions or whole-unit counts appear in the model. Solution methods are typically exact, or they certify how far the returned solution can be from the optimum.

The intuition behind the method

Many decisions cannot be split: a facility is either opened or not, a worker is either assigned to a shift or not, an order is placed in whole units. Plain linear programming ignores this and can return fractional answers that cannot be implemented. MIP enforces integrality in the model itself. Solvers usually apply branch-and-bound: they solve continuous relaxations to bound the best objective value reachable in each region of the search, discard regions whose bound cannot beat the best integer-feasible solution found so far (the incumbent), and often add cutting planes that tighten the relaxation. When the search finishes, or stops within a chosen gap tolerance, the incumbent is returned together with the bound it was compared against.

History

The foundations of integer programming were laid by Ralph Gomory, who introduced the cutting-plane method in 1958, and by Land and Doig, who formalized branch-and-bound in 1960. Subsequent decades saw the development of LP relaxation theory, polyhedral combinatorics (Edmonds, Padberg, Grötschel), and by the 1990s commercial solvers made large-scale MIP practical. The field is comprehensively treated in Nemhauser and Wolsey (1988) and Wolsey (1998).

When to use it

Choose MIP when the objective and constraints are linear, or can be linearised without losing the structure that matters, and some decisions are genuinely discrete, as in facility location, crew scheduling, capital budgeting, network design or cutting-stock problems. It is the appropriate choice when a proven optimum or a certified gap matters for the decision, and when the instance remains tractable for the available solver after formulation. Do not use MIP when the objective or constraints are inherently nonlinear and cannot be linearised (mixed-integer nonlinear programming is the relevant class then), when the instance is so large that exact search is impractical (consider heuristics or metaheuristics), or when the integer restrictions do not materially change the answer and linear programming is accurate enough and faster. The standard model assumes that all coefficients and right-hand sides are known and deterministic, that the objective and constraints are linear after any linearisation, that the variables and constraints capture the decision accurately, and that the model admits at least one feasible solution. If the data are uncertain, the stochastic mixed-integer programming approach (see the related page) is the relevant extension.

Limitations and considerations

  • In the worst case the problem is NP-hard, so solve time can grow exponentially with the number of integer variables.
  • Solve time depends strongly on the formulation: two models of the same problem can produce very different search trees if their LP relaxations differ in tightness.
  • Nonlinear terms such as products of two decision variables must be linearised, which adds variables and constraints, or be handled by a separate MINLP solver that is harder to run.
  • Standard LP sensitivity information such as dual values and ranges does not carry over directly to integer variables, so what-if analysis usually means re-solving the model with changed data.
  • Commercial solvers can be costly, although open-source solvers exist and may behave differently on hard instances.
  • The optimum is only as meaningful as the model: an incorrect constraint produces a precise but wrong plan.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Returns a feasible solution together with a certified optimality gap, so solution quality can be stated explicitly rather than assumed.
  • Represents binary and general integer variables directly, so yes/no choices, minimum batch sizes and logical either-or conditions can be written without ad hoc workarounds.
  • Modern solvers such as Gurobi, CPLEX and SCIP combine branch-and-bound, cutting planes and presolve, which makes many moderate-sized industrial instances tractable.
  • The model is an explicit list of variables, constraints and objective, so domain experts can check each assumption against the real problem.
  • Modelling languages such as AMPL, GAMS, Pyomo and JuMP allow the same formulation to be passed to different solvers.

Applications

  • Supply chain and logistics: vehicle routing, facility location, and inventory optimization with integer shipment quantities.
  • Workforce scheduling: nurse rostering, crew assignment, and shift planning with binary assignment variables.
  • Capital budgeting: selecting a portfolio of indivisible investment projects subject to budget constraints.
  • Telecommunications and network design: capacity expansion and routing with binary link-activation decisions.
  • Energy systems: unit commitment in power grids deciding which generators to switch on or off each hour.
  • Manufacturing: production lot-sizing, machine scheduling, and cutting-stock problems with integer batch sizes.

How it works

How it works

1

Write the model as a linear objective over continuous variables x and integer variables y, subject to linear constraints Ax + By ≤ b, as in the formulation above. Continuous variables represent quantities that may be fractional; integer and binary variables represent discrete decisions such as whether a facility is opened. Some texts write the constraints in the equivalent form Ax + By ≥ b, and the standard reference (Numerical Methods in Finance and Economics, p. 565) uses the letter D for the second coefficient matrix. The two sign conventions are interchangeable by multiplying the corresponding rows by −1; this page keeps Ax + By ≤ b throughout.

Formula
\min_{x,y}\; c^\top x + d^\top y \quad \text{s.t.}\; Ax + By \leq b,\; x \geq 0,\; y \in \mathbb{Z}^p
2

Drop the integrality requirement on y and solve the resulting linear program. For a minimisation problem its optimal value is a lower bound on the MIP optimum, and its solution may be fractional. For binary variables the relaxation keeps the upper bound of 1 as well as nonnegativity.

Formula
\text{LP relaxation: replace } y \in \mathbb{Z}^p \text{ with } y \geq 0
3

Pick an integer variable that takes a fractional value in the relaxation solution. Create two subproblems: one adds an upper bound equal to the rounded-down value, the other a lower bound equal to the rounded-up value. Together they cover every integer-feasible point, so no feasible integer solution is lost.

Formula
\text{Select fractional } y_j^*; \text{ create subproblems: } y_j \leq \lfloor y_j^* \rfloor \text{ and } y_j \geq \lceil y_j^* \rceil
4

Solve the relaxation of each subproblem. If its bound is no better than the incumbent, prune the node. If its solution already satisfies integrality and improves the incumbent, record it as the new incumbent.

Formula
\text{Prune node if LP bound} \geq \text{incumbent; update incumbent when integer-feasible solution found}
5

Optionally add valid inequalities that remove the current fractional relaxation solution while keeping every integer-feasible point. Gomory cuts are the classical example; problem-specific families such as clique and flow cuts can, in suitable models, reduce the size of the search tree considerably.

Formula
\text{Add Gomory or problem-specific cutting planes to tighten LP relaxation before branching}
6

Stop when every node has been pruned or solved, or when the difference between the incumbent and the global bound is within a tolerance set by the user. Return the incumbent with the bound and gap achieved. A tighter tolerance generally means a longer search. If a time or gap limit stops the search first, the returned incumbent is not guaranteed to be optimal; report it together with its bound and gap rather than as the optimum. An infeasible status means that no integer-feasible point satisfies the constraints, which often points to conflicting constraints or a modelling error. An unbounded status often means that a variable or direction in the model lacks a bound or constraint.

Formula
\text{Stop when all nodes pruned; return incumbent } x^*, y^* \text{ with optimality gap} \leq \epsilon

Common pitfalls

  • Setting the optimality gap tolerance too tight can keep the solver running for a long time on large instances; choose the tolerance from the needs of the decision and check the gap reported at termination.
  • Symmetric structures, such as interchangeable facilities or identical machines, create equivalent branches that inflate the search tree; symmetry-breaking constraints can remove them.
  • A weak LP relaxation (a large integrality gap) forces a deep search tree; adding valid inequalities or reformulating the model often helps more than faster hardware.
  • Declaring every variable integer when only some need it increases solve effort; restrict integrality and use binary variables only where the logic requires them.
  • Ignoring warm-starting with a known good feasible solution makes the solver spend time finding the first incumbent, which delays the pruning that the incumbent enables.

Frequently asked questions

How is MIP different from linear programming (LP)?

LP requires all decision variables to be continuous (real-valued), which can yield fractional solutions that are physically infeasible (e.g., 2.7 trucks). MIP adds integrality constraints on some or all variables, enforcing whole-number or binary solutions at the cost of greater computational complexity.

When should I use a heuristic instead of MIP?

When the problem has very many variables, highly nonlinear structure, or requires a near-real-time solution, exact MIP may be too slow. Metaheuristics (genetic algorithms, simulated annealing) can produce good solutions quickly, but without optimality guarantees. MIP is preferred when certification of solution quality matters.

What is the optimality gap and how small should it be?

The gap compares the objective value of the best integer-feasible solution found (the incumbent) with the best bound on the optimum proven by the search at termination, and is usually reported as a percentage. The exact formula depends on the solver, for example on which quantity is used as the denominator, so the value to use is the one reported in the solver log at termination. The gap indicates how far the returned solution can be from the true optimum. The acceptable tolerance depends on the application; tighter tolerances generally require substantially more solver time.

Can MIP handle nonlinear objectives or constraints?

Standard MIP assumes linearity. Nonlinear relationships must be linearised (e.g., piecewise-linear approximation, binary expansion of products) or handled by mixed-integer nonlinear programming (MINLP) solvers, which are significantly harder to solve.

Which solvers are recommended for MIP?

Commercial: Gurobi and CPLEX are the industry benchmarks. Open-source: SCIP, CBC (via COIN-OR), and HiGHS are competitive for moderate-sized problems. All support standard modelling interfaces such as AMPL, Pyomo, and JuMP.

Related methods

Sources

  1. Nemhauser, G. L., Wolsey, L. A. (1988). Integer and Combinatorial Optimization. Wiley-Interscience, New York.

    ISBN: 9780471359432
  2. Wolsey, L. A. (1998). Integer Programming. Wiley-Interscience, New York.

    ISBN: 9780471283669
  3. Numerical Methods in Finance and Economics: A MATLAB-Based Introduction, p. 565