Inferensys

Glossary

Mixed Integer Programming (MIP)

An exact optimization method where some decision variables are constrained to be integers, used to mathematically formulate and solve routing problems.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
EXACT OPTIMIZATION

What is Mixed Integer Programming (MIP)?

Mixed Integer Programming (MIP) is a mathematical optimization technique where some decision variables are constrained to take only integer values, enabling the precise formulation of discrete-choice problems like vehicle routing.

Mixed Integer Programming (MIP) is an exact optimization framework that models problems where some decision variables must be integers (e.g., number of trucks, binary stop/visit decisions) while others remain continuous (e.g., fuel load). This mathematical structure directly captures the discrete, combinatorial nature of last-mile delivery optimization, where a vehicle either visits a stop or it doesn't—there is no fractional solution. MIP solvers use algorithms like branch-and-bound and cutting planes to systematically search for a provably optimal solution.

In logistics, MIP formulates the Vehicle Routing Problem (VRP) as a set of linear constraints defining vehicle capacities, time windows, and route continuity. The solver iteratively tightens bounds on the objective—typically minimizing total distance or cost—until it converges on the optimal integer assignment. Unlike heuristics such as Simulated Annealing, MIP guarantees global optimality, making it the gold standard for high-stakes planning where even a 1% cost reduction represents significant value.

FOUNDATIONAL OPTIMIZATION

Key Characteristics of MIP

Mixed Integer Programming (MIP) is a powerful exact optimization framework where some decision variables are constrained to be integers, enabling the mathematical formulation and solution of complex combinatorial problems like vehicle routing.

01

Discrete Decision Variables

The defining feature of MIP is the ability to model yes/no or countable decisions. Integer variables represent indivisible entities like vehicles, drivers, or stops. A binary variable (0 or 1) can indicate whether a specific vehicle traverses a specific arc in a route. This contrasts with Linear Programming (LP), where fractional solutions are allowed. Without integer constraints, an LP might suggest assigning 0.7 of a truck to a route, which is physically impossible. MIP enforces logical, real-world feasibility.

02

Branch-and-Bound Algorithm

The primary exact algorithm for solving MIPs. It systematically partitions the problem into smaller subproblems (branching) and solves their LP relaxations. Key mechanics:

  • Relaxation: Temporarily ignore integer constraints to get a lower bound (for minimization).
  • Pruning: Discard a branch if its bound is worse than the current best integer solution.
  • Incumbent: The best feasible integer solution found so far. This creates a search tree, efficiently eliminating vast regions of the solution space without explicit enumeration.
03

Cutting Planes

A complementary technique to branch-and-bound that tightens the LP relaxation. Cuts are additional linear constraints added to the formulation that are redundant for integer solutions but slice off fractional regions of the feasible space. For example, in a VRP, a subtour elimination constraint prevents a solution where a vehicle visits a small cluster of customers without connecting to the depot. Modern solvers use a branch-and-cut framework, dynamically generating cuts at each node of the search tree.

04

Objective Function & Constraints

A MIP model is defined by three components:

  • Objective Function: A linear expression to minimize (e.g., total travel distance, cost) or maximize.
  • Constraints: Linear inequalities or equalities defining the feasible region (e.g., vehicle capacity limits, time window adherence).
  • Variable Bounds: Domains for each variable (e.g., binary, integer, continuous). The art of MIP formulation lies in translating a real-world logistics problem into this precise mathematical structure. A tighter formulation with a smaller integrality gap solves significantly faster.
05

Optimality Gap & Solver Tolerance

For large-scale problems, proving absolute optimality can be computationally prohibitive. Solvers track the optimality gap: the relative difference between the best integer solution found (incumbent) and the best remaining theoretical bound. A solver is typically stopped when this gap falls below a set tolerance (e.g., 1%). This provides a provable guarantee on solution quality—a key advantage over heuristic methods like Genetic Algorithms, which offer no such mathematical warranty on how close a solution is to the true optimum.

06

Commercial vs. Open-Source Solvers

The performance of MIP models is heavily dependent on the underlying solver engine.

  • Commercial: Gurobi and IBM CPLEX are industry leaders, offering highly optimized presolve routines, heuristics, and parallel branch-and-cut implementations. They often solve problems orders of magnitude faster.
  • Open-Source: SCIP and HiGHS provide robust alternatives, with SCIP excelling in constraint integer programming. Solver selection is a critical architectural decision, balancing licensing cost against the required solve time for operational deployment in real-time routing systems.
OPTIMIZATION METHODOLOGY COMPARISON

MIP vs. Metaheuristics for Routing

A technical comparison of exact Mixed Integer Programming against heuristic and metaheuristic approaches for solving vehicle routing and last-mile delivery problems.

FeatureMixed Integer Programming (MIP)Genetic Algorithm (GA)Adaptive Large Neighborhood Search (ALNS)

Solution Quality

Provably optimal (gap = 0%)

Near-optimal, no guarantee

Near-optimal, no guarantee

Optimality Gap

0.0%

1-5% typical

0.5-3% typical

Solve Time (100 stops)

Seconds to minutes

Seconds

Seconds

Solve Time (1000+ stops)

Hours to intractable

Minutes

Minutes

Constraint Handling

Warm Start Capability

Deterministic Output

Real-Time Re-Optimization

MIP FUNDAMENTALS

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Mixed Integer Programming and its role in solving complex last-mile delivery optimization problems.

Mixed Integer Programming (MIP) is an exact mathematical optimization technique where some decision variables are constrained to take only integer values while others can remain continuous. It works by defining an objective function (such as minimizing total delivery cost) subject to a set of linear constraints (vehicle capacity, time windows, depot locations). The solver systematically explores the solution space using algorithms like Branch-and-Bound and Cutting Planes to find the provably optimal solution. Unlike heuristics, MIP guarantees global optimality, making it the gold standard for high-stakes routing decisions where even a 1% cost reduction translates to millions in savings.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.