pub struct DcOpfInstance { /* private fields */ }Expand description
The DC optimal power flow instance: the shared network, the typed objective, the active constraint selections, the selected DC branch susceptance formula, and the reference conditions the network states.
Implementations§
Source§impl DcOpfInstance
impl DcOpfInstance
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_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.
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, branch susceptance formula, and compatible initial point. This is the checked path for a parameter edit such as a branch rating change; callers do not have to reconstruct the problem and risk dropping its semantics.
§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 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.
Sourcepub fn to_dc_pf(&self) -> Result<(DcPfInstance, Vec<Diagnostic>), Error>
pub fn to_dc_pf(&self) -> Result<(DcPfInstance, Vec<Diagnostic>), Error>
The DC power flow instance for this problem’s network at its stated injections: the objective and the constraint selections are discarded, and the discard is recorded.
§Errors
Trait Implementations§
Source§impl BalancedCalculationInstance for DcOpfInstance
impl BalancedCalculationInstance for DcOpfInstance
Source§fn network(&self) -> &BalancedNetwork
fn network(&self) -> &BalancedNetwork
Source§impl Clone for DcOpfInstance
impl Clone for DcOpfInstance
Source§fn clone(&self) -> DcOpfInstance
fn clone(&self) -> DcOpfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more