[SciPy-user] stopping criterion for integrate.odeint?

Ryan Gutenkunst rng7 at cornell.edu
Wed Mar 23 20:56:38 CST 2005


On Mar 23, 2005, at 7:38 PM, Robert Kern wrote:
> Ryan Gutenkunst wrote:
>
>> For now, it's not worth it to me to wrap up another package, 
>> especially since that would be yet another thing for our users to 
>> have to install. If there's interest in moving scipy over to a more 
>> sophisticated integrator, I'd be happy to help, but I'm still 
>> somewhat of a newbie and have no clue wrt FORTRAN, so I couldn't do 
>> it alone. I also expect that it might break a lot of existing code if 
>> we aren't careful with outputs.
>
> We probably wouldn't replace the current functions for the reason you 
> mention. However, we have no problem with adding quality algorithms 
> (size, license, and distributability allowing). Did you have a 
> particular package in mind?

Well the only example I've actually used is in Matlab.

We'd really love to be able to use SUNDIALS 
(http://www.llnl.gov/CASC/sundials/). The sensitivity capabilities and 
ability to handle DAE systems are very attractive. (We've implemented 
some of those capabilities using odeint, but our implementations are 
pretty problem-specific and not that efficient.) The code is BSD, but 
the suite itself is a 7 meg download (!).

In a more realistic vein, LSODAR 
(http://www.netlib.org/odepack/opkd-sum) would be a nice addition. It 
would add root-finding capabilities that would be useful to Hans and 
myself. Since odeint already uses LSODA, I imagine wrapping LSODAR 
wouldn't be that hard.

>> Anyways, I hope my explanation of our solution is reasonably clear. 
>> If folks are interested, I'll clean-up, comment, and post our code.
>
> Please do.

I'm attaching the code. It's rough, and I'd love to hear improvements 
from the many more experienced coders on this list.

Ryan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Integration.py
Type: application/octet-stream
Size: 4902 bytes
Desc: not available
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20050323/21d16a9b/Integration.obj
-------------- next part --------------


>
> -- 
> Robert Kern
> rkern at ucsd.edu
>
-- 
Ryan Gutenkunst               |
Cornell Dept. of Physics      |       "It is not the mountain
                               |        we conquer but ourselves."
Clark 535 / (607)255-6068     |        -- Sir Edmund Hillary
AIM: JepettoRNG               |
          http://www.physics.cornell.edu/~rgutenkunst/


More information about the SciPy-user mailing list