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
impl AcOtsSolution
Sourcepub fn new(
instance: Arc<AcOtsInstance>,
branch_closed: Vec<bool>,
ac_solution: AcOpfSolution,
) -> Result<Self, Error>
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.
Sourcepub fn instance(&self) -> &AcOtsInstance
pub fn instance(&self) -> &AcOtsInstance
The switching instance this solution solves. Borrowed; never a copy.
The shared instance owner.
Sourcepub fn network(&self) -> &BalancedNetwork
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.
Sourcepub fn branch_closed(&self) -> &[bool]
pub fn branch_closed(&self) -> &[bool]
The final branch statuses, in branch table order.
Sourcepub const fn ac_solution(&self) -> &AcOpfSolution
pub const fn ac_solution(&self) -> &AcOpfSolution
The AC optimal power flow solution over the final topology.
Sourcepub const fn switching_cost(&self) -> f64
pub const fn switching_cost(&self) -> f64
The cost of the status changes against the initial topology.
Sourcepub fn branches_open(&self) -> usize
pub fn branches_open(&self) -> usize
The number of branches open in the final topology.
Sourcepub fn branches_switched(&self) -> usize
pub fn branches_switched(&self) -> usize
The number of branches whose final status differs from the initial one.
Sourcepub fn objective(&self) -> f64
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.
Sourcepub fn termination(&self) -> &Termination
pub fn termination(&self) -> &Termination
How the producing calculation ended, as the AC solution records it.