pub struct GridfmSnapshot<'a> { /* private fields */ }Expand description
One snapshot in a gridfm scenario batch: a parsed Network 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 and bus-id ordering — so the
dense bus index means the same bus across snapshots and the tables stay
schema-consistent. The builders enforce that 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 variants (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 Network, scenario: i64) -> Self
pub fn new(net: &'a Network, 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
numbered_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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more