uchicago.src.sim.engine
Class SubSchedule

java.lang.Object
  extended by uchicago.src.sim.engine.BasicAction
      extended by uchicago.src.sim.engine.ScheduleBase
          extended by uchicago.src.sim.engine.SubSchedule
All Implemented Interfaces:
TickCounter

Deprecated.

public class SubSchedule
extends ScheduleBase

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.

Version:
$Revision: 1.7 $ $Date: 2004/11/03 19:50:57 $
Author:
Nick Collier (Modified by Michael J. North)
See Also:
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.ScheduleBase
getCurrentTime, getCurrentTimeDouble, preExecute, removeAction, removeActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAt, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtInterval, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtIntervalRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionAtRnd, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginning, scheduleActionBeginningRnd, scheduleActionBeginningRnd, scheduleActionBeginningRnd, scheduleActionBeginningRnd
 
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

SubSchedule

public 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

Parameters:
iterations - the number of times to execute scheduled actions per tick of the parent schedule

SubSchedule

public 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

Parameters:
interval - the execution interval
iterations - the number of times to execute scheduled actions per tick of the parent schedule
Method Detail

setIterations

public void setIterations(long iterations)
Deprecated. 
Sets the number of iterations of this SubSchedule's action per tick of the parent Schedule.

Parameters:
iterations - the number of times to execute my scheduled actions per tick of the parent schedule

getIterations

public long getIterations()
Deprecated. 
Gets the number of times this SubSchedule's actions will execute per parent Schedule tick.


execute

public void execute()
Deprecated. 
Executes this SubSchedules actions the specified number of times.

Specified by:
execute in class BasicAction