Interface Controller

All Superinterfaces:
IAction
All Known Implementing Classes:
DefaultController

public interface Controller extends IAction
Interface representing the Controller for the simulation. This will handle the setup, execution, and teardown of the model. This contains a set of ControllerActions that perform the actual work, allowing this to perform primarily as a container and orderer of the actions.
Author:
Jerry Vos
  • Method Details

    • setControllerRegistry

      void setControllerRegistry(ControllerRegistry controllerRegistry)
      Sets the registry of ControllerActions that the controller will run.
      Parameters:
      controllerRegistry - a registry used to find actions to run
    • getControllerRegistry

      ControllerRegistry getControllerRegistry()
      Retrieves the registry of ControllerActions that the controller will run.
      Returns:
      a registry used to find actions to run
    • getCurrentRunState

      RunState getCurrentRunState()
      Retrieves the current RunState the controller is using.
      Returns:
      the RunState the controller is currently using
    • setScheduleRunner

      void setScheduleRunner(Runner scheduleRunner)
      Sets the ScheduleRunner that will be used to execute the model's schedule and found through the RunState. This is used in the execute() phase of the controller.
      Parameters:
      scheduleRunner - the ScheduleRunner that will execute the model's schedule
    • batchInitialize

      void batchInitialize()
      Initializes the action for a batch run (a set of runs).
    • runParameterSetters

      Parameters runParameterSetters(Parameters params)
      Initializes the parameters for the current run.
      Parameters:
      params - an optional parameters object that will have the parameters loaded into it
      Returns:
      the parameters object that the parameters were loaded into
    • runInitialize

      RunState runInitialize(Parameters params)
      Initializes the action for a single run (possibly one of many).
    • runCleanup

      void runCleanup()
      Cleans up the action after a run just occurred.
    • batchCleanup

      void batchCleanup()
      Cleans up the action after a batch run (a set of runs).
    • getScheduleRunner

      Runner getScheduleRunner()
      Gets the ScheduleRunner that will be used to execute the model's schedule found through the RunState. This is used in the execute() phase of the controller.
      Returns:
      the ScheduleRunner that will be used to execute the model's schedule.
    • getNextRunNumber

      int getNextRunNumber()
      Gets the next run number. The next run number is the number assigned to the next run when runInitialize is called.
      Returns:
      the next run number. The next run number is the number assigned to the next run when runInitialize is called.
    • getNextBatchNumber

      int getNextBatchNumber()
      Gets the next batch number. The next batch number is the number assigned to the next batch when batchInitialize is called.
      Returns:
      the next batch number. The next batch number is the number assigned to the next batch when batchInitialize is called.
    • setup

      void setup()