Class Scheduler
Defined in File scheduler.h
Inheritance Relationships
Derived Type
public kami::SequentialScheduler
(Class SequentialScheduler)
Class Documentation
-
class Scheduler
Create a Kami scheduler.
Schedulers are responsible for executing each time step in the model. A scheduler will have a collection of agents assigned to it and will execute the step function for each agent based on the type of scheduling implemented.
Subclassed by kami::SequentialScheduler
Public Functions
Execute a single time step.
This method will step through the list of Agents in the
Population
associated withmodel
and then execute theAgent::step()
method for every Agent assigned to this scheduler in the order assigned.- Parameters
model – a reference copy of the model
- 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
- Returns
returns vector of agents successfully stepped
Execute a single time step.
This method will step through the list of Agents provided 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 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
Protected Attributes
-
int _step_counter = 0
Counter to increment on each step