pub struct Solution<'a> {
solution: Solution,
variables: VariableMap,
time_slice_info: &'a TimeSliceInfo,
constraint_keys: ConstraintKeys,
pub objective_value: Money,
}Expand description
The solution to the dispatch optimisation problem
Fields§
§solution: Solution§variables: VariableMap§time_slice_info: &'a TimeSliceInfo§constraint_keys: ConstraintKeys§objective_value: MoneyThe objective value for the solution
Implementations§
Source§impl Solution<'_>
impl Solution<'_>
Sourcepub fn create_flow_map(&self) -> FlowMap
pub fn create_flow_map(&self) -> FlowMap
Create a map of commodity flows for each asset’s coeffs at every time slice.
Note that this only includes commodity flows which relate to existing assets, so not every commodity in the simulation will necessarily be represented.
Sourcepub fn iter_activity(
&self,
) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
pub fn iter_activity( &self, ) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
Activity for all assets (existing and candidate, if present)
Sourcepub fn iter_activity_for_existing(
&self,
) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
pub fn iter_activity_for_existing( &self, ) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
Activity for each existing asset
Sourcepub fn iter_activity_for_candidates(
&self,
) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
pub fn iter_activity_for_candidates( &self, ) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, Activity)>
Activity for each candidate asset
Sourcepub fn iter_unmet_demand(
&self,
) -> impl Iterator<Item = (&CommodityID, &RegionID, &TimeSliceID, Flow)>
pub fn iter_unmet_demand( &self, ) -> impl Iterator<Item = (&CommodityID, &RegionID, &TimeSliceID, Flow)>
Iterate over unmet demand
Sourcepub fn iter_capacity(&self) -> impl Iterator<Item = (&AssetRef, AssetCapacity)>
pub fn iter_capacity(&self) -> impl Iterator<Item = (&AssetRef, AssetCapacity)>
Iterate over capacity values
Will return AssetCapacity::Continuous or AssetCapacity::Discrete depending on whether
the asset has a defined unit size.
Sourcepub fn iter_commodity_balance_duals(
&self,
) -> impl Iterator<Item = (&CommodityID, &RegionID, &TimeSliceID, MoneyPerFlow)>
pub fn iter_commodity_balance_duals( &self, ) -> impl Iterator<Item = (&CommodityID, &RegionID, &TimeSliceID, MoneyPerFlow)>
Keys and dual values for commodity balance constraints.
Sourcepub fn iter_activity_duals(
&self,
) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, MoneyPerActivity)>
pub fn iter_activity_duals( &self, ) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, MoneyPerActivity)>
Keys and dual values for activity constraints.
Note: if there are any flexible capacity assets, these will have two duals with identical keys, and there will be no way to distinguish between them in the resulting iterator. Recommended for now only to use this function when there are no flexible capacity assets.
Also note: this excludes seasonal and annual constraints. Recommended for now not to use this for models that include seasonal or annual availability constraints.
Sourcepub fn iter_column_duals(
&self,
) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, MoneyPerActivity)>
pub fn iter_column_duals( &self, ) -> impl Iterator<Item = (&AssetRef, &TimeSliceID, MoneyPerActivity)>
Keys and values for column duals.
Auto Trait Implementations§
impl<'a> Freeze for Solution<'a>
impl<'a> RefUnwindSafe for Solution<'a>
impl<'a> !Send for Solution<'a>
impl<'a> !Sync for Solution<'a>
impl<'a> Unpin for Solution<'a>
impl<'a> UnwindSafe for Solution<'a>
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