Discrete Variables and Mixed Integer Programming


Lecture 18

November 4, 2024

Review and Questions

Linear Programming

  • Assumptions of:
    • certainty
    • divisibility
    • linearity
  • Solutions must be at intersections of constraints.
  • Shadow prices: value of relaxing constraints.
  • Saw examples from power systems and air quality

Questions

Poll Everywhere QR Code

Text: VSRIKRISH to 22333

URL: https://pollev.com/vsrikrish

See Results

Mixed Integer Linear Programming

Limitations of Linear Programming

LPs are powerful but have some (strong) assumptions.

What do we do when they don’t hold or a linear relaxation would be inappropriate?

Problems with Discrete Decisions

Economic dispatch: Assumed we had a fleet of online generators, all of which generated.

What if we had to also make decisions about which generators to operate?

Fixed Costs

A key consideration when deciding whether to operate something are fixed costs.

  • Fixed costs: Labor, etc, required to operate or produce regardless of quantity.
  • Variable costs: Costs of inputs (energy, additional labor, materials) required to operate or produce per unit of time/quantity.

Fixed Costs Cause Discontinuities

Operational Status As Decision Variables

The potential decision to not operate means that we need to introduce new indicator variables, which flag on/off status:

\[ \mathbb{I}_g = \begin{cases} 0 & \text{off} \\ 1 & \text{on} \end{cases} \]

Binary and Integer Variables

These indicator variables are binary variables: 0 or 1.

More generally, we can consider optimization problems with integer variables \(x \in \mathbb{Z}\).

Discrete Decision Variables Violate Divisibility

Recall that for LPs, solutions must occur at corners of the feasible polyhedra.

Discrete Decision Variables Violate Divisibility

Mixed-integer LPs: corners may not exist at integer points.

Solving MILPs

Example: Simple Mixed-Integer Linear Program

\[ \begin{align} \max \quad & 3x_1 + 4x_2 \\[0.5em] \text{subject to:} \quad & 2x_1 + 6x_2 \leq 27 \\[0.5em] & x_2 \geq 2 \\[0.5em] & 3x_1 + x_2 \leq 19 \\[0.5em] & x_1, x_2 \geq 0 \\[0.5em] & x_1, x_2 \quad \text{integers} \end{align} \]

Example: MILP

Example: MILP

Idea of Mixed-Integer Solution Method

Solution to linear relaxation (relax integer constraint to turn into an LP) is an upper bound on the mixed-integer solution (why?).

  1. Starting from this, test new problems “bounding” LP solution with integer constraints.

  2. Continue until integer solution found.

This is the branch and bound algorithm.

Branch and Bound: Node 1

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Branch and Bound Nodes 2 and 3

\[ \begin{align} \max \quad & 3x_1 + 4x_2 \\[0.5em] \text{subject to:} \quad & 2x_1 + 6x_2 \leq 27 \\ & x_2 \geq 2 \\ & 3x_1 + x_2 \leq 19 \\ & x_1, x_2 \geq 0 \\ & {\color{red}x_2 \leq 2} \qquad (\text{node}\, 2) \\ & {\color{blue}x_2 \geq 3} \qquad (\text{node}\, 3) \\ \end{align} \]

Example MILP: Nodes 2 and 3

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Nodes 4 and 5

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Nodes 6 and 7

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Branch and Bound

Branch and Bound Node 1

Example MILP: Nodes 8 and 9

Example MILP: Branch and Bound

Branch and Bound Node 1

Key Takeaways

Mixed Integer Problems

  • Integer/binary variables (e.g. from operational status) cause several violations of LP assumptions.
    • Non-linear/discontinuous objectives/constraints;
    • Loss of variable divisibility.
  • Can solve these problems with branch and bound (or more sophisticated refinements, such as branch and cut).
    • Search only useful refinements, ignore others.

Upcoming Schedule

Wednesday/Monday: Applications of MILP to solid waste management and power systems.

Assessments

Prelim 2: Next Wednesday (11/13), on material through LP.