i Prof. Lee,
Thanks very much for the reply. I'm looking over the two models to
try to let it sink in... and diving into more docs to help as well.
I used to work for a Swedish s/w company, Telelogic, which "back in
the day" made SDL tools and are now a UML 2 vendor, so I definitely
have a certain FSM semantics "baggage" I'm bringing along here.
The idea that the FSM could fire > 1 transition at once (based on
the "trigger == 1" guard), let alone fire an infinite number in zero
time, is a notion I'd forgotten. Quite cool stuff indeed. I don't re-
call if that is how things work in Harel-like FSMs... haven't looked
at the theory in a while (yep, got your June '99 paper on my desk...)
I had sent two models in as many emails; unfortunately the first did
not make it through the size limit. I will tweak and resend that as it
touched on some other general concepts of how we are approaching our
work in Ptolemy.
I will have to go read up on the time advancement issue you discussed.
That's got me stumped a bit, but a look at the CT semantics should
help. I guess my asking it to animate the states for 1s per entry is
the only reason things seem to be moving along as I had intended.
From: Edward A. Lee [mailto: XXXX@XXXXX.COM ]
Sent: Saturday, April 22, 2006 12:37 AM
To: Lutz, Charles D
Subject: RE: Shared variables among multiple instances of FSMs
I think that what's going on in your model is that when the
output of the ContinuousClock goes to 1, the ModalModel
starts switching states without letting time advance any
further. This is the right behavior under CT semantics,
since the guard on both transitions is "trigger == 1", and
hence when the trigger input has value 1, both guards are
true. Your model specifies an infinite number of state
transitions in zero time.
In the attached model, I made the following changes:
- changed the outside director to DEDirector
- removed the inside director
- changed the ContinuousClock to Clock
- changed the directorClass parameter of the ModalModel
to ptolemy.domains.fsm.kernel.FSMDirector (note that this
would have been the default if you had first used the ModalModel
- set the synchronizeToRealTime parameter of the director to true.
I think you really want DE, not CT for this type of model.
CT is useful when you have continuous dynamics (given by ordinary
differential equations). It has much more subtle semantics that
cleanly support hybrid systems (mixing continuous dynamics with
discrete dynamics). Your model, in fact, is a hybrid system with
Zeno behavior. See:
DE is much simpler. In the attached model, each time the Clock
an output, the ModalModel executes one transition. Replace the Clock
with PoissonClock and you get a much more interesting model with random
Hope this helps.
At 03:06 PM 4/21/2006, Lutz, Charles D wrote:
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
XXXX@XXXXX.COM , http://ptolemy.eecs.berkeley.edu/~eal
Posted to the ptolemy-hackers mailing