[SciPy-user] odeint

Robert Kern rkern at ucsd.edu
Wed Oct 5 06:33:53 CDT 2005


LOPEZ GARCIA DE LOMANA, ADRIAN wrote:
> Thanks for your answer, I'll check if it works in my machine. I guess your're right, the errors appear when the values of the simulation are close to zero.
> 
> The problem is that I'm not just interested on solving this specific example but it is part of a bigger program where I search for the parameters, run the simulations, and evaluate a score given some data. I'll check how if I can integrate your suggestion into the program.
> 
> But, don't you think we are talking about a bug? Overall, if we want to compare scipy with Octave ... I mean, I definetly prefer SciPy, it's much faster, but I also want it to be reliable, and I don't want to be caring if the simulation is "too" close to zero.

What exactly is the bug? odeint can't know that some of your parameters
aren't supposed to be negative and thus automatically avoid them. When
you ran your simulation, you got some output warning you that the
function was raising exceptions, but the simulation completed did it
not? odeint correctly determined that its guesses overshot the boundary
on the domain of valid parameters, backed up and continued integrating.
It might be worth adding an argument to the function to silence the
output of such error messages.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the SciPy-user mailing list