49 std::set<Agent*>::iterator it;
56 <<
" has reached the end of its lifetime";
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
virtual void Decommission()
Decommissions the agent, removing it from the simulation.
const int exit_time() const
Returns the default time step at which this agent will exit the simulation (-1 if the agent has an in...
virtual std::string str()
Description of this agent.
Institution(Context *ctx)
Default constructor for Institution Class.
const std::string prototype() const
Returns the agent's prototype.
virtual void EnterNotify()
Called to give the agent an opportunity to register for services (e.g.
virtual void Decommission()
Decommissions the agent, removing it from the simulation.
void UnregisterTimeListener(TimeListener *tl)
Removes an agent from receiving tick/tock notifications.
virtual ~Institution()
every agent should be destructable
virtual bool CheckDecommissionCondition()
facilities over write this method if a condition must be met before their destructors can be called ...
virtual void Build(Agent *parent)
Called when the agent enters the smiulation as an active participant and is only ever called once...
virtual void Build(Agent *parent)
perform all tasks required when an inst enters the simulation
void lifetime(int n_timesteps)
Sets the number of time steps this agent operates between building and decommissioning (-1 if the age...
virtual std::string str()
every agent should be able to print a verbose description
virtual int time()
Returns the current simulation timestep.
The Facility class is the abstract class/interface used by all facility agents.
Context * context() const
Returns this agent's simulation context.
std::string kind_
describes the agent subclass (e.g.
virtual void Tock()
Simulation agents do their end-of-timestep activities in the Tock method.
void RegisterTimeListener(TimeListener *tl)
Registers an agent to receive tick/tock notifications every timestep.
Agent * parent() const
Returns parent of this agent. Returns NULL if the agent has no parent.
Code providing rudimentary logging capability for the Cyclus core.
A simulation context provides access to necessary simulation-global functions and state...
The abstract base class used by all types of agents that live and interact in a simulation.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
Information helpful for simulation users and developers alike.
virtual void InitFrom(QueryableBackend *b)
Intializes an agent's internal state from the database.
const std::set< Agent * > & children() const
Returns a list of children this agent has.
The Institution class is the abstract class/interface used by all institution agents.
enable_if< has_const_iterator< T >::value, typename T::const_iterator >::type begin(const T &c)
void SchedDecom(Agent *m, int time=-1)
Schedules the given Agent to be decommissioned at the specified timestep t.