Package repast.simphony.ui
Class GUIScheduleRunner
java.lang.Object
repast.simphony.engine.environment.AbstractRunner
repast.simphony.ui.GUIScheduleRunner
This class executes the model schedule found in the RunState's
ScheduleRegistry.
- Author:
- Nick Collier
-
Field Summary
FieldsFields inherited from class repast.simphony.engine.environment.AbstractRunner
controller, environmentBuilder, pause, runListeners, stop, thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRenderer(Renderer renderer) voidvoidThis executes the given RunState object's schedule.protected ISchedulegetSchedule(RunState toExecuteOn) booleango()Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).voidsetPause(boolean pause) voidsetTickListener(TickListener tickListener) voidstep()voidstop()Stops the execution of the scheduled events after the any events scheduled for the current tick have been executed.Methods inherited from class repast.simphony.engine.environment.AbstractRunner
addRunListener, firePausedMessage, fireRestartedMessage, fireStartedMessage, fireStoppedMessage, init, removeRunListener, setController, setEnvironmentBuilder
-
Field Details
-
lastSleepTime
public long lastSleepTime
-
-
Constructor Details
-
GUIScheduleRunner
public GUIScheduleRunner()
-
-
Method Details
-
addRenderer
-
clearRenderers
public void clearRenderers() -
execute
This executes the given RunState object's schedule. It will continue executing the schedule until there are no more actions schedule or the run manager tells it to stop.- Parameters:
toExecuteOn- the RunState to execute on
-
go
public boolean go()Description copied from interface:RunnerSpecifies if the simulation should continue to run (returns true) or if it should stop (returns false).- Specified by:
goin interfaceRunner- Overrides:
goin classAbstractRunner- Returns:
- true if the runner should keep going
-
setPause
public void setPause(boolean pause) - Specified by:
setPausein interfaceRunner- Overrides:
setPausein classAbstractRunner
-
step
public void step()- Specified by:
stepin interfaceRunner- Overrides:
stepin classAbstractRunner
-
stop
public void stop()Description copied from class:AbstractRunnerStops the execution of the scheduled events after the any events scheduled for the current tick have been executed.- Specified by:
stopin interfaceRunner- Overrides:
stopin classAbstractRunner
-
getTickListener
-
setTickListener
-
getSchedule
-