Ptolemy II 10.0.1 Release Notes

Ptolemy II is a set of Java packages supporting heterogeneous, concurrent modeling and design. Its kernel package supports clustered hierarchical graphs, which are collections of entities and relations between those entities. Its actor package extends the kernel so that entities have functionality and can communicate via the relations. Its domains extend the actor package by imposing models of computation on the interaction between entities. Examples of models of computation include discrete-event systems, dataflow, process networks, synchronous/reactive systems, and communicating sequential processes.

Ptolemy II includes a number of support packages, such as
data, providing a type system, data encapsulation and an expression parser,
plot, providing visual display of data,
math, providing matrix and vector math and signal processing functions, and
graph, providing graph-theoretic manipulations.

The Ptolemy Book describes the Ptolemy II design and the implementation of the Java classes.

Building Graphical Models describes how to use Vergil.

Complete List of Domains in Ptolemy II

Ptolemy II includes a growing suite of domains, each of which realizes a model of computation. It also includes a component library, in which most components are domain polymorphic, in that they can operate in several of the domains. Most are also data polymorphic, in that they operate on several data types. The domains that have been implemented are listed below.

Domains that are reasonably mature:

Domains that are still experimental:


The core of Ptolemy II 10.0.1 is 100% Java, so it should work on any platform that has JDK 1.6 or later.

We developed Ptolemy II 10.0.1 under Mac OS X, Windows and Linux with JDK1.7.0_25 and JDK1.8.0_11 Under MacOS 10.7.5, we were also able to use Java 1.6.0_26.

Ptolemy II 10.0 will not compile under Java 1.3 because we use the java.lang.URI class, which is present only in Java 1.4 and later. JDK 1.5 or later is required so that these packages can use generics: backtrack, ptalon and others. JDK 1.6 is required because ptdb uses javax.swing.GroupLayout and because of other changes.

In the past, Ptolemy II has been compiled and run under IBM JDK 1.6.0. However, the IBM JDK has not be tried recently. There are the following limitations under IBM JDK 1.6.0

Ptolemy II 10.0.1 Highlights



Ptolemy II 10.0 is the first complete release since Ptolemy II 8.0 and thus includes many changes.

The key driving force for the release is to be a companion to the Ptolemy Book:
Claudius Ptolemaeus, Editor, "System Design, Modeling, and Simulation Using Ptolemy II",, 2014. (included in the release as $PTII/doc/books/systems/PtolemyII_DigitalV1_02.pdf, but not present in the SVN developer tree.)

Below are the highlights of this release.


The Ptolemy II Ontologies package extends the Ptolemy II type inference engine to provide an efficient and scalable framework for general static analysis of arbitrary properties on a Ptolemy model. The framework supports properties that are specified as concepts in an ontology graph that must be structured as a lattice. The usefulness of this framework is demonstrated with an example of a physical dimensions ontology. This ontology labels different signals as representing acceleration, velocity, position, and time. In a Ptolemy model of physical dynamics, the dimensional properties of input and output signals can be automatically inferred using the ontology analysis. Ptolemy model developers can use the ontologies package to define their own ontologies for structural and semantic property analysis. This can prevent interface connection problems during model construction by identifying when incompatible signals are erroneously connected. This work draws on concepts from compiler optimization static analysis techniques and applies them to Ptolemy actor-oriented models.


Ontologies Demonstrations

Export to Web

Ptolemy II includes a flexible mechanism for creating web pages from models and for building web services. The more basic mechanism is the export to web , which simply makes a model available as a web page for browsing using a web browser. Such a web page provides easy access and documentation for models that archives both the structure of the models and the results of executing the models. It can be used to share information about models or their execution without requiring installation of any software, since an ordinary web browser is sufficient. More interestingly, the mechanism is extensible and customizable, allowing for creation of fairly sophisticated web pages. You can associate hyperlinks or actions defined in JavaScript with icons in a model. The customization can be done for individual icons in a model or for sets of icons in a model.


CG Code Generator

Ptolemy II 10.0 includes the "cg" code generator at $PTII/ptolemy/cg.

We took the lessons learned from $PTII/ptolemy/codegen and applied them to cg. In particular, cg more easily supports multiple backends with less code duplication. The cg code generator is under active development, we are working on code generation for large systems. For details about cg, see $PTII/ptolemy/cg/README.html.

Developers: Christopher Brooks, Dai Bui, Bert Rodiers, Stavros Tripakis


Code Generation (CG) Demonstrations

FSM/Modal Model updates



New demonstrations

Building Controls Virtual Test Bed (BCVTB)

The Building Controls Virtual Test Bed (BCVTB) website states:

"The Building Controls Virtual Test Bed (BCVTB) is a software environment that allows expert users to couple different simulation programs for co-simulation, and to couple simulation programs with actual hardware. For example, the BCVTB allows to simulate a building in EnergyPlus and the HVAC and control system in Modelica, while exchanging data between the software as they simulate. The BCVTB is based on the Ptolemy II software environment. The BCVTB allows expert users of simulation to expand the capabilities of individual programs by linking them to other programs. Due to the different programs that may be involved in distributed simulation, familiarity with configuring programs is essential."

The BCVTB demos use external tools, so they are not likely to run, though the models are browsable.

Electric Power System (EPS)

Execute Demos

Fuel System

Office Space

Probabilistic Models

Ptango (Internet of Things)

Ptango is a project between Bosch and UC Berkeley that involves the Internet of Things (IoT).

The Internet of Things is the idea that everyday objects are uniquely addressable and have a representation in a structure similar to the Internet.

Comparing and contrasting IoT with Cyber-physical Systems (CPS) is useful. The key thing with CPS is the interaction between the dynamics of the physical world and the dynamics of software and networks. The focus of IoT is on the information flow between physical devices and network services. In the Cyber-Physical Systems Concept Map, IoT overlaps with wireless sensing and actuating, though IoT is not necessarily wireless.

The name "Ptango" refers to the fact that with the Internet of Things, it takes more than two to tango.

The research goal of Ptango is to invent a Model of Computation (MoC) for the Internet of Things that assigns operational semantics to the composition of Things.

Applications and features of interest include:

Ptango is using Representational state transfer (RESTful) interfaces like http, which is stateless, where all the state is carried in the request and reply. Via RESTful interfaces, our work is focusing on a subset of IoT known as the Web of Things.

Models of Computation

Cellular Automata (CA)

Component Interaction (CI)


Discrete Event (DE)


Kahn Process Networks (PN)




Synchronous Dataflow


Actor Demonstrations

Graph Transformation (GT)

Input Output Actors


The JavaScript actor executes a script that can read inputs and parameters, perform calculations, and write outputs.


New Demonstrations for other facilities

Code Generation (CG)

See Code Generation (CG) Demonstrations above.


See Ontologies Demonstrations above.

Type System


Other Key New Capabilities

New and Enhanced Actor Libraries

Additional Features

Aspect-Oriented Modeling


In 2011, the HandSimDroid project developed a prototype that allows Ptolemy models to run under Android. Students from CMU (Anar Huseynov, Justin Killian, Ishwinder Singh) worked with Bosch researchers (Elizabeth Latronico, Charles Shelton) and Berkeley researchers to re-architect a portion of Ptolemy II so that models could run on a server and be displayed on a low-powered handset. The code for this effort is in


The JavaScript actor executes a script that can read inputs and parameters, perform calculates and write outputs.


PDFAttribute to the Utilities->Decorative library in Vergil that allows you to include PDF in a Vergil diagram.

PDFAttribute can be used to include Latex-formatted equations in Vergil diagrams, and get full print resolution when printing to PDF for use in papers, books, etc.

PDFAttribute uses uses pdf-renderer, obtainable from This is a LGPL'd open source product from Sun.

To use PDFAttribute and create equations, we use LatexIt (see for the Mac version) From LatexIt, we can create a PDF file with an equation.

Then drag into my Vergil diagram a PDFAttribute, or select Edit Custom Icon and drag in a PDFIcon. Double click on that to select the PDF file.

Other new classes

Works in Progress

Bug fixes

For the current list of bugs, see Ptolemy II Bugs
and Kepler Bugs.

A few features and classes were removed outright.

Use $PTII/ptolemy/cg instead.

Backward Compatibility

Most models developed under Ptolemy II 1.0.1, 2.0.1, 3.0.2, 4.0.1, 5.0.2 or HyVisual 2.2-beta, 3.0, 4.0.1, 5.0.1, 6.0.2, 7.0.1 and 8.0.1 should run under Ptolemy II 10.0.1

The MoMLParser includes a list of backward compatibility filters that make certain changes on models when read, handling such issues as actors being moved or renamed and parameter names being changed. The filters themselves are defined in ptolemy.moml.filter. If you have developed your own actors under earlier versions of Ptolemy II by writing your own Java files, you should recompile all your java code with the new release. In theory, copying the .class files should work, but recompiling is safer.

Features that were new in previous Ptolemy II releases

Features that were new in previous Ptolemy II releases


Version 10.0.1 has the following limitations:

Release Limitations

Limitations in the Class Mechanism

There are several known problems:

Limitations in the Actor Libraries

Limitations in the PN Domain

The PN domain documents that it locally handles mutations. However, this is currently not true in the implementation. For the basic PN model, this doesn't really matter, since mutations happen pretty much the same as they would otherwise. (i.e. they are non-deterministic in when they execute) However, for timed PN models, there is actually some expressiveness lost, since timed PN models can locally execute mutations deterministically.

Embedding a PN typed composite actor inside a non-process top level such as DE does not work. In fact embedding a process domain inside a non-process domain is likely to have problems. Profess Lee wrote:

Yes, it looks as if the code is designed so that process domains (PN, CSP) can only be used within process domains. I'm not sure to what extent this is a limitation of the process domains vs. a semantic problem. What would PN mean within DE? Since PN has no well-defined notion of a "firing", how would you assign time stamps to the outputs of a PN actor? By default in DE, the time stamps of the outputs of an actor match those of the inputs that triggered the firing. There is no such notion in PN.

Limitations in the User Interface

Below are some of the limitations of Vergil, the Ptolemy II Graphical User Interface.

Limitations in JNI

Code Generation Limitations

Code Generation limitations are covered on the Code Generation page.

Missing Domains

For limitations discovered after the release, see the Ptolemy II 10.0.1 website

Last Updated: $Date: 2014-12-16 13:52:11 -0800 (Tue, 16 Dec 2014) $