Wednesday, April 8, 2020

Runge-Kutta, SIR - susceptible (S), infected (I), and resistant (R)


Ref:

  1. https://www.geeksforgeeks.org/runge-kutta-4th-order-method-solve-differential-equation/

The formula basically computes next value yn+1 using current yn plus weighted average of four increments.
  • k1 is the increment based on the slope at the beginning of the interval, using y
  • k2 is the increment based on the slope at the midpoint of the interval, using y + hk1/2.
  • k3 is again the increment based on the slope at the midpoint, using using y + hk2/2.
  • k4 is the increment based on the slope at the end of the interval, using y + hk3.



SIR model 

REF: 

  1. Susceptible (S). The individual hasn't contracted the disease, but she can be infected due to transmisison from infected people
  2. Infected (I). This person has contracted the disease
  3. Recovered/Deceased (R). The disease may lead to one of two destinies: either the person survives, hence developing inmunity to the disease, or the person is deceased.
There are many versions of this model, considering birth and death (SIRD with demography), with intermediate states, etc. However, since we are in the early stages of the COVID-19 expansion and our interest is focused in the short term, we will consider that people develops immunity (in the long term, immunity may be lost and the COVID-19 may come back within a certain seasonality like the common flu) and there is no transition from recovered to the remaining two states. With this, the differential equations that govern the system are:
dSdt=βSIN

dIdt=βSINγI

dRdt=γI

Where β is the contagion rate of the pathogen and γ is the recovery rate.

No comments:

Post a Comment

Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...