Open mavilar opened 2 years ago
The code seems OK. Not sure what the problem is.
Hi Mavilar and Lulu I think you will encounter the problem of trivial solution which will be in this system S(t)=1000, I(t)=0,R(t)=0. The question is how to avoide the trivial solution. There are some suggestions in FAQ e,g,. #356
I am trying to solve the system of ordinary differential equations of a SIR model like the following one:
$$ \begin{cases} \frac{dS}{dt} = - \tau I(t) S(t) \ \frac{dI}{dt} = \tau I(t) S(t) - \frac{1}{k} I(t) \ \frac{dR}{dt} = \frac{1}{k} I(t) \ \end{cases} $$
As I could not figure out how to solve the train convergence problem I was having, I tried to implement all the recommendations given in this question of the FAQ:
I was trying to get the solution of that ODE system for $t$ between $0$ and $60$, so the first thing was to transform it so that the solution fell between $0$ and $1$ instead, as this is one of the most repeated recommendations I could found.
After also following all the other recommendations in that section, my code is like follows:
Any idea of what may be happening?