SL-edi / covid-visualisation

0 stars 0 forks source link

Extrapolate existing data to make predictions about future spread #10

Open tjanowsk opened 4 years ago

tjanowsk commented 4 years ago

This is likely post-mvp. We can initially use SIR model, but the code should be flexible enough to replace it with another model.

The model

We want to solve a system of first-order non-linear ordinary differential equations (ODEs):

dS/dt = -aSI - bI dI/dt = aSI dR/dt = bI

where S - susceptible population = total population - infected - dead - recovered I - infected population R - 'removed' = recovered + dead and a and b are some positive constants with dimensions (1/t) and t is the time

The computation

tjanowsk commented 4 years ago

This is a bit computation-heavy and therefore may be a good playing ground for trying WebAssembly. See e.g. https://www.youtube.com/watch?v=7mBf3Gig9io Then we could use e.g. the C implementation of RK4 in GNU scientific library and compile it to a wasm file.