[SciPy-User] odeint with saturation?

Brian Blais bblais@bryant....
Fri Oct 15 12:58:42 CDT 2010

On Oct 15, 2010, at 11:55 AM, Jonathan Stickel wrote:

>> some of my cases have saturating values.  In many cases a value can't
>> go negative (if it does, it should just be set equal to zero).  It
> ...
> if var < eps && dvar<0:
>     dvar = 0
> ...

thanks!  so the obvious works...I feel a little sheepish now...  :)

> P.S.  I found that the effort to learn how to use scipy.integrate.ode 
> was the effort.  It provides more control and a slightly better solver 
> than scipy.integrate.odeint.  YMMV.

what's the difference?  it looks like ode lets you choose the integrator, and has some fine-grained options dependent on integrator method.  is that right, or is there another advantage to using ode instead of odeint?



Brian Blais

More information about the SciPy-User mailing list