What is merit order?
The ranking of power plants by marginal cost, used to decide which ones are switched on first to meet demand.
Merit order diagram example
Merit order is the way electricity markets and grid operators line up generators from the cheapest to the most expensive to run, and call on them in that order until demand is met. It explains why the price of power moves with demand and why adding cheap supply lowers prices. It is one of the core ideas for understanding who earns what in an electricity market.
How it works
Each plant has a marginal cost, which is the cost of producing one more unit of energy. Wind and solar have almost none, nuclear and coal are low to moderate, and gas peaking plants are high. The operator stacks these costs from lowest to highest, draws a line where the cumulative supply reaches demand, and the last plant needed sets the market price for everyone.
This creates a trade-off and a feedback effect. When cheap supply increases, expensive plants are pushed out of the order and the price falls, which can make those plants unprofitable even though the system still needs them for rare peaks. When demand rises, the price jumps as costlier plants are called on.
Example
Say three plants offer power: wind at 100 MW with a marginal cost of 0 per MWh, coal at 100 MW at 40, and gas at 100 MW at 90. If demand is 150 MW, wind supplies all 100 MW and coal supplies 50 MW, so the price is set by coal at 40 per MWh. If demand rises to 250 MW, gas must supply 50 MW and the price rises to 90 for all 250 MW. Wind then earns 90 per MWh, though it costs nothing to run. These are round illustrative numbers.
How to model it in Machinations
Represent each plant as a Source with a capacity and a marginal cost held in a Register. Use Gates with conditions to switch plants on in cost order, and a Pool for unmet demand. A Register takes the cost of the last plant used as the price. Make demand and the wind capacity Levers, then Play and chart the price.
See merit order in a system you can Play
Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.