citylearn.internal.market_history module
Lossless, append-oriented storage for community market settlements.
- class citylearn.internal.market_history.MarketSettlementHistory(steps=())[source]
Bases:
MutableSequenceBinary64 columns, interned member IDs and per-step row offsets.
Indexing, slicing and iteration return ordinary lists of dictionaries for the requested steps only. These are detached snapshots: assign a changed step back to the history to persist edits. Nonstandard/legacy rows are retained verbatim in a sparse side table, rather than dropping unknown fields.
Arrays grow amortized, without retaining per-row Python objects. Totals use the legacy chronological addition order; edits invalidate them and the next query rebuilds them once. No prices, flows or physical state are recomputed.