Skip to main content

Module sim

Module sim 

Source
Expand description

The sandbox simulator: telemetry as a pure function of asset, seed, faults and time.

Values are piecewise constant per minute, so the replay is deterministic and never needs a store. Every value is computed directly for its minute — a battery’s state of charge in closed form from its daily schedule — so one asset at one instant costs O(1), whatever the time of day. The physics is plausible, not accurate — for demonstrating and testing, never for forecasting. Weather is shared by every asset (correlated pools); each asset adds its own small noise.

Structs§

Dispatch
A battery’s traded schedule for one delivery day: it follows the setpoints instead of its own daily pattern. The state of charge is closed-form from prefix sums, so it stays O(log n).
Fault
A planned disturbance of one asset over [from, to).
Simulator
The simulator for one scenario.

Enums§

FaultKind
What a fault does to an asset.

Constants§

STALE_SECS
Simulated values are stale after a minute without a new one.