Hi Richard,
Ptolemy II does support multithreaded execution.  See for example
$PTII/ptolemy/domains/de/demo/RealTimeComposite/RealTimeComposite.xml

Ptolemy has threaded domains such as Kahn Process Networks (PN) where
each actor executes in a Java Thread.

It should be possible to run multiple models within separate threads
within one JVM.  I have not particularly tried this lately, but
I see no reason why running multiple models in one JVM would not work.

The typical way to clean up is to set the container of an actor or
composite actor to null.

Locally, we use JProfiler to look at performance and memory leaks.
See $PTII/doc/coding/performance.htm for some notes.  I find it easier
to check performance by running the model without a UI.

_Christopher

Richard Ware wrote:
1) Do I remember correctly that Ptolemy does not in any way support
Java concurrency or multi-threading?  If so, then I would assume that one
couldn't safely run 2 models in one JVM, even if each had its own
instances of TypedCompositeActor, Manager, Director, etc.  If one
wanted concurrency, one would run separate JVM's, each with one
model that would have no contact with any other model.  Right?

2)  If (in one JVM) I had a program running that wanted to run
several models (similar to each other), one after the other, how much reuse
of Ptolemy instances makes sense?  Would you recommend nulling
all references after each model run, and instantiating all Ptolemy objects
fresh?  Or would it make any sense to reuse the same
TypedCompositeActor, Manager, Director, etc?  Regardless of
which approach I use, I plan to delete all actors from the first model run
and create all actors for the second run fresh, for reasons involving the
nature of my simulation.  Does Ptolemy have a way to scrub all actors
out of a model, allowing the creation of new ones?

 I look forward to your clarifications.

    Richard Ware





----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]



----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to