As part of moving to online instruction, i decided my programming class might like to simulate COVID. Of course, everyone and their sibling is doing this, but it is instructive to see how a model is built. I chose a model that is moderately correct (aside from being continuous and non-spatial). It has Susceptible, Exposed, Carrier, Infected, and Resolved as states. After putting in realistic parameters, with a little adjustment, the results strongly suggest that social distancing is the critical parameter to shut down the disease.
This image shows how they’re connected.
I used a constant population which does two things. First, it generates a “master equation” among the derivatives, and second — it gives us a sanity check. If the total number of individuals differs from the input then we have a problem.
A pair of parameters, the clearance rate (how fast you recover) and the conversion rate (how fast you get sick after infection) control the ration of carriers to infected people. The apparent effect of asymptomatic, but infected, people can be mimiced either by a fraction resistant (L in this figure) or by the ratio of conversion to clearance. This model cannot tell the difference.
Once defined the equations follow from simple calculus. The only confusing bit is the “S/N” in dS/dt and dE/dt. It reflects the faction of the population that is vulnerable. We also assume that the ability of a person to spread the disease is different for carriers and infected individuals.
The death rate is expressed as a fraction of the individuals who cease to be infected. I assumed 3% of symptomatic individuals will perish.
It’s not particularly hard to program these in a spreadsheet and they are stable enough to use a (gag!) forward Euler solver.
If a Carrier infects four people, the trajectory is:
The number of deaths, starting from 1,000,000 individuals is 20421.
Carriers infecting only one person result in a much nicer looking trajectory. Although the number of deaths doesn’t improve that much (15810)
To get the number of deaths down takes serious social isolation where the average Carrier only infects 0.5 other people. Then the death are only 183. The take home message — it is critical to self-isolate. I could not get these results by changing any other parameters.