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.
Glossary
Mixed Integer Programming (MIP)

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
| Feature | Mixed 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 |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Mixed Integer Programming (MIP) is a foundational exact solver, but it operates within a broader ecosystem of heuristics, problem variants, and real-world constraints. Explore the key concepts that complement MIP in last-mile delivery optimization.
Multi-Objective Optimization
Real-world logistics rarely optimizes a single metric. Multi-objective MIP models simultaneously balance conflicting goals:
- Minimize total distance driven
- Maximize on-time delivery percentage
- Minimize fleet size utilized Solutions are evaluated on the Pareto frontier, where improving one objective necessarily degrades another. Techniques like weighted-sum scalarization or epsilon-constraint methods convert these into solvable single-objective MIPs.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us