Inferensys

Glossary

Mixed-Integer Linear Programming (MILP)

Mixed-Integer Linear Programming (MILP) is a mathematical optimization technique that minimizes or maximizes a linear objective function subject to linear constraints, where some decision variables are restricted to integer values while others remain continuous.
Finance analyst reviewing cash flow AI optimization on laptop, charts and projections visible, home office work session.
DISCRETE OPTIMIZATION

What is Mixed-Integer Linear Programming (MILP)?

A mathematical optimization framework for solving problems where some variables are restricted to integer values while others remain continuous, all within linear constraints and a linear objective function.

Mixed-Integer Linear Programming (MILP) is an optimization technique that minimizes or maximizes a linear objective function subject to linear constraints, where a subset of decision variables is constrained to take only integer values. This discrete requirement allows MILP to model binary on/off decisions—such as whether a charging station is active—alongside continuous variables like power flow rates, making it essential for smart charging and unit commitment problems.

MILP solvers employ branch-and-bound and cutting-plane algorithms to efficiently explore the solution space, guaranteeing global optimality for convex formulations. In electric vehicle fleet management, MILP is used to solve the NP-hard scheduling problem of assigning discrete charging time slots while respecting transformer load management constraints and minimizing demand charges, bridging the gap between continuous power physics and discrete operational logic.

MATHEMATICAL FOUNDATIONS

Key Characteristics of MILP

Mixed-Integer Linear Programming (MILP) is a powerful optimization framework that combines continuous variables with discrete decision variables, making it essential for solving complex EV charging scheduling problems where physical constraints meet binary on/off logic.

01

Discrete Decision Variables

MILP introduces integer variables that represent yes/no or on/off decisions—such as whether a charging station is active at a specific time slot. Unlike pure linear programming, these discrete variables allow the model to capture real-world constraints like binary charging states, vehicle-to-charger assignment, and minimum power thresholds below which chargers cannot operate efficiently.

02

Objective Function Formulation

The objective function defines what the optimization seeks to minimize or maximize, expressed as a linear combination of decision variables. Common EV charging objectives include:

  • Minimizing total electricity cost under time-of-use tariffs
  • Minimizing peak load to avoid demand charges
  • Maximizing renewable energy utilization by aligning charging with solar generation
  • Minimizing battery degradation by penalizing high C-rates
03

Constraint Modeling

Constraints enforce the physical and operational limits of the charging system. MILP handles multiple constraint types simultaneously:

  • Power balance constraints ensuring total load does not exceed transformer capacity
  • State of Charge (SoC) constraints guaranteeing vehicles reach target charge levels by departure time
  • Sequential constraints linking SoC across consecutive time intervals
  • Mutual exclusion constraints preventing conflicting charger assignments
04

Branch-and-Bound Algorithm

The dominant solution method for MILP problems, branch-and-bound systematically explores the solution space by:

  • Solving linear programming relaxations where integer variables are temporarily treated as continuous
  • Branching on fractional variables to create subproblems with tighter bounds
  • Bounding by pruning subproblems that cannot improve upon the current best solution
  • Modern solvers like Gurobi and CPLEX use advanced presolve, cutting planes, and heuristics to accelerate convergence
05

Time-Indexed Formulations

EV charging optimization typically uses time-indexed MILP formulations where the planning horizon is discretized into uniform intervals (e.g., 15-minute slots). Each interval has its own set of decision variables, creating a temporal coupling where the charging decision at time t directly affects the state at time t+1. This structure enables precise modeling of time-of-use pricing windows and dynamic grid signals.

06

Computational Complexity Considerations

MILP is NP-hard, meaning solution time can grow exponentially with problem size. For large-scale EV fleet optimization, practitioners employ:

  • Rolling horizon approaches that solve shorter time windows sequentially
  • Aggregation techniques grouping similar vehicles to reduce variable count
  • Heuristic warm starts providing good initial solutions to accelerate solver convergence
  • Decomposition methods like Lagrangian relaxation for geographically distributed charging networks
MILP FUNDAMENTALS

Frequently Asked Questions

Clear, technical answers to the most common questions about applying Mixed-Integer Linear Programming to electric vehicle charging and grid optimization problems.

Mixed-Integer Linear Programming (MILP) is a mathematical optimization technique where an objective function is minimized or maximized subject to linear constraints, with the critical distinction that some decision variables are restricted to integer values while others remain continuous. The integer variables typically represent discrete decisions—such as whether a charging station is on/off (binary 0-1) or how many vehicles are assigned to a specific charger—while continuous variables model physical quantities like power flow in kilowatts. The solver systematically explores the feasible solution space using algorithms like Branch-and-Bound, which partitions the problem into subproblems by fixing integer variables, and Cutting Planes, which tighten the linear relaxation. In electric vehicle charging, MILP enables the precise scheduling of charge start times and power allocations across a fleet while respecting hard constraints like transformer capacity limits and vehicle departure deadlines.

OPTIMIZATION METHOD COMPARISON

MILP vs. Other Optimization Techniques

Comparative analysis of Mixed-Integer Linear Programming against alternative optimization approaches for EV charging scheduling problems

FeatureMILPHeuristic MethodsReinforcement Learning

Handles discrete decisions (on/off)

Global optimality guarantee

Solution time for large instances

Minutes to hours

< 1 sec

< 1 sec

Requires explicit mathematical model

Handles non-linear constraints

Interpretability of solution

High

Medium

Low

Adapts to real-time data

Computational cost per decision

High

Low

Medium

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.