32.2: Epidemic Dynamics - Continuous Model
( \newcommand{\kernel}{\mathrm{null}\,}\)
Instead of using the discrete markov model, we can also use a continuous model with ordinary differential equations.
For example, we have that
˙x1=dx1(t)dt=−0.05x1(t)+0.04x2(t)
It means that the changes in the susceptible group depends on susceptible and infected individuals. It increase because of the recovered people from infected ones and it decreases because of the infection.
Similarly, we have the equations for all three groups.
˙x2=dx2(t)dt=0.05x1(t)−0.17x2(t)˙x3=dx3(t)dt=0.1x2(t)˙x4=dx4(t)dt=0.03x2(t)
We can write it as system of ODEs as ˙x(t)=Bx(t). Write down the matrix B in numpy.matrix
Plot all the distribution for 200 days. Then compare it with the discrete version.