As of March 5, 2020, Japan's situation regarding the new coronavirus (COVID-19) has been taken very seriously, including immigration restrictions from other countries. Although the government has requested that all elementary, junior high and high schools be closed all over the country, and some have questioned the effect, it is also understood that political judgment is necessary because it is difficult to show scientific grounds. I can do it. This article uses the SEIR model, which is one of the mathematical models of infectious diseases, to verify whether it is possible to control the peak of infection by taking a certain period of time off from a school or business establishment (with a scale of 1000 people). is. However, this article is a simulation under limited assumptions and does not provide scientific confirmation or academic evidence. We do not take any responsibility as it may be helpful or incorrect. For most of the programs, I referred to this article.
Details of the SEIR model are omitted in this article, but in Wikipedia According to
It is composed of, and its acronym is called SEIR model. It seems. SEIR model parameters include
there is. According to Ministry of Health, Labor and Welfare, the incubation period is "according to WHO's knowledge, the incubation period is currently Is 1-12.5 days (mostly 5-6 days), "so let's assume 5.5 days. The duration of infection is unknown, but it is said that fever will continue for about 4 days after the onset and then recover or become severe, so it is assumed to be 8 days. (If the condition becomes severe, it is considered that the patient will be hospitalized, but the mildly ill person shall recover while living a normal life without being aware of it.) The most important is the infection rate, but based on the data provided by the Ministry of Health, Labor and Welfare, we have done the following.
According to Q & A of the Ministry of Health, Labor and Welfare, the frequency with which one infected person causes secondary infection is shown in the figure below. It seems. From this data, using uniform random numbers, Define a function that calculates the rate R0 (basic reproduction number) that produces a secondary infection.
def COVID19R0(er):
if np.random.rand() < er:
# good environment
if np.random.rand() < 0.8:
R0 = 0
else:
R0 = np.random.randint(1,4)*1.0
else:
# bad environment
R0 = np.random.randint(0,12)*1.0
return R0
Here, er is defined as the probability that the source of infection was in a poorly ventilated environment.
We also want to evaluate the impact of the leave, so we will introduce the following parameters.
Based on R0 and these parameters, I modified the SEIR model as follows:
#define differencial equation of seir model
def seir_eq5(v,t, keys):
er = keys['er']
lp = keys['lp']
ip = keys['ip']
tb = keys['tb']
te = keys['te']
#
if t >= tb and t <= te: #Holiday period
R0 = 0 #Completely closed (when there are no people in the school / business office)
else:
R0 = COVID19R0(er)
#
ds = - R0/ip * v[2] if v[0] >= 0 else 0 # note: s >= 0
de = -ds - (1/lp) * v[1]
di = (1/lp)*v[1] - (1/ip)*v[2]
dr = (1/ip)*v[2]
return [ds, de, di, dr]
Import the library to run the simulation.
import numpy as np
import matplotlib.pyplot as plt
Define a function to solve the ODE.
def my_odeint(deq, ini_state, tseq, keys):
sim = None
v = np.array(ini_state).astype(np.float64)
dt = (tseq[1] - tseq[0])*1.0
for t in tseq:
dv = deq(v,t, keys)
v = v + np.array(dv) * dt
if sim is None:
sim = v
else:
sim = np.vstack((sim, v))
return sim
Code that calculates and graphs the results.
#solve seir model
ini_state=[999,0,1,0]
t_max=180
dt=0.01
t=np.arange(0,t_max,dt)
#
keys = {'er':0.5, 'lp':5.5, 'ip':8, 'tb':0, 'te':0}
sim = my_odeint(seir_eq5, ini_state, t, keys)
#
plt.rcParams["font.size"] = 12
fig, ax = plt.subplots(figsize=(10,5))
ax.plot(t,sim)
ax.set_xticks(np.linspace(0,t_max,19))
ax.set_yticks(np.linspace(0,1000,11))
ax.grid(which='both')
ax.legend(['Susceptible','Exposed','Infected','Recovered'])
plt.show()
Here, er (probability that the source of infection was in a poorly ventilated environment) was assumed to be 0.5.
We will start with one infected person on the 0th day out of 1000 offices.
The peak is about the 60th day, and there are days when there are up to about 320 infected people.
The peak is about the 95th day, and there are days when there are up to about 310 infected people. It is interesting that the peak delay days (35 = 95-60) are longer than the holidays (20 days).
Peaks are dispersed on days 52 and 90, with up to about 200 infected days occurring on day 90.
The result is the same as if you do not take any leave. This is thought to be because on the 60th day, there were no people who were not immune to S: infection (Susceptible).
From the above, the following trends can be derived from the simulation regarding the peak control of infection by taking a certain period (20 days) of absence from schools and business establishments (with a scale of 1000 people).
Therefore, if you want to take a leave of absence, it may be most effective to do it from "the stage when the infection starts to rise rapidly" to "before the infection starts to subside".
I referred to the following page.
Recommended Posts