Skip to content

fluxopt.contract

The cross-layer data contract.

Names shared between the layers — model_data (writes them), model (builds variables/constraints from them), and results / contributions / stats (read the solution) — live here so a rename is a one-line change instead of a silent cross-file drift.

Core dimensions The entity dimensions flow, carrier, converter, storage, effect, source_effect, time, period and the converter equation axis eq_idx are stable vocabulary used as plain literals throughout — ubiquitous enough that constants would hurt readability.

Absence Not-set is a missing row, throughout. An unsized flow has no row in flows.sizes, an unbounded aggregate none in flows.aggregates, an Investment that never expires none in invest.lifetime. There are no sentinel values to test for and nothing to spell "not set" as.

``None`` survives at container level, where it means the feature is
absent from the whole system: the converters / storages / piecewise /
status tables, and the sizing and invest sub-containers.

Solution variables linopy variable names follow <family>--<field> with family one of flow / component / storage / invest / effect. The same names key Result.solution.

Classes:

Name Description
Var

Solution variable names, <family>--<field> (also keys of Result.solution).

Var

Solution variable names, <family>--<field> (also keys of Result.solution).