|
||||||||||
| 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.SubSchedule
public class SubSchedule
Executes within a parent Schedule and manages the
execution of BasicActions according to an internal clock.
A SubSchedule allows a user to further divide the ticks of a parent
Schedule by some specified number. Certain aspects of the model can
then occur "faster" than other elements.
A SubSchedule is typically scheduled against a Schedule to execute at some tick t. When the SubSchedule exectutes at t, it then iterates over its own scheduled actions a specified number of times. So, for example, a SubSchedule may execute all its actions three times for every tick of its parent Schedule.
The actions scheduled on a SubSchedule will iterate with a simulated concurrency (i.e. in random order). If the actions should be executed in some specified order, the actions should be added to an ActionGroup set for sequential execution. This ActionGroup can then be added to the SubSchedule for execution. Specifying the order in the scheduleActionAt and scheduleActionAtInterval methods can be used to insure that certain actions occur after other actions.
Schedule,
BasicAction,
ActionGroup| 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 | |
|---|---|
SubSchedule(double interval,
long iterations)
Deprecated. Constructs a SubSchedule with the specifed interval, and with the specified number of times to execute its scheduled actions per tick of the parent Schedule |
|
SubSchedule(long iterations)
Deprecated. Constructs a SubSchedule with a default interval of 1, and with the specified number of times to execute its scheduled actions per tick of the parent Schedule |
|
| Method Summary | |
|---|---|
void |
execute()
Deprecated. Executes this SubSchedules actions the specified number of times. |
long |
getIterations()
Deprecated. Gets the number of times this SubSchedule's actions will execute per parent Schedule tick. |
void |
setIterations(long iterations)
Deprecated. Sets the number of iterations of this SubSchedule's action per tick of the parent Schedule. |
| 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 SubSchedule(long iterations)
iterations - the number of times to execute scheduled actions per
tick of the parent schedule
public SubSchedule(double interval,
long iterations)
interval - the execution intervaliterations - the number of times to execute scheduled actions per
tick of the parent schedule| Method Detail |
|---|
public void setIterations(long iterations)
iterations - the number of times to execute my scheduled actions per
tick of the parent schedulepublic long getIterations()
public void execute()
execute in class BasicAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||