pub struct DcPfInstance { /* private fields */ }Expand description
The DC power flow instance: the shared network plus per bus boundary specifications and the selected branch susceptance formula.
Implementations§
Source§impl DcPfInstance
impl DcPfInstance
Sourcepub fn from_network(network: BalancedNetwork) -> Result<Self, Error>
pub fn from_network(network: BalancedNetwork) -> Result<Self, Error>
Build the instance from the network’s stated data: reference buses contribute their stated angle, isolated buses no equation, and every other bus its net active injection over in service generators and loads.
§Errors
A network with no reference bus.
Sourcepub fn with_branch_susceptance_formula(
self,
formula: BranchSusceptanceFormula,
) -> Self
pub fn with_branch_susceptance_formula( self, formula: BranchSusceptanceFormula, ) -> Self
Select the branch susceptance formula, consuming the instance. The network handle moves; no table is copied.
Sourcepub fn with_initial_point(self, point: OperatingPoint<BalancedNetwork>) -> Self
pub fn with_initial_point(self, point: OperatingPoint<BalancedNetwork>) -> Self
Supply an optional solver initial point.
Sourcepub fn with_network(self, network: BalancedNetwork) -> Result<Self, Error>
pub fn with_network(self, network: BalancedNetwork) -> Result<Self, Error>
Replace the network and recalculate the fixed bus specifications while preserving the branch susceptance formula and a compatible initial point.
§Errors
The replacement has no reference bus 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) -> &[DcBusSpecification]
pub fn specifications(&self) -> &[DcBusSpecification]
The per bus boundary specifications, in bus table order.
Sourcepub const fn branch_susceptance_formula(&self) -> BranchSusceptanceFormula
pub const fn branch_susceptance_formula(&self) -> BranchSusceptanceFormula
The selected branch susceptance formula.
Sourcepub const fn initial_point(&self) -> Option<&OperatingPoint<BalancedNetwork>>
pub const fn initial_point(&self) -> Option<&OperatingPoint<BalancedNetwork>>
The optional solver initial point.
Trait Implementations§
Source§impl BalancedCalculationInstance for DcPfInstance
impl BalancedCalculationInstance for DcPfInstance
Source§fn network(&self) -> &BalancedNetwork
fn network(&self) -> &BalancedNetwork
Source§impl Clone for DcPfInstance
impl Clone for DcPfInstance
Source§fn clone(&self) -> DcPfInstance
fn clone(&self) -> DcPfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more