Written by 5:00 pm Highlights, Math

Modeling the spread of the Corona Virus

I recently posted an article outlining a method called SIR-networks and an implementation in Matlab. It was originally a task at the university I teach at and I wanted to react to the recent Dengue-Fever outbreak in Jemen.

I recently posted an article outlining a method called SIR-networks and an implementation in Matlab. It was originally a task at the university I teach at and I wanted to react to the recent Dengue-Fever outbreak in Jemen.

Since then, the Coronavirus has created a lot of fear around the world, a giant wave of infections and several thousand deaths at the time of writing this article. So when I had time on my hands during two 4 hour train rides recently, I decided to port that system to a more accessible platform. More details will be provided shortly and I will continue work on the system in the next days, but as it stands, this is a tool to model the spread of infectious diseases.

Some details on the controls:

  • Beta is the average number of likely interactions times the probability of infection per time step. So if the time step is one day, every person meets 4 people per day and the likelihood of infection is 50% (0.5) then beta would be 2 ( 1 * 4 * 0.5 = 2)
  • Gamma is the inverse of the number of time steps it takes to recover. So if it takes 4 timesteps to recover, gamma is 0.25.
  • The time step length is measured in days.
  • The total length of the simulation is also measured in days.
  • The mortality describes what fraction of “recovered” people are dead in this model. So if out of 100 infected people one person dies, this value is 0.01.
  • The starting point are currently 1000 infected people in China on day 0.

To use the tool, you first have to click “Run simulation” or adapt the values above that and then click it. After the run is complete, you can either visualize the result on the world map by clicking “Visualize” or select countries and target groups in the three chart elements and visualize the outcome as line plots.

The code for this website is available in my Github account. I will update it as soon as I have time to make it more readable and extend its functionality.

Known bugs:

  • There are some countries especially in Africa that are currently not part of the model. This is due to a backend issue.
  • It is hard to tell when the computation is done.
  • The traffic model is based on air-transport and that model is not optimal.
  • Countermeasures by governments are not currently being considered.
  • Land and Sea travel is not part of the simulation.

I will write more articles in the next days outlining the development and status of this project and introducing you to ways of also developing solutions for complex problems in a few hours or days. Until then I would be happy about your comments.

(Visited 95 times, 1 visits today)
Last modified: February 18, 2020
Close