Class InOrderScheduler

java.lang.Object
modelarium.scheduler.InOrderScheduler
All Implemented Interfaces:
Scheduler

public class InOrderScheduler extends Object implements Scheduler
Class for scheduling agents to execute in the order they appear in the agent set.

This scheduling strategy ensures that all agents are processed sequentially and predictably for each simulation tick.

  • Constructor Details

    • InOrderScheduler

      public InOrderScheduler()
      Constructs an in-order scheduler.
  • Method Details

    • runTick

      public void runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random)
      Executes each agent's run() method in the order they are stored in the agent set.
      Specified by:
      runTick in interface Scheduler
      Parameters:
      threadName - the name of the worker thread running the tick
      clock - the model's clock, giving the current tick
      environment - a read-only view of the worker's environment
      agentSet - the set of agents to run for this tick
      random - the random generator the scheduler can use for ordering decisions