Skip to content

Commit e787164

Browse files
committed
Add/update docs
1 parent ddec2e5 commit e787164

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/simulation/investment/appraisal.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

src/simulation/investment/coefficients.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@ use std::collections::HashMap;
1111
mod costs;
1212
use 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)]
1618
pub 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.
2528
pub fn calculate_coefficients_for_assets(
2629
model: &Model,
2730
objective_type: &ObjectiveType,

0 commit comments

Comments
 (0)