pub struct Commodity {
pub id: CommodityID,
pub description: String,
pub kind: CommodityType,
pub time_slice_level: TimeSliceLevel,
pub levies: CommodityLevyMap,
pub demand: DemandMap,
}
Expand description
A commodity within the simulation.
Represents a substance (e.g. CO2) or form of energy (e.g. electricity) that can be produced or consumed by processes.
Fields§
§id: CommodityID
Unique identifier for the commodity (e.g. “ELC”)
description: String
Text description of commodity (e.g. “electricity”)
kind: CommodityType
Commodity balance type
time_slice_level: TimeSliceLevel
The time slice level for commodity balance
levies: CommodityLevyMap
Levies for this commodity for different combinations of region, year and time slice.
May be empty if there are no levies for this commodity, otherwise there must be entries for every combination of parameters. Note that these values can be negative, indicating an incentive.
demand: DemandMap
Demand as defined in input files. Will be empty for non-service-demand commodities.
The TimeSliceSelection
part of the key is always at the same TimeSliceLevel
as the
time_slice_level
field. E.g. if the time_slice_level
is seasonal, then there will be
keys representing each season (and not e.g. individual time slices).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commodity
impl<'de> Deserialize<'de> for Commodity
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>,
Source§impl HasID<CommodityID> for Commodity
impl HasID<CommodityID> for Commodity
Source§fn get_id(&self) -> &CommodityID
fn get_id(&self) -> &CommodityID
impl StructuralPartialEq for Commodity
Auto Trait Implementations§
impl Freeze for Commodity
impl RefUnwindSafe for Commodity
impl !Send for Commodity
impl !Sync for Commodity
impl Unpin for Commodity
impl UnwindSafe for Commodity
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more