pub struct GridfmSnapshot<'a> { /* private fields */ }Expand description
One snapshot in a gridfm scenario batch: a parsed BalancedNetwork and the scenario
id stamped into its rows.
powerio has no solver, so each snapshot is an operating point a caller (e.g. a
scenario generator) has already produced. Snapshots in one batch share a base
element set — the same bus/branch/gen counts, system base, and element row
identities — so every dense index means the same element across snapshots
and the tables stay schema-consistent. Scenario ids are unique within a
batch. The builders enforce these conditions and otherwise return
Error::ScenarioShapeMismatch. Within that, load, dispatch, voltages,
branch status, bus type, and costs may all vary per snapshot — this mirrors
gridfm-datakit, whose topology scenarios (N-K, random component drop) toggle
BR_STATUS/GEN_STATUS on a fixed element set, and gridfm-graphkit, which
rebuilds the graph independently for every scenario.
Implementations§
Source§impl<'a> GridfmSnapshot<'a>
impl<'a> GridfmSnapshot<'a>
Sourcepub fn new(net: &'a BalancedNetwork, scenario: i64) -> Self
pub fn new(net: &'a BalancedNetwork, scenario: i64) -> Self
A snapshot pairing a network with the scenario id stamped into its rows.
For the common “k-th input is base + k” numbering, prefer
number_snapshots, which assigns ids with checked arithmetic.
Trait Implementations§
Source§impl<'a> Clone for GridfmSnapshot<'a>
impl<'a> Clone for GridfmSnapshot<'a>
Source§fn clone(&self) -> GridfmSnapshot<'a>
fn clone(&self) -> GridfmSnapshot<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more