Blog

What Is MILP? Mixed-Integer Linear Programming Explained

MILP (Mixed-Integer Linear Programming) solves optimization problems with integer and continuous variables. See how it works and how Gurobi solves it fast.

Blog

What Is MILP? Mixed-Integer Linear Programming Explained

MILP (Mixed-Integer Linear Programming) solves optimization problems with integer and continuous variables. See how it works and how Gurobi solves it fast.

Blog

What Is MILP? Mixed-Integer Linear Programming Explained

MILP (Mixed-Integer Linear Programming) solves optimization problems with integer and continuous variables. See how it works and how Gurobi solves it fast.

author

Gurobi Team

Gurobi Team

author

Gurobi Team

Gurobi Team

MILP, or mixed-integer linear programming, finds the best feasible decision when some choices must be whole numbers and others can vary continuously. This article uses MILP for the broad linear class with at least one integer-constrained variable; pure ILP is its all-integer special case. A MILP pairs a linear objective and constraints with continuous, integer, or binary variables. MILPs are by far the most common optimization model class in the real world.

A solver, such as Gurobi, combines algorithms such as presolve, relaxations, cutting planes, heuristics, and branch-and-bound to find feasible incumbents and bound possible improvement. When the incumbent and bound satisfy the configured relative or absolute gap criterion, no solution feasible for the stated model can improve the incumbent beyond that gap, subject to numerical tolerances.

In practice, solving a MILP means:

1. Define the decisions, objective, and rules.

2. Mark variables as continuous, integer, or binary, and set lower and upper bounds. For example, a yes/no decision is binary, while an amount decision could be integer (e.g. how many people, since a person shouldn't be cut in half), or continuous (e.g. money, liquids, or other things of that nature).

3. Run the solver, then validate the result against the real operation.

What is MILP?

Start Solving with Gurobi

Try Gurobi on your own optimization models and see how it performs on real decision problems.

Start Solving with Gurobi

Try Gurobi on your own optimization models and see how it performs on real decision problems.

Start Solving with Gurobi

Try Gurobi on your own optimization models and see how it performs on real decision problems.

Join our newsletter to stay up to date on features releases and more.

By subscribing you agree to with our Privacy Policy

© Gurobi Optimization, LLC. All Rights Reserved.

Join our newsletter to stay up to date on features releases and more.

By subscribing you agree to with our Privacy Policy

© Gurobi Optimization, LLC. All Rights Reserved.