muse2/simulation/investment/appraisal/
costs.rs1use crate::asset::{AssetRef, AssetState};
3use crate::units::{MoneyPerCapacity, Year};
4
5pub fn annual_fixed_cost(asset: &AssetRef) -> MoneyPerCapacity {
14 match asset.state() {
15 AssetState::Commissioned { .. } => annual_fixed_cost_for_existing(asset),
16 AssetState::Candidate => annual_fixed_cost_for_candidate(asset),
17 _ => {
18 panic!("annual_fixed_cost should only be called with Commissioned or Candidate assets")
19 }
20 }
21}
22
23fn annual_fixed_cost_for_existing(asset: &AssetRef) -> MoneyPerCapacity {
24 let fixed_operating_cost = asset.process_parameter().fixed_operating_cost;
25 fixed_operating_cost * Year(1.0)
26}
27
28fn annual_fixed_cost_for_candidate(asset: &AssetRef) -> MoneyPerCapacity {
29 let fixed_operating_cost = asset.process_parameter().fixed_operating_cost;
30 let annual_fixed_operating_cost = fixed_operating_cost * Year(1.0);
31 let capital_costs = asset.get_annual_capital_cost_per_capacity();
32 annual_fixed_operating_cost + capital_costs
33}