Skip to main content

BalancedOperatingPointBuilder

Struct BalancedOperatingPointBuilder 

Source
pub struct BalancedOperatingPointBuilder { /* private fields */ }
Expand description

Bulk constructor for a balanced operating point series. Identities resolve once against the network’s stable order — buses in bus table order by ID, elements in table order by payload identity — and every column is validated against that order and the point count. Dense columns are point major; sparse columns override one base row per point by identity.

Implementations§

Source§

impl BalancedOperatingPointBuilder

Source

pub fn new(network: BalancedNetwork, time_points: Vec<TimePoint>) -> Self

Source

pub fn for_point(network: BalancedNetwork) -> Self

Start a builder for one operating point.

Source

pub fn bus_voltage_magnitudes(self, values: Vec<f64>) -> Self

Dense bus voltage magnitudes: point_count * n_buses values in bus table order, point major.

Source

pub fn bus_voltage_angles(self, values: Vec<f64>) -> Self

Source

pub fn bus_active_injections(self, values: Vec<f64>) -> Self

Source

pub fn bus_reactive_injections(self, values: Vec<f64>) -> Self

Source

pub fn generator_active_powers(self, values: Vec<f64>) -> Self

Source

pub fn generator_reactive_powers(self, values: Vec<f64>) -> Self

Source

pub fn generator_voltage_setpoints(self, values: Vec<f64>) -> Self

Source

pub fn generator_in_service(self, values: Vec<bool>) -> Self

Source

pub fn load_active_powers(self, values: Vec<f64>) -> Self

Source

pub fn load_reactive_powers(self, values: Vec<f64>) -> Self

Source

pub fn branch_in_service(self, values: Vec<bool>) -> Self

Source

pub fn branch_tap_ratios(self, values: Vec<f64>) -> Self

Source

pub fn branch_phase_shifts(self, values: Vec<f64>) -> Self

Source

pub fn switch_closed(self, values: Vec<bool>) -> Self

Source

pub fn sparse_bus_voltage_magnitudes( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Sparse bus voltage magnitudes: one base row plus per point overrides keyed by bus identity.

Source

pub fn sparse_bus_voltage_angles( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_bus_active_injections( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_bus_reactive_injections( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_generator_active_powers( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_generator_reactive_powers( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_generator_voltage_setpoints( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_generator_in_service( self, base: Vec<bool>, changes: Vec<Vec<(String, bool)>>, ) -> Self

Source

pub fn sparse_load_active_powers( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Sparse load active powers: one base row in load table order plus per point overrides keyed by payload identity.

Source

pub fn sparse_load_reactive_powers( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_branch_in_service( self, base: Vec<bool>, changes: Vec<Vec<(String, bool)>>, ) -> Self

Source

pub fn sparse_branch_tap_ratios( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_branch_phase_shifts( self, base: Vec<f64>, changes: Vec<Vec<(String, f64)>>, ) -> Self

Source

pub fn sparse_switch_closed( self, base: Vec<bool>, changes: Vec<Vec<(String, bool)>>, ) -> Self

Source

pub fn build(self) -> Result<TimeSeries<OperatingPoint<BalancedNetwork>>, Error>

Resolve every identity once, validate every column, and build the series. The points share the network handle and the columns.

§Errors

A shape mismatch, a duplicate or unknown identity, or a time axis whose length disagrees with the columns.

Source

pub fn build_point(self) -> Result<OperatingPoint<BalancedNetwork>, Error>

Build one operating point.

§Errors

The builder does not contain exactly one point, or a quantity is invalid.

Trait Implementations§

Source§

impl Debug for BalancedOperatingPointBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.