Interesting application...  On your two specific queries:

1) Supporting vector values in CT would be relatively easy,
   I believe. The best way to do this would probably be:

       Augment the Integrator actor to accept type [double]
       (double matrix) and/or {double} (array of doubles).
       I don't think this would be difficult. I think the
       initial value of the integrator would, in effect,
       specify the type of the ports.  I.e., if you give
       an initial value "[0.0, 0.0]", then the ports would
       resolve to type [double].  Internally, the Integrator
       needs to just behave like two integrators.

       One subtlety is that the design would have to take into
       account some anomalous situations:
       - What if the initial value is "[0.0, 0.0]" but the input
         receives a three-element vector at run time? The type
         system won't catch this.  Exception?
       - What if the dimensionality of the initial value changes
         during run time (e.g. on a transition in a modal model)?
         I think this can be handled, but would require careful
         coding.

   Note that this does not accomplish modeling of multidimensional
   systems using PDEs.  In principle, this can be done too, but it
   would require significant adaptation of the solver to support
   finite element methods rather than just adaptive time step sizes.
   We currently have no plans to develop this capability, but if
   anyone out there is interested in doing it, I would be pleased
   to help get it started...

2) On the performance issue: Shallow code generation should work,
   in principle, but I doubt it would help much.

   It is true that we have put essentially no effort into
   performance of the CT solver. We have been focusing
   on getting the semantics right for hybrid systems, and have largely
   resolved all the issues we are aware of (see
   
http://ptolemy.eecs.berkeley.edu/publications/papers/05/OperationalSemantics).
   Haiyang Zheng (cc'd here) is planning to build an alternative solver
   that leverages what we've learned and uses a much simpler scheduling
   strategy.  Our hope is that this will yield performance improvements,
   but I confess that the performance improvements are not the main
   objective at this time; instead, the major objective is to validate
   the semantics with a simpler, more readable, and more understandable
   realization.

   A small amount of profiling to determine where the time is being
   spent might go a long way...

Edward



At 03:32 PM 9/23/2005 +0200, GONZE Marc-André wrote:
Dear all,

We are currently developing a modeling & simulation plateform, at the
Institute of Radioprotection and Nuclear Safety (Cadarache, France),
for simulating the fate and transport of pollutants in environmental
ecosystems that basically involve discrete and continuous-time processes.
>From a mathematical point of view, we have to solve systems of
multidimensional coupled (non)linear ODEs (up to 2 dimensions),
with either discrete or continuous right-hand side terms.

We have been investigating for nearly two years the computational capability
of graphical programming toolboxes, such as Goldsim & Matlab/Simulink, but
were not completely satisfied with.

We identified that Ptolemy II could be a good candidate, in the sense that
we were there able to easily model embedded (eco)systems of different
characteristic time scales,
following a hierarchical approach, and perform probabilistic calculations
(i.e. Monte Carlo) using high-order actors.
However, we realized that :

1) PtolemyII did not support vectorization at least in the CT domain yet,
2) Simulations in Ptolemy II (from Vergil), were rather slow compared
toabove-mentionned toolboxes.

Thus, our questions are :

1) Would it be difficult & energy-consuming to extend the CT domain (i.e.
integrators) and discrete-event domains to support multi-dimensional
mathematical systems ?
2) How could we speed up the calculations ? Is the shallow code or C code
generator operational for this kind of problem ?

We would very much appreciate any suggestion or help

Dr. Marc-André Gonze
Symbiose project leader
IRSN/DEI
CE Cadarache,
France
tel. : 33-4-42-19-95-44
e-mail : [EMAIL PROTECTED]





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

------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
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