pub struct PowerRange {
pub start_of_range: f64,
pub end_of_range: f64,
pub commodity_quantity: CommodityQuantity,
}Expand description
A range of power values for one commodity quantity.
The start is the power at an operation-mode factor of 0, the end the power at 1. Consumption is positive and production negative, always as seen at the grid.
Fields§
§start_of_range: f64The power at factor 0.
end_of_range: f64The power at factor 1.
commodity_quantity: CommodityQuantityThe quantity the values refer to.
Implementations§
Source§impl PowerRange
impl PowerRange
Sourcepub const fn new(
start: f64,
end: f64,
commodity_quantity: CommodityQuantity,
) -> Self
pub const fn new( start: f64, end: f64, commodity_quantity: CommodityQuantity, ) -> Self
A power range.
Sourcepub const fn exactly(value: f64, commodity_quantity: CommodityQuantity) -> Self
pub const fn exactly(value: f64, commodity_quantity: CommodityQuantity) -> Self
A power range with a single value.
Sourcepub const fn range(self) -> NumberRange
pub const fn range(self) -> NumberRange
The range without its commodity quantity.
Trait Implementations§
Source§impl Clone for PowerRange
impl Clone for PowerRange
impl Copy for PowerRange
Source§impl Debug for PowerRange
impl Debug for PowerRange
Source§impl<'de> Deserialize<'de> for PowerRange
impl<'de> Deserialize<'de> for PowerRange
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 PowerRange
impl PartialEq for PowerRange
Source§impl Serialize for PowerRange
impl Serialize for PowerRange
impl StructuralPartialEq for PowerRange
Auto Trait Implementations§
impl Forget for PowerRange
impl Freeze for PowerRange
impl RefUnwindSafe for PowerRange
impl Send for PowerRange
impl Sync for PowerRange
impl Unpin for PowerRange
impl UnsafeUnpin for PowerRange
impl UnwindSafe for PowerRange
Blanket Implementations§
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