Class ScheduleRunner

java.lang.Object
repast.simphony.ws.ScheduleRunner
All Implemented Interfaces:
Runner, Executor<RunState>

public class ScheduleRunner extends Object implements Runner
This class executes the model schedule found in the RunState's ScheduleRegistry.
Author:
Nick Collier
  • Field Details

    • stop

      protected boolean stop
    • pause

      protected boolean pause
    • step

      protected boolean step
  • Constructor Details

    • ScheduleRunner

      public ScheduleRunner()
  • Method Details

    • execute

      public void execute(RunState toExecuteOn)
      This executes the given RunState object's schedule. It will continue executing the schedule until there are no more actions schedule or the run manager tells it to stop.
      Specified by:
      execute in interface Executor<RunState>
      Parameters:
      toExecuteOn - the RunState to execute on
    • go

      public boolean go()
      Description copied from interface: Runner
      Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).
      Specified by:
      go in interface Runner
      Returns:
      true if the runner should keep going
    • setPause

      public void setPause(boolean pause)
      Specified by:
      setPause in interface Runner
    • step

      public void step()
      Specified by:
      step in interface Runner
    • stop

      public void stop()
      Specified by:
      stop in interface Runner
    • getTickListener

      public TickListener getTickListener()
    • setTickListener

      public void setTickListener(TickListener tickListener)
    • getSchedule

      protected ISchedule getSchedule(RunState toExecuteOn)
    • init

      public void init()
      Specified by:
      init in interface Runner
    • setEnvironmentBuilder

      public void setEnvironmentBuilder(RunEnvironmentBuilder environment)
      Specified by:
      setEnvironmentBuilder in interface Runner
    • addRunListener

      public void addRunListener(RunListener listener)
      Description copied from interface: Runner
      Adds the specified listener to the list of RunListener-s to be notified of any run related events, such as stopped, started, and so on.
      Specified by:
      addRunListener in interface Runner
      Parameters:
      listener - the listener to add.
    • removeRunListener

      public void removeRunListener(RunListener listener)
      Description copied from interface: Runner
      Removes the specified RunListener from the list for RunListener notified by this runner.
      Specified by:
      removeRunListener in interface Runner
    • setController

      public void setController(Controller controller)
      Specified by:
      setController in interface Runner