Electricity Market Clearing
LP / MILP · LMP
Day-Ahead Auction · Merit Order · Locational Prices
Every day at 10 a.m., a regional transmission organization runs the world's largest and strangest auction. Hundreds of thousands of electricity bids from generators — plus price-responsive demand bids, block bids, and complex start-up/no-load bids — are submitted for the 24 hours of the next day. The ISO solves a mixed-integer linear program that maximizes social welfare (or equivalently, minimizes total declared bid cost) subject to the network and the operational constraints of power systems. The locational marginal price (LMP) at each node emerges as the dual of the nodal-balance constraint, and becomes the single number that drives every investment decision in the generation fleet.
The problem
Auction mechanics and the economics of merit-order clearing
An electricity market is the only wholesale market in the world where the commodity cannot be stored (meaningfully, at grid scale) and must be delivered through a physical network subject to the laws of electromagnetism. Every MW generated at one location flows across the network to every other node, respecting Kirchhoff's laws. A market-clearing engine must match supply to demand while simultaneously respecting the physics. This is why electricity markets look so different from other commodity markets: the clearing is the optimization problem of OPF or UC with bid prices replacing cost curves.
Most ISOs use uniform-price auctions: all accepted sellers at a node receive the same LMP, and all buyers pay that LMP, regardless of their bid. This is the efficient mechanism: bidders have incentive to bid their true marginal cost because the clearing price is set by the marginal accepted bid (the most expensive unit still dispatched), not by their own bid. Pay-as-bid auctions exist historically (UK pre-2001 NETA, some capacity markets) but are dominated by uniform-price in modern electricity markets.
Modern market clearing is increasingly SCUC (Security-Constrained UC) for the day-ahead plus SCED (Security-Constrained ED) for real-time. The SCUC is run once the day before for 24 hours; SCED runs every 5 minutes for the next 10–15 minute interval. Ancillary services (regulation, spinning reserve, non-spinning reserve) are co-optimized with energy. MISO, PJM, CAISO, ERCOT, NYISO, ISO-NE all use variations of this architecture.
Mathematical formulation
Uniform-price auction as LP / MILP
Notation
| Symbol | Meaning | Units |
|---|---|---|
| $\mathcal{G}$ | Generators submitting bids | — |
| $\mathcal{D}$ | Demand bidders | — |
| $b_g$ | Generator $g$'s bid price | $/MWh |
| $v_d$ | Demand $d$'s bid price (value) | $/MWh |
| $P_g^{\max}$ | Generator $g$'s offered quantity | MW |
| $D_d^{\max}$ | Demand $d$'s quantity bid | MW |
| $p_g$ | Awarded generation | MW |
| $q_d$ | Awarded demand | MW |
| $\lambda$ | LMP (dual of balance) | $/MWh |
Social welfare maximization
The market operator maximizes the sum of consumer willingness-to-pay minus supplier bid cost:
Equivalent to minimizing total bid cost (when demand is inelastic):
Constraints
Nodal balance (source of LMP dual):
LMP at bus $i$ = dual multiplier of (2). Quantity bounds:
Transmission constraints (DC-OPF):
Additional constraints for UC-style markets: minimum up/down times, start-up costs, reserve adequacy, reserve-energy co-optimization.
LMP decomposition
When transmission binds, the LMP at different nodes diverges. The LMP at bus $i$ decomposes:
where $\lambda^{\mathrm{sys}}$ is the system marginal price (same everywhere if unconstrained), $\lambda^{\mathrm{cong}}_i$ is the congestion component, and $\lambda^{\mathrm{loss}}_i$ is the marginal loss component. This decomposition is reported to every market participant by the ISO.
Make-whole payments
Uniform-price auctions can leave generators “not made whole” on commitment costs (start-up, no-load). ISOs resolve this with uplift payments (PJM’s make-whole, MISO’s revenue sufficiency guarantee) that top up any committed generator whose LMP revenues don't cover its own bid costs + commitment obligations. Uplift violates pure uniform-pricing theory but is economically necessary given the MIP structure.
Complexity
Pure energy market clearing (no network) is a polynomial-time LP. With DC-OPF, it's a larger LP; with UC (commitment binaries) it's a MILP. Real ISO clearings handle tens of thousands of binaries and millions of continuous variables, solved daily in 20 minutes to 1 hour on commercial MILP solvers (PJM uses IBM CPLEX; MISO uses Gurobi / FICO Xpress).
Real-world data
PJM, MISO, CAISO, ERCOT published data
All US RTOs publish historical LMPs at all nodes, clearing results, and market monitoring reports. PJM Data Miner, CAISO OASIS, and their counterparts offer hourly/5-minute LMP, congestion, and ancillary prices going back decades.
Nord Pool, EPEX Spot (Europe)
European day-ahead markets. Unlike US LMP-based markets, most European markets use zonal pricing (one price per country or bidding zone), with flow-based coupling across zones.
Illustrative auction (this page)
The interactive solver handles a 6-generator day-ahead auction with user-configurable demand. Visualizes the merit-order curve, LMP formation, and how a change in load moves through the bid stack. Optional transmission constraint causes LMP divergence across two zones.
Interactive solver
Day-ahead auction with merit order and LMP visualization
Auction parameters
Merit order & LMP formation
Solution interpretation
The merit-order staircase is the most-watched object in the entire wholesale electricity industry. Each step is one bid block: low-cost renewables and nuclear at the left floor, rising through combined-cycle gas, peaking gas, and oil at the right wall. The intersection with demand sets the LMP; the generator at that step is the marginal generator. Its bid becomes the price for everyone.
A carbon adder shifts the stack: higher-emissions units lift more than lower-emission ones. At enough carbon price ($100+/tCO2 in 2024 projections), coal fully falls out and gas becomes marginal; at even higher levels, gas fills only peaks and renewables+storage fill the base. This is the central OR story of the energy transition visualized in real time.
Congestion is the other major driver of outcome. When the transmission link between Zone A (cheap) and Zone B (expensive) saturates, the two zones become different markets: Zone A sees a low LMP (the marginal generator there is cheap), Zone B sees a high LMP (a more expensive local generator must run). The LMP spread is the ISO's direct economic signal to transmission investors — exactly the input that feeds TEP.
The producer surplus (area below LMP but above bid curve, left of cleared quantity) is the aggregate profit to inframarginal generators: coal at $25 bid but LMP $80 earns $55/MWh inframarginal rent. This is the economic signal that drives GEP decisions. Market clearing is not just an operational tool — it generates all the price information that the energy sector runs on.
Extensions & variants
Day-ahead SCUC with uplift
The real US-ISO day-ahead auction is a large MILP co-optimizing energy, reserves, and commitment binaries, with N-1 security constraints. Solved nightly; all major ISOs use commercial MILP solvers.
Real-time SCED
Every 5-15 minutes: re-optimize dispatch given the fixed day-ahead commitment plus updated load, renewable, and outage information. QP with DC-OPF; 5,000+ generators and 10,000+ lines in real ISOs.
Capacity markets
Separate auctions for capacity (MW available to be dispatched, paid regardless of energy) that pair with energy markets. PJM RPM, MISO resource adequacy. Capacity auctions use VCG-like mechanisms with reliability constraints.
Zonal markets (Europe)
Most European markets use zonal pricing with flow-based coupling. Each bidding zone has a single price; cross-zone flows are capacity-limited. Nord Pool's multi-zone market solves a large LP integrated across Scandinavia.
Strategic bidding & market power
Game-theoretic extension where generators bid strategically (above marginal cost). Supply-function equilibrium models and agent-based market simulation are active research areas. Regulatory bodies (FERC, DG Energy) monitor for market power.
Net-zero market design
As marginal cost approaches zero (renewables set LMP), traditional energy-only markets collapse financially. Proposals: capacity markets, scarcity pricing, 100% RE auctions, operating reserve demand curves. Very active research + policy area (2020+).