Lecture 1 — Introduction to Optimization, LP, ILP, and MILP

Foundations, modeling mindset, exact methods overview

1 Learning objectives

By the end of this lecture you should be able to

  • articulate the core elements of an optimization model
  • distinguish linear programming, integer linear programming, and mixed integer linear programming
  • define binary decision variables and explain why they are a special case of integer variables
  • formulate small LP, ILP, and MILP models from text
  • recognize common modeling patterns for practice

2 Lecture roadmap

This lecture is organized in six blocks:

  1. optimization as a mathematical decision framework
  2. LP foundations and geometric intuition
  3. why integrality is needed for discrete decisions
  4. reusable binary-variable modeling patterns
  5. MILP as the bridge between strategic and operational decisions
  6. practical modeling pitfalls and exercises

3 What is Optimization

Optimization is the scientific discipline concerned with selecting the best possible decision from a set of feasible alternatives, subject to explicitly stated constraints. The notion of “best” is formalized through an objective function, while feasibility is determined by constraints that encode physical, economic, technological, or logical limitations of the system under study.

In mathematical terms, an optimization problem can be expressed as:

\[ \begin{aligned} \min_{x \in \mathcal{X}} \ \ & f(x) \\ \text{s.t.}\ \ & g_i(x) \le 0,\quad i=1,\dots,m, \end{aligned} \]

where:

  • \(x\) denotes the decision variables, representing quantities or choices under the control of the decision maker,
  • \(f(x)\) is the objective function, a scalar-valued measure that quantifies performance, such as cost, profit, distance, time, risk, or energy consumption,
  • \(g_i(x)\) are the constraints, which restrict admissible decisions by modeling system limitations, policy rules, or logical relationships, and
  • \(\mathcal{X}\) is the decision space, defining the domain of allowable values for \(x\), potentially including nonnegativity, upper bounds, integrality, or discreteness requirements.

An optimization problem is said to be feasible if there exists at least one \(x \in \mathcal{X}\) satisfying all constraints, and optimal if among all feasible solutions, it attains the best possible objective value.

From a computational perspective, optimization provides a rigorous framework for transforming informal decision problems into well-defined mathematical models that can be analyzed and solved using algorithmic methods. The choice of the modeling framework (continuous, integer, or mixed-integer) has a fundamental impact on both the expressive power of the model and the computational complexity of solving it.

Optimization thus lies at the core of operations research, mathematical programming, and algorithmic decision making, serving as a bridge between real-world decision problems and formal, solvable mathematical formulations.


3.1 Why Optimization?

Optimization problems arise naturally whenever limited resources must be allocated efficiently to achieve well-defined goals. In many real-world systems, decisions are constrained by budgets, capacities, physical laws, or policy rules, and optimization provides a principled way to navigate these trade-offs.

  • Operations Research Optimization is central to classical operations research problems such as facility location, vehicle routing, production planning, scheduling, and workforce assignment. These problems involve coordinating multiple interdependent decisions to minimize costs or maximize service quality under resource and operational constraints.

  • Economics and Finance In economics and finance, optimization underlies portfolio selection, pricing strategies, cost minimization, revenue maximization, and equilibrium analysis. Decision makers seek optimal trade-offs between risk and return, or between competing economic objectives, subject to market and regulatory constraints.

  • Engineering and Infrastructure Systems Engineering applications include the design and operation of networks (transportation, telecommunication, power grids), resource allocation in manufacturing systems, and optimization of energy generation and distribution. Here, optimization ensures efficient, reliable, and sustainable system performance.

  • Computer Science, Data Science, and Artificial Intelligence Many problems in computer science are inherently optimization problems, including combinatorial optimization, algorithm design, and resource scheduling. In data science and artificial intelligence, training machine learning models often reduces to minimizing a loss function subject to regularization or structural constraints.

Across all these domains, optimization serves as a unifying framework that converts complex decision-making problems into mathematical models that can be analyzed, solved, and implemented using algorithmic methods.


3.2 Key Elements of an Optimization Model

An optimization model is built by carefully translating a real-world decision problem into a precise mathematical structure. The quality of the resulting solution depends critically on how accurately these elements capture the underlying system.

  1. Decision Variables Decision variables represent the choices that are under the control of the decision maker. They are the fundamental unknowns whose values are to be determined by solving the optimization problem. Example: \(x_j\) denotes the number of units of product \(j\) to be produced during a planning period.

  2. Objective Function The objective function provides a quantitative measure of performance and defines what it means for a solution to be “optimal.” It aggregates the effects of decision variables into a single scalar value to be minimized or maximized. Example: minimizing total production cost or maximizing overall profit.

  3. Constraints Constraints describe the restrictions that feasible decisions must satisfy. They model physical limitations, resource availability, policy rules, technological relationships, or logical conditions inherent in the system. Example: machine capacity limits, labor availability, material balance equations, or demand satisfaction requirements.

  4. Data Parameters Data parameters are known, fixed inputs to the model that characterize a specific problem instance. These parameters are not decision variables but influence the objective and constraints. Example: unit costs, processing times, customer demands, or available labor hours.

  5. Solution Method The solution method refers to the algorithmic approach or solver used to compute an optimal solution. The choice of method depends on the problem structure and size, and may range from exact algorithms to approximation or heuristic techniques. Example: simplex or interior-point methods for LP, branch-and-bound for ILP, or metaheuristic algorithms for large-scale problems.

  6. Post-analysis and Validation After obtaining a solution, it is essential to interpret and validate the results in the context of the original problem. This includes checking feasibility, assessing practical implementability, and performing sensitivity analysis to understand how changes in data parameters affect the solution.

Together, these elements form a coherent modeling framework that enables systematic analysis and informed decision making through optimization.


3.3 The Modeling Workflow

In practice, developing an effective optimization model is an iterative and structured process rather than a one-shot activity. A systematic workflow helps ensure that the mathematical formulation faithfully represents the real decision problem and leads to meaningful, implementable solutions.

  1. Understand the problem context Clearly identify the decision-making setting, the objectives to be achieved, and the stakeholders involved. At this stage, it is essential to understand what is being optimized, which resources are limited, and what trade-offs are inherent in the system.

  2. Define decision variables Translate the controllable decisions into well-defined mathematical variables. Each decision variable should have a clear interpretation and unit, and collectively they should fully describe all decisions to be optimized.

  3. Formulate the objective function Express the performance criterion mathematically as a function of the decision variables. The objective should align with the true goal of the decision maker, such as minimizing cost, maximizing profit, or improving service quality.

  4. Express the constraints Model all relevant limitations and requirements using mathematical expressions. Constraints must accurately capture physical capacities, resource availability, logical relationships, and policy rules, without introducing unnecessary complexity.

  5. Select a solution method or solver Choose an appropriate algorithmic approach based on the structure and scale of the problem. This may involve exact methods for small to medium instances, or approximation and heuristic methods for large or complex problems.

  6. Interpret results and validate Analyze the computed solution in the context of the original problem. Check feasibility, assess whether the solution is practically implementable, and perform sensitivity or scenario analysis to understand robustness with respect to data uncertainty.

  7. Iterate and refine If the results do not align with real-world expectations or constraints, revise the model. Refinement may involve redefining variables, tightening constraints, adjusting objective terms, or incorporating additional system details.

This modeling workflow forms the conceptual foundation for all subsequent topics in this course, including Linear Programming (LP), Integer Linear Programming (ILP), and Mixed Integer Linear Programming (MILP), and remains applicable across a wide range of optimization problems and application domains.


3.4 One Problem, Three Formulations (LP, ILP, MILP)

To see the difference between LP, ILP, and MILP clearly, keep the same decision story and change only variable domains.

Scenario. A training center offers short modules. Module \(j\) generates educational value \(v_j\) per delivered unit and consumes instructor time \(t_j\). Total weekly instructor availability is \(H\).

  1. LP version (divisible units). If module delivery is divisible (e.g., hours), let \(x_j \ge 0\) be the delivered amount: \[ \begin{aligned} \max\ \ & \sum_j v_j x_j \\ \text{s.t.}\ \ & \sum_j t_j x_j \le H,\\ & 0 \le x_j \le U_j,\ \forall j. \end{aligned} \]

  2. ILP version (indivisible sessions). If each delivery is an indivisible session, let \(n_j \in \mathbb{Z}_{\ge 0}\): \[ \begin{aligned} \max\ \ & \sum_j v_j n_j \\ \text{s.t.}\ \ & \sum_j t_j n_j \le H,\\ & 0 \le n_j \le U_j,\ n_j \in \mathbb{Z}_{\ge 0},\ \forall j. \end{aligned} \]

  3. MILP version (fixed activation + delivered amount). If starting module \(j\) incurs fixed setup effort \(F_j\), introduce binary \(y_j\) and link with big-\(M\) bounds: \[ \begin{aligned} \max\ \ & \sum_j \left(v_j x_j - F_j y_j\right) \\ \text{s.t.}\ \ & \sum_j t_j x_j \le H,\\ & L_j y_j \le x_j \le U_j y_j,\ \forall j,\\ & x_j \ge 0,\ y_j \in \{0,1\},\ \forall j. \end{aligned} \]

Key point. The problem context is unchanged; only the variable domains and linking constraints change the model class from LP to ILP to MILP.


4 Linear Programming (LP)

Linear Programming (LP) is one of the most fundamental and extensively studied classes of optimization problems. An LP model is characterized by a linear objective function, linear constraints, and continuous decision variables. Because of this structure, LP admits strong theoretical properties and highly efficient solution algorithms, making it a cornerstone of operations research and mathematical programming.

In an LP, decision variables are allowed to take fractional values, which makes LP particularly suitable for modeling divisible resources such as material flows, energy, time, or monetary quantities.


4.1 Canonical Form

A standard minimization LP can be written in canonical form as:

\[ \begin{aligned} \min\ \ & c^\top x \\ \text{s.t.}\ \ & Ax \le b, \\ & x \ge 0, \end{aligned} \]

where:

  • \(x \in \mathbb{R}^n\) is the vector of decision variables,
  • \(c \in \mathbb{R}^n\) contains the objective coefficients,
  • \(A \in \mathbb{R}^{m \times n}\) is the constraint coefficient matrix, and
  • \(b \in \mathbb{R}^m\) is the right-hand side vector.

This form is not restrictive: equality constraints, \(\ge\)-type inequalities, and free variables can all be transformed into this representation through standard reformulations.


4.2 Key Properties of Linear Programming

  1. Feasible Region The set of all points satisfying the linear constraints defines the feasible region. Geometrically, this region is a convex polyhedron, formed by the intersection of finitely many half-spaces.

  2. Extreme Point Optimality If an LP has an optimal solution, then at least one optimal solution occurs at an extreme point (vertex) of the feasible region. This fundamental property underlies the design of vertex-based algorithms such as the simplex method.

  3. Efficient Algorithms Linear programs can be solved very efficiently in practice.

    • The simplex algorithm is widely used and often extremely fast on real instances.
    • Interior-point methods provide polynomial-time complexity guarantees and are effective for large-scale LPs.
  4. Duality Theory Every LP has an associated dual problem, whose variables can be interpreted as shadow prices or marginal values of resources. Duality enables sensitivity analysis and provides deep insights into how changes in parameters affect the optimal solution.


4.3 Example: Diet Problem

A dietitian aims to design a diet that satisfies nutritional requirements at minimum cost.

  • Data:

    • \(c_j\): cost per unit of food \(j\)
    • \(a_{ij}\): amount of nutrient \(i\) contained in one unit of food \(j\)
    • \(r_i\): minimum required intake of nutrient \(i\)
  • Decision variables: \(x_j \ge 0\) denotes the quantity of food \(j\) included in the diet.

  • Model:

\[ \begin{aligned} \min\ \ & \sum_j c_j x_j \\ \text{s.t.}\ \ & \sum_j a_{ij} x_j \ge r_i,\quad \forall i, \\ & x_j \ge 0,\quad \forall j. \end{aligned} \]

This model illustrates how linear constraints can capture nutritional requirements, while the objective function represents total cost.


4.4 Example: Production Planning

A company produces two products, \(A\) and \(B\), using a limited amount of labor.

  • Data:

    • Profit: \(3\) per unit of product \(A\), \(5\) per unit of product \(B\)
    • Labor usage: \(2\) hours per unit of \(A\), \(4\) hours per unit of \(B\)
    • Total available labor: \(100\) hours
  • Decision variables:

    • \(x_A\) = number of units of product \(A\) produced
    • \(x_B\) = number of units of product \(B\) produced
  • Model:

\[ \begin{aligned} \max\ \ & 3x_A + 5x_B \\ \text{s.t.}\ \ & 2x_A + 4x_B \le 100, \\ & x_A, x_B \ge 0. \end{aligned} \]

With only two variables, this LP can be solved graphically by visualizing the feasible region and identifying the vertex that maximizes profit.


4.5 Takeaways

  • Linear programming provides a powerful framework for modeling problems with continuous decision variables and linear relationships.
  • Optimal solutions, when they exist, are attained at extreme points of the feasible region.
  • LP models are widely applicable in areas such as resource allocation, blending, scheduling, transportation, and logistics, and they form the basis for more advanced models such as ILP and MILP.

5 From LP to ILP

Integer Linear Programming (ILP) extends linear programming by imposing integrality requirements on some or all decision variables, while preserving the linear structure of the objective function and constraints. This extension is essential for modeling decisions that are inherently discrete and cannot be meaningfully represented by fractional values.

In ILP, decision variables are restricted to take integer values, most commonly binary values.

  • Binary variable. A binary variable is a special case of an integer variable that can only take values in the set \(\{0,1\}\): \[ x \in \{0,1\}\quad \text{encodes a yes–no or on–off decision.} \]

    Binary variables play a central role in optimization modeling because they allow the representation of selection, activation, logical conditions, and structural decisions.

  • Why integer variables? Integer variables are required whenever decisions involve:

    • on–off or open–close choices,
    • logical selection, such as choosing at most \(p\) items,
    • counting decisions, such as the number of workers, shifts, or vehicles,
    • discrete and indivisible resources, such as machines, trucks, or facilities.
  • Computational aspect. Unlike LP, ILP is NP-hard in general. The introduction of integrality destroys convexity and makes the problem combinatorial in nature. Modern solvers address this challenge using sophisticated algorithmic frameworks that combine branch-and-bound, branch-and-cut (cutting planes), presolve techniques, primal heuristics, and strong formulations to solve many practically relevant instances efficiently.

Modeling guideline. Whenever the underlying phenomenon is discrete by nature—such as assignment, selection, routing, or facility opening—imposing integrality constraints is the correct modeling abstraction. Binary variables are particularly effective for controlling activation, enforcing either–or logic, and linking continuous decisions to discrete choices.


5.1 Binary Variables: Common Modeling Patterns

Binary variables give rise to a set of standard modeling patterns that recur across a wide range of applications. Mastery of these patterns is essential for effective ILP and MILP modeling.

  • Selection (cardinality constraint). Choose at most \(p\) items from a given set: \[ \sum_j y_j \le p,\quad y_j \in \{0,1\}. \]

  • Activation (on–off constraint using big-\(M\)). A continuous decision variable \(x_j\) is allowed to take positive values only if the corresponding binary variable is active: \[ x_j \le M y_j,\quad y_j \in \{0,1\},\ x_j \ge 0. \]

    Remark. When supported by the solver, indicator constraints (e.g., \(y_j=0 \Rightarrow x_j=0\)) are preferable, as they avoid explicit big-\(M\) values. If big-\(M\) is used, it should be chosen as tightly as possible to strengthen the formulation.

  • Either–or constraint (disjunctive modeling). Enforce that at least one of two linear constraints must hold: \[ a^\top x \le b + M(1-y),\quad d^\top x \le e + M y,\quad y \in \{0,1\}. \] When \(y=0\), the first constraint is enforced; when \(y=1\), the second constraint is enforced.

  • Logical implication. Model conditional constraints such as “if \(y=1\), then \(x \ge L\)”: \[ x \ge L y,\quad y \in \{0,1\}. \] Similarly, “if \(y=0\), then \(x=0\)” can be modeled as \(x \le U y\).

Strengthening tip. Whenever possible, replace generic big-\(M\) constants with known physical or structural bounds (e.g., using a capacity \(U_j\) as the natural upper bound). Tight bounds significantly improve the quality of LP relaxations.


5.2 ILP Example 1: Assignment Problem

Problem. Assign each worker to exactly one task, and each task to exactly one worker, such that the total assignment cost is minimized.

  • Data. \(c_{ij}\) denotes the cost of assigning worker \(i\) to task \(j\).

  • Decision variables. \(x_{ij} \in \{0,1\}\) equals 1 if worker \(i\) is assigned to task \(j\).

  • Model. \[ \begin{aligned} \min\ \ & \sum_i \sum_j c_{ij} x_{ij} \\ \text{s.t.}\ \ & \sum_j x_{ij} = 1,\quad \forall i,\\ & \sum_i x_{ij} = 1,\quad \forall j,\\ & x_{ij} \in \{0,1\}. \end{aligned} \]

Notes. This is a classical 0–1 ILP. The constraint matrix is totally unimodular, implying that the LP relaxation already yields integer solutions. As a result, the problem can be solved efficiently using linear programming techniques.


5.3 ILP Example 2: Set Covering

Problem. Select the minimum-cost set of stations such that every demand point is covered by at least one open station.

  • Data. \(a_{ij} = 1\) if station \(j\) covers demand point \(i\) (and \(0\) otherwise); \(c_j\) is the cost of opening station \(j\).

  • Decision variables. \(y_j \in \{0,1\}\) equals 1 if station \(j\) is opened.

  • Model. \[ \begin{aligned} \min\ \ & \sum_j c_j y_j \\ \text{s.t.}\ \ & \sum_j a_{ij} y_j \ge 1,\quad \forall i,\\ & y_j \in \{0,1\}. \end{aligned} \]

Notes. The covering constraints define a classical packing/covering structure. Strengthened formulations and cutting planes are often crucial for solving large-scale instances efficiently.


5.4 ILP Example 3: Knapsack with Selection

Problem. Choose a subset of items to maximize total value subject to a capacity constraint.

  • Data. \(v_j\) denotes the value of item \(j\), \(w_j\) denotes its weight, \(W\) is the knapsack capacity.

  • Decision variables. \(x_j \in \{0,1\}\) indicates whether item \(j\) is selected.

  • Model. \[ \begin{aligned} \max\ \ & \sum_j v_j x_j \\ \text{s.t.}\ \ & \sum_j w_j x_j \le W,\\ & x_j \in \{0,1\}. \end{aligned} \]

Notes. Despite its compact formulation, the knapsack problem is NP-hard and appears as a fundamental substructure in many more complex integer and mixed-integer optimization models.


6 Mixed Integer Linear Programming (MILP)

Mixed Integer Linear Programming (MILP) extends integer linear programming by allowing continuous and integer decision variables to coexist within a single linear optimization model. This modeling framework is particularly powerful because many real-world decision problems naturally involve a combination of discrete design choices and continuous operational decisions.

In MILP, binary or integer variables typically represent strategic or structural decisions (such as opening facilities or activating setups), while continuous variables model operational quantities (such as production levels or material flows).

  • General template. \[ \begin{aligned} \min\ \ & c^\top x + d^\top y \\ \text{s.t.}\ \ & A x + B y \le b,\\ & x \in \mathbb{R}^n_{\ge 0},\quad y \in \{0,1\}^m. \end{aligned} \]

    Here, \(x\) represents continuous decision variables, while \(y\) represents binary (or more generally, integer) decision variables.

  • Typical use cases. MILP is the standard modeling paradigm for problems such as facility location with flow decisions, production planning with setup costs, blending problems with on–off recipes, network design, scheduling with changeovers, and many integrated planning problems in logistics and manufacturing.

Relaxation insight. The LP relaxation of an MILP is obtained by dropping the integrality requirements on the variables \(y\). For minimization problems, this relaxation provides a lower bound on the optimal objective value. Strong formulations and tight constraints reduce the gap between the LP relaxation and the integer optimum, thereby significantly improving computational performance.


6.1 MILP Example 1: Facility Location with Flow

Problem. Decide which facilities to open and how much to ship from each open facility to customers in order to satisfy all demands at minimum total cost.

  • Data.

    • \(f_j\): fixed cost of opening facility \(j\)
    • \(U_j\): capacity of facility \(j\)
    • \(c_{ij}\): unit shipping cost from facility \(j\) to customer \(i\)
    • \(d_i\): demand of customer \(i\)
  • Decision variables.

    • \(y_j \in \{0,1\}\) equals 1 if facility \(j\) is opened
    • \(x_{ij} \ge 0\) denotes the quantity shipped from facility \(j\) to customer \(i\)
  • Model. \[ \begin{aligned} \min\ \ & \sum_j f_j y_j + \sum_i \sum_j c_{ij} x_{ij} \\ \text{s.t.}\ \ & \sum_j x_{ij} \ge d_i,\quad \forall i,\\ & \sum_i x_{ij} \le U_j y_j,\quad \forall j,\\ & x_{ij} \ge 0,\quad y_j \in \{0,1\}. \end{aligned} \]

Notes. The constraint \(\sum_i x_{ij} \le U_j y_j\) links the continuous flow variables to the binary opening decisions and ensures that no flow is allowed through a closed facility. This is an example of an on–off constraint with a natural big-\(M\), where \(M = U_j\). When available, indicator constraints (e.g., \(y_j = 0 \Rightarrow x_{ij} = 0\) for all \(i\)) can be used as an alternative formulation.


6.2 MILP Example 2: Production Planning with Setups

Problem. Plan production quantities over multiple periods and decide whether to set up production in each period. Setting up production incurs a fixed cost, and production is limited by a maximum capacity when the setup is active.

  • Data.

    • \(F_t\): fixed setup cost in period \(t\)
    • \(c_t\): variable production cost per unit in period \(t\)
    • \(d_t\): demand in period \(t\)
    • \(U_t\): maximum production capacity in period \(t\) if production is set up
  • Decision variables.

    • \(y_t \in \{0,1\}\) equals 1 if production is set up in period \(t\)
    • \(x_t \ge 0\) denotes the production quantity in period \(t\)
  • Model. \[ \begin{aligned} \min\ \ & \sum_t \left(F_t y_t + c_t x_t\right) \\ \text{s.t.}\ \ & \sum_{\tau=1}^t x_\tau \ge \sum_{\tau=1}^t d_\tau,\quad \forall t,\\ & x_t \le U_t y_t,\quad \forall t,\\ & x_t \ge 0,\quad y_t \in \{0,1\}. \end{aligned} \]

Notes. The cumulative demand constraints ensure that demand is met up to each period when backlogging is not allowed. The constraint \(x_t \le U_t y_t\) links production to setup decisions and prevents production in periods without setup. If inventory and backlogging are permitted, additional state variables and inventory balance equations must be introduced.


MILP provides a unifying framework for modeling complex decision problems that involve both strategic discrete choices and tactical or operational continuous decisions, making it one of the most important tools in modern operations research and optimization practice.


6.3 Practical Remarks for ILP and MILP Modeling

Effective integer and mixed-integer modeling goes beyond writing mathematically correct formulations. Computational performance and solution quality depend heavily on how the model is structured and parameterized.

  • Big-\(M\) selection. Big-\(M\) constants should always be chosen as tight as possible. Excessively large values weaken the LP relaxation, lead to poor bounds, and significantly slow down the branch-and-bound search. Whenever feasible, replace generic big-\(M\) values with natural physical or logical bounds derived from the problem data.

  • Indicator constraints. When supported by the solver, indicator constraints are preferable to explicit big-\(M\) formulations. They express logical conditions directly (e.g., “if \(y=0\), then \(x=0\)”), avoid manual tuning of constants, and often result in stronger relaxations and better numerical behavior.

  • Scaling and variable bounds. Provide meaningful lower and upper bounds for all variables whenever possible. Coefficients in objectives and constraints should be scaled to similar orders of magnitude to improve numerical stability and solver robustness.

  • Formulation strength. Different formulations of the same problem can vary drastically in computational difficulty. Strong formulations that incorporate valid inequalities, tightened constraints, or extended variable sets can dramatically reduce solution time by improving the quality of LP relaxations.

  • Stopping criteria and solution assessment. For large-scale models, it is often practical to impose time limits and acceptable optimality gaps. Always assess the feasibility and quality of the obtained solution and interpret results in the context of the underlying decision problem rather than relying solely on solver status.


6.4 Common First-Model Mistakes (and Fixes)

Mistake Why it hurts Practical fix
Using continuous variables for indivisible decisions Produces infeasible real-world recommendations (e.g., 2.4 trucks) Use integer or binary domains where decisions are discrete
Missing or inconsistent units Creates dimensionally invalid constraints Check units term-by-term in every objective and constraint
Choosing overly large big-\(M\) values Weak LP relaxations and slow branch-and-bound Derive \(M\) from explicit data bounds (capacity, demand, horizon)
Omitting variable bounds Larger search space and numerical instability Add tight lower and upper bounds whenever possible
Treating solver output as final without validation Risks impractical or fragile decisions Perform feasibility checks and quick scenario/sensitivity tests

6.5 LP vs ILP vs MILP: Quick Comparison

The three major classes of linear optimization models differ primarily in the nature of their decision variables and the resulting computational complexity. The table below summarizes their key characteristics.

Aspect LP ILP MILP
Decision variables Continuous Integer (often binary) Mixture of continuous and integer
Objective function Linear Linear Linear
Constraints Linear Linear Linear
Computational complexity Polynomial time in theory for certain algorithms NP-hard NP-hard
Typical use cases Flow problems, blending, fractional resource allocation Selection, assignment, routing, scheduling Integrated design and operations, facility location with flows, production planning with setups
Modeling role Purely operational decisions Purely discrete decisions Joint strategic and operational decisions

This comparison highlights how LP serves as the foundational model class, while ILP and MILP extend it to capture discrete decision making and integrated planning problems encountered in real-world applications.


7 Mini Exercises

  1. Project selection under a budget (ILP). A set of projects \(J\) is available. Project \(j\) yields profit \(v_j\) and requires effort \(e_j\). At most \(p\) projects can be selected, and the total effort cannot exceed \(B\).

    • Introduce binary decision variables: \[ x_j \in \{0,1\}\quad \forall j \in J, \] where \(x_j=1\) if project \(j\) is selected.

    • Formulate an ILP that maximizes total profit subject to:

      • a cardinality constraint (select at most \(p\) projects), and
      • a budget constraint (total effort at most \(B\)).

    Task. Write the full mathematical model: objective function, constraints, and variable domains.

  2. Set covering with penalties (MILP). Consider the standard set covering model with demand points \(i\) and stations \(j\), where \(a_{ij}=1\) if station \(j\) covers demand point \(i\). In standard set covering, every demand point must be covered. In this exercise, coverage is optional but leaving demand point \(i\) uncovered incurs penalty \(P_i\).

    Task. Propose a MILP formulation by introducing either:

    • binary uncovered indicators \(u_i \in \{0,1\}\), where \(u_i=1\) means demand point \(i\) is uncovered, or
    • continuous slack variables representing uncovered status with an appropriate linearization.

    The objective should minimize the total opening cost plus uncovered penalties, and the constraints should ensure each demand point is either covered or counted as uncovered.


8 References for This Chapter

  1. Land, A. H., & Doig, A. G. (1960). An automatic method of solving discrete programming problems. Econometrica, 28(3), 497-520. DOI: 10.2307/1910129
  2. Gomory, R. E. (1958). Outline of an algorithm for integer solutions to linear programs. Bulletin of the American Mathematical Society, 64(5), 275-278. DOI: 10.1090/S0002-9904-1958-10224-4
  3. Karmarkar, N. (1984). A new polynomial-time algorithm for linear programming. Combinatorica, 4(4), 373-395. DOI: 10.1007/BF02579150
  4. Lenstra, H. W. (1983). Integer programming with a fixed number of variables. Mathematics of Operations Research, 8(4), 538-548. DOI: 10.1287/moor.8.4.538
  5. Nemhauser, G. L., & Wolsey, L. A. (1999). Integer and Combinatorial Optimization. Wiley. URL: https://www.wiley-vch.de/publish/en/books/ISBN978-0-471-35943-2
  6. Schrijver, A. (1998). Theory of Linear and Integer Programming. Wiley. URL: https://www.wiley-vch.de/en/areas-interest/mathematics-statistics/mathematics-16ma/discrete-mathematics-16ma9/theory-of-linear-and-integer-programming-978-0-471-98232-6
  7. Boyd, S., & Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. DOI: 10.1017/CBO9780511804441
Back to top