Class PSDFDirector

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

    public class PSDFDirector
    extends SDFDirector
    The Parameterized Synchronous Dataflow (PSDF) domain is an extension of the Synchronous Dataflow (SDF) domain that allows for more extensive reconfiguration of models. The SDF domain uses static analysis of variable dependence to detect cases where rate parameters may change. By default, SDF disallows reconfiguration of all rate parameters. If rate parameters are allowed to change, then SDF checks that rate parameters do not change during execution of the schedule, and declares that inferred rate parameters for external ports change as often as the internal rate parameters.

    This domain offers two key extensions:

    1. Dependence analysis is used to determine if the modification to the rate parameters occurs during execution of the SDF schedule. If this test passes, then a parameterized schedule is constructed.
    2. The generated schedule is checked for local synchrony, to determine if external rate parameters may change. The correct dependency information for external ports is then declared.
    Note that the resulting behavior is identical to the SDF scheduler, with rate parameter changes allowed, except much more efficient, since scheduling on the fly is not necessary during every reconfiguration. Additionally, code can be generated for the PSDF domain that allows for efficient reconfiguration. The added precision of dependency analysis for external rate parameters also means that some hierarchical models that would be ruled out by the SDF checks are allowed.
    Since:
    Ptolemy II 3.1
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    See Also:
    PSDFScheduler
    Pt.AcceptedRating:
    Red (johnr)
    Pt.ProposedRating:
    Red (neuendor)
    • Constructor Detail

      • PSDFDirector

        public PSDFDirector()
                     throws IllegalActionException,
                            NameDuplicationException
        Construct a director in the default workspace with an empty string as its name. The director is added to the list of objects in the workspace. Increment the version number of the workspace. The PSDFDirector will have a default scheduler of type PDFScheduler.
        Throws:
        IllegalActionException - If the name has a period in it, or the director is not compatible with the specified container.
        NameDuplicationException - If the container already contains an entity with the specified name.
      • PSDFDirector

        public PSDFDirector​(Workspace workspace)
                     throws IllegalActionException,
                            NameDuplicationException
        Construct a director in the workspace with an empty name. The director is added to the list of objects in the workspace. Increment the version number of the workspace. The PSDFDirector will have a default scheduler of type PDFScheduler.
        Parameters:
        workspace - The workspace for this object.
        Throws:
        IllegalActionException - If the name has a period in it, or the director is not compatible with the specified container.
        NameDuplicationException - If the container already contains an entity with the specified name.
      • PSDFDirector

        public PSDFDirector​(CompositeEntity container,
                            java.lang.String name)
                     throws IllegalActionException,
                            NameDuplicationException
        Construct a director in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. Increment the version number of the workspace. The PSDFDirector will have a default scheduler of type PSDFScheduler.
        Parameters:
        container - Container of the director.
        name - Name of this director.
        Throws:
        IllegalActionException - If the director is not compatible with the specified container. May be thrown in a derived class.
        NameDuplicationException - If the container is not a CompositeActor and the name collides with an entity in the container.
    • Method Detail

      • invalidateSchedule

        public void invalidateSchedule()
        Indicate that a schedule for the model may no longer be valid. This method should be called when topology changes are made, or for that matter when any change that may invalidate the schedule is made. In this base class, this method sets a flag that forces scheduling to be redone at the next opportunity. If there is no scheduler, do nothing.
        Overrides:
        invalidateSchedule in class StaticSchedulingDirector