Package repast.simphony.ws
Class ScheduleRunner
java.lang.Object
repast.simphony.ws.ScheduleRunner
This class executes the model schedule found in the RunState's
ScheduleRegistry.
- Author:
- Nick Collier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRunListener
(RunListener listener) Adds the specified listener to the list of RunListener-s to be notified of any run related events, such as stopped, started, and so on.void
This executes the given RunState object's schedule.protected ISchedule
getSchedule
(RunState toExecuteOn) boolean
go()
Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).void
init()
void
removeRunListener
(RunListener listener) Removes the specified RunListener from the list for RunListener notified by this runner.void
setController
(Controller controller) void
setEnvironmentBuilder
(RunEnvironmentBuilder environment) void
setPause
(boolean pause) void
setTickListener
(TickListener tickListener) void
step()
void
stop()
-
Field Details
-
stop
protected boolean stop -
pause
protected boolean pause -
step
protected boolean step
-
-
Constructor Details
-
ScheduleRunner
public ScheduleRunner()
-
-
Method Details
-
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. -
go
public boolean go()Description copied from interface:Runner
Specifies if the simulation should continue to run (returns true) or if it should stop (returns false). -
setPause
public void setPause(boolean pause) -
step
public void step() -
stop
public void stop() -
getTickListener
-
setTickListener
-
getSchedule
-
init
public void init() -
setEnvironmentBuilder
- Specified by:
setEnvironmentBuilder
in interfaceRunner
-
addRunListener
Description copied from interface:Runner
Adds the specified listener to the list of RunListener-s to be notified of any run related events, such as stopped, started, and so on.- Specified by:
addRunListener
in interfaceRunner
- Parameters:
listener
- the listener to add.
-
removeRunListener
Description copied from interface:Runner
Removes the specified RunListener from the list for RunListener notified by this runner.- Specified by:
removeRunListener
in interfaceRunner
-
setController
- Specified by:
setController
in interfaceRunner
-