File tree Expand file tree Collapse file tree
src/simulation/investment Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ fn calculate_lcox(
4242 asset,
4343 max_capacity,
4444 commodity,
45- & coefficients,
45+ coefficients,
4646 demand,
4747 & model. time_slice_info ,
4848 highs:: Sense :: Minimise ,
@@ -55,7 +55,7 @@ fn calculate_lcox(
5555 results. capacity ,
5656 annual_fixed_cost,
5757 & results. activity ,
58- & activity_costs,
58+ activity_costs,
5959 ) ;
6060
6161 // Return appraisal output
@@ -81,7 +81,7 @@ fn calculate_npv(
8181 asset,
8282 max_capacity,
8383 commodity,
84- & coefficients,
84+ coefficients,
8585 demand,
8686 & model. time_slice_info ,
8787 highs:: Sense :: Maximise ,
@@ -94,7 +94,7 @@ fn calculate_npv(
9494 results. capacity ,
9595 annual_fixed_cost,
9696 & results. activity ,
97- & activity_surpluses,
97+ activity_surpluses,
9898 ) ;
9999
100100 // Return appraisal output
Original file line number Diff line number Diff line change @@ -11,17 +11,20 @@ use std::collections::HashMap;
1111mod costs;
1212use costs:: { activity_cost, activity_surplus, annual_fixed_cost} ;
1313
14- /// Map storing coefficients for each variable
14+ /// Map storing cost coefficients for an asset.
15+ ///
16+ /// These are calculated according to the objective type of the agent owning the asset.
1517#[ derive( Clone ) ]
1618pub struct ObjectiveCoefficients {
1719 /// Cost per unit of capacity
1820 pub capacity_coefficient : MoneyPerCapacity ,
1921 /// Cost per unit of activity in each time slice
2022 pub activity_coefficients : IndexMap < TimeSliceID , MoneyPerActivity > ,
21- // Unmet demand coefficient
23+ /// Unmet demand coefficient
2224 pub unmet_demand_coefficient : MoneyPerFlow ,
2325}
2426
27+ /// Calculates cost coefficients for all assets for a given objective type.
2528pub fn calculate_coefficients_for_assets (
2629 model : & Model ,
2730 objective_type : & ObjectiveType ,
You can’t perform that action at this time.
0 commit comments