#[non_exhaustive]pub struct BranchSwitchingCost {
pub id: String,
pub open_cost: f64,
pub close_cost: f64,
}Expand description
The calculation types used by solver consumers. The full problem
vocabulary lives in powerio_prob; these types sit at the facade root so
a consumer does not need a second PowerIO dependency to name its boundary.
The cost of changing one branch’s status, in objective units. Only a
change against the initial topology costs anything: opening an initially
closed branch costs open_cost, closing an initially open one
close_cost.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringThe branch identity.
open_cost: f64The cost of opening the branch.
close_cost: f64The cost of closing the branch.
Implementations§
Trait Implementations§
Source§impl Clone for BranchSwitchingCost
impl Clone for BranchSwitchingCost
Source§fn clone(&self) -> BranchSwitchingCost
fn clone(&self) -> BranchSwitchingCost
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 BranchSwitchingCost
impl Debug for BranchSwitchingCost
Source§impl PartialEq for BranchSwitchingCost
impl PartialEq for BranchSwitchingCost
impl StructuralPartialEq for BranchSwitchingCost
Auto Trait Implementations§
impl Freeze for BranchSwitchingCost
impl RefUnwindSafe for BranchSwitchingCost
impl Send for BranchSwitchingCost
impl Sync for BranchSwitchingCost
impl Unpin for BranchSwitchingCost
impl UnsafeUnpin for BranchSwitchingCost
impl UnwindSafe for BranchSwitchingCost
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