Message Boards Message Boards

Reason for NDSolve::ivres error?

Hi,

When I evaluate the final cell in this notebook, I get "NDSolve::ivres: NDSolve has computed initial values that give a zero residual for the differential-algebraic system, but some components are different from those specified. If you need them to be satisfied, giving initial conditions for all dependent variables and their derivatives is recommended."

I am simply trying to replicate a model from a paper (this one: SCIEnTIfIC RePoRtS | (2018) 8:5866 | DOI:10.1038/s41598-018-24006-w), and I don't know the mechanics of numerical integration well enough to understand what causes this error and if there is a straightforward solution. I have tried a few things but the error always persists. The source of it is the discrete periodic function for c(t). Perhaps there is a better way to code that?

POSTED BY: Gareth Russell

I should mention that the outputs without the error message seem to be right and match the paper's stochastic versions, but the output with the warning does not. In other words, it does seem that something has gone wrong.

POSTED BY: Gareth Russell
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract