The base class for schedulers. A scheduler schedules the execution order of the containees of a CompositeActor.
A scheduler is contained by a StaticSchedulingDirector, and provides the schedule for it. The director will use this schedule to govern the execution of a CompositeActor.
A schedule is represented by the Schedule class, and determines the order of the firing of the actors in a particular composite actor. In this base class, the default schedule fires the deeply contained actors in the order of their construction. A domain specific scheduler will override this to provide a different order.
The schedule, once constructed, is cached and reused as long as the schedule is still valid. The validity of the schedule is set by the setValid() method. If the current schedule is not valid, then the schedule will be recomputed the next time the getSchedule() method is called. However, derived classes will usually override only the protected _getSchedule() method.
The scheduler does not perform any mutations, and it does not listen for changes in the model. Directors that use this scheduler should normally invalidate the schedule when mutations occur.
@author Jie Liu, Steve Neuendorffer
@version $Id: Scheduler.java,v 1.81 2005/10/29 01:14:33 cxh Exp $
@since Ptolemy II 0.2
@Pt.ProposedRating Green (neuendor)
@Pt.AcceptedRating Yellow (neuendor)
@see ptolemy.actor.sched.Schedule