It is certainly possible to do this.
It is done in the DDF domain (see the towers of hanoi
example, which uses a recursive construct to dynamically
build a dataflow model as needed). There is also the
MobileModel actor, which accepts a MoML string at the
input and instantiates it as a model to process
input data.  This latter actor should be viewed as
a concept demonstration.

There is the whole potential pitfall of self-modifying
code to worry about here... I think there is a very good
research topic in identifying the best higher-order actors
(actors that operate on actors). The recursive technique
used in DDF is an example of a highly structured (read,
displined) way to do this.  But it also may be more restrictive
than we want.

Edward

At 02:02 PM 4/26/2006, Lutz, Charles D wrote:
Hi hackers,

I’m playing with the MultiInstanceComposite again; setting up some number
of instances via nInstances is trivial. Does anyone know if there is a way to
dynamically instantiate instances of something during the run? I.e. it would
be great to “new() up” some instances of the MIC’s internal model at runtime.

My guess is that this isn’t possible with MIC (I haven’t learned the prefire()
etc. stuff yet but the MIC’s docs led me to this conclusion). I am poking at
other things but haven’t found anything “obvious” yet.

Any tips would be greatly appreciated!

Thanks,

Chuck Lutz
Lockheed Martin
Systems of Systems - Modeling and Operations Analysis
BMC4I Modeling and Simulation
Moorestown, NJ
(856)638-7234 (office)
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]

“Everyone spoke of an information overload, but what there
was in fact was a non-information overload.”
– Richard Saul Wurman


------------
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
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal


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

Reply via email to