pub struct AcPfInstance { /* private fields */ }Expand description
The calculation types used by solver consumers. The full problem
vocabulary lives in powerio_prob; these types sit at the facade root so
a consumer does not need a second PowerIO dependency to name its boundary.
The AC power flow instance: the shared network plus one
AcBusSpecification per bus.
Implementations§
Source§impl AcPfInstance
impl AcPfInstance
Sourcepub fn new(
network: BalancedNetwork,
specifications: Vec<AcBusSpecification>,
) -> Result<AcPfInstance, Error>
pub fn new( network: BalancedNetwork, specifications: Vec<AcBusSpecification>, ) -> Result<AcPfInstance, Error>
Build an AC power flow instance from explicit bus specifications. The specification vector follows bus table order and is retained exactly; it is not inferred again from bus types, loads, or generator schedules.
§Errors
The specification count differs from the bus count, or no specification declares a reference bus.
Sourcepub fn from_network(network: BalancedNetwork) -> Result<AcPfInstance, Error>
pub fn from_network(network: BalancedNetwork) -> Result<AcPfInstance, Error>
Build the instance from the network’s stated data. A PQ bus states its net injections; a PV bus its net active injection and the regulating generator’s voltage setpoint; a reference bus its setpoint magnitude and stated angle.
§Errors
A network with no reference bus, or conflicting active voltage controllers: two in service generators at one bus stating different voltage setpoints are refused until an explicit edit resolves them.
Sourcepub fn with_initial_point(
self,
point: OperatingPoint<BalancedNetwork>,
) -> AcPfInstance
pub fn with_initial_point( self, point: OperatingPoint<BalancedNetwork>, ) -> AcPfInstance
Supply an optional solver initial point.
Sourcepub fn with_network(
self,
network: BalancedNetwork,
) -> Result<AcPfInstance, Error>
pub fn with_network( self, network: BalancedNetwork, ) -> Result<AcPfInstance, Error>
Replace the network and recalculate the fixed bus specifications while preserving a compatible initial point.
§Errors
The replacement has no reference bus, has conflicting voltage controllers, or changes an identity layout used by the initial point.
Sourcepub fn network(&self) -> &BalancedNetwork
pub fn network(&self) -> &BalancedNetwork
The network this instance calculates on. Borrowed; never a copy.
Sourcepub fn specifications(&self) -> &[AcBusSpecification]
pub fn specifications(&self) -> &[AcBusSpecification]
The per bus specifications, in bus table order.
Sourcepub const fn initial_point(&self) -> Option<&OperatingPoint<BalancedNetwork>>
pub const fn initial_point(&self) -> Option<&OperatingPoint<BalancedNetwork>>
The optional solver initial point.
Sourcepub fn to_dc_pf(&self) -> (DcPfInstance, Vec<Diagnostic>)
pub fn to_dc_pf(&self) -> (DcPfInstance, Vec<Diagnostic>)
The DC power flow instance this AC problem implies: reactive data and voltage magnitudes are discarded, and the DC model’s flat voltage assumption is recorded as a diagnostic.
Trait Implementations§
Source§impl BalancedCalculationInstance for AcPfInstance
impl BalancedCalculationInstance for AcPfInstance
Source§fn network(&self) -> &BalancedNetwork
fn network(&self) -> &BalancedNetwork
Source§impl Clone for AcPfInstance
impl Clone for AcPfInstance
Source§fn clone(&self) -> AcPfInstance
fn clone(&self) -> AcPfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more