The model

What GridSim is, and how it computes.

EXPLAIN

GridSim is the public face of grid-sim, a deterministic Rust simulator of the Great Britain electricity system. It couples two engines that answer two different physical questions.

Two coupled engines

Energy adequacy — half-hourly chronological dispatch over real weather (1985–2024) and real fleet data. It answers: does the energy balance, hour by hour, across a whole year? This is where the storage question lives — required long-duration storage, curtailment, capture prices, system costs.

System stability — swing-equation event simulation. It answers: does the system survive losing its largest infeed? Inertia, rate of change of frequency, and frequency nadir, for the grid as dispatched at a given moment.

The two are coupled: the stability inputs (system inertia) are derived from the adequacy outputs (which synchronous plant is running each hour).

The determinism contract

Every output is a pure function of three inputs and nothing else:

results = f(scenario file, data-pack checksum, engine git hash)

There is no wall-clock and no unseeded randomness. Re-running the same scenario against the same data pack with the same engine build gives a bit-identical result. That is what makes each published number pinnable by a regression test — and what makes the whole site reproducible. See Reproducibility & data.

How this section is organised

This mirrors the structure a reader of PyPSA, oemof or Calliope will expect.

The generated Rust API reference is published separately at /api/ (built from cargo doc in the engine’s CI; not yet wired on this scaffold).