WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Programming Lab
Finance Platform
SystemModeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Trends
Machine Learning
Multiparadigm Data Science
Internet of Things
High-Performance Computing
Hackathons
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Search
Message Boards
Answer
(
Unmark
)
Mark as an Answer
GROUPS:
Architecture
Biological Sciences
Mathematics
Medical Sciences
Social Science
Equation Solving
Wolfram Language
Modeling
Numerical Computation
Events & Media
3
Anton Antonov
SEI2HR model with quarantine scenarios
Anton Antonov, Accendo Data LLC
Posted
1 year ago
1709 Views
|
0 Replies
|
3 Total Likes
Follow this post
|
SEI2HR model with quarantine scenarios
Version 0.8
Anton Antonov
MathematicaForPrediction at WordPress
SystemModeling at GitHub
March, April 2020
Introduction
The
epidemiology compartmental model
, [Wk1], presented in this notebook -- SEI2HR -- deals with the left-most and middle rectangles in this diagram:
I
m
a
g
e
R
e
s
i
z
e
[
I
m
p
o
r
t
[
"
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
a
n
t
o
n
o
n
c
u
b
e
/
S
y
s
t
e
m
M
o
d
e
l
i
n
g
/
r
a
w
/
m
a
s
t
e
r
/
P
r
o
j
e
c
t
s
/
C
o
r
o
n
a
v
i
r
u
s
-
p
r
o
p
a
g
a
t
i
o
n
-
d
y
n
a
m
i
c
s
/
D
i
a
g
r
a
m
s
/
C
o
r
o
n
a
v
i
r
u
s
-
p
r
o
p
a
g
a
t
i
o
n
-
s
i
m
p
l
e
-
d
y
n
a
m
i
c
s
.
j
p
e
g
"
]
,
9
0
0
]
I
n
[
]
:
=
O
u
t
[
]
=
“SEI2HR” stands for “Susceptible, Exposed, Infected two, Hospitalized, Recovered” (populations.)
In this notebook we also deal with quarantine scenarios.
Remark:
We consider the contagious disease propagation models as instances of the more general
System Dynamics (SD)
models. We use SD terminology in this notebook.
The models
SEI2R
The model SEI2R are introduced and explained in the notebook [AA2]. SEI2R differs from
the classical SEIR model
, [Wk1, HH1], with the following elements:
1. Two separate infected populations: one is "severely symptomatic", the other is "normally symptomatic"
2. The monetary equivalent of lost productivity due to infected or died people is tracked.
SEI2HR
For the formulation of SEI2HR we use a system of Differential Algebraic Equations (DAE’s). The package [AAp1] allows the use of a formulation that has just Ordinary Differential Equations (ODE’s).
Here are the unique features of SEI2HR:
People stocks
◼
Two types of infected populations: normally symptomatic and severely symptomatic
◼
Hospitalized population
◼
Deceased from infection population
◼
Hospital beds
◼
Hospital beds are a limited resource that determines the number of hospitalized people
◼
Only severely symptomatic people are hospitalized according to the available hospital beds
◼
The hospital beds stock is not assumed constant, it has its own change rate.
◼
Money stocks
◼
The money from lost productivity are tracked
◼
The money for hospital services are tracked
◼
SEI2HR’s place a development plan
This graph shows the “big picture” of the model development plan undertaken in [AAr1] and SEI2HR (discussed in this notebook) is in that graph:
O
u
t
[
]
=
Notebook structure
The rest of notebook has the following sequence of sections:
Package load section
◼
SEI2HR structure in comparison of SEI2R
◼
Explanations of the equations of SEI2HR
◼
Quarantine scenario modeling preparation
◼
Parameters and initial conditions setup
◼
Populations, hospital beds, quarantine scenarios
◼
Parametric simulation solution
◼
Interactive interface
◼
Sensitivity analysis
◼
Load packages
The epidemiological models framework used in this notebook is implemented with the packages [AAp1, AAp2, AA3]; many of the plot functions are from the package [AAp4].
I
m
p
o
r
t
[
"
h
t
t
p
s
:
/
/
r
a
w
.
g
i
t
h
u
b
u
s
e
r
c
o
n
t
e
n
t
.
c
o
m
/
a
n
t
o
n
o
n
c
u
b
e
/
S
y
s
t
e
m
M
o
d
e
l
i
n
g
/
m
a
s
t
e
r
/
P
r
o
j
e
c
t
s
/
C
o
r
o
n
a
v
i
r
u
s
-
p
r
o
p
a
g
a
t
i
o
n
-
d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I
S
S
P
,
I
N
S
P
]
(
I
N
S
P
[
t
]
+
I
S
S
P
[
t
]
+
H
P
[
t
]
μ
[
H
P
]
+
I
N
S
P
[
t
]
μ
[
I
N
S
P
]
+
(
I
S
S
P
[
t
]
-
H
P
[
t
]
)
μ
[
I
S
S
P
]
)
8
′
S
P
t
-
S
P
[
t
]
H
P
[
t
]
β
[
H
P
]
T
P
[
t
]
-
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
t
]
-
M
a
x
[
0
,
I
S
S
P
[
t
]
-
H
P
[
t
]
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
t
]
-
S
P
t
μ
T
P
,
R
a
t
e
R
u
l
e
s
#
S
y
m
b
o
l
V
a
l
u
e
1
μ
[
H
P
]
0
.
2
5
μ
[
I
S
S
P
]
2
β
[
H
P
]
0
.
1
β
[
I
S
S
P
]
3
n
h
b
r
[
T
P
]
0
.
0
0
2
9
4
n
h
b
c
r
[
I
S
S
P
,
I
N
S
P
]
0
5
h
s
c
r
[
I
S
S
P
,
I
N
S
P
]
1
,
I
n
i
t
i
a
l
C
o
n
d
i
t
i
o
n
s
#
E
q
u
a
t
i
o
n
1
D
I
P
[
0
]
0
2
H
B
[
0
]
n
h
b
r
[
T
P
]
T
P
[
0
]
3
H
P
[
0
]
0
4
M
H
S
[
0
]
0
O
u
t
[
]
=
Equations explanations
In this section we provide rationale of the model equations of SEI2HR.
The equations for Susceptible, Exposed, Infected, Recovered populations of SEI2R are "standard" and explanations about them are found in [WK1, HH1]. For SEI2HR those equations change because of the stocks Hospitalized Population and Hospital Beds.
The equations time unit is one day. The time horizon is one year. Since we target COVID-19, [Wk2, AA1], we do not consider births.
Remark:
For convenient reading the equations in this section have tooltips for the involved stocks and rates.
Verbalization description of the model
We start with one infected (normally symptomatic) person, the rest of the people are susceptible. The infected people meet other people directly or get in contact with them indirectly. (Say, susceptible people touch things touched by infected.) For each susceptible person there is a probability to get the decease. The decease has an incubation period: before becoming infected the susceptible are (merely) exposed. The infected recover after a certain average infection period or die. A certain fraction of the infected become severely symptomatic. If there are enough hospital beds the severely symptomatic infected are hospitalized. The hospitalized severely infected have different death rate than the non-hospitalized ones. The number of hospital beds might change: hospitals are extended, new hospitals are build, or there are not enough medical personnel or supplies. The deaths from infection are tracked (accumulated.) Money for hospital services and money from lost productivity are tracked (accumulated.)
The equations below give mathematical interpretation of the model description above.
Code for the equations
Each equation in this section are derived with code like this:
M
o
d
e
l
G
r
i
d
T
a
b
l
e
F
o
r
m
[
m
o
d
e
l
S
E
I
2
H
R
,
l
s
M
o
d
e
l
O
p
t
s
]
[
"
E
q
u
a
t
i
o
n
s
"
]
[
[
1
,
E
q
u
a
t
i
o
n
P
o
s
i
t
i
o
n
[
m
o
d
e
l
S
E
I
2
H
R
,
R
P
]
+
1
,
2
]
]
and then the output cell is edited to be “DisplayFormula” and have CellLabel value corresponding to the stock of interest.
The infected and hospitalized populations
SEI2HR has two types of infected populations: a normally symptomatic one and a severely symptomatic one. A major assumption for SEI2HR is that only the severely symptomatic people are hospitalized. (That assumption is also reflected in the diagram in the introduction.)
Each of those three populations have their own contact rates and mortality rates.
Here are the contact rates from the SEI2HR dictionary
C
o
l
u
m
n
F
o
r
m
@
C
a
s
e
s
[
N
o
r
m
a
l
@
m
o
d
e
l
S
E
I
2
H
R
[
"
R
a
t
e
s
"
]
,
H
o
l
d
P
a
t
t
e
r
n
[
β
[
_
]
_
]
,
∞
]
I
n
[
]
:
=
β
[
I
N
S
P
]
C
o
n
t
a
c
t
r
a
t
e
f
o
r
t
h
e
n
o
r
m
a
l
l
y
s
y
m
p
t
o
m
a
t
i
c
p
o
p
u
l
a
t
i
o
n
β
[
I
S
S
P
]
C
o
n
t
a
c
t
r
a
t
e
f
o
r
t
h
e
s
e
v
e
r
e
l
y
s
y
m
p
t
o
m
a
t
i
c
p
o
p
u
l
a
t
i
o
n
β
[
H
P
]
C
o
n
t
a
c
t
r
a
t
e
f
o
r
t
h
e
h
o
s
p
i
t
a
l
i
z
e
d
p
o
p
u
l
a
t
i
o
n
O
u
t
[
]
=
Here are the mortality rates from the SEI2HR dictionary
C
o
l
u
m
n
F
o
r
m
@
C
a
s
e
s
[
N
o
r
m
a
l
@
m
o
d
e
l
S
E
I
2
H
R
[
"
R
a
t
e
s
"
]
,
H
o
l
d
P
a
t
t
e
r
n
[
μ
[
_
]
_
]
,
∞
]
I
n
[
]
:
=
μ
[
T
P
]
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
μ
[
I
N
S
P
]
I
n
f
e
c
t
e
d
N
o
r
m
a
l
l
y
S
y
m
p
t
o
m
a
t
i
c
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
μ
[
I
S
S
P
]
I
n
f
e
c
t
e
d
S
e
v
e
r
e
l
y
S
y
m
p
t
o
m
a
t
i
c
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
μ
[
H
P
]
H
o
s
p
i
t
a
l
i
z
e
d
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
O
u
t
[
]
=
Remark:
Below with “Infected Population” we mean both stocks Infected Normally Symptomatic Population (INSP) and Infected Severely Symptomatic Population (ISSP).
Total Population
In this notebook we consider a DAE’s formulation of SEI2HR. The stock Total Population has the following (obvious) algebraic equation:
T
P
[
t
]
M
a
x
[
0
,
E
P
[
t
]
+
I
N
S
P
[
t
]
+
I
S
S
P
[
t
]
+
R
P
[
t
]
+
S
P
[
t
]
]
(
T
P
)
Note that with Max we specified that the total population cannot be less than
0
.
Remark:
As mentioned in the introduction, the package [AAp1] allows for the use of non-algebraic formulation, without an equation for TP.
Susceptible Population
The stock Susceptible Population (SP) is decreased by (1) infections derived from stocks Infected Populations and Hospitalized Population (HP), and (2) morality cases derived with the typical mortality rate.
′
S
P
[
t
]
-
H
P
[
t
]
S
P
[
t
]
β
[
H
P
]
T
P
[
t
]
-
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
t
]
-
M
a
x
[
0
,
-
H
P
[
t
]
+
I
S
S
P
[
t
]
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
t
]
-
S
P
[
t
]
μ
[
T
P
]
(
S
P
)
Because we hospitalize the severely infected people only instead of the term
I
S
S
P
[
t
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
t
]
we have the terms
H
P
[
t
]
S
P
[
t
]
β
[
H
P
]
T
P
[
t
]
+
M
a
x
[
0
,
-
H
P
[
t
]
+
I
S
S
P
[
t
]
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
t
]
.
The first term is for the infections derived from the hospitalized population. The second term for the infections derived from people who are infected severely symptomatic and
not
hospitalized.
Births term
Note that we do not consider in this notebook births, but the births term can be included in SP’s equation:
B
l
o
c
k
[
{
m
=
S
E
I
2
H
R
M
o
d
e
l
[
t
,
"
B
i
r
t
h
s
T
e
r
m
"
T
r
u
e
]
}
,
M
o
d
e
l
G
r
i
d
T
a
b
l
e
F
o
r
m
[
m
]
[
"
E
q
u
a
t
i
o
n
s
"
]
〚
1
,
E
q
u
a
t
i
o
n