Continuous system simulation in Python

François Pinard pinard at
Fri Oct 7 14:41:53 CEST 2005

[Robert Kern]

> [...] an ODE integrator would probably want to adaptively select its
> timesteps as opposed to laying out a uniform discretization upfront.

Eons ago, I gave myself such a little beast (but really found in an
Appendix of a book on simulation), which I use since then whenever I
need it, not so often in these days.  If you are curious, see:

yet I'm sure there is just plenty of such things, all around.

The above is in C, not in Python.  I vaguely remember having once
rewritten the thing in Python, then discarded the result as not fast
enough for the need I then had.  If I really needed to use it nowadays,
I'll probably try to quickly link it through Pyrex.  Or just look around
a bit for some already made, and maybe better solution. :-)

It is easy and convenient, when writing a mixed discrete and continuous
simulation system, to tie the advancement control of the various active
ODE solvers within the main loop of the discrete event scheduler.

François Pinard

More information about the Python-list mailing list