I am trying to use the package ode and periodically it will come up with this error message 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. And then the program just take very long to run. Is there anyway to get the program to terminate when this warning is issued instead of continuing to run ? Tjun Kiat [[alternative HTML version deleted]]
On May 2, 2013, at 1:36 AM, Tjun Kiat Teo wrote:> I am trying to use the package ode and periodically it will come up with > this error message > > 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. > > And then the program just take very long to run. Is there anyway to get the > program to terminate when this warning is issued instead of continuing to > run ?Standard debugging strategy: You set option to terminate when a warning is issued: options(warn=2) ?options # And especially review the examples You can also arrange for R to drop back into the browser(): ?browser -- David Winsemius Alameda, CA, USA
Hi, just press ESC and the solver should stop. BTW, warnings like this are usually a sign of unrealistic parameters, problematic model equations or inappropriate tolerance settings. See also: http://cran.r-project.org/web/packages/deSolve/vignettes/deSolve.pdf#46 ThPe On 5/2/2013 10:36 AM, Tjun Kiat Teo wrote:> I am trying to use the package ode and periodically it will come up with > this error message > > 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. > > And then the program just take very long to run. Is there anyway to get the > program to terminate when this warning is issued instead of continuing to > run ? > > > Tjun Kiat[...]