pub struct ReducedCosts(IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>);
Expand description
A map of reduced costs for different assets in different time slices
This is the system cost associated with one unit of activity (MoneyPerActivity) for each asset in each time slice.
For candidate assets this is calculated directly from the activity variable duals.
For existing assets this is calculated from the operating cost and the revenue from flows.
These may be used in the investment algorithm, depending on the appraisal method, to compare the cost effectiveness of different potential investment decisions.
Tuple Fields§
§0: IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>
Implementations§
Source§impl ReducedCosts
impl ReducedCosts
Sourcepub fn get(
&self,
asset: &AssetRef,
time_slice: &TimeSliceID,
) -> MoneyPerActivity
pub fn get( &self, asset: &AssetRef, time_slice: &TimeSliceID, ) -> MoneyPerActivity
Get the reduced cost for the specified asset and time slice
If no reduced cost is found for the asset, the reduced cost is returned for the relevant candidate asset. This can occur the first year an asset is commissioned, or if an asset was not selected in an earlier iteration of the ironing out loop.
Sourcepub fn iter(
&self,
) -> impl Iterator<Item = (&(AssetRef, TimeSliceID), &MoneyPerActivity)>
pub fn iter( &self, ) -> impl Iterator<Item = (&(AssetRef, TimeSliceID), &MoneyPerActivity)>
Iterate over the map
Sourcepub fn iter_mut(
&mut self,
) -> impl Iterator<Item = (&(AssetRef, TimeSliceID), &mut MoneyPerActivity)>
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = (&(AssetRef, TimeSliceID), &mut MoneyPerActivity)>
Iterate mutably over the map
Trait Implementations§
Source§impl Clone for ReducedCosts
impl Clone for ReducedCosts
Source§fn clone(&self) -> ReducedCosts
fn clone(&self) -> ReducedCosts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for ReducedCosts
impl Default for ReducedCosts
Source§fn default() -> ReducedCosts
fn default() -> ReducedCosts
Source§impl From<IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>> for ReducedCosts
impl From<IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>> for ReducedCosts
Source§fn from(map: IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>) -> Self
fn from(map: IndexMap<(AssetRef, TimeSliceID), MoneyPerActivity>) -> Self
Source§impl FromIterator<((AssetRef, TimeSliceID), MoneyPerActivity)> for ReducedCosts
impl FromIterator<((AssetRef, TimeSliceID), MoneyPerActivity)> for ReducedCosts
Source§impl IntoIterator for ReducedCosts
impl IntoIterator for ReducedCosts
Source§type Item = ((AssetRef, TimeSliceID), MoneyPerActivity)
type Item = ((AssetRef, TimeSliceID), MoneyPerActivity)
Source§type IntoIter = IntoIter<(AssetRef, TimeSliceID), MoneyPerActivity>
type IntoIter = IntoIter<(AssetRef, TimeSliceID), MoneyPerActivity>
Auto Trait Implementations§
impl Freeze for ReducedCosts
impl RefUnwindSafe for ReducedCosts
impl !Send for ReducedCosts
impl !Sync for ReducedCosts
impl Unpin for ReducedCosts
impl UnwindSafe for ReducedCosts
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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