[SciPy-User] Problem with ODEINT

Lofgren, Eric elofgren@email.unc....
Thu Nov 24 10:54:34 CST 2011

I checked the parameters, and they seem to both be reasonable values for the system in question. What's especially confusing to be is if I change the code to something like: 

 SIR = spi.odeint(eq_system, startPop, t_interval, hmin=1e-20)

where I've set a smaller step-size, I still get the occasional error like this:

 lsoda--  warning..internal t (=r1) and h (=r2) are
       such that in the machine, t + h = t on the next step  
       (h = step size). solver will continue anyway
      In above,  R1 =  0.1000000000000E+01   R2 =  0.5798216400482E-81
 lsoda--  at t(=r1) and step size h(=r2), the error
       test failed repeatedly or with abs(h) = hmin
      In above,  R1 =  0.1000000000000E+01   R2 =  0.5798216400482E-81
Repeated error test failures (internal error).
Run with full_output = 1 to get quantitative information.

Which suggests the solver is blazing right past the minimum step size I just set.


On Nov 24, 2011, at 10:56 AM, <scipy-user-request@scipy.org>
 <scipy-user-request@scipy.org> wrote:

> Date: Thu, 24 Nov 2011 13:33:57 -0200
> From: Flavio Coelho <fccoelho@gmail.com>
> Subject: Re: [SciPy-User] Problem with ODEINT
> To: SciPy Users List <scipy-user@scipy.org>
> Message-ID:
> 	<CAAbyzbQP0JV3fyKsH3XiisZAhr-tBTik1Z8HEwi=_VJWgqcnjw@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> Hi,
> I have seen this before with odeint. It is probably related to the
> parameterization of your model, which is leading very large derivatives.
> This is causing the numerical solver to try to reduce the step size (h) to
> try to resolve the dynamics. h is apparently hitting its default lower
> limit (something in the vicinity of 1E-85).
> You can try to set a lower hmin, when calling odeint, but it would be best
> to go over your parameter values and check if they are reasonable.
> Disclaimer: Ihave not run your script nor checked your parameters, just
> took a lok at the error messages.
> good luck,
> Fl?vio

More information about the SciPy-User mailing list