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
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.
| Generator | Type | Capacity | Cost/MWh | Startup | Min ON | Min OFF |
|---|---|---|---|---|---|---|
| Oakville Coal | Coal | 800 MW | $45 | $35,000 | 6 hrs | 4 hrs |
| Riverside Gas | Gas | 600 MW | $65 | $15,000 | 3 hrs | 2 hrs |
| Lakeside Nuclear | Nuclear | 1,200 MW | $12 | $50,000 | 8 hrs | 6 hrs |
| Hilltop Wind Farm | Wind | 400 MW | $5 | $5,000 | 2 hrs | 1 hr |
| Desert Solar | Solar | 350 MW | $8 | $5,000 | 2 hrs | 1 hr |
| Valley Gas Peaker | Gas | 300 MW | $85 | $8,000 | 2 hrs | 1 hr |
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 optimizationTry It Yourself
Commit generators across a 24-hour horizon
Unit Commitment Optimizer
6 Generators · 24 HoursReady. Select a scenario and click “Solve & Compare All Algorithms”.
| Algorithm | Total Cost | Startups | Time |
|---|---|---|---|
| Click Solve to run | |||
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 + roundingRelax 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
- (2001). The Next Generation of Electric Power Unit Commitment Models. Springer. https://doi.org/10.1007/978-1-4757-3427-7
- (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.