pub struct McAcOpfInstance { /* private fields */ }Expand description
The multiconductor AC optimal power flow instance: the shared network, the typed per phase objective, and the active terminal voltage, conductor, and per phase generator constraint selections.
Implementations§
Source§impl McAcOpfInstance
impl McAcOpfInstance
Sourcepub fn from_network(network: MulticonductorNetwork) -> Result<Self, Error>
pub fn from_network(network: MulticonductorNetwork) -> Result<Self, Error>
Build the instance with the default per phase objective and every stated limit active.
§Errors
A network with no voltage source.
Sourcepub fn with_objective(self, objective: Objective) -> Self
pub fn with_objective(self, objective: Objective) -> Self
Replace the objective, consuming the instance. The shared network moves; no table is copied.
Sourcepub fn with_objective_term(self, term: ObjectiveTerm) -> Self
pub fn with_objective_term(self, term: ObjectiveTerm) -> Self
Append one objective term, consuming the instance.
Sourcepub fn with_constraints(
self,
constraints: MulticonductorActiveConstraints,
) -> Self
pub fn with_constraints( self, constraints: MulticonductorActiveConstraints, ) -> Self
Replace the active constraint selections, consuming the instance.
Sourcepub fn with_initial_point(
self,
point: OperatingPoint<MulticonductorNetwork>,
) -> Self
pub fn with_initial_point( self, point: OperatingPoint<MulticonductorNetwork>, ) -> Self
Supply an optional solver initial point.
Sourcepub fn with_network(self, network: MulticonductorNetwork) -> Result<Self, Error>
pub fn with_network(self, network: MulticonductorNetwork) -> Result<Self, Error>
Replace the network while preserving this instance’s objective, constraint selections, and a compatible initial point.
Sourcepub fn network(&self) -> &MulticonductorNetwork
pub fn network(&self) -> &MulticonductorNetwork
The network this instance calculates on. Borrowed; never a copy.
Sourcepub const fn constraints(&self) -> &MulticonductorActiveConstraints
pub const fn constraints(&self) -> &MulticonductorActiveConstraints
The active constraint selections.
Sourcepub const fn initial_point(
&self,
) -> Option<&OperatingPoint<MulticonductorNetwork>>
pub const fn initial_point( &self, ) -> Option<&OperatingPoint<MulticonductorNetwork>>
The optional solver initial point.
Sourcepub fn to_mc_ac_pf(&self) -> Result<(McAcPfInstance, Vec<Diagnostic>), Error>
pub fn to_mc_ac_pf(&self) -> Result<(McAcPfInstance, Vec<Diagnostic>), Error>
The multiconductor power flow instance for this problem’s network at its stated injections: the objective and constraint selections are discarded, and the discard is recorded.
§Errors
Trait Implementations§
Source§impl Clone for McAcOpfInstance
impl Clone for McAcOpfInstance
Source§fn clone(&self) -> McAcOpfInstance
fn clone(&self) -> McAcOpfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more