Class BaseSDFScheduler

    • Field Detail

      • VERBOSE

        protected static final boolean VERBOSE
        If true, then print verbose messages. By default, this variable is set to false. To enable verbose messages, edit the source file and recompile.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseSDFScheduler

        public BaseSDFScheduler()
        Construct a scheduler with no container(director) in the default workspace, the name of the scheduler is "Scheduler".
      • BaseSDFScheduler

        public BaseSDFScheduler​(Workspace workspace)
        Construct a scheduler in the given workspace with the name "Scheduler". 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.
      • BaseSDFScheduler

        public BaseSDFScheduler​(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 attribute.
        Throws:
        IllegalActionException - If the attribute 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

      • declareRateDependency

        public abstract void declareRateDependency()
                                            throws IllegalActionException
        Declare the rate dependency on any external ports of the model. SDF directors should invoke this method once during preinitialize.
        Throws:
        IllegalActionException - If there is a problem setting the rate dependency on an external port.
      • _declareDependency

        protected void _declareDependency​(ConstVariableModelAnalysis analysis,
                                          Port port,
                                          java.lang.String name,
                                          java.util.List dependents)
                                   throws IllegalActionException
        Add a DependencyDeclaration (with the name "_SDFRateDependencyDeclaration") to the variable with the given name in the given port that declares the variable is dependent on the given list of variables. If a dependency declaration with that name already exists, then simply set its dependents list to the given list.
        Parameters:
        analysis - The ConstVariableModelAnalysis
        port - The port that gets the DependencyDeclaration.
        name - The name of the DependencyDeclaration.
        dependents - The dependents.
        Throws:
        IllegalActionException - If there is a problem setting the rate dependency on a port
      • _saveBufferSizes

        protected void _saveBufferSizes​(java.util.Map minimumBufferSizes)
        Create and set a parameter in each relation according to the buffer sizes calculated for this system.
        Parameters:
        minimumBufferSizes - A map from relation to the minimum possible buffer size of that relation.
      • _saveContainerRates

        protected void _saveContainerRates​(java.util.Map externalRates)
                                    throws NotSchedulableException,
                                           IllegalActionException
        Push the rates calculated for this system up to the contained Actor, but only if the ports do not have a set rates. This allows the container to be properly scheduled if it is in a hierarchical system and the outside system is SDF.
        Parameters:
        externalRates - A map from external port to the rate of that port.
        Throws:
        IllegalActionException - If any called method throws it.
        NotSchedulableException - If an external port is both an input and an output, or neither an input or an output, or connected on the inside to ports that have different tokenInitProduction.
      • _saveFiringCounts

        protected void _saveFiringCounts​(java.util.Map entityToFiringsPerIteration)
        Create and set a parameter in each actor according to the number of times it will fire in one execution of the schedule.
        Parameters:
        entityToFiringsPerIteration - A map from actor to firing count.