1 #ifndef CYCAMORE_SRC_GROWTH_REGION_H_ 2 #define CYCAMORE_SRC_GROWTH_REGION_H_ 23 std::pair<int, std::pair<std::string, std::string> > >
Demand;
38 class GrowthRegion :
public cyclus::Region,
39 public cyclus::toolkit::Position {
52 #pragma cyclus note {"doc": "A region that governs a scenario in which " \ 53 "there is growth in demand for a commodity. "} 68 inline cyclus::toolkit::SupplyDemandManager*
sdmanager() {
73 #pragma cyclus var { \ 74 "alias": ["growth", "commod", \ 75 ["piecewise_function", \ 76 ["piece", "start", ["function", "type", "params"]]]], \ 77 "uitype": ["oneormore", "string", \ 79 ["pair", "int", ["pair", "string", "string"]]]], \ 80 "uilabel": "Growth Demand Curves", \ 81 "doc": "Nameplate capacity demand functions." \ 83 "Each demand type must be for a commodity for which capacity can be built "\ 84 "(e.g., 'power' from cycamore::Reactors). Any archetype that implements the "\ 85 "cyclus::toolkit::CommodityProducer interface can interact with the "\ 86 "GrowthRegion in the manner." \ 88 "Demand functions are defined as piecewise functions. Each piece must "\ 89 "be provided a starting time and function description. Each function "\ 90 "description is comprised of a function type and associated parameters. "\ 92 " * Start times are inclusive. For a start time :math:`t_0`, the demand "\ 93 "function is evaluated on :math:`[t_0, \infty)`." \ 95 " * Supported function types are based on the "\ 96 "`cyclus::toolkit::BasicFunctionFactory "\ 97 "types <http://fuelcycle.org/cyclus/api/classcyclus_1_1toolkit_1_1BasicFunctionFactory.html#a2f3806305d99a745ab57c300e54a603d>`_. " \ 99 " * The type name is the lower-case name of the function (e.g., " \ 100 "'linear', 'exponential', etc.)." \ 102 " * The parameters associated with each function type can be found on their " \ 103 "respective documentation pages.", \ 105 std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string> > > >
commodity_demand;
108 cyclus::toolkit::BuildingManager buildmanager_;
129 void OrderBuilds(cyclus::toolkit::Commodity& commodity,
double unmetdemand);
132 #pragma cyclus var { \ 134 "uilabel": "Geographical latitude in degrees as a double", \ 135 "doc": "Latitude of the agent's geographical position. The value should " \ 136 "be expressed in degrees as a double." \ 140 #pragma cyclus var { \ 142 "uilabel": "Geographical longitude in degrees as a double", \ 143 "doc": "Longitude of the agent's geographical position. The value should " \ 144 "be expressed in degrees as a double." \ 155 #endif // CYCAMORE_SRC_GROWTH_REGION_H_
virtual void Tick()
On each tick, the GrowthRegion queries its supply demand manager to determine if there exists some de...
friend class GrowthRegionTests
virtual ~GrowthRegion()
The default destructor for the GrowthRegion.
GrowthRegion(cyclus::Context *ctx)
The default constructor for the GrowthRegion.
virtual std::string version()
std::map< std::string, std::vector< std::pair< int, std::pair< std::string, std::string > > > > commodity_demand
void Unregister_(cyclus::Agent *agent)
unregister a child
void RecordPosition()
Records an agent's latitude and longitude to the output db.
void AddCommodityDemand_(std::string commod, Demand &demand)
add a demand for a commodity on which this region request that facilities be built ...
void OrderBuilds(cyclus::toolkit::Commodity &commodity, double unmetdemand)
orders builds given a commodity and an unmet demand for production capacity of that commodity ...
cyclus::toolkit::SupplyDemandManager sdmanager_
manager for Supply and demand
cyclus::toolkit::SupplyDemandManager * sdmanager()
cycamore::GrowthRegion string
cyclus::toolkit::Position coordinates
virtual void EnterNotify()
enter the simulation and register any children present
virtual void DecomNotify(Agent *m)
unregister a child
std::vector< std::pair< int, std::pair< std::string, std::string > > > Demand
A container of (time, (demand type, demand parameters))
void Register_(cyclus::Agent *agent)
register a child