An example of what you build on lpspec. A capacity-expansion planner: the model is 69 lines of YAML, the job that solves and archives it 380 lines of Python, this site 1225 lines of Markdown and SQL over the parquet the job wrote, and the notebook 342 lines. All of it is in the source; nothing else is behind it.

base, as solved

The model page prints the spec with nothing bound: no data, no solver, just what the YAML states. The other pages print what the solver returned, with no math beside it. This page is the two joined — every declaration in the notation models/pathway.symbols.yaml declares, and under each one what the archive says it cost.

An annex is about one run, and this is base. Any other archive in the directory prints the same way:

uv run showcase-annex carbon_cap --runs runs
period 2030 2035 2040 2045 total
objective 15,317,224 9,522,038 10,461,374 9,755,721 45,056,357

Every period solved to optimal.

Constraints

What the row costs at the optimum.

accumulate

Keyed by year, generator.

rows priced largest shadow price
12 11 60,000.00

balance

Keyed by year, day, hour.

rows priced largest shadow price
288 86 67,000.00

capacity

Keyed by year, day, hour, generator.

rows priced largest shadow price
864 176 67,000.00

carbon

Keyed by year.

rows priced largest shadow price
4 0 0.00

Named expressions

The quantity the model gives a name.

capex

Keyed by year, generator.

2030 2035 2040 2045
10,166,268.4 3,575,306.4 4,912,790.7 4,401,556.0

emissions

Keyed by year.

2030 2035 2040 2045
37,461.5 33,981.3 26,111.0 21,416.7

opex

Keyed by year, generator.

2030 2035 2040 2045
5,150,955.1 5,946,731.2 5,548,583.7 5,354,165.2

Variables

What the solver was free to choose.

build

Keyed by year, generator.

rows total non-zero
12 484.6 10

p

Keyed by year, day, hour, generator.

rows total non-zero
864 21,683.1 468

total

Keyed by year, generator.

rows total non-zero
12 1,523.3 12