Class RunState
java.lang.Object
repast.simphony.engine.environment.RunState
A class that contains information about the current (or upcoming) simulation
run.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToRegistry
(Object key, Object value) Adds an item to the general registry.Retrieves theControllerRegistry
used 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 RunState
Retrieves the master context for the simulation.Retrieves the run info.static Context
Retrieves the schedule registry.static RunState
init()
static RunState
init
(RunInfo runInfo, ScheduleRegistry scheduleRegistry, GUIRegistry guiRegistry) static RunState
removeFromRegistry
(Object key) Removes the item identified by the specified key from the general registry.void
setControllerRegistry
(ControllerRegistry controllerRegistry) Sets theControllerRegistry
used to setup and teardown the simulation.void
setGUIRegistry
(GUIRegistry guiRegistry) Sets the GUI registryvoid
setMasterContext
(Context masterContext) Sets the master context for the simulation.void
setRandomRegistry
(RandomRegistry registry) void
setRunInfo
(RunInfo runInfo) Sets the run info.static void
setSafeMasterContext
(Context safeMasterContext) void
setScheduleRegistry
(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 theControllerRegistry
used to setup and teardown the simulation.- Parameters:
controllerRegistry
- the run'sControllerRegistry
-
getControllerRegistry
Retrieves theControllerRegistry
used to setup and teardown the simulation.- Returns:
- the run's
ControllerRegistry
-
getRandomRegistry
-
setRandomRegistry
-