Class ThrottleAttributes

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

    public class ThrottleAttributes
    extends DecoratorAttributes
    Container for decorator attributes that are provided to local sources and other actors that schedule their own firings by a PtidesDirector. Local sources in Ptides can produce an infinite number of future events. Whether this can happen depends on the execution strategy implemented in the Ptides director. Note that in a DE composite, all events are produced in time-stamp order. In Ptides we do not have this restriction; events can be produced out of timestamp order as long as the event is safe to process. Local sources are triggered by pure events produced during a firing of a local source. Such a pure event is always safe to process. The attributes provided by this decorator are used to throttle the production of events by local sources in Ptides.
    • The parameter maximumLookaheadTime makes sure that actors are not fired at logical times bigger than the current platform time plus the parameter value.
    • The parameter maximumFutureEvents specifies that the decorated actor can only create and put onto the event queue a certain number of events. These events have to be consumed by downstream actors in order to allow the actor to create more events.
    The boolean parameters useMaximumLookaheadTime and useMaximumFutureEvents are used to specify which parameter is used. It is possible to use both parameters to throttle events to say the following: The decorated actor should produce events with timestamps up to maximumLookaheadTime time units ahead of the current platform time, but there should not be more than maximumFutureEvents events from this actor in the event queue at any time.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Patricia Derler
    Pt.AcceptedRating:
    Red (eal)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • useMaximumLookaheadTime

        public Parameter useMaximumLookaheadTime
        This parameter specifies that the parameter maximumFutureFiringTime should be used to throttle the decorated actor. This parameter contains a boolean value that defaults to false.
      • maximumLookaheadTime

        public Parameter maximumLookaheadTime
        The maximumLookaheadTime parameter is the time added to the current platform time during which the decorated actor can safely be fired. This parameter contains a double value that defaults to 0.0.
      • useMaximumFutureEvents

        public Parameter useMaximumFutureEvents
        This parameter specifies that the parameter maximumFutureEvents should be used to throttle the decorated actor. This parameter contains a boolean value that defaults to true.
      • maximumFutureEvents

        public Parameter maximumFutureEvents
        The maximumFutureEvents parameter specifies the maximum number of events produced by the decorated actor that can be present in the event queue at a time. This parameter contains an int value that defaults to 0.