CYCLUS
|
The Institution class is the abstract class/interface used by all institution agents.
region-institution-facility hierarchy in Cyclus. A Institution institution is an actor associated with a set of facilities for which it is responsible. An Institution may be used to adjust preferences in the ResourceExchange to make material routing decisions based on interfacility relationships. Deployment is a primary differentiator between different Institution implementations.
Definition at line 29 of file institution.h.
#include <institution.h>
Protected Member Functions | |
void | InitFrom (Institution *m) |
Protected Member Functions inherited from cyclus::Agent | |
virtual std::string | InformErrorMsg (std::string msg) |
void | InitFrom (Agent *m) |
Additional Inherited Members | |
Protected Attributes inherited from cyclus::Agent | |
std::string | kind_ |
cyclus::Institution::Institution | ( | Context * | ctx | ) |
Default constructor for Institution Class.
Definition at line 16 of file institution.cc.
|
virtual |
every agent should be destructable
Definition at line 20 of file institution.cc.
perform all tasks required when an inst enters the simulation
Reimplemented from cyclus::Agent.
Definition at line 35 of file institution.cc.
|
virtual |
Decommissions the agent, removing it from the simulation.
Results in destruction of the agent object. If agents write their own Decommission function, they must call their superclass' Decommission function at the END of their Decommission function.
Reimplemented from cyclus::Agent.
Definition at line 43 of file institution.cc.
|
virtual |
Called to give the agent an opportunity to register for services (e.g.
ticks/tocks and resource exchange). Note that this may be called more than once, and so agents should track their registrations carefully. If agents implement this function, they must call their superclass's EnterNotify function at the BEGINNING of their EnterNotify function.
Reimplemented from cyclus::Agent.
Definition at line 39 of file institution.cc.
|
inlinevirtual |
Translates info for the agent from an input file to the database by reading parameters from the passed InfileTree (parsed from xml) and recording data via the DbInit variable.
The simulation id and agent id are automatically injected in all data transfered to the database through DbInit. This function must be implemented by all agents. This function must call the superclass' InfileToDb function before doing any other work.
Agent parameters in the InfileTree are scoped in the "agent/*‍/" path. The superclass InitFrom expects the scope InfileTree passed to it to be unchanged from the agent's InfileTree arg.
Example:
Reimplemented from cyclus::Agent.
Definition at line 41 of file institution.h.
|
protected |
Definition at line 23 of file institution.cc.
|
inlinevirtual |
Intializes an agent's internal state from the database.
Appropriate simulation id, agent id, and time filters are automatically included in all queries. If the agent is a direct subclass of the Agent class, than it should NOT call its superclass' InitFrom(QueryableBackend*) function. If, however, it is a subclasses other Agent subclasses (e.g. subclass of Facility, Region, etc.), then it MUST call its superclass' InitFrom(QueryableBackend*) function. Example:
Reimplemented from cyclus::Agent.
Definition at line 44 of file institution.h.
|
inlinevirtual |
Provides an agent's initial inventory of resources before a simulation begins.
The resources are keyed in the same way as given in the agent's SnapshotInv function. Agents should iterate through each named inventory provided and populate their corresponding resource containers with the given resources.
Implements cyclus::Agent.
Definition at line 49 of file institution.h.
Snapshots agent-internal state to the database via the DbInit var di.
The simulation id , agent id, and the simulation time are automatically injected in all information transfered to the database through DbInit. If the agent is a direct subclass of the Agent class, than it should NOT call its superclass' Snapshot function. If, however, it subclasses other Agent subclasses (e.g. subclass of Facility, Region, etc.), then it MUST call its superclass' Snapshot function. Example:
Implements cyclus::Agent.
Definition at line 47 of file institution.h.
|
inlinevirtual |
Snapshots an agent's resource inventories to the database.
The set of resources in each container should be stored under a string key unique for that container that will be used when re-initializing inventories for restarted simulations in the InitInv function.
Implements cyclus::Agent.
Definition at line 51 of file institution.h.
|
virtual |
every agent should be able to print a verbose description
Reimplemented from cyclus::Agent.
Definition at line 27 of file institution.cc.
Simulation agents do their beginning-of-timestep activities in the Tick method.
time | is the current simulation timestep |
Implements cyclus::TimeListener.
Definition at line 63 of file institution.h.
|
virtual |
Simulation agents do their end-of-timestep activities in the Tock method.
time | is the current simulation timestep |
Implements cyclus::TimeListener.
Definition at line 48 of file institution.cc.