17 kind_ = std::string(
"Facility");
38 std::stringstream
ss(
"");
The abstract base class used by all types of agents that live and interact in a simulation.
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
const std::string prototype() const
Returns the agent's prototype.
virtual void Build(Agent *parent)
Called when the agent enters the smiulation as an active participant and is only ever called once.
Context * context() const
Returns this agent's simulation context.
const int lifetime() const
Returns the number of time steps this agent operates between building and decommissioning (-1 if the ...
virtual void Decommission()
Decommissions the agent, removing it from the simulation.
std::string kind_
describes the agent subclass (e.g.
virtual void EnterNotify()
Called to give the agent an opportunity to register for services (e.g.
Agent * parent() const
Returns parent of this agent. Returns NULL if the agent has no parent.
virtual std::string str()
Description of this agent.
const int enter_time() const
Returns the time step at which this agent's Build function was called (-1 if the agent has never been...
A simulation context provides access to necessary simulation-global functions and state.
void UnregisterTrader(Trader *e)
Unregisters an agent as a participant in resource exchanges.
void RegisterTrader(Trader *e)
Registers an agent as a participant in resource exchanges.
void RegisterTimeListener(TimeListener *tl)
Registers an agent to receive tick/tock notifications every timestep.
void UnregisterTimeListener(TimeListener *tl)
Removes an agent from receiving tick/tock notifications.
A generic mechanism to manually manage exceptions.
The Facility class is the abstract class/interface used by all facility agents.
virtual void Decommission()
decommissions the facility, default behavior is for the facility to delete itself
virtual void EnterNotify()
Called to give the agent an opportunity to register for services.
virtual std::string str()
every agent should be able to print a verbose description
virtual void Build(Agent *parent)
builds the facility in the simulation
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
virtual bool CheckDecommissionCondition()
facilities over write this method if a condition must be met before their destructors can be called
A simple API for agents that wish to exchange resources in the simulation.
Code providing rudimentary logging capability for the Cyclus core.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters