Class StagedAgent
Defined in File agent.h
Inheritance Relationships
Base Type
public kami::Agent
(Class Agent)
Class Documentation
-
class StagedAgent : public kami::Agent
A superclass for all staged agents.
Staged agents use a two-phase step to allow agents to take actions without updating the state of the model before all agents have been allowed to update. All work necessary to advance the
StagedAgent
state should take place in thestep()
function. However, theStagedAgent
should not actually update the state, and instead save the results for later use. Finally, during theadvance()
stage, the StagedAgent state should update.StagedAgents
must implement both thestep()
andadvance()
functions.Public Functions
Post-step advance the agent.
This method should be called after
step()
. Any updates or cleanups to the agent that must happen for theStagedAgent
to complete its step must happen here.- Parameters
model – a reference copy of the model