Odd SciPy ODE Integration error

后端 未结 2 1847
梦毁少年i
梦毁少年i 2020-12-09 20:46

I\'m implementing a very simple Susceptible-Infected-Recovered model with a steady population for an idle side project - normally a pretty trivial task. But I\'m running int

2条回答
  •  北海茫月
    2020-12-09 21:14

    The infected population PopIn[1] decays to zero. Apparently, (normal) numerical imprecision leads to PopIn[1] becoming negative (approx. -3.549e-12) near t=322.9. Then eventually the solution blows up near t=7818.093, with PopIn[0] going toward +infinity and PopIn[1] going toward -infinity.

    Edit: I removed my earlier suggestion for a "quick fix". It was a questionable hack.

提交回复
热议问题