Skip to main content

AcOtsSolution

Struct AcOtsSolution 

Source
pub struct AcOtsSolution { /* private fields */ }
Expand description

The AC optimal transmission switching result: the final branch statuses, their switching cost, and the AC optimal power flow solution over that topology.

Implementations§

Source§

impl AcOtsSolution

Source

pub fn new( instance: Arc<AcOtsInstance>, branch_closed: Vec<bool>, ac_solution: AcOpfSolution, ) -> Result<Self, Error>

Attach the AC optimal power flow solution computed on instance.fix_topology(&branch_closed).

§Errors

The topology fails AcOtsInstance::validate_topology, the AC solution answers a different problem than the fixed topology states (its network, objective, or constraint selections differ), or an open branch carries flow. A NaN flow on an open branch means no flow was recorded and is accepted; a NaN anywhere else is left to AcOpfSolution.

Source

pub fn instance(&self) -> &AcOtsInstance

The switching instance this solution solves. Borrowed; never a copy.

Source

pub fn shared_instance(&self) -> Arc<AcOtsInstance> ⓘ

The shared instance owner.

Source

pub fn network(&self) -> &BalancedNetwork

The instance’s network: every candidate branch at its initial status. The final statuses are branch_closed; the AC solution’s instance holds the network with them applied.

Source

pub fn branch_closed(&self) -> &[bool]

The final branch statuses, in branch table order.

Source

pub const fn ac_solution(&self) -> &AcOpfSolution

The AC optimal power flow solution over the final topology.

Source

pub const fn switching_cost(&self) -> f64

The cost of the status changes against the initial topology.

Source

pub fn branches_open(&self) -> usize

The number of branches open in the final topology.

Source

pub fn branches_switched(&self) -> usize

The number of branches whose final status differs from the initial one.

Source

pub fn objective(&self) -> f64

The objective value: the AC solution’s objective, plus the switching cost when the instance’s objective states the switching cost term.

Source

pub fn termination(&self) -> &Termination

How the producing calculation ended, as the AC solution records it.

Source

pub fn residuals(&self) -> &Residuals

The AC solution’s numerical residuals.

Source

pub fn producer(&self) -> Option<&str>

The producer or solver identity the AC solution records.

Trait Implementations§

Source§

impl Clone for AcOtsSolution

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AcOtsSolution

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.