Class Priority

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

    public class Priority
    extends Parameter
    A parameter to store an integer number priority in an actor. The default priority is 0. A smaller number designates a higher priority. In an execution with a timed model of computation, such as DE, when two actors are scheduled with the same timestamp and microstep, they are fired according to the priority specified for them. The actor with a smaller priority number is fired before the one with a greater priority number.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Red (tfeng)
    • Constructor Detail

      • Priority

        public Priority​(NamedObj container,
                        java.lang.String name)
                 throws IllegalActionException,
                        NameDuplicationException
        Construct a priority parameter with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This parameter 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. The object is not added to the list of objects in the workspace unless the container is null. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of the parameter.
        Throws:
        IllegalActionException - If the parameter is not of an acceptable class for the container.
        NameDuplicationException - If the name coincides with a parameter already in the container.