Class StagedScheduler
Defined in File staged.h
Inheritance Relationships
Base Type
public kami::SequentialScheduler
(Class SequentialScheduler)
Class Documentation
-
class StagedScheduler : public kami::SequentialScheduler
Will execute all agent steps in a sequential order.
A sequential scheduler will iterate over the agents assigned to the scheduler and call their
step()
function in a sequential order. That order is preserved between calls tostep()
but may be modified byadd_agent()
ordelete_agent()
.Public Functions
Execute a single time step.
This method will step through the list of Agents in the scheduler’s internal queue and execute the
Agent::step()
method for eachAgent
in the same order. Finally, it will execute theAgent::advance()
method for each Agent in the same order.- Parameters
model – a reference copy of the model
agent_list – list of agents to execute the step
- Returns
returns vector of agents successfully stepped
Execute a single time step for a
ReporterModel
This method will step through the list of Agents in the scheduler’s internal queue and then execute the
Agent::step()
method for every Agent assigned to this scheduler in the order assigned.- Parameters
model – a reference copy of the
ReporterModel
agent_list – list of agents to execute the step
- Returns
returns vector of agents successfully stepped