Skip to main content

Unit Commitment

Mixed-Integer Programming · NP-Hard

LP-based unit commitment saves utilities 1–5% of annual fuel costs — $50–$500M for large ISOs (Hobbs et al., 2001). Every day at 10:00 AM, an ISO system operator must decide which generators to start up, shut down, or keep running for the next 24 hours. This is the Unit Commitment Problem — a large-scale MIP — where startup costs, minimum on/off times, and ramp rate constraints create billions of feasible combinations.

Where This Decision Fits

Energy sector decision chain — the highlighted step is what this page optimizes

Plant SitingLong-term capacity
Transmission NetworkGrid infrastructure
Unit CommitmentGenerator ON/OFF
DistributionLast-mile delivery
Market TradingPricing & contracts

The Problem

Scheduling 6 generators over a 24-hour horizon

A regional ISO manages 6 generators supplying electricity to a metropolitan area over a 24-hour planning horizon. Each hour, the operator must decide the ON/OFF commitment status of every generator while meeting hourly demand that varies from 1,200 MW at night to 2,800 MW during peak afternoon hours.

The generators have heterogeneous characteristics: a large Lakeside Nuclear plant (1,200 MW, $12/MWh) provides cheap baseload but requires 8 hours minimum on-time once started; Oakville Coal (800 MW, $45/MWh) and Riverside Gas (600 MW, $65/MWh) offer dispatchable mid-merit power; renewables like Hilltop Wind Farm (400 MW, $5/MWh) and Desert Solar (350 MW, $8/MWh) are cheap but intermittent; and the expensive Valley Gas Peaker (300 MW, $85/MWh) handles extreme peaks.

GeneratorTypeCapacityCost/MWhStartupMin ONMin OFF
Oakville CoalCoal800 MW$45$35,0006 hrs4 hrs
Riverside GasGas600 MW$65$15,0003 hrs2 hrs
Lakeside NuclearNuclear1,200 MW$12$50,0008 hrs6 hrs
Hilltop Wind FarmWind400 MW$5$5,0002 hrs1 hr
Desert SolarSolar350 MW$8$5,0002 hrs1 hr
Valley Gas PeakerGas300 MW$85$8,0002 hrs1 hr
Unit Commitment MIP Formulation minimize   Σg,t cg · pgt + Σg,t Sg · vgt   // fuel cost + startup cost
subject to
  Σg pgt = Dt    // demand met each hour t
  Pgmin · ugt ≤ pgt ≤ Pgmax · ugt    // generation limits when ON
  vgt − wgt = ugt − ug,t−1    // startup/shutdown logic
  ugt, vgt, wgt ∈ {0, 1}   // binary commitment, startup, shutdown

With 6 generators and 24 hours, the binary decision space alone is 2144 — approximately 2.2 × 1043 combinations. Minimum up/down time constraints and startup costs couple decisions across time periods, making this a fundamentally harder problem than single-period economic dispatch.

See full Energy Grid optimization

Try It Yourself

Commit generators across a 24-hour horizon

Unit Commitment Optimizer

6 Generators · 24 Hours
Mid-July heat wave. Air conditioning drives afternoon demand to 2,800 MW. Solar peaks at noon but wind is calm. Nuclear and coal provide baseload; gas peakers needed for the 4 PM–8 PM super-peak.
ON
OFF
Load Curve

Ready. Select a scenario and click “Solve & Compare All Algorithms”.

AlgorithmTotal CostStartupsTime
Click Solve to run
Schedule details will appear here after solving.

The Algorithms

Three approaches to solving unit commitment

Priority List

Heuristic O(G · T)

The simplest approach: rank generators by average cost (merit order) and commit them from cheapest to most expensive until hourly demand is met. Min up/down time constraints are enforced greedily. Fast but can miss cost-saving startup/shutdown patterns.

LP Relaxation

Approximation O(n³) LP solve + rounding

Relax the binary commitment variables to continuous [0, 1] and solve the resulting linear program. The LP optimal value provides a lower bound. Round fractional solutions to binary (generators with u ≥ 0.5 are committed ON). Provides a quality guarantee but rounding may violate min up/down time constraints.

Lagrangian Relaxation

Heuristic O(I · G · T²)

Relax the demand-coupling constraint into the objective via Lagrange multipliers. This decomposes the problem into G independent single-generator subproblems, each solvable by dynamic programming. Multipliers are updated via subgradient optimization. Produces near-optimal solutions with a quality bound from the Lagrangian dual.

Computational Complexity

  • Unit Commitment is NP-hard (reduction from set cover)
  • With G generators and T periods: 2G·T possible commitment schedules
  • Min up/down time constraints couple binary variables across time — no period-by-period decomposition
  • Real ISOs solve instances with 1,000+ generators and 168 hours (weekly) using commercial MIP solvers
  • Lagrangian relaxation was the industry standard before MIP solvers became fast enough (~2010)

References

Academic foundations

  • Hobbs, B.F., Rothkopf, M.H., O'Neill, R.P. & Chao, H. (2001). The Next Generation of Electric Power Unit Commitment Models. Springer. https://doi.org/10.1007/978-1-4757-3427-7
  • Wood, A.J., Wollenberg, B.F. & Sheble, G.B. (2014). Power Generation, Operation, and Control. 3rd ed. Wiley.

Explore More Applications

This demo is part of a comprehensive mathematical modeling and operations research toolkit covering scheduling, routing, packing, network optimization, and stochastic models.

Disclaimer
Data shown is illustrative. Generator parameters, demand profiles, and costs are representative scenarios for educational purposes and do not reflect any specific utility or ISO operation.
Back
ESC