Peaky Flexers

Peaky Flexers

Electricity Market Price Formation — Welfare-Maximising Capacity Investment & Dispatch with Zero Variable Cost Intermittency

Get Flexing — How to Use This Model Documentation & README on GitHub Contact me

Load Duration Curve Blocks i

Load Duration Curve Blocks

Real electricity demand varies hour by hour. Rather than modelling all 8,760 hours, the model uses a Load Duration Curve that groups hours by demand level into three blocks.

BlockRepresentsDefault
Winter PeakColdest, highest-demand hours300h
ShoulderSpring, autumn, milder winter3,000h
Low DemandSummer & overnight5,460h

Set the hours for each block (should sum to 8,760). Demand levels come from the tier definitions.

These are not calendar months — think of them as buckets grouping hours with similar demand and weather conditions.

Renewables Availability Profile (Sub-Blocks) i

Renewables Intermittency

Each LDC block is split into two sub-blocks to capture intermittency:

  • Low Renewables — hours when renewable output is scarce
  • High Renewables — hours when output is plentiful
ParameterMeaning
% HoursFraction of block hours in this sub-block (must sum to 100%)
% AvailabilityFraction of installed renewables capacity available

This creates intra-block price differentials that make storage valuable within a block — charging when renewables are plentiful, discharging when scarce.

Each block is split into Low Renewables and High Renewables sub-blocks to capture intermittency. % Hours must sum to 100 per block.

Demand Tiers & Expandable Demand i

Demand Tiers

Demand in each block is divided into three tiers by willingness to pay:

  • High-value — critical loads (hospitals, data centres). High VoLL, high shift cost.
  • Mid-value — important but flexible (commercial heating). Moderate VoLL.
  • Low-value — deferrable loads (EV charging, water heating). Low VoLL.
ParameterMeaning
Quantity (GW)GW of this tier present during the block
VoLLMax price this demand will pay; above this it is curtailed
Shift CostCost to move demand to a later, cheaper block (downward only)

Expandable demand activates when prices fall below its value — representing new consumption attracted by cheap power.

Supply-Side Technology Costs i

Supply Technologies

The model determines how much of each technology to build. No capacities are pre-set.

  • Renewables — zero fuel cost; output limited by availability profile. Input: annualised capital cost.
  • Nuclear — firm baseload capacity with low variable cost and zero carbon emissions. Inputs: annualised capital cost, variable cost.
  • Gas Peaker — flexible, burns gas. Inputs: capital cost, variable cost, carbon price, emission factor.
  • Storage — specified via CapEx: duration (h), connection cost (£/MW), cell cost (£/MWh), asset life, discount rate (%). Annualised using capital recovery factor. No fuel cost — implied cycling cost is an output.
  • T&D — network capacity, sized to peak generation. Input: annualised capacity cost.

Storage conversion: power cost = (connection/1000)×CRF; energy cost = (cell cost/1000)×CRF, amortised over cycles/year. CRF uses discount rate and asset life.

The model determines optimal capacities. No fixed capacities are pre-set.

Zero variable cost generation (wind, solar). Output depends on the Renewables Availability Profile above.

Firm baseload with zero carbon emissions. Planned outage reduces availability in all periods. Peak unavailability is an additional derating applied only during winter peak sub-blocks.

CapEx is annualised using the capital recovery factor (CRF) with the discount rate: power cost = (connection/1000)×CRF; energy cost = (cell cost/1000)×CRF, then amortised over cycles.

Sized to peak system generation. The constraint binds at the sub-block with the highest total dispatched power.

Household Bill Optimisation (Optional)

Takes system clearing prices and optimises a single household’s demand, storage, and curtailment.

Market Equilibrium Summary

Optimal Capacity Mix

Input Load Duration Curve

Raw demand blocks as entered, before any optimisation, shifting, or storage.

Generation Duration Curve

Total generation by source in each sub-block after optimisation, sorted by GW.

Mouse-over within blocks for more information.

Price Duration Curve

Clearing prices sorted high to low, with demand served, shifted, and storage activity per sub-block.

Demand & Supply by Sub-Block (GW)

Energy by Sub-Block (GWh)

Each bar shows GW × hours for that sub-block. Storage charging appears as demand; storage discharging appears as supply.

Storage Activity

Detailed Sub-Block Results

Comments & Feature Requests

Comments, bug reports, and ideas for new features are very welcome.

If you'd like to make a public suggestion about the model, please open a GitHub issue. If you'd prefer to contact Tony directly, use the email link below.

Public comments on GitHub Email Tony

AI Assistant

A Claude API key is needed to use this feature. Get a Claude API key

Welcome to Peaky Flexers

This is a beta project. Feedback welcome!

Please get in touch with comments or suggestions.