Class RunState

java.lang.Object
repast.simphony.engine.environment.RunState

public class RunState extends Object
A class that contains information about the current (or upcoming) simulation run.
  • Field Details

    • safeMasterContext

      public static Context safeMasterContext
    • staticInstance

      public static RunState staticInstance
  • Method Details

    • setSafeMasterContext

      public static void setSafeMasterContext(Context safeMasterContext)
    • init

      public static RunState init()
    • initDistributed

      public static RunState initDistributed()
    • init

      public static RunState init(RunInfo runInfo, ScheduleRegistry scheduleRegistry, GUIRegistry guiRegistry)
    • getInstance

      public static RunState getInstance()
    • getRunInfo

      public RunInfo getRunInfo()
      Retrieves the run info.
      Returns:
      the run info
    • setRunInfo

      public void setRunInfo(RunInfo runInfo)
      Sets the run info.
      Parameters:
      runInfo - the run info
    • getScheduleRegistry

      public ScheduleRegistry getScheduleRegistry()
      Retrieves the schedule registry.
      Returns:
      the schedule registry
    • setScheduleRegistry

      public void setScheduleRegistry(ScheduleRegistry scheduleRegistry)
      Sets the schedule registry
      Parameters:
      scheduleRegistry - the schedule registry
    • getGUIRegistry

      public GUIRegistry getGUIRegistry()
      Retrieves the GUI registry
      Returns:
      the GUI registry
    • setGUIRegistry

      public void setGUIRegistry(GUIRegistry guiRegistry)
      Sets the GUI registry
      Parameters:
      guiRegistry - the gui registry
    • addToRegistry

      public void addToRegistry(Object key, Object value)
      Adds an item to the general registry.
      Parameters:
      key - the items id
      value - the item itself
    • removeFromRegistry

      public Object removeFromRegistry(Object key)
      Removes the item identified by the specified key from the general registry.
      Parameters:
      key - the items id
      Returns:
      the removed item.
    • getFromRegistry

      public Object getFromRegistry(Object key)
      Gets the item identified by the specified key from the general registry.
      Parameters:
      key - the items id
      Returns:
      the item or null if the item is not found.
    • setMasterContext

      public void setMasterContext(Context masterContext)
      Sets the master context for the simulation.
      Parameters:
      masterContext - the simulation's master context
    • getMasterContext

      public Context getMasterContext()
      Retrieves the master context for the simulation.
      Returns:
      the simulation's master context
    • getSafeMasterContext

      public static Context getSafeMasterContext()
    • setControllerRegistry

      public void setControllerRegistry(ControllerRegistry controllerRegistry)
      Sets the ControllerRegistry used to setup and teardown the simulation.
      Parameters:
      controllerRegistry - the run's ControllerRegistry
    • getControllerRegistry

      public ControllerRegistry getControllerRegistry()
      Retrieves the ControllerRegistry used to setup and teardown the simulation.
      Returns:
      the run's ControllerRegistry
    • getRandomRegistry

      public RandomRegistry getRandomRegistry()
    • setRandomRegistry

      public void setRandomRegistry(RandomRegistry registry)