pub struct AcOpfInstance { /* private fields */ }Expand description
The AC optimal power flow instance: the shared network, the typed objective, and the active generator capability, voltage, thermal, and angle constraint selections.
Implementations§
Source§impl AcOpfInstance
impl AcOpfInstance
Sourcepub fn from_network(network: BalancedNetwork) -> Result<Self, Error>
pub fn from_network(network: BalancedNetwork) -> Result<Self, Error>
Build the instance with every stated limit active. The default objective is the network’s generator cost curves when at least one dispatchable generator carries cost data. A network with no applicable cost rows becomes an explicit feasibility problem instead of inventing zero cost curves. Partially populated costs still select the network objective so preparation reports the missing row.
§Errors
A network with no reference bus or no in service generator attached to a non-isolated bus.
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: ActiveConstraints) -> Self
pub fn with_constraints(self, constraints: ActiveConstraints) -> Self
Replace the active constraint selections, consuming the instance.
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 while preserving this instance’s objective, constraint selections, and compatible initial point.
§Errors
The replacement has no reference bus or dispatchable generator, or it 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 const fn constraints(&self) -> &ActiveConstraints
pub const fn constraints(&self) -> &ActiveConstraints
The active constraint selections.
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_ac_pf(&self) -> Result<(AcPfInstance, Vec<Diagnostic>), Error>
pub fn to_ac_pf(&self) -> Result<(AcPfInstance, Vec<Diagnostic>), Error>
The AC power flow instance for this problem’s network at its stated injections and setpoints: the objective and the constraint selections are discarded, and the discard is recorded.
§Errors
Sourcepub fn to_dc_opf(&self) -> (DcOpfInstance, Vec<Diagnostic>)
pub fn to_dc_opf(&self) -> (DcOpfInstance, Vec<Diagnostic>)
The DC optimal power flow instance this AC problem implies: the objective and the generator capability, thermal, and angle selections carry over; the voltage bound selection has no DC variable and is discarded, and the flat voltage assumption is recorded.
Trait Implementations§
Source§impl BalancedCalculationInstance for AcOpfInstance
impl BalancedCalculationInstance for AcOpfInstance
Source§fn network(&self) -> &BalancedNetwork
fn network(&self) -> &BalancedNetwork
Source§impl Clone for AcOpfInstance
impl Clone for AcOpfInstance
Source§fn clone(&self) -> AcOpfInstance
fn clone(&self) -> AcOpfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more