Class PteraModalModel

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

    public class PteraModalModel
    extends ModalModel
    This is a typed composite actor to be a Ptera modal model. A Ptera modal model has a Ptera (Ptolemy Event Relation Actor) model inside. The Ptera model has a number of events, and scheduling relations may exist between events, meaning that the processing of the starting event causes the ending event to occur after a certain amount of model time. A scheduling relation may also be guarded by a Boolean expression.

    The controller of a Ptera modal model is a Ptera controller (instance of PteraController). The Ptera controller contains an PteraDirector, which has an event queue to store scheduled events in time-stamp order. The Ptera modal model itself also has a Ptera director. The Ptera director in the controller maintains its own event queue, and schedules itself to be fired by putting the controller in the event queue of the Ptera modal model's director.

    An event can have one or more refinements. A refinement can be an actor model, an FSM model, or a Ptera model. If a refinement is a Ptera model, then its controller reports its earliest event to the controller of this modal model, which fires it when the model time reaches the reported time in the future. If the Ptera refinement itself contains an event that has a refinement in Ptera, that controller reports to the controller one level above, which in turn reports to the modal model.

    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Constructor Detail

      • PteraModalModel

        public PteraModalModel​(CompositeEntity container,
                               java.lang.String name)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a Ptera modal model with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
      • PteraModalModel

        public PteraModalModel​(Workspace workspace)
                        throws IllegalActionException,
                               NameDuplicationException
        Construct a Ptera modal model in the specified workspace with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace.
        Parameters:
        workspace - The workspace that will list the actor.
        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.
    • Method Detail

      • getCausalityInterface

        public CausalityInterface getCausalityInterface()
        Return a causality interface for this actor. This method returns the causality interface where no output port depends on the input ports. It is an instance of BreakCausalityInterface. FIXME: A causality interface special for Ptera should be returned instead.
        Specified by:
        getCausalityInterface in interface Actor
        Overrides:
        getCausalityInterface in class ModalModel
        Returns:
        A representation of the dependencies between input ports and output ports.