Skip to content

Commit 95c610a

Browse files
committed
Pass flow map to perform_agent_investment cf. solution
1 parent acecd3e commit 95c610a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/simulation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pub fn run(
3737
assets.decommission_old(year);
3838

3939
// NB: Agent investment is not carried out in first milestone year
40-
if let Some((solution, prices)) = opt_results {
41-
perform_agent_investment(&model, &solution, &prices, &mut assets);
40+
if let Some((flow_map, prices)) = opt_results {
41+
perform_agent_investment(&model, &flow_map, &prices, &mut assets);
4242

4343
// **TODO:** Remove this when we implement at least some of the agent investment code
4444
// See: https://github.com/EnergySystemsModellingLab/MUSE_2.0/issues/304
@@ -64,7 +64,7 @@ pub fn run(
6464
writer.write_flows(year, &flow_map)?;
6565
writer.write_prices(year, &prices)?;
6666

67-
opt_results = Some((solution, prices));
67+
opt_results = Some((flow_map, prices));
6868
}
6969

7070
writer.flush()?;

src/simulation/investment.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Code for performing agent investment.
2-
use super::optimisation::Solution;
2+
use super::optimisation::FlowMap;
33
use super::CommodityPrices;
44
use crate::asset::AssetPool;
55
use crate::model::Model;
@@ -10,12 +10,12 @@ use log::info;
1010
/// # Arguments
1111
///
1212
/// * `model` - The model
13-
/// * `solution` - The solution to the dispatch optimisation
13+
/// * `flow_map` - Map of commodity flows
1414
/// * `prices` - Commodity prices
1515
/// * `assets` - The asset pool
1616
pub fn perform_agent_investment(
1717
_model: &Model,
18-
_solution: &Solution,
18+
_flow_map: &FlowMap,
1919
_prices: &CommodityPrices,
2020
assets: &mut AssetPool,
2121
) {

0 commit comments

Comments
 (0)