[SciPy-user] PyDSTool and SciPy (integrators)
Anne Archibald
peridot.faceted@gmail....
Thu Apr 17 18:57:19 CDT 2008
Hi,
PyDSTool looks to be full of useful code, and I hope it can become a
self-sustaining project.
The pieces that look most useful to me for inclusion in SciPy are the
integrators, as you say. But it's not clear to me why I should prefer
dopri853 or radau5 to the Adams integrator built in to scipy. Are
somehow better for all functions? Take better advantage of the
smoothness of objective functions? More robust in the face of stiff or
partially-stiff systems?
What I have needed is an integrator that offers more control. The
particular problem I ran into was one where I needed to be able to set
stopping conditions based on the dependent variables, not least
because my model stopped making sense at a certain point. I ended up
wrapping LSODAR from ODEPACK, and it made my life vastly easier. If
you have integrators that can provide that kind of control, that would
be very useful. Similarly something like a trajectory object that
knows enough about the integrator to provide a spline with the right
derivatives and knot spacing would be handy.
Your scheme for producing compiled objective functions appeals less as
a component of scipy. It's definitely useful as a part of PyDSTool,
and many people working with ODEs will want to take advantage of it,
but I foresee problems with incorporating it in scipy. For one thing
it requires that the user have a C compiler installed and configured
in the right way, and it requires that the system figure out how to
call it appropriately at runtime. This seems like it's going to make
installation significantly more tricky; already installation is one of
the big stumbling blocks for scipy. A second problem is that
presumably it places restrictions on the right-hand-side functions
that one can use. In some of the cases I have used odeint, the RHS has
been quite complicated, passing through methods of several objects,
calling various functions from scipy.special, and so on. An integrator
that can't deal with this sort of RHS is going to be a specialized
tool (and presumably much faster within its domain of applicability).
On the other hand, the general problem of making callbacks run faster
turns up in a number of places in scipy - the optimization routines,
for example, have the same problem. A general approach to solving this
problem would be very valuable.
In summary, I think that the most useful additions to scipy's
differential equation integration would be:
* A good model for solving ODEs and representing their results
* Ability to set stopping conditions and additional functions to be computed
Anne
More information about the SciPy-user
mailing list