Class SRRandomizedScheduler

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class SRRandomizedScheduler
    extends Scheduler
    A scheduler the Synchronous Reactive (SR) domain. This schedule is simply a random ordering of all the actors. The director should cycle through this schedule repeatedly, deciding which actors to fire, until it determines that the given iteration has converged. The ordering of the schedule has no effect on the results of an iteration.
    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Paul Whitaker
    See Also:
    SRDirector
    Pt.AcceptedRating:
    Green (pwhitake)
    Pt.ProposedRating:
    Green (pwhitake)
    • Constructor Detail

      • SRRandomizedScheduler

        public SRRandomizedScheduler()
        Construct a SR scheduler with no container (director) in the default workspace.
      • SRRandomizedScheduler

        public SRRandomizedScheduler​(Workspace workspace)
        Construct a SR scheduler in the given workspace. If the workspace argument is null, use the default workspace. The scheduler is added to the list of objects in the workspace. Increment the version number of the workspace.
        Parameters:
        workspace - Object for synchronization and version tracking.
      • SRRandomizedScheduler

        public SRRandomizedScheduler​(Director container,
                                     java.lang.String name)
                              throws IllegalActionException,
                                     NameDuplicationException
        Construct a scheduler in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. This attribute will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of this scheduler.
        Throws:
        IllegalActionException - If the scheduler is not of an acceptable class for the container, or if the name contains a period.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • _getSchedule

        protected Schedule _getSchedule()
                                 throws NotSchedulableException
        Return the scheduling sequence. Overrides _getSchedule() method in the base class. This method should not be called directly, rather the getSchedule() method (which is defined in the superclass) will call it when the schedule is invalid. This method is not synchronized on the workspace.
        Overrides:
        _getSchedule in class Scheduler
        Returns:
        A schedule representing the scheduling sequence.
        Throws:
        NotSchedulableException - If the CompositeActor is not schedulable.
        See Also:
        CompositeEntity.deepEntityList()