Skip to main content

to_gridfm_record_batches

Function to_gridfm_record_batches 

Source
pub fn to_gridfm_record_batches(
    snapshots: &[GridfmSnapshot<'_>],
    opts: &GridfmOptions,
) -> Result<GridfmTables>
Expand description

Build the four gridfm tables for a batch of scenarios, row stacked and keyed by the scenario column. Pure (no I/O). Each snapshot carries its own scenario id; the include_y_bus/taps/shifts flags apply to every snapshot.

§Errors

Error::EmptyScenarioBatch for an empty batch, Error::ScenarioShapeMismatch if the snapshots don’t share one base element set and system base or reuse a scenario id, powerio_tx::Error::ReferenceBusCount unless each case has exactly one reference bus (graphkit needs a slack), Error::NormalizedGridfmSnapshot for a normalized input, Error::NonFiniteGridfmValue for a NaN/Inf physical quantity (or a NaN limit — ±Inf limits are the valid unbounded sentinel) that would reach Parquet, powerio_tx::Error::NonFiniteSusceptance if a finite branch impedance still yields a non-finite admittance, and powerio_tx::Error::UnknownBus if a generator or branch references a bus the network doesn’t define.