Class QueueControl

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

    public class QueueControl
    extends TypedAtomicActor
    An actor that distribute its input data to different outputs. Its output ports queue1 and queue2 is connected to two queue actors respectively. The lengh of the two queue are fed back to its input ports q1Length and q2Length. The input token at input is distributed according to the following policy: if the total length of queue1 and queue2 is less than threshold1, specified by the minMark parameter, the input token is send to queue1 if queue1's length is less than queue2's, otherwise send to queue2; if the total length is greater than threshold1 but less than threshold2, specified by the minMark parameter, the input token may be dropped randomly(with a probability proportional to the amount larger than threshold1) or send to queues shorter; if the total length is greater than threshold2, then drop the input token. If the input token is dropped, it is send to the dropped output so that it can be catched or monitored when necessary.
    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Xiaojun Liu
    Pt.AcceptedRating:
    Yellow (cxh)
    Pt.ProposedRating:
    Yellow (cxh)