Ptolemy Event Relation Actor (PTERA) Domain

The Ptera (Ptolemy Event Relation Actor) domain is a discrete-event model of computation. A model in Ptera is represented with a graph of nodes and edges, where nodes represent events and directed edges between events represent scheduling relation. One or more events can be selected as initial events, which are scheduled at model time 0.0. When an event is fired, it possibly performs certain actions, and if there are outgoing edges from that event, the events at the end points of those edges are scheduled after non-negative delays. One or more events can also be selected as final events. The firing of final events causes the event queue to be emptied after their actions are performed, and therefore no more events can be processed.

The Ptera domain supports a different kind of modal models called PteraModalModels, compared to modal models using FSMs (Finite State Machines) as the control. A PteraModalModel uses Ptera at the top level, and each event is refined into a sub-model. The refinements can use Ptera and any other Ptolemy models of computation.

A Ptera model is timed. Although it should work in many domains, the DE (Discrete-Event) domain or Ptera domain itself are recommended. When embedded in those domains, the scheduling of the Ptera model is delegated to the container by calling the fireAt() function of its director.

There are many useful additional features for Ptera, such as canceling edges and parameters. A canceling edge, denoted by a dotted line, cancels a previously scheduled event instead of scheduling a new one. If the pointed to event has multiple instances in the event queue, then the first instance is cancelled. Events may also have parameters, and the actual values for those parameters are specified by the expressions on the edges that schedule them. Those expressions are evaluated at run-time. The events may refer to the values of those parameters in their actions by parameter names.

References

  1. Lee W. Schruben, "Simulation Modeling with Event Graphs," Communications of the ACM (CACM), 26(11): 957-963, 1983.
    Ptera is based on Lee W. Schruben's Event Graphs.
  2. Thomas Huining Feng and Edward A. Lee, "Ptera: An Event Oriented Model of Computation," a chapter from
    Claudius Ptolemaeus, Editor, "System Design, Modeling, and Simulation Using Ptolemy II", Ptolemy.org, 2014. (included in the release as $PTII/doc/books/systems/PtolemyII_DigitalV1_02.pdf)
    The models provided in this chapter are also available online.
  3. T. H. Feng, E. A. Lee, L. W. Schruben, "Ptera: An Event-Oriented Model of Computation for Heterogeneous Systems", EMSOFT, October 24-29, 2010, Scottsdale, Arizona, USA, ACM Press.
    A short explanation of Ptera.
  4. Thomas Huining Feng, "Model Transformation with Hierarchical Discrete-Event Control," Ph.D. Dissertation, EECS Department, University of California, Berkeley, Technical Report No. UCB/EECS-2009-77, May 20, 2009.
    See chapter three for an explanation of Ptera.