#[non_exhaustive]pub struct PiecewiseLinearCost {
pub power: Vec<f64>,
pub value: Vec<f64>,
}Expand description
One convex piecewise linear generator cost in preparation units.
power[i] and value[i] are the supplied breakpoint coordinates after
scaling the power coordinate into the preparation’s Units.
Objective values do not scale with the power unit. The preparation builder
validates that both columns have the same length, power is strictly
increasing, and adjacent segment slopes are nondecreasing.
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.power: Vec<f64>Breakpoint powers in the preparation’s selected power unit.
value: Vec<f64>Objective values at the corresponding breakpoints.
Trait Implementations§
Source§impl Clone for PiecewiseLinearCost
impl Clone for PiecewiseLinearCost
Source§fn clone(&self) -> PiecewiseLinearCost
fn clone(&self) -> PiecewiseLinearCost
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 PiecewiseLinearCost
impl Debug for PiecewiseLinearCost
Source§impl<'de> Deserialize<'de> for PiecewiseLinearCost
impl<'de> Deserialize<'de> for PiecewiseLinearCost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PiecewiseLinearCost
impl PartialEq for PiecewiseLinearCost
Source§fn eq(&self, other: &PiecewiseLinearCost) -> bool
fn eq(&self, other: &PiecewiseLinearCost) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PiecewiseLinearCost
impl Serialize for PiecewiseLinearCost
impl StructuralPartialEq for PiecewiseLinearCost
Auto Trait Implementations§
impl Freeze for PiecewiseLinearCost
impl RefUnwindSafe for PiecewiseLinearCost
impl Send for PiecewiseLinearCost
impl Sync for PiecewiseLinearCost
impl Unpin for PiecewiseLinearCost
impl UnsafeUnpin for PiecewiseLinearCost
impl UnwindSafe for PiecewiseLinearCost
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