On Mon, Jul 25, 2011 at 17:53, Laura Matrajt <matrajt@gmail.com> wrote:
Laura Matrajt <matrajt <at> gmail.com> writes:
Kevin Dunn <kgdunn <at> gmail.com> writes:
Hi Laura,
There's an example in the SciPy documentation on using a Jacobian: http://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html
This is for the ``ode`` function, not the ``odeint`` function though.
I've just posted an example on using ``ode`` with coupled ODEs, no Jacobian over here:
http://scipy-central.org/item/13/0/integrating-an-initial-value-problem-mult...
Hope that helps, Kevin
Hi Kevin, the example was good. I now have implemented my Jacobian. Thank you very much!!!!!
Hi all: sorry to bother you again! I implemented the Jacobian as Anne kindly suggested to me with the help of Kevin's pointers to the correct webpage AND I increased the maximum number of steps as Warren kindly said. I am now getting a new message:
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.1209062893646E+03 R2 = 0.9059171791494E-18
I would find the set(s) of initial conditions that give this warning, and repeat the integration with a different integrator and/or different tolerance settings on the integrator. Then compare the trajectories. If there is negligible difference, then can probably ignore the warning. That being said, I've not used the lsoda integrator before, so I have no idea how serious this warning might be. Which is why I recommend you try a different integrator also. Kevin
It is just a warning, and my code continues to run. But I am really worried about this being a bug. The problem is that I am coupling a system of ODE's with a stochastic process. Mainly, I simulate a day of an epidemic, stop the integrator, change some of the initial conditions stochastically (not just randomly, I do follow some rules) and I run the ODE again and so on. I have run this millions of times (and I am not exagerating about the millions) and it doesn't produce any warnings, but every now and then (~15 times) it does it. I don't know if this is a bug or just that not all of my domain will be good for the ODE's... If anyone has any suggestion of how to think about this problem, I will really appreciate it!!!!!! thanks to all the people that replied to me previously, you helped me sooo much already!