|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.engine.BasicAction
uchicago.src.sim.engine.ScheduleBase
uchicago.src.sim.engine.Schedule
public class Schedule
Manages the execution of BasicActions (ActionGroups, SimActions, and SimListActions) according to a simulation clock. The clock is incremeneted at the completion of the execution of all the BasicActions scheduled for execution at that clock tick. A Schedule is itself a BasicAction and so Schedules can be added to other Schedules.
The actions scheduled on a Schedule will iterate with a simulated concurrency (i.e. in random order). If the actions should be executed in some specified order, the action should be added to an ActionGroup set for sequential execution. This ActionGroup can then be added to the Schedule for execution. Specifying the order in the scheduleActionAt and scheduleActionAtInterval methods can be used to insure that certain actions occur after other actions.
BasicAction,
ActionGroup,
SubSchedule| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class uchicago.src.sim.engine.ScheduleBase |
|---|
ScheduleBase.Order |
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.engine.ScheduleBase |
|---|
actionQueue, CONCURRENT, groupToExecute, indexCount, LAST, lastGroup, lastQueue, preExecuted, randGroup, RANDOM, repeatInterval, ticks, topGroup |
| Fields inherited from class uchicago.src.sim.engine.BasicAction |
|---|
INTERVAL_UPDATER, ONE_TIME_UPDATER, updater |
| Constructor Summary | |
|---|---|
Schedule()
Constructs a schedule that with a default execution interval of 1. |
|
Schedule(double executionInterval)
Constructs a schedule that executes at the specified interval. |
|
| Method Summary | |
|---|---|
void |
execute()
Executes all the actions scheduled for the current clock tick. |
void |
executeEndActions()
Executes all the actions scheduled to execute at simulation end. |
void |
executePauseActions()
Executes all the actions scheduled to execute at a simulation pause. |
java.util.Vector |
getEndActions()
Gets the Vector of BasicActions to execute at the end of the simulation run. |
java.util.Vector |
getPauseActions()
Gets the Vector of BasicActions to execute during a pause in the simulation run. |
void |
removeEndAction(BasicAction action)
Removes the specified action from the list of actions to be executed at the end of a simulation. |
void |
removePauseAction(BasicAction action)
Removes the specified action from the list of actions to be executed at the pause in a simulation. |
BasicAction |
scheduleActionAtEnd(BasicAction action)
Schedules the execution of the specified action for the end of the simulation run. |
BasicAction |
scheduleActionAtEnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for the end of the simulation. |
BasicAction |
scheduleActionAtEnd(java.util.List list,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for the end of the simulation. |
BasicAction |
scheduleActionAtEnd(java.lang.Object o,
java.lang.String methodName)
Schedules the execution of the specified method on the specified object for the end of the simulation run. |
BasicAction |
scheduleActionAtEndRnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for the end of the simulation. |
BasicAction |
scheduleActionAtEndRnd(java.util.List list,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for the end of the simulation. |
BasicAction |
scheduleActionAtPause(BasicAction action)
Schedules the execution of the specified action for a pause in the simulation run. |
BasicAction |
scheduleActionAtPause(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for a pause in the simulation. |
BasicAction |
scheduleActionAtPause(java.util.List list,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for a pause in the simulation. |
BasicAction |
scheduleActionAtPause(java.lang.Object o,
java.lang.String methodName)
Schedules the execution of the specified method on the specified object for a pause in the simulation run. |
BasicAction |
scheduleActionAtPauseRnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for a pause in the simulation. |
BasicAction |
scheduleActionAtPauseRnd(java.util.List list,
java.lang.String methodName)
Schedules the execution of the specified method on every object in the specified List for a pause in the simulation. |
| Methods inherited from class uchicago.src.sim.engine.BasicAction |
|---|
addToGroup, getIntervalTime, getName, getNextTime, reSchedule, setIntervalTime, setName, setNextTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Schedule()
Schedule(double)public Schedule(double executionInterval)
executionInterval - the execution interval.| Method Detail |
|---|
public BasicAction scheduleActionAtEnd(BasicAction action)
action - the BasicAction to execute at the end of a run.public BasicAction scheduleActionAtPause(BasicAction action)
action - the BasicAction to execute when the simulation run is
paused
public BasicAction scheduleActionAtEnd(java.lang.Object o,
java.lang.String methodName)
o - the object on which the method will be calledmethodName - the name of method to call on the object.
public BasicAction scheduleActionAtPause(java.lang.Object o,
java.lang.String methodName)
o - the object on which the method will be calledmethodName - the name of method to call on the object.
public BasicAction scheduleActionAtEnd(java.util.List list,
java.lang.String methodName)
list - the List of objects on which the method will be calledmethodName - the name of method to call on the object.
public BasicAction scheduleActionAtEndRnd(java.util.List list,
java.lang.String methodName)
list - the List of objects on which the method will be calledmethodName - the name of method to call on the object.SimUtilities
public BasicAction scheduleActionAtPause(java.util.List list,
java.lang.String methodName)
list - the List of objects on which the method will be calledmethodName - the name of method to call on the object.
public BasicAction scheduleActionAtPauseRnd(java.util.List list,
java.lang.String methodName)
list - the List of objects on which the method will be calledmethodName - the name of method to call on the object.SimUtilities
public BasicAction scheduleActionAtEnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
list - the List of objects on which the method will be calledsuperClass - the superclass of all the objects in the list.methodName - the name of method to call on the object.
public BasicAction scheduleActionAtEndRnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
list - the List of objects on which the method will be calledsuperClass - the superclass of all the objects in the list.methodName - the name of method to call on the object.SimUtilities
public BasicAction scheduleActionAtPause(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
list - the AList of objects on which the method will be calledsuperClass - the superclass of all the objects in the list.methodName - the name of method to call on the object.
public BasicAction scheduleActionAtPauseRnd(java.util.List list,
java.lang.Class superClass,
java.lang.String methodName)
list - the AList of objects on which the method will be calledsuperClass - the superclass of all the objects in the list.methodName - the name of method to call on the object.SimUtilitiespublic void removeEndAction(BasicAction action)
action - the action to removepublic void removePauseAction(BasicAction action)
action - the action to removepublic java.util.Vector getEndActions()
public java.util.Vector getPauseActions()
public void execute()
execute in class BasicActionpublic void executeEndActions()
public void executePauseActions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||