Skip to content

Examples#

Open a page here to see one whole spec as the YAML file and as the math that the typesetter prints from it. Every spec is a file under examples/ in the repository.

  • Least-cost dispatch is the smallest whole spec, with a balance, a bound and a cost to minimise.
  • Unit commitment adds an on/off decision and a start-up ramp. One quantity has three cases, so a single inequality covers a running unit and a starting unit.
  • One construct per spec shows each operator in the smallest file that uses it, beside the equation it prints.
  • A component library is several files that compose into one spec. Each file reads the shared entries of one surface file and prints on its own. The composed page shows what merge returns.

The PyPSA pages start at PyPSA in one file. They state the model that PyPSA builds, as a proof of concept, and they sit in the Development section. PyPSA in 24 files composes the same spec from fragments.

To print the math of your own spec, see Typeset the math.