Mixed-Integer Linear Programming (MILP) is an optimization method that minimizes (or maximizes) a linear objective function subject to a set of linear equality and inequality constraints, where a subset of the decision variables are restricted to take only integer values. This integrality constraint allows the model to capture discrete, yes-or-no decisions—such as whether to open a warehouse, route a truck, or schedule a production batch—that are impossible to represent in purely continuous linear programming formulations.
Glossary
Mixed-Integer Linear Programming (MILP)

What is Mixed-Integer Linear Programming (MILP)?
A foundational operations research technique for solving complex decision problems where some choices are discrete and others are continuous.
MILP problems are solved using sophisticated algorithms, most commonly Branch and Bound, which systematically partitions the search space into subproblems while using linear programming relaxations to compute bounds that prune non-optimal regions. Advanced solvers integrate cutting-plane methods, presolve reductions, and heuristics to accelerate convergence. In autonomous supply chains, MILP is the computational engine behind Multi-Echelon Inventory Optimization, Vehicle Routing Problem (VRP) variants, and Job Shop Scheduling, enabling prescriptive analytics systems to recommend globally optimal operational actions rather than merely predicting outcomes.
Key Characteristics of MILP
Mixed-Integer Linear Programming (MILP) is defined by a specific set of mathematical properties that distinguish it from other optimization paradigms. These characteristics dictate its modeling power and computational complexity.
Linear Objective Function
The goal of a MILP is to minimize or maximize a single, linear objective function. This function is a weighted sum of decision variables, such as 3x + 2y - z. The linearity is a strict requirement; terms like x² or x*y are not permitted. This property ensures that the objective's contribution from each variable is constant and proportional, a key assumption that enables the use of powerful, convergent solution algorithms like branch-and-bound.
Linear Constraints
All restrictions on the decision variables must be expressed as linear equalities or inequalities. A typical constraint takes the form a₁x₁ + a₂x₂ ≤ b. This linearity defines a feasible region that is a convex polytope in the continuous space. The intersection of these linear constraints creates the search space where the optimal solution must reside, and the linearity guarantees that the optimal continuous solution will be at a vertex of this polytope.
Integrality Constraints
The defining feature of MILP is that some decision variables are restricted to integer values. These are the 'integer' variables in 'Mixed-Integer'. Common restrictions include:
- Binary variables:
x ∈ {0, 1}, used to model yes/no decisions like facility location or task assignment. - General integers:
y ∈ {0, 1, 2, ...}, used for counting discrete items like vehicles or batches. This integrality transforms the problem from a tractable Linear Program (LP) into a combinatorial one, making it NP-hard.
Separation of Continuous and Discrete Variables
A MILP model explicitly partitions its decision variables into two distinct sets:
- Continuous variables: Can take any real value within bounds, often representing flow rates, temperatures, or percentages.
- Integer variables: Restricted to discrete values, representing structural or logical decisions. This 'mixed' nature allows a single model to capture both the high-level strategic choices (discrete) and the fine-grained operational quantities (continuous) of a system, such as deciding which warehouses to open (integer) and how much product to ship from each (continuous).
Deterministic Data
A standard MILP formulation assumes that all input parameters—such as costs, demands, and resource capacities—are known with certainty at the time of solving. The model does not inherently account for uncertainty or variability in the data. This contrasts with Stochastic Optimization or Robust Optimization, which explicitly incorporate data uncertainty. In a deterministic MILP, the output is a single, optimal action plan contingent on the exact data provided.
Computational Complexity (NP-Hardness)
The addition of integer variables makes MILP a combinatorially explosive problem. It belongs to the class of NP-hard problems, meaning there is no known algorithm that can solve all instances in polynomial time. The computational effort can grow exponentially with the number of integer variables. Practical solvers use sophisticated techniques like the Simplex method for continuous relaxations, combined with branch-and-bound, cutting planes, and heuristics to close the optimality gap and find provably optimal solutions within a reasonable timeframe.
Frequently Asked Questions
Clear, concise answers to the most common questions about Mixed-Integer Linear Programming, from its core definition to its role in modern prescriptive analytics.
Mixed-Integer Linear Programming (MILP) is an optimization method that minimizes or maximizes a linear objective function subject to a set of linear constraints, where some decision variables are restricted to integer values while others can be continuous. It works by combining the Simplex Method for solving the continuous linear programming relaxation with sophisticated enumeration algorithms like Branch and Bound to enforce integrality. The solver first solves the problem as if all variables were continuous. If the optimal solution has fractional values for integer-constrained variables, the algorithm systematically partitions the problem into subproblems, creating a search tree. It uses the relaxed solution's objective value as a bound to prune unpromising branches, guaranteeing an exact optimal solution without exhaustively checking every integer combination. This mechanism allows MILP to model discrete decisions—like yes/no choices, on/off states, or countable quantities—within a continuous optimization framework.
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 Linear Programming (MILP) is a foundational technique within the broader field of prescriptive analytics. The following concepts are essential for understanding how MILP relates to other optimization and decision-making methodologies.
Linear Programming (LP)
The continuous relaxation of MILP where all decision variables are allowed to take fractional values. LP problems are solvable in polynomial time using the Simplex Method or interior-point methods. In a MILP context, solving the LP relaxation provides a lower bound (for minimization) that is critical for the Branch and Bound algorithm. If the LP relaxation solution happens to satisfy integrality constraints, it is optimal for the MILP.
Branch and Bound
The most common exact algorithm for solving MILPs to global optimality. It systematically partitions the feasible region by branching on fractional integer variables, creating subproblems. For each subproblem, the LP relaxation is solved to compute a bound. Subtrees are pruned when their bound is worse than the incumbent best integer solution, or when the subproblem is infeasible. Modern solvers enhance this with cutting planes, heuristics, and presolve routines.
Constraint Programming (CP)
A complementary paradigm to MILP that excels when constraints are logical or combinatorial rather than purely linear. CP uses constraint propagation and systematic search to reduce variable domains. While MILP relies on a linear objective and convex relaxations, CP handles non-linear constraints like all-different or cumulative natively. Hybrid MILP/CP approaches are increasingly used for complex scheduling and routing problems.
Heuristics and Metaheuristics
When MILP problems become too large for exact solvers, heuristic methods find good, but not provably optimal, solutions quickly. Key approaches include:
- Genetic Algorithms: Evolve populations of solutions via crossover and mutation
- Simulated Annealing: Probabilistically escape local optima by accepting worse solutions
- Large Neighborhood Search: Destroy and repair portions of a solution iteratively These are often embedded within MILP solvers as primal heuristics to find feasible integer solutions early.
Vehicle Routing Problem (VRP)
A canonical application domain for MILP. The VRP seeks optimal routes for a fleet of vehicles serving customers, minimizing total distance or cost. Standard MILP formulations use three-index or two-index vehicle flow models with subtour elimination constraints. Real-world variants add time windows (VRPTW), capacity limits (CVRP), and heterogeneous fleets. These problems are NP-hard, and MILP solvers are typically combined with column generation or decomposition for large instances.
Stochastic Programming
Extends MILP to handle uncertainty in parameters such as demand, costs, or yields. A two-stage stochastic MILP formulates a recourse problem: first-stage decisions are made before uncertainty is revealed, and second-stage decisions adapt after. The deterministic equivalent is a large-scale MILP over multiple scenarios. This contrasts with Robust Optimization, which immunizes against worst-case realizations within an uncertainty set rather than optimizing expected value.

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