Class RunState


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

      • safeMasterContext

        public static Context safeMasterContext
      • staticInstance

        public static RunState staticInstance
    • Method Detail

      • setSafeMasterContext

        public static void setSafeMasterContext​(Context safeMasterContext)
      • initDistributed

        public static RunState initDistributed()
      • 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()
      • setRandomRegistry

        public void setRandomRegistry​(RandomRegistry registry)