pub struct SocwrOpfSolution { /* private fields */ }Expand description
A solution of the PowerModels SOCWR relaxation of AC optimal power flow.
This is a relaxation result and its objective is a lower bound. It is not
an crate::AcOpfSolution and makes no claim that its voltage products
recover an AC feasible voltage phasor.
Implementations§
Source§impl SocwrOpfSolution
impl SocwrOpfSolution
pub const FORMULATION: &'static str = "socwr"
Sourcepub fn new(
instance: Arc<AcOpfInstance>,
termination: Termination,
values: SocwrOpfValues,
objective_lower_bound: f64,
) -> Result<SocwrOpfSolution, Error>
pub fn new( instance: Arc<AcOpfInstance>, termination: Termination, values: SocwrOpfValues, objective_lower_bound: f64, ) -> Result<SocwrOpfSolution, Error>
Construct a SOCWR solution from table ordered primal values and its objective lower bound.
§Errors
Any value column has a length different from its network table.
pub const fn formulation(&self) -> &'static str
pub fn instance(&self) -> &AcOpfInstance
pub fn network(&self) -> &BalancedNetwork
pub const fn termination(&self) -> &Termination
pub const fn residuals(&self) -> &Residuals
pub fn producer(&self) -> Option<&str>
pub const fn values(&self) -> &SocwrOpfValues
pub const fn duals(&self) -> &SocwrOpfDuals
pub const fn objective_lower_bound(&self) -> f64
pub fn with_producer(self, producer: impl Into<String>) -> SocwrOpfSolution
pub const fn with_residuals(self, residuals: Residuals) -> SocwrOpfSolution
Sourcepub fn with_duals(self, duals: SocwrOpfDuals) -> Result<SocwrOpfSolution, Error>
pub fn with_duals(self, duals: SocwrOpfDuals) -> Result<SocwrOpfSolution, Error>
Attach optional dual columns.
§Errors
A present column has the wrong length, or a thermal limit multiplier is negative or nonfinite.
pub fn bus_order(&self) -> impl ExactSizeIterator
pub fn branch_order(&self) -> impl ExactSizeIterator
pub fn generator_order(&self) -> impl ExactSizeIterator
pub fn bus_voltage_magnitude_squared(&self, bus: BusId) -> Option<f64>
pub fn branch_voltage_product_real(&self, branch: &str) -> Option<f64>
pub fn branch_voltage_product_imaginary(&self, branch: &str) -> Option<f64>
pub fn generator_active_power(&self, generator: &str) -> Option<f64>
pub fn generator_reactive_power(&self, generator: &str) -> Option<f64>
pub fn branch_from_active_power(&self, branch: &str) -> Option<f64>
pub fn branch_from_reactive_power(&self, branch: &str) -> Option<f64>
pub fn branch_to_active_power(&self, branch: &str) -> Option<f64>
pub fn branch_to_reactive_power(&self, branch: &str) -> Option<f64>
Trait Implementations§
Source§impl Clone for SocwrOpfSolution
impl Clone for SocwrOpfSolution
Source§fn clone(&self) -> SocwrOpfSolution
fn clone(&self) -> SocwrOpfSolution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocwrOpfSolution
impl Debug for SocwrOpfSolution
Source§impl From<SocwrOpfSolution> for PioValue
impl From<SocwrOpfSolution> for PioValue
Source§fn from(value: SocwrOpfSolution) -> Self
fn from(value: SocwrOpfSolution) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SocwrOpfSolution
impl RefUnwindSafe for SocwrOpfSolution
impl Send for SocwrOpfSolution
impl Sync for SocwrOpfSolution
impl Unpin for SocwrOpfSolution
impl UnsafeUnpin for SocwrOpfSolution
impl UnwindSafe for SocwrOpfSolution
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more