Unit Commitment
Economic dispatch shares the load among units that are already running. But a large thermal unit cannot be switched on in a minute: it takes hours to warm up, burns fuel and money to start, and once running it cannot go below a minimum output. So the day before, operators (or market algorithms) decide which units to commit for each hour of tomorrow, given the load forecast and a reserve margin. That is unit commitment: a scheduling problem with on/off decisions, which makes it much harder than dispatch.
Safety. A scheduling calculation; nothing is built or switched.
What makes it hard
For each period and unit there is a binary decision and an output . The objective is
where is the running cost per hour and the start-up cost, subject to:
- load balance in every period;
- output limits : a committed unit cannot go below its minimum;
- spinning reserve: committed capacity , so that the loss of a unit can be covered at once;
- in practice also minimum up and down times, ramp rates, start-up times, crew and fuel constraints, and network limits.
With units there are combinations per period and schedules: units over hours is , so brute force is hopeless. Methods used over the decades: priority lists, dynamic programming over the combinations of each period, Lagrangian relaxation, and today mixed-integer linear programming with commercial solvers, which handles thousands of units in market-clearing engines.
Priority lists and dynamic programming
A priority list ranks units by their average cost at full load and commits them in that order until the load plus reserve is covered. It is fast and often good, but it ignores start-up costs: it switches a unit off as soon as it is not needed and pays to restart it later.
Dynamic programming (DP) walks forward period by period. For each feasible combination (state) it keeps the cheapest way to reach it from any state of the previous period, adding the start-up costs of the units that switch on. At the end, the cheapest final state traces back the best schedule. With units there are at most states per period, and DP finds the true optimum of this model (minimum up/down times need the time a unit has been on or off in the state, which multiplies the state count).
The example system
Three units, a day in six blocks of four hours, spinning reserve:
| Unit | Type (typical role) | – (MW) | (€/h) | Start-up (€) | Full-load average (€/MWh) |
|---|---|---|---|---|---|
| A | large steam unit (base load) | 100–300 | 4000 | 37.0 | |
| B | combined-cycle gas (mid-merit) | 50–200 | 5000 | 46.0 | |
| C | open-cycle gas turbine (peaker) | 20–100 | 300 | 75.0 |
Load forecast: , , , , , . Unit A is already running at midnight. (Illustrative numbers.)
Worked example: block 4 by hand
Given: block 4, , reserve rule .
Find: the cheapest feasible commitment for this block alone and its dispatch.
Solve: A + B has of capacity, short of , so C must run too (A + B + C: ). Dispatch with equal incremental cost: A's incremental cost at is , still the cheapest, so A runs at its maximum. C runs at its minimum, (its incremental cost there is above anything else). B takes the rest: , incremental cost , which is .
Check: C is committed only for reserve: it produces at a high price because the rule forces it on. A cheaper option would be more reserve from elsewhere (a storage plant or demand response), which is why reserve markets exist.
In Python: priority list against dynamic programming
import itertools
import numpy as np
# name: (Pmin, Pmax, a, b, c, start-up cost); cost a + bP + cP^2 in EUR/h, P in MW
units = {"A": (100, 300, 1200, 30.0, 0.010, 4000),
"B": (50, 200, 600, 40.0, 0.015, 5000),
"C": (20, 100, 200, 70.0, 0.030, 300)}
names = list(units)
load = [180, 380, 250, 470, 350, 220] # MW, six 4-hour blocks of one day
hours = 4
reserve = 0.10 # online capacity must cover load + 10 %
def dispatch(on, D):
"""Lossless economic dispatch of the committed units (lambda bisection). None if infeasible."""
U = [units[n] for n in on]
if not U or sum(u[0] for u in U) > D or sum(u[1] for u in U) < D * (1 + reserve):
return None
lo, hi = 0.0, 500.0
for _ in range(60):
lam = (lo + hi) / 2
P = [min(max((lam - u[3]) / (2 * u[4]), u[0]), u[1]) for u in U]
lo, hi = (lam, hi) if sum(P) < D else (lo, lam)
return sum(u[2] + u[3] * p + u[4] * p * p for u, p in zip(U, P)), P
states = [s for r in range(1, 4) for s in itertools.combinations(names, r)]
# 1) priority list: commit by full-load average cost until the reserve rule is met
avg = {n: (u[2] + u[3] * u[1] + u[4] * u[1] ** 2) / u[1] for n, u in units.items()}
order = sorted(names, key=avg.get)
print("full-load average cost (EUR/MWh):", ", ".join(f"{n} {avg[n]:.1f}" for n in order))
prev, total = ("A",), 0.0
for t, D in enumerate(load):
on = []
for n in order:
on.append(n)
if dispatch(tuple(sorted(on)), D):
break
on = tuple(sorted(on))
run, P = dispatch(on, D)
start = sum(units[n][5] for n in on if n not in prev)
total += hours * run + start
print(f" block {t+1}: {D} MW -> {'+'.join(on):5s} start-up {start:5.0f} outputs {np.round(P, 1)}")
prev = on
print(f"priority list total: {total:,.0f} EUR")
# 2) dynamic programming over all on/off combinations (forward, keeps the cheapest path to each state)
best = {("A",): (0.0, [])} # A is already running at midnight
for D in load:
new = {}
for s in states:
res = dispatch(s, D)
if res is None:
continue
for p, (cost, path) in best.items():
c = cost + hours * res[0] + sum(units[n][5] for n in s if n not in p)
if s not in new or c < new[s][0]:
new[s] = (c, path + ["+".join(s)])
best = new
cost, path = min(best.values())
print(f"dynamic programming: {' | '.join(path)} total {cost:,.0f} EUR")full-load average cost (EUR/MWh): A 37.0, B 46.0, C 75.0
block 1: 180 MW -> A start-up 0 outputs [180.]
block 2: 380 MW -> A+B start-up 5000 outputs [300. 80.]
block 3: 250 MW -> A start-up 0 outputs [250.]
block 4: 470 MW -> A+B+C start-up 5300 outputs [300. 150. 20.]
block 5: 350 MW -> A+B start-up 0 outputs [300. 50.]
block 6: 220 MW -> A start-up 0 outputs [220.]
priority list total: 301,964 EUR
dynamic programming: A | A+B | A+B | A+B+C | A+B | A total 300,614 EUR
The priority list switches B off in block 3 ( fits in A's with reserve) and pays its start-up again in block 4. Dynamic programming keeps B running at its minimum through block 3 instead. That costs more in fuel for the four hours (B's no-load and minimum-output cost, minus what A saves by producing less), which is less than the restart: the day costs instead of . With B's start-up at the two methods would agree. Real units also have minimum down times that may forbid the stop-and-restart altogether.
Guided lab: check a schedule against the forecast
Hand calculation. For the DP schedule, compute block 3 by hand: A + B dispatched at . Equal incremental cost gives with , so (and , above A's maximum): far below B's minimum, so B sits at and A at .
Simulation. Change the load forecast by in the program and see whether the commitment changes: commitment decisions are made on forecasts, and the reserve rule is what absorbs the error.
What you would measure. Operators compare the day-ahead forecast with metered demand: day-ahead load forecasts for a whole system typically miss by to (mean absolute error), more on unusual days, and wind and solar forecasts much more. The real-time dispatch then corrects within the committed units, and the reserve covers forced outages. No bench work: this is a scheduling calculation.
Hazards. None.
Pitfalls
- Forgetting minimum output. A committed unit adds its whether or not you need it; at night that can force other units off or require exports.
- Ignoring start-up costs (the priority list's flaw) or minimum up/down times (which can make a "cheaper" schedule infeasible).
- Treating reserve as free. It forces expensive units on, as in block 4.
- Assuming the forecast is exact. Robust and stochastic unit commitment plan for forecast errors, especially with a lot of wind and solar (Storage, Capacity Factor and LCOE).
Practice
- In block 1 (), B alone would also satisfy the limits and the reserve rule (). Why does every good schedule keep A instead?
- What would a reserve requirement of change in block 2 ()?
- B's start-up cost falls to . Which schedule is now cheaper in block 3, and by how much?
Answer
- A is already running (no start-up) and cheaper: at A costs , B would cost , plus B's start-up. B alone would also leave almost no reserve margin.
- : A + B () still suffices, so nothing changes; in block 4 ( needed) A + B + C () still suffices.
- Stopping B and restarting it: of fuel saved minus start-up, so stopping is cheaper by .
Test yourself
What does unit commitment decide that economic dispatch does not?
- the output of each running unit
- which units are on or off in each period
- the line flows
- the voltage setpoints
Why can a priority list give a more expensive schedule than dynamic programming?
- it ignores fuel costs
- it ignores start-up costs and the coupling between periods
- it violates the reserve rule
- it uses the wrong load
A spinning-reserve requirement of 10 % at 470 MW means the committed units must have a total maximum output of at least…
- 470 MW
- 517 MW
- 423 MW
- 564 MW
With 10 units and 24 hourly periods, how many on/off schedules exist?
- 240