CYCAMORE
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cycamore::GrowthRegion Class Reference

This region determines if there is a need to meet a certain capacity (as defined via input) at each time step. More...

#include <growth_region.h>

Inheritance diagram for cycamore::GrowthRegion:

Public Member Functions

virtual Json::Value annotations ()
 
virtual cyclus::Agent * Clone ()
 
virtual void DecomNotify (Agent *m)
 unregister a child More...
 
virtual void DecomNotify (Agent *m)
 unregister a child More...
 
virtual void EnterNotify ()
 enter the simulation and register any children present More...
 
virtual void EnterNotify ()
 enter the simulation and register any children present More...
 
 GrowthRegion (cyclus::Context *ctx)
 The default constructor for the GrowthRegion. More...
 
 GrowthRegion (cyclus::Context *ctx)
 The default constructor for the GrowthRegion. More...
 
virtual void InfileToDb (cyclus::InfileTree *tree, cyclus::DbInit di)
 
virtual void InitFrom (cycamore::GrowthRegion *m)
 
virtual void InitFrom (cyclus::QueryableBackend *b)
 
virtual void InitInv (cyclus::Inventories &inv)
 
virtual std::string schema ()
 
cyclus::toolkit::SupplyDemandManager * sdmanager ()
 
cyclus::toolkit::SupplyDemandManager * sdmanager ()
 
virtual void Snapshot (cyclus::DbInit di)
 
virtual cyclus::Inventories SnapshotInv ()
 
virtual void Tick ()
 On each tick, the GrowthRegion queries its supply demand manager to determine if there exists some demand. More...
 
virtual void Tick ()
 On each tick, the GrowthRegion queries its supply demand manager to determine if there exists some demand. More...
 
virtual std::string version ()
 
virtual std::string version ()
 
virtual ~GrowthRegion ()
 The default destructor for the GrowthRegion. More...
 
virtual ~GrowthRegion ()
 The default destructor for the GrowthRegion. More...
 

Protected Member Functions

void AddCommodityDemand_ (std::string commod, Demand &demand)
 add a demand for a commodity on which this region request that facilities be built More...
 
*The type name is the lower case name of the function (e.g.," "'linear', 'exponential', etc.)." "\n\n" "*The parameters associated with each function type can be found on their" "respective documentation pages."
 
void OrderBuilds (cyclus::toolkit::Commodity &commodity, double unmetdemand)
 orders builds given a commodity and an unmet demand for production capacity of that commodity More...
 
void Register_ (cyclus::Agent *agent)
 register a child More...
 
void Unregister_ (cyclus::Agent *agent)
 unregister a child More...
 

Protected Attributes

cyclus::toolkit::BuildingManager buildmanager_
 manager for building things More...
 
std::map< std::string, std::vector< std::pair< int, std::pair< std::string, std::string > > > > commodity_demand
 
std::vector< intcycpp_shape_commodity_demand
 
cyclus::toolkit::SupplyDemandManager sdmanager_
 manager for Supply and demand More...
 

Friends

class GrowthRegionTests
 

Detailed Description

This region determines if there is a need to meet a certain capacity (as defined via input) at each time step.

If there is such a need, the region will determine how many of each facility type are required and then determine, facility by facility, which of its institutions are available to build each facility.

In order to make GrowthRegion copacetic with init/restart, its input parameter space was simplified. For now it can only provide growth support for a single demanded commodity. A relatively simple next step will be to determin an input API and corresponding implementation that again supports multiple commodities being demanded.

Warning
The growth region is experimental

Definition at line 40 of file _tmp_build/cycamore/growth_region.h.

Constructor & Destructor Documentation

cycamore::GrowthRegion::GrowthRegion ( cyclus::Context *  ctx)

The default constructor for the GrowthRegion.

Definition at line 7 of file _tmp_build/cycamore/growth_region.cc.

Referenced by cycamore::ConstructGrowthRegion().

cycamore::GrowthRegion::~GrowthRegion ( )
virtual

The default destructor for the GrowthRegion.

Definition at line 9 of file _tmp_build/cycamore/growth_region.cc.

cycamore::GrowthRegion::GrowthRegion ( cyclus::Context *  ctx)

The default constructor for the GrowthRegion.

virtual cycamore::GrowthRegion::~GrowthRegion ( )
virtual

The default destructor for the GrowthRegion.

Member Function Documentation

void cycamore::GrowthRegion::AddCommodityDemand_ ( std::string  commod,
Demand demand 
)
protected

add a demand for a commodity on which this region request that facilities be built

Definition at line 11 of file _tmp_build/cycamore/growth_region.cc.

References sdmanager_, and cycamore::string.

Referenced by EnterNotify().

virtual Json::Value cycamore::GrowthRegion::annotations ( )
inlinevirtual

Definition at line 179 of file _tmp_build/cycamore/growth_region.h.

virtual cyclus::Agent* cycamore::GrowthRegion::Clone ( )
inlinevirtual

Definition at line 135 of file _tmp_build/cycamore/growth_region.h.

References InitFrom(), and m.

virtual void cycamore::GrowthRegion::DecomNotify ( Agent *  m)
virtual

unregister a child

void cycamore::GrowthRegion::DecomNotify ( Agent *  m)
virtual

unregister a child

Definition at line 52 of file _tmp_build/cycamore/growth_region.cc.

References Unregister_().

Referenced by Snapshot(), and version().

virtual void cycamore::GrowthRegion::EnterNotify ( )
virtual

enter the simulation and register any children present

void cycamore::GrowthRegion::EnterNotify ( )
virtual

enter the simulation and register any children present

Definition at line 34 of file _tmp_build/cycamore/growth_region.cc.

References AddCommodityDemand_(), commodity_demand, and Register_().

Referenced by Snapshot(), and version().

* The type name is the lower case name of the cycamore::GrowthRegion::function ( e.  g.,
" "'linear'  ,
'exponential'  ,
etc.   
)
protected
virtual void cycamore::GrowthRegion::InfileToDb ( cyclus::InfileTree *  tree,
cyclus::DbInit  di 
)
inlinevirtual
virtual void cycamore::GrowthRegion::InitFrom ( cycamore::GrowthRegion m)
inlinevirtual

Definition at line 50 of file _tmp_build/cycamore/growth_region.h.

References commodity_demand, and cycpp_shape_commodity_demand.

Referenced by Clone().

virtual void cycamore::GrowthRegion::InitFrom ( cyclus::QueryableBackend *  b)
inlinevirtual
virtual void cycamore::GrowthRegion::InitInv ( cyclus::Inventories &  inv)
inlinevirtual

Definition at line 230 of file _tmp_build/cycamore/growth_region.h.

void cycamore::GrowthRegion::OrderBuilds ( cyclus::toolkit::Commodity &  commodity,
double  unmetdemand 
)
protected

orders builds given a commodity and an unmet demand for production capacity of that commodity

Parameters
commoditythe commodity being demanded
unmetdemandthe unmet demand

Definition at line 118 of file _tmp_build/cycamore/growth_region.cc.

References buildmanager_.

Referenced by Tick().

void cycamore::GrowthRegion::Register_ ( cyclus::Agent *  agent)
protected

register a child

Definition at line 56 of file _tmp_build/cycamore/growth_region.cc.

References buildmanager_, and sdmanager_.

Referenced by EnterNotify().

virtual std::string cycamore::GrowthRegion::schema ( )
inlinevirtual

Definition at line 141 of file _tmp_build/cycamore/growth_region.h.

cyclus::toolkit::SupplyDemandManager* cycamore::GrowthRegion::sdmanager ( )
inline

Definition at line 67 of file src/growth_region.h.

References commodity_demand, and sdmanager_.

cyclus::toolkit::SupplyDemandManager* cycamore::GrowthRegion::sdmanager ( )
inline
virtual void cycamore::GrowthRegion::Snapshot ( cyclus::DbInit  di)
inlinevirtual
virtual cyclus::Inventories cycamore::GrowthRegion::SnapshotInv ( )
inlinevirtual

Definition at line 233 of file _tmp_build/cycamore/growth_region.h.

virtual void cycamore::GrowthRegion::Tick ( )
virtual

On each tick, the GrowthRegion queries its supply demand manager to determine if there exists some demand.

If demand for a commodity exists, then the correct build order for that demand is constructed and executed.

Parameters
timeis the time to perform the tick
void cycamore::GrowthRegion::Tick ( )
virtual

On each tick, the GrowthRegion queries its supply demand manager to determine if there exists some demand.

If demand for a commodity exists, then the correct build order for that demand is constructed and executed.

Parameters
timeis the time to perform the tick

Definition at line 92 of file _tmp_build/cycamore/growth_region.cc.

References commodity_demand, OrderBuilds(), and sdmanager_.

Referenced by Snapshot(), and version().

void cycamore::GrowthRegion::Unregister_ ( cyclus::Agent *  agent)
protected

unregister a child

Definition at line 78 of file _tmp_build/cycamore/growth_region.cc.

References buildmanager_, and sdmanager_.

Referenced by DecomNotify().

virtual std::string cycamore::GrowthRegion::version ( )
inlinevirtual

Definition at line 47 of file src/growth_region.h.

References CYCAMORE_VERSION, DecomNotify(), EnterNotify(), m, and Tick().

virtual std::string cycamore::GrowthRegion::version ( )
inlinevirtual

Definition at line 49 of file _tmp_build/cycamore/growth_region.h.

References CYCAMORE_VERSION.

Friends And Related Function Documentation

Definition at line 41 of file _tmp_build/cycamore/growth_region.h.

Member Data Documentation

cyclus::toolkit::BuildingManager cycamore::GrowthRegion::buildmanager_
protected

manager for building things

Definition at line 272 of file _tmp_build/cycamore/growth_region.h.

Referenced by OrderBuilds(), Register_(), and Unregister_().

std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string> > > > cycamore::GrowthRegion::commodity_demand
protected
std::vector<int> cycamore::GrowthRegion::cycpp_shape_commodity_demand
protected

Definition at line 267 of file _tmp_build/cycamore/growth_region.h.

Referenced by InfileToDb(), InitFrom(), and Snapshot().

cyclus::toolkit::SupplyDemandManager cycamore::GrowthRegion::sdmanager_
protected

manager for Supply and demand

Definition at line 275 of file _tmp_build/cycamore/growth_region.h.

Referenced by AddCommodityDemand_(), Register_(), sdmanager(), Tick(), and Unregister_().


The documentation for this class was generated from the following files: