muse2/simulation/
investment.rs

1//! Code for performing agent investment.
2use super::optimisation::FlowMap;
3use super::CommodityPrices;
4use crate::asset::AssetPool;
5use crate::model::Model;
6use log::info;
7
8/// Perform agent investment to determine capacity investment of new assets for next milestone year.
9///
10/// # Arguments
11///
12/// * `model` - The model
13/// * `flow_map` - Map of commodity flows
14/// * `prices` - Commodity prices
15/// * `assets` - The asset pool
16pub fn perform_agent_investment(
17    _model: &Model,
18    _flow_map: &FlowMap,
19    _prices: &CommodityPrices,
20    assets: &mut AssetPool,
21) {
22    info!("Performing agent investment...");
23
24    let mut new_pool = Vec::new();
25    for asset in assets.iter() {
26        // **TODO**: Implement agent investment. For now, just keep all assets.
27        new_pool.push(asset.clone().into());
28    }
29
30    assets.replace_active_pool(new_pool);
31}