Tour of What's New in Version 5.0
See also What's New in other versions.
Contents:
- Dynamic Dataflow:
HanoiTower
(see also
Eratosthenes,
IfThenElse,
Loop,
OrderedMerge,
RandomWalk)
In dynamic dataflow (DDF) models, actors are fired in response to available
input data. The schedule is dynamic and data dependent, and actors can
change their production and consumption rates in each firing.
Unlike synchronous dataflow, the DDF model of computation is Turing
complete, and questions of deadlock and boundedness are undecidable.
The HanoiTower
example exploits this to give an algorithmic solution to the well-known
towers of Hanoi problem.
-
Modeling of hybrid systems:
NewtonsCradleComplicated.
(In Ptolemy II 8.0, the continuous domain was created. Between Ptolemy II 8.0 and 10.0, ct was removed. The paths to the demos has been updated from domains/ct to domains/continuous.)
Hybrid systems are a special case of modal models
where finite-state machines (FSMs) are combined with the continuous-time (CT) models
to get mixed continuous-time and discrete-event models.
The HyVisual package
is a subset of Ptolemy II that includes the FSM and CT domains and libraries
that support the design of hybrid systems.
Version 5.0 introduces significant rework of the hybrid systems
modeling infrastructure to have more complete and predictable
semantics, as described in the paper
"
Operational Semantics of Hybrid Systems".
The
NewtonsCradleComplicated
example illustrates this with a model of a physical system that has simultaneous
events.
(In Ptolemy II 8.0, the continuous domain was created. Between Ptolemy II 8.0 and 10.0, ct was removed. The paths to the demos has been updated from domains/ct to domains/continuous.)
- Stochastic hybrid systems:
$PTII/ptolemy/domains/ct/demo/Spontaneous/IncreasingRatePoisson.xml (Removed by Ptolemy II 10.0)
(see also
HysteresisWithRandomDelay,
Brownian
).
Stochastic hybrid systems add random behavior to continuous-time models mixed
with discrete events. The
$PTII/ptolemy/domains/ct/demo/Spontaneous/IncreasingRatePoisson.xml (Removed by Ptolemy II 10.0)
models spontaneous mode transitions governed by a Poisson process.
The HysteresisWithRandomDelay
example uses similar spontaneous mode transitions to model random delay in mode transitions.
The Brownian example
models a stochastic differential equation describing a random walk process.
(In Ptolemy II 8.0, the continuous domain was created. Between Ptolemy II 8.0 and 10.0, ct was removed. The paths to the demos have been updated from domains/ct to domains/continuous.)
- Heterochronous Dataflow:
Fibonacci
(see also
Merge).
Heterochronous dataflow (HDF) is an extension of synchronous dataflow
(SDF) that permits dynamically changing production and consumption
patterns without sacrificing static scheduling. In SDF, the production
and consumption patterns of an actor are constant.
In HDF they are allowed to change between iterations of the HDF schedule.
Modal models can be used to change these patterns.
Although HDF can express many data-dependent computations that cannot
be represented by SDF, it is not Turing complete. Consequently, deadlock
and boundedness remain decidable.
The Fibonacci
example uses this mechanism in a clever way to extract a Fibonacci sequence
from a counting sequence.
- Unbounded model time:
LongRuns.
Version 5.0 introduces a new
Time class
that represents model time in a manner that has a specified resolution
and unbounded growth potential. Any two time values that are within the specified
resolution are treated as equal. Moreover, time can increase forever without
concern for loss of resolution or overflow.
The LongRuns
example is a discrete-event model that can be run forever, in principle,
without (significant) growth of memory requirements and without loss
of (internal) precision in model time.
The precision of time representations is given by a director parameter
whose value is shared across all directors in a model (see
SharedParameter).
(Moved to ptolemy.actor.parameters after Ptolemy II 7.0)
- Synchronous Reactive Modeling:
GuardedCount.
The synchronous/reactive (SR) domain,
which is inspired by the synchronous languages Esterel, Lustre, and Signal,
realizes a concurrency model where actors react instantaneously and simultaneously
at ticks of a logical clock. Version 5.0 introduces a richer set of actors
for use with this domain, as well as a bug fix permitting
SROptimizedScheduler to be used inside a composite actor.
The GuardedCount
example illustrates some of these new capabilities.
The new actors are:
- Nondeterministic merge in Process Networks (PN):
NondeterministicMerge.
The PN domain now supports a NondeterministicMerge actor, which merges two
incoming streams nondeterministically. This new actor should be used with
caution, since determinism is one of the key features of PN. Use of this
actor is risky because any given execution is only representative of
the possible executions. Nonetheless, this offers a considerable
increment in expressiveness.
- New Parameters:
A number of new parameters have been introduced.
The DoubleRangeParameter
limits the range and precision of a double-valued parameter,
and is supported in the user interface by providing a slider by default in parameter
editing dialogs.
The FilePortParameter
is used by actors to specify a file or URL using both a
parameter and a port. The user interface supports this by offering a file browser
dialog by default when editing this parameter. The
SharedParameter).
(Moved to ptolemy.actor.parameters after Ptolemy II 7.0)
is a parameter
whose value is constrained to be identical to a suite of other instances of
SharedParameter in the same model. This parameter is used, for example, to
handle seeds in random number generators, as illustrated for example in
ColtRandom.
- Higher Order Components:
ExecDemos
(see also
IterateOverArray).
The higher-order component capabilities of Ptolemy II continue to evolve.
The ExecDemos model, when executed, starts a new
Java virtual machine that then executes the
RunDemos model,
which runs all demos in a specified directory using full-screen mode.
This illustrates how to use higher-order actors to control the lifecylcle of other Ptolemy II
models. This example can be set up to automatically and repeatedly run demos
unattended by following the instructions in the
README.txt file.
The new higher-order actors include:
- Graphics domain:
SolarSystem
(see also Helen).
The graphics (GR) domain has been extensively revised to take better advantage of underlying
capabilities in the Java 3D package. For example, the
SolarSystem
model illustrates transparency (see the rings of Saturn), and the
Helen model
illustrates texture mapping and movable viewer positioning.
The following capabilities are now supported:
- transparency
- texture mapping
- shininess
- colors use ColorAttribute
- more colors can be set
- settable resolution
- wireframe option for shapes
- flat facets option for shapes
- run-time changes of parameter values
- parameters in the Text3D actor
- movable viewer position
A number of new and enhanced actor libraries are included in version 5.0.
You may also wish to refer to the
ptolemy.actor.lib
package, where most of the domain-polymorphic actors reside (domain-polymorphic actors are
those that can be used in more than one domain).
- New generic actors:
- Random number generators:
ColtRandom.
A new library of random number generators, developed jointly with
David Bauer and Kostas Oikonomou from AT&T Research, is based on the popular
Colt "Open Source Libraries for High
Performance Scientific and Technical
Computing in Java."
Colt is described at
http://hoschek.home.cern.ch/hoschek/colt/
.
The library supports many
commonly used probability distributions and provides
systematic management of seeds and random number generation
techniques.
- New discrete-event actors:
- Communications library:
The communications library
includes a number of new actors:
- New Continuous Time demos:
(In Ptolemy II 8.0, the continuous domain was created. Between Ptolemy II 8.0 and 10.0, ct was removed. The paths to the demos have been updated from domains/ct to domains/continuous.)
- New Discrete Event (DE) demos:
- Assembly Line
- de/demo/HierarchicalModel/HierarchicalModel.xml (Removed after Ptolemy II 7.0)
- New Dynamic Dataflow (DDF) demos:
- New Heterochronous Dataflow (HDF) demos:
- New Giotto demos:
- New Graphics (GR) demos
(requires Java 3D, see the GR domain):
- New Wireless demos:
- Java compatibility:
Ptolemy II can be compiled under Java 1.5.0_01. Java 1.4.2_08
is preferred though.
- Support changing the order of attributes, ports, etc., and
support moving objects towards the foreground or background
in the user interface. This is particularly helpful when
editing icons, since the elements of the icon can now be sent
to the background or brought to the foreground by right clicking
and selecting the appropriate option.
- Fractional math:
A new library supporting arithmetic on fractions has been created. See:
- Added external source (URL) option to the Instantiate Entity
command in the Graph menu.
- Below is a partial list of other new Java files:
- Fixed "Restore Defaults" when actors and directors
use the three argument constructor for parameters.
- Previously, if a class definition were to show the name
of ports, there was no way to turn this off (the attribute
_showName) could not be removed. Now, marker attributes
such as _showName are boolean valued parameters, so they
can be turned off by overriding their value.
- Fixed long standing bug in copy where objects are represented
in the wrong order in the exported MoML.
- Fixed some subtle bugs in ModalModel, where changes to
input/output status and ordering of ports were not properly
reflected in the mirror ports.
- A number of potential deadlocks have been fixed:
- deadlock while dragging actors during a run.
- deadlocks in PN when exceptions occur in the model.