Package modelarium.scheduler
Interface Scheduler
- All Known Implementing Classes:
FunctionalScheduler,InOrderScheduler,RandomOrderScheduler
public interface Scheduler
Interface for representing a scheduling policy for running a single tick of the agent-based model.
Implementations of this interface define the order in which a tick is executed over a given set of agents.
-
Method Summary
Modifier and TypeMethodDescriptionvoidrunTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes a single simulation tick for the provided agent set.
-
Method Details
-
runTick
void runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes a single simulation tick for the provided agent set.- Parameters:
threadName- the name of the worker thread running the tickclock- the model's clock, giving the current tickenvironment- a read-only view of the worker's environmentagentSet- the set of agents to execute for this tickrandom- the random generator the scheduler can use for ordering decisions
-