@@ -4,6 +4,7 @@ use crate::commodity::CommodityID;
44use crate :: id:: { define_id_getter, define_id_type} ;
55use crate :: process:: Process ;
66use crate :: region:: RegionID ;
7+ use crate :: units:: { Dimensionless , Money } ;
78use indexmap:: IndexMap ;
89use serde_string_enum:: DeserializeLabeledStringEnum ;
910use std:: collections:: HashMap ;
@@ -19,7 +20,7 @@ pub type AgentMap = IndexMap<AgentID, Agent>;
1920pub type AgentCostLimitsMap = HashMap < u32 , AgentCostLimits > ;
2021
2122/// A map of commodity portions for an agent, keyed by commodity and year
22- pub type AgentCommodityPortionsMap = HashMap < ( CommodityID , u32 ) , f64 > ;
23+ pub type AgentCommodityPortionsMap = HashMap < ( CommodityID , u32 ) , Dimensionless > ;
2324
2425/// A map for the agent's search space, keyed by commodity and year
2526pub type AgentSearchSpaceMap = HashMap < ( CommodityID , u32 ) , Rc < Vec < Rc < Process > > > > ;
@@ -56,9 +57,9 @@ define_id_getter! {Agent, AgentID}
5657#[ derive( Debug , Clone , PartialEq ) ]
5758pub struct AgentCostLimits {
5859 /// The maximum capital cost the agent will pay.
59- pub capex_limit : Option < f64 > ,
60+ pub capex_limit : Option < Money > ,
6061 /// The maximum annual operating cost (fuel plus var_opex etc) that the agent will pay.
61- pub annual_cost_limit : Option < f64 > ,
62+ pub annual_cost_limit : Option < Money > ,
6263}
6364
6465/// The decision rule for a particular objective
0 commit comments