Skip to main content
← Back to M Definitions

Mixed integer programming

What Is Mixed Integer Programming?

Mixed integer programming (MIP) is a type of mathematical optimization that involves finding the best outcome (maximum or minimum value) of a function, subject to a set of constraints, where some or all of the decision variables are restricted to be integers. This distinguishes MIP from other optimization techniques within the broader field of mathematical optimization, as it allows for the modeling of discrete decisions, such as "yes/no" choices or countable quantities. Mixed integer programming problems are pervasive in finance, operations research, and various industries for making complex decisions under resource limitations.

History and Origin

The roots of mixed integer programming trace back to the mid-20th century, building upon the foundational work in linear programming. While pure integer programming problems appeared in ancient times, the formal development of integer programming, distinct from linear programming, gained significant traction after George B. Dantzig developed the simplex method for linear programming in 1947. Early contributions to integer programming include Ralph Gomory's work in 1958 on cutting plane algorithms. The concept of "Branch and Bound," a crucial algorithm for solving mixed integer programming problems, was introduced in 1963 by John Little, Katta Murty, Dura Sweeney, and Caroline Karel. The first commercially used mixed integer programming code based on branch-and-bound, "LP 90/94," was significantly influenced by the work of William Orchard-Hays. The field has since seen substantial theoretical and computational advancements, as detailed in "A Brief History of Optimization/Mathematical Programming" by INFORMS.org.6

Key Takeaways

  • Mixed integer programming (MIP) combines continuous and discrete decision variables in an optimization problem.
  • It is used to model real-world scenarios requiring "all or nothing" choices or countable units.
  • MIP problems are generally more computationally challenging to solve than pure linear programming problems.
  • Modern algorithms and software have made solving large-scale MIP problems feasible for diverse applications.
  • MIP is a powerful tool in quantitative analysis for optimizing complex systems and resource allocation.

Formula and Calculation

A general mixed integer programming problem can be formulated as follows:

Minimize/Maximize cTx+dTySubject to Ax+Byhx0y{0,1,2,}kxRn\begin{align*} \text{Minimize/Maximize } & \mathbf{c}^\text{T}\mathbf{x} + \mathbf{d}^\text{T}\mathbf{y} \\ \text{Subject to } & \mathbf{A}\mathbf{x} + \mathbf{B}\mathbf{y} \le \mathbf{h} \\ & \mathbf{x} \ge \mathbf{0} \\ & \mathbf{y} \in \{0, 1, 2, \dots\}^k \\ & \mathbf{x} \in \mathbb{R}^n \end{align*}

Where:

  • (\mathbf{x}) represents a vector of continuous decision variables.
  • (\mathbf{y}) represents a vector of integer decision variables, which may be binary (0 or 1) or general integers.
  • (\mathbf{c}) and (\mathbf{d}) are vectors of coefficients for the objective function.
  • (\mathbf{A}) and (\mathbf{B}) are matrices of coefficients for the constraints.
  • (\mathbf{h}) is a vector representing the right-hand side of the constraints.
  • (n) is the number of continuous variables.
  • (k) is the number of integer variables.

The goal is to find values for (\mathbf{x}) and (\mathbf{y}) that optimize the objective function while satisfying all constraints.

Interpreting the Mixed Integer Programming Solution

Interpreting the solution of a mixed integer programming problem involves understanding the optimal values assigned to both continuous and integer variables. The integer variables typically represent discrete choices or quantities. For instance, in a production planning problem, an integer variable might indicate whether a factory should be opened (1) or not (0), or how many units of a specific product to manufacture. The continuous variables might then represent the quantity of raw materials to use or the hours of labor. The solution provides the optimal combination of these discrete choices and continuous adjustments that maximizes profit or minimizes cost, for example. Understanding these outputs allows decision-makers to implement the most efficient plan based on the model's insights. It provides a prescriptive recommendation for action, moving beyond descriptive or predictive analytics.

Hypothetical Example

Consider a small investment firm aiming to maximize its expected return by allocating a fixed budget across several investment opportunities, some of which require an "all or nothing" commitment.

Scenario: The firm has $10 million to invest. There are three potential investments:

  1. Stock Portfolio A: Requires a minimum investment of $2 million (can invest more). Continuous variable. Expected return: 8%.
  2. Real Estate Project B: Requires an investment of exactly $3 million or $0. Integer (binary) variable. Expected return: 12%.
  3. Bond Fund C: Requires a minimum of $1 million (can invest more). Continuous variable. Expected return: 5%.

The firm also has a policy that if they invest in Real Estate Project B, they must also invest in Stock Portfolio A to diversify.

Formulation Elements:

  • Let (x_A) be the continuous amount invested in Stock Portfolio A (in millions $).
  • Let (y_B) be a binary variable for Real Estate Project B (1 if invested, 0 if not).
  • Let (x_C) be the continuous amount invested in Bond Fund C (in millions $).

Objective Function (Maximize Expected Return):
Maximize (0.08x_A + 0.12(3y_B) + 0.05x_C)

Constraints:

  1. Budget Constraint: (x_A + 3y_B + x_C \le 10) (Total investment must not exceed $10 million)
  2. Minimum Investment for Stock Portfolio A: (x_A \ge 2)
  3. Minimum Investment for Bond Fund C: (x_C \ge 1)
  4. Conditional Investment Constraint: (3y_B \le x_A) (If (y_B = 1), then $3 million is invested in B, implying (x_A) must be at least $3 million, which satisfies the general rule of also investing in A if B is chosen)
  5. Non-negativity and Variable Types:
    • (x_A \ge 0), (x_C \ge 0)
    • (y_B \in {0, 1})

A solver would then determine the optimal values for (x_A), (y_B), and (x_C) that maximize the expected return, considering all these investment constraints. For example, a solution might indicate to invest $7 million in Stock Portfolio A, $3 million in Real Estate Project B (since (y_B=1)), and $0 in Bond Fund C, assuming this combination is feasible and optimal given all conditions.

Practical Applications

Mixed integer programming is a versatile tool with numerous practical applications across various sectors, particularly within finance and operations.

In the financial services industry, MIP is employed for:

  • Portfolio Optimization: Firms use MIP to construct investment portfolios that maximize returns while adhering to complex constraints like cardinality limits (e.g., investing in no more than a certain number of assets), minimum buy-in amounts, or sector allocation rules. This enables quantitative analysts and portfolio managers to make informed decisions that consider both continuous asset weights and discrete investment choices.5
  • Asset-Liability Management: Banks and insurance companies utilize MIP to manage long-term assets and liabilities, factoring in discrete decisions related to new product offerings or capital expenditure.
  • Trading and Hedging Strategies: Optimizing trading strategies, including the selection of financial instruments and the timing of trades, can involve MIP due to transaction costs or minimum trade sizes.

Beyond finance, MIP is crucial in:

  • Supply Chain Management: Optimizing logistics, facility location, inventory levels, and transportation networks often involves discrete choices such as opening a new warehouse or selecting a transport route. Companies like IBM Research have explored quantum algorithms for routing formulations, which are often based on MIP techniques.4
  • Production Planning: Manufacturers use MIP to schedule production, allocate resources, and manage inventory, especially when dealing with batch sizes or machine assignments that must be integers.
  • Workforce Scheduling: Airlines, hospitals, and call centers use MIP to create optimal staff schedules, considering factors like shifts, breaks, and skill requirements, which involve discrete assignments.
  • Telecommunications: Designing network topologies and routing data traffic involves discrete decisions about equipment placement and connection types.
  • Energy Sector: Optimizing power generation, distribution, and renewable energy integration involves discrete choices about turning generators on or off, or selecting power plant locations.

Leading mathematical optimization software companies like Gurobi note that financial services firms are increasingly adopting these technologies to gain a competitive advantage and improve efficiency and profitability.3,2

Limitations and Criticisms

Despite its power, mixed integer programming has inherent limitations and faces several criticisms, primarily concerning its computational complexity and practical implementation.

  • Computational Complexity: MIP problems are classified as NP-hard, meaning that the time required to find an exact optimal solution can grow exponentially with the problem size. Even with advanced algorithms and powerful computing, large-scale MIP problems can be intractable, requiring significant computational resources and time. This can make real-time decision-making challenging for highly dynamic systems.
  • Model Formulation Difficulty: Accurately formulating a real-world problem as a mixed integer program requires expertise in both the domain and mathematical modeling. Improper formulation can lead to suboptimal solutions or models that are computationally impossible to solve.
  • Data Quality Sensitivity: Like all optimization models, MIP solutions are highly sensitive to the quality and accuracy of the input data. Inaccurate or incomplete data can lead to misleading or impractical optimal solutions. Addressing data quality issues is often a significant hurdle in practical applications.
  • Lack of Transparency: For non-experts, the complex nature of MIP models and the black-box solvers can make it difficult to understand why a particular solution is optimal. This lack of transparency can hinder trust and adoption by business stakeholders.
  • Scalability Challenges: While solvers have improved, certain problem structures or very large instances can still push the limits of current technology, necessitating the use of heuristics that provide good, but not necessarily optimal, solutions.
  • Practical Implementation Hurdles: Successfully implementing mathematical optimization projects in businesses often faces challenges related to data integration, model accuracy, and organizational changes, as discussed in "Applying Mathematical Optimization in Practice: A Note on Insights from MO Projects."1

Mixed Integer Programming vs. Linear Programming

Mixed integer programming (MIP) and linear programming (LP) are both fundamental techniques within mathematical optimization, but they differ critically in the nature of their decision variables.

FeatureLinear Programming (LP)Mixed Integer Programming (MIP)
Variable TypeAll decision variables are continuous (real numbers).Some or all decision variables are restricted to be integers.
Solution SpaceConvex polyhedron (a shape with flat faces).Non-convex, discrete points within a continuous space.
ComplexityGenerally easier and faster to solve.Significantly more computationally challenging (NP-hard).
Modeling PowerBest for problems where fractional solutions are acceptable.Essential for problems involving "yes/no" decisions, counts, or discrete choices.
ExamplesResource allocation (e.g., how much of each product to make if partial units are allowed).Project selection, facility location, scheduling, where discrete units are required.

The core distinction lies in whether fractional values for all variables are permissible. If a problem dictates that certain decisions must be whole numbers (e.g., number of machines, hiring decisions, or whether to undertake a project), then linear programming alone is insufficient, and mixed integer programming becomes necessary. The additional constraint of integrality makes MIP problems much harder to solve, often requiring specialized algorithms like branch-and-bound or cutting plane methods, which are not typically needed for standard LPs.

FAQs

What is the main difference between integer programming and mixed integer programming?

Integer programming requires all decision variables to be integers. Mixed integer programming, as its name suggests, allows some variables to be integers and others to be continuous (real numbers). This flexibility makes MIP more widely applicable to real-world problems that involve a mix of discrete choices and continuous adjustments.

Why are mixed integer programming problems harder to solve than linear programming problems?

The primary reason is the integrality constraint. In linear programming, the feasible region is a convex set, meaning that if you take any two points in the set, the line segment connecting them is also entirely within the set. This property allows for efficient optimization algorithms like the simplex method. For mixed integer programming, the feasible region is not convex due to the discrete nature of some variables, making it much harder to navigate and find the optimal solution.

What kinds of real-world problems can be solved using mixed integer programming?

Mixed integer programming is used to solve a vast array of real-world problems where discrete decisions are involved. Common applications include designing optimal logistics and supply chain management networks, creating efficient production schedules, optimizing financial portfolios with specific investment rules, and scheduling personnel or resources. It's particularly useful in situations where "yes/no" decisions or indivisible units are part of the problem.

What are some common algorithms used to solve mixed integer programming problems?

The most common and effective algorithms for solving mixed integer programming problems include:

  • Branch and Bound: This algorithm systematically explores the solution space by breaking down the original problem into smaller subproblems (branching) and using bounds derived from relaxing the integer constraints (e.g., solving an LP) to prune away subproblems that cannot yield a better solution.
  • Cutting Planes: These are additional linear constraints (cuts) added to the problem formulation that cut off fractional solutions without eliminating any feasible integer solutions, thereby tightening the relaxation and guiding the solver towards integer solutions more quickly.
  • Branch and Cut: This combines both branch-and-bound and cutting plane techniques, using cuts at various nodes of the branch-and-bound tree to improve efficiency.
  • Heuristics: While not guaranteeing optimality, heuristics are used to find good, feasible solutions quickly, especially for very large or complex problems where finding the true optimum is computationally prohibitive.

Can mixed integer programming be used with machine learning?

Yes, mixed integer programming and machine learning can be complementary. MIP can be used in conjunction with machine learning in several ways:

  • Prescriptive Analytics: Machine learning models can predict future outcomes, and these predictions can then serve as inputs to a MIP model, which prescribes optimal actions based on those predictions. For example, ML might forecast demand, and MIP optimizes production based on that forecast.
  • Feature Selection: MIP can be used to select the most relevant features for a machine learning model, formulated as a problem to minimize the number of features while maintaining predictive accuracy.
  • Optimal Decision-Making: For certain machine learning applications, such as neural network verification or learning Bayesian networks, integer programming formulations can be directly applied to ensure optimal or verifiable outcomes. This integration allows for more robust and actionable insights from data.