Examples#
Each example page contains the specification of one optimisation model
(a spec) twice. The page has the YAML file,
and the math that the typesetter prints from the file.
Every spec is a file under examples/ in the repository, and the test suite
loads each one. Open a page to see whether the language can state a problem
like yours, and what each line of the file means.
- Least-cost dispatch is the smallest spec with a balance, a bound and a cost to minimise.
- Unit commitment states
previous_statusin three cases, so one inequality covers a running unit and a starting unit. - One construct per spec contains the smallest file for
each form of the four operators and
dual, each file beside its typeset equation. - A component library is several files that
mergecomposes into one spec, each written against one shared fragment (the surface).
An open-source power system modelling framework
(PyPSA) has its own pages in the Development section,
which start at PyPSA in one file. They state the model that PyPSA
builds, as a proof that the language can state it.
PyPSA in 25 files states the same spec in fragments
that merge composes.
See also
- Typeset output, for the formats the typesetter prints and their options
- The language reference, for every key a file accepts