Class RunState
java.lang.Object
repast.simphony.engine.environment.RunState
A class that contains information about the current (or upcoming) simulation
run.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToRegistry(Object key, Object value) Adds an item to the general registry.Retrieves theControllerRegistryused to setup and teardown the simulation.getFromRegistry(Object key) Gets the item identified by the specified key from the general registry.Retrieves the GUI registrystatic RunStateRetrieves the master context for the simulation.Retrieves the run info.static ContextRetrieves the schedule registry.static RunStateinit()static RunStateinit(RunInfo runInfo, ScheduleRegistry scheduleRegistry, GUIRegistry guiRegistry) static RunStateremoveFromRegistry(Object key) Removes the item identified by the specified key from the general registry.voidsetControllerRegistry(ControllerRegistry controllerRegistry) Sets theControllerRegistryused to setup and teardown the simulation.voidsetGUIRegistry(GUIRegistry guiRegistry) Sets the GUI registryvoidsetMasterContext(Context masterContext) Sets the master context for the simulation.voidsetRandomRegistry(RandomRegistry registry) voidsetRunInfo(RunInfo runInfo) Sets the run info.static voidsetSafeMasterContext(Context safeMasterContext) voidsetScheduleRegistry(ScheduleRegistry scheduleRegistry) Sets the schedule registry
-
Field Details
-
safeMasterContext
-
staticInstance
-
-
Method Details
-
setSafeMasterContext
-
init
-
initDistributed
-
init
public static RunState init(RunInfo runInfo, ScheduleRegistry scheduleRegistry, GUIRegistry guiRegistry) -
getInstance
-
getRunInfo
Retrieves the run info.- Returns:
- the run info
-
setRunInfo
Sets the run info.- Parameters:
runInfo- the run info
-
getScheduleRegistry
Retrieves the schedule registry.- Returns:
- the schedule registry
-
setScheduleRegistry
Sets the schedule registry- Parameters:
scheduleRegistry- the schedule registry
-
getGUIRegistry
Retrieves the GUI registry- Returns:
- the GUI registry
-
setGUIRegistry
Sets the GUI registry- Parameters:
guiRegistry- the gui registry
-
addToRegistry
Adds an item to the general registry.- Parameters:
key- the items idvalue- the item itself
-
removeFromRegistry
Removes the item identified by the specified key from the general registry.- Parameters:
key- the items id- Returns:
- the removed item.
-
getFromRegistry
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
Sets the master context for the simulation.- Parameters:
masterContext- the simulation's master context
-
getMasterContext
Retrieves the master context for the simulation.- Returns:
- the simulation's master context
-
getSafeMasterContext
-
setControllerRegistry
Sets theControllerRegistryused to setup and teardown the simulation.- Parameters:
controllerRegistry- the run'sControllerRegistry
-
getControllerRegistry
Retrieves theControllerRegistryused to setup and teardown the simulation.- Returns:
- the run's
ControllerRegistry
-
getRandomRegistry
-
setRandomRegistry
-