pub struct McAcOpfSolution { /* private fields */ }Expand description
The multiconductor AC optimal power flow solution: the power flow results plus per phase generator dispatch and the objective value.
Implementations§
Source§impl McAcOpfSolution
impl McAcOpfSolution
Sourcepub fn new(
instance: Arc<McAcOpfInstance>,
termination: Termination,
terminal_voltage_magnitude: Vec<f64>,
terminal_voltage_angle: Vec<f64>,
source_active_injection: Vec<f64>,
generator_active_power: Vec<f64>,
objective: f64,
) -> Result<Self, Error>
pub fn new( instance: Arc<McAcOpfInstance>, termination: Termination, terminal_voltage_magnitude: Vec<f64>, terminal_voltage_angle: Vec<f64>, source_active_injection: Vec<f64>, generator_active_power: Vec<f64>, objective: f64, ) -> Result<Self, Error>
Assemble the results: the power flow columns plus the optimized per phase generator dispatch (watts, generator table order with each generator’s terminal map order) and the objective value.
§Errors
A column whose length disagrees with the instance’s resolved terminals or generator conductors.
Sourcepub fn instance(&self) -> &McAcOpfInstance
pub fn instance(&self) -> &McAcOpfInstance
The immutable instance this solution solves. Borrowed; never a copy.
The shared instance owner, for another solution of the same problem.
Sourcepub fn network(&self) -> &MulticonductorNetwork
pub fn network(&self) -> &MulticonductorNetwork
The network the solved instance calculates on.
Sourcepub fn termination(&self) -> &Termination
pub fn termination(&self) -> &Termination
How the producing calculation ended.
Sourcepub fn with_producer(self, producer: impl Into<String>) -> Self
pub fn with_producer(self, producer: impl Into<String>) -> Self
Record the producer identity.
Sourcepub fn with_residuals(self, residuals: Residuals) -> Self
pub fn with_residuals(self, residuals: Residuals) -> Self
Record the numerical residuals.
Sourcepub fn terminal_voltage_magnitude(
&self,
bus: &str,
terminal: &str,
) -> Option<f64>
pub fn terminal_voltage_magnitude( &self, bus: &str, terminal: &str, ) -> Option<f64>
Voltage magnitude at one bus terminal, volts.
Sourcepub fn terminal_voltage_angle(&self, bus: &str, terminal: &str) -> Option<f64>
pub fn terminal_voltage_angle(&self, bus: &str, terminal: &str) -> Option<f64>
Voltage angle at one bus terminal, radians.
Sourcepub fn terminal_current_magnitude(
&self,
bus: &str,
terminal: &str,
) -> Option<f64>
pub fn terminal_current_magnitude( &self, bus: &str, terminal: &str, ) -> Option<f64>
Current into the network at one bus terminal, amperes, when the producer reported currents.
Sourcepub fn terminal_active_power(&self, bus: &str, terminal: &str) -> Option<f64>
pub fn terminal_active_power(&self, bus: &str, terminal: &str) -> Option<f64>
Active power into the network at one bus terminal, watts, when the producer reported terminal powers.
Sourcepub fn with_terminal_currents(self, values: Vec<f64>) -> Result<Self, Error>
pub fn with_terminal_currents(self, values: Vec<f64>) -> Result<Self, Error>
Record per terminal current magnitudes, amperes.
§Errors
A column whose length disagrees with the resolved terminals.
Sourcepub fn with_terminal_powers(self, values: Vec<f64>) -> Result<Self, Error>
pub fn with_terminal_powers(self, values: Vec<f64>) -> Result<Self, Error>
Record per terminal active powers, watts.
§Errors
A column whose length disagrees with the resolved terminals.
Sourcepub fn source_active_injections(&self) -> &[f64]
pub fn source_active_injections(&self) -> &[f64]
Per source terminal active injections, watts, in source table order with each source’s terminal map order.
Sourcepub fn generator_active_powers(&self) -> &[f64]
pub fn generator_active_powers(&self) -> &[f64]
The optimized per phase generator dispatch, watts, generator table order with each generator’s terminal map order.
Trait Implementations§
Source§impl Clone for McAcOpfSolution
impl Clone for McAcOpfSolution
Source§fn clone(&self) -> McAcOpfSolution
fn clone(&self) -> McAcOpfSolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more