Inferensys

Glossary

Mixed-Integer Linear Programming (MILP)

An optimization formulation that models switch statuses as binary integer variables and power flow physics as linear constraints to find globally optimal reconfiguration solutions.
Finance analyst reviewing cash flow AI optimization on laptop, charts and projections visible, home office work session.
OPTIMIZATION FORMULATION

What is Mixed-Integer Linear Programming (MILP)?

Mixed-Integer Linear Programming (MILP) is a mathematical optimization technique that models decision variables as a combination of continuous values and discrete integers, enabling the precise formulation of complex operational constraints.

Mixed-Integer Linear Programming (MILP) is an optimization framework where the objective function and all constraints are linear, but a subset of decision variables is restricted to integer values. This formulation is essential for modeling discrete decisions—such as the open/closed status of a switch—within a continuous physical system like power flow. The integer variables allow the solver to represent logical conditions, on/off states, and sequencing decisions that cannot be captured by continuous linear programming alone.

In grid topology optimization, MILP models binary integer variables to represent the status of sectionalizing and tie switches, while continuous variables capture voltage magnitudes and branch power flows. The solver, typically using branch-and-bound or cutting-plane algorithms, searches for the globally optimal combination of switch states that minimizes losses or restores service while strictly enforcing the radiality constraint and thermal limits. This guarantees a mathematically proven optimal reconfiguration rather than an approximate heuristic solution.

MATHEMATICAL FOUNDATIONS

Key Characteristics of MILP in Grid Optimization

Mixed-Integer Linear Programming (MILP) provides the rigorous mathematical framework for finding globally optimal solutions to distribution network reconfiguration problems by modeling switch states as binary variables and power flow physics as linear constraints.

01

Binary Decision Variables

The defining characteristic of MILP is the use of binary integer variables (0 or 1) to represent discrete switch states in the distribution network.

  • Open switch: Represented as 0, indicating no current flow through that branch
  • Closed switch: Represented as 1, allowing power to flow along that path
  • Tie switches: Modeled as binary variables that can change state during optimization
  • Sectionalizing switches: Similarly represented to enable feeder reconfiguration

This binary formulation directly maps the physical reality of switchgear—a switch is either open or closed, with no intermediate state. The solver explores combinations of these binary variables to find the optimal topology.

02

Linear Power Flow Constraints

MILP formulations enforce linearized power flow physics to ensure all solutions respect electrical engineering principles while maintaining computational tractability.

  • DistFlow equations: Linear approximations of branch flow equations specifically derived for radial distribution networks
  • Voltage drop constraints: Linear relationships between power flow and voltage magnitude differences along feeders
  • Current limits: Thermal capacity constraints expressed as linear inequalities on branch flows
  • Kirchhoff's laws: Node balance equations ensuring power injected equals power consumed plus losses

The linearization is essential—true AC power flow is non-convex and nonlinear, making global optimization computationally prohibitive for real-time grid operations.

03

Radiality Enforcement

A critical constraint in MILP-based reconfiguration is the radiality requirement—the solution must produce a network topology without any closed loops.

  • Spanning tree constraints: Mathematical conditions ensuring the resulting graph connects all nodes without cycles
  • Single-parent rules: Each load bus must receive power from exactly one upstream source
  • Connectivity guarantees: Constraints preventing unintentional islanding of customers
  • Substation separation: Rules ensuring feeders remain electrically distinct under normal operation

Radiality is enforced for protection coordination—radial networks allow simple overcurrent protection schemes with predictable fault current paths, eliminating the complexity of directional relaying required in meshed systems.

04

Global Optimality Guarantee

Unlike heuristic methods such as the Branch Exchange Method, MILP solvers provide a mathematical guarantee of finding the globally optimal solution within the defined search space.

  • Branch-and-bound: The core algorithm systematically partitions the solution space and prunes suboptimal regions
  • Optimality gap: Solvers report the percentage difference between the best found solution and the theoretical lower bound
  • Proven convergence: Commercial solvers like Gurobi and CPLEX can close the gap to 0.0%, certifying optimality
  • Benchmarking value: MILP solutions serve as ground truth for evaluating faster heuristic algorithms

This guarantee is crucial for regulatory compliance and investment planning, where utilities must demonstrate they are operating the grid at maximum efficiency.

05

Multi-Objective Formulation

MILP frameworks naturally extend to multi-objective optimization, allowing grid operators to balance competing goals through weighted objective functions or constraint-based approaches.

  • Loss minimization: Reducing I²R losses by shortening current paths and balancing feeder loading
  • Switching cost minimization: Penalizing unnecessary switch operations to preserve equipment lifespan
  • Voltage profile improvement: Minimizing deviations from nominal voltage across all buses
  • Load balancing: Equalizing utilization percentages across parallel transformers and feeders

The solver generates a Pareto optimal front—a set of solutions where improving one objective necessarily degrades another, enabling operators to make informed trade-off decisions based on current operational priorities.

06

Computational Complexity Management

MILP problems are NP-hard in general, meaning solution time can grow exponentially with the number of binary variables. Practical grid applications require careful formulation strategies.

  • Tight big-M values: Using the smallest possible constants in disjunctive constraints to improve solver performance
  • Symmetry breaking: Adding constraints to eliminate mathematically equivalent but permuted solutions
  • Warm starting: Providing the solver with a known feasible topology to accelerate convergence
  • Time limit settings: Configuring solvers to return the best solution found within operational time windows (typically 30-300 seconds)
  • Decomposition techniques: Breaking large networks into smaller subproblems solved sequentially

Modern commercial solvers leverage cutting planes and presolve reductions to dramatically reduce solve times, making MILP viable for networks with hundreds of switches.

SOLUTION APPROACH COMPARISON

MILP vs. Heuristic Methods for Grid Reconfiguration

Comparison of Mixed-Integer Linear Programming against common heuristic methods for solving the distribution feeder reconfiguration problem under radiality constraints.

FeatureMILPBranch ExchangeGenetic Algorithm

Optimality guarantee

Global optimum proven

Solution quality

Optimal

Near-optimal (local minimum)

Near-optimal (stochastic)

Handles radiality constraints

Handles voltage constraints

Handles thermal limits

Multi-objective capability

Weighted sum or epsilon-constraint

Pareto front via NSGA-II

Computation time (1000-bus system)

2-30 seconds

< 1 second

30-300 seconds

Solver dependency

CPLEX, Gurobi, or SCIP required

None

None

Deterministic output

Scalability to 10,000+ buses

Limited by solver memory

Integration with MPC framework

Handles integer switching costs

Cold load pickup modeling

Implementation complexity

High (formulation expertise)

Low

Medium

MILP IN GRID OPTIMIZATION

Frequently Asked Questions

Clarifying the mathematical foundations and practical applications of Mixed-Integer Linear Programming for solving complex distribution network reconfiguration challenges.

Mixed-Integer Linear Programming (MILP) is an optimization formulation where some decision variables are constrained to integer values while others remain continuous, and all relationships are expressed as linear constraints. In grid topology optimization, binary integer variables (0 or 1) represent the open/closed status of switches, while continuous variables model physical quantities like voltage magnitudes and power flows. The solver systematically explores the solution space using algorithms like branch-and-bound, which partitions the problem into subproblems by fixing integer variables, and cutting-plane methods, which tighten the linear relaxation. This guarantees finding the globally optimal reconfiguration that minimizes losses or restores service, unlike heuristic methods that may settle for local optima.

Prasad Kumkar

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.