WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Finance Platform
System Modeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Application Server
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
Message Boards
Answer
(
Unmark
)
Mark as an Answer
GROUPS:
Staff Picks
Biological Sciences
Mathematics
Medical Sciences
Operations Research
Mathematica
Modeling
3
Anton Antonov
SEI2HR-Econ model with quarantine and supplies scenarios
Anton Antonov, Accendo Data LLC
Posted
2 years ago
4746 Views
|
2 Replies
|
3 Total Likes
Follow this post
|
MODERATOR NOTE: coronavirus resources & updates:
https://wolfr.am/coronavirus
SEI2HR-Econ model with quarantine and supplies scenarios
Version 0.9
Anton Antonov
MathematicaForPrediction at WordPress
SystemModeling at GitHub
March, April 2020
Introduction
The
epidemiology compartmental model
, [Wk1], presented in this notebook -- SEI2HR-Econ -- deals with all three rectangles in this diagram:
I
n
[
]
:
=
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
]
O
u
t
[
]
=
“SEI2HR” stands for “Susceptible, Exposed, Infected two, Hospitalized, Recovered” (populations.) “Econ” stands for “Economic”.
In this notebook we also deal with both quarantine scenarios and medical supplies scenarios. In the notebook [AA4] we deal with quarantine scenarios over a simpler model, SEI2HR.
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 is 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
◼
There are two types of infected populations: normally symptomatic and severely symptomatic.
◼
There is a hospitalized population.
◼
There is a 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 is tracked.
◼
The money for hospital services is tracked.
SEI2HR-Econ
SEI2HR-Econ adds the following features to SEI2HR:
◼
Medical supplies
◼
Medical supplies production is part of the model.
◼
Medical supplies delivery is part of the model..
◼
Medical supplies accumulation at hospitals is taken into account.
◼
Medical supplies demand tracking.
◼
Hospitalization
◼
Severely symptomatic people are hospitalized according to two limited resources: hospital beds and medical supplies.
◼
Money stocks
◼
Money for medical supplies production is tracked.
SEI2HR-Econ’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-Econ structure in comparison of SEI2HR
◼
Explanations of the equations of SEI2HR-Econ
◼
Quarantine scenario modeling preparation
◼
Medical supplies production and delivery scenario modeling preparation
◼
Parameters and initial conditions setup
◼
Populations, hospital beds, quarantine scenarios, medical supplies scenarios
◼
Simulation solutions
◼
Interactive interface
◼
Sensitivity analysis
Load packages
The epidemiological models framework used in this notebook is implemented with the packages [AAp1-AAp4, AA3]; many of the plot functions are from the package [AAp5].
I
n
[
]
:
=
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
y
n
a
m
i
c
s
/
W
L
/
E
p
i
d
e
m
i
o
l
o
g
y
M
o
d
e
l
s
.
m
"
]
;
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
y
n
a
m
i
c
s
/
W
L
/
E
p
i
d
e
m
i
o
l
o
g
y
M
o
d
e
l
M
o
d
i
f
i
c
a
t
i
o
n
s
.
m
"
]
;
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
y
n
a
m
i
c
s
/
W
L
/
E
p
i
d
e
m
i
o
l
o
g
y
M
o
d
e
l
i
n
g
V
i
s
u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
[
T
P
]
T
P
[
0
]
6
m
s
c
r
[
T
P
]
0
.
0
2
7
m
s
c
r
[
I
N
S
P
]
0
.
7
8
m
s
c
r
[
I
S
S
P
]
3
9
m
s
c
r
[
H
P
]
4
1
0
κ
[
H
M
S
]
2
H
B
[
0
]
m
s
c
r
[
I
S
S
P
]
1
1
κ
[
M
S
]
2
m
s
c
r
[
T
P
]
T
P
[
0
]
1
2
κ
[
M
S
D
]
H
B
[
0
]
1
0
,
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
H
M
S
[
0
]
κ
[
H
M
S
]
2
M
M
S
P
[
0
]
0
3
M
S
[
0
]
κ
[
M
S
]
4
M
S
D
[
0
]
0
Equations explanations
In this section we provide rationale for the equations of SEI2HR-Econ.
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. For SEI2HR-Econ the SEI2HR equations change because of the stocks Medical Supplies, Medical Supplies Demand, and Hospital Medical Supplies.
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. The severely symptomatic infected are hospitalized if there are enough hospital beds and enough medical supplies. 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 different types of populations (infected, hospitalized, recovered, etc.) have their own consumption rates of medical supplies. The medical supplies are produced with a certain rate (units per day) and delivered after a certain delay period. The hospitals have their own storage for medical supplies. Medical supplies are delivered to the hospitals only, non-hospitalized people go to the medical supplies producer to buy supplies. The hospitals have precedence for the medical supplies: if the medical supplies are not enough for everyone, the hospital needs are covered first (as much as possible.)
The medical supplies producer has a certain storage capacity (for supplies.) The medical supplies delivery vehicles have a certain -- generally speaking, smaller -- capacity. The hospitals have a certain capacity to store medical supplies. It is assumed that both producer and hospitals have initial stocks of medical supplies. (Following a certain normal, general preparedness protocol.)
The combined demand from all populations for medical supplies is tracked (accumulated.) The deaths from infection are tracked (accumulated.) Money for medical supplies production, 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:
I
n
[
]
:
=
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
E
c
o
n
,
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
E
c
o
n
,
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-Econ dictionary
I
n
[
]
:
=
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
E
c
o
n
[
"
R
a
t
e
s
"
]
,
H
o
l
d
P
a
t
t
e
r
n
[
β
[
_
]
_
]
,
∞
]
O
u
t
[
]
=
β
[
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
Here are the mortality rates from the SEI2HR-Econ dictionary
I
n
[
]
:
=
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
E
c
o
n
[
"
R
a
t
e
s
"
]
,
H
o
l
d
P
a
t
t
e
r
n
[
μ
[
_
]
_
]
,
∞
]
O
u
t
[
]
=
μ
[
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
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-Econ. The stock Total Population has the following (obvious) algebraic equation:
(
T
P
)
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
]
]
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
)
′
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
]
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:
I
n
[
]
:
=
B
l
o
c
k
[
{
m
=
S
E
I
2
H
R
E
c
o
n
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
P
o
s
i
t
i
o
n
[
m
,
S
P
]
+
1
,
2
〛
]
O
u
t
[
]
=
′
S
P
[
t
]
-
S
P
[
t
]
μ
[
T
P
]
-
H
P
[
t
]
S
P
[
t
]
β
[
H
P
]
T
P
[
0
]
-
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
0
]
-
M
a
x
[
0
,
-
H
P
[
t
]
+
I
S
S
P
[
t
]
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
0
]
+
μ
[
T
P
]
T
P
[
0
]
The births rate is the same as the death rate, but it can be programmatically changed. (See [AAp2].)
Exposed Population
The stock Exposed Population (EP) is increased by (1) infections derived from the stocks Infected Populations and Hospitalized Population, and (2) mortality cases derived with the typical mortality rate. EP is decreased by (1) the people who after a certain average incubation period (aincp) become ill, and (2) mortality cases derived with the typical mortality rate.
(
E
P
)
′
E
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
]
-
E
P
[
t
]
1
a
i
n
c
p
+
μ
[
T
P
]
Infected Normally Symptomatic Population
INSP is increased by a fraction of the people who have been exposed. That fraction is derived with the parameter severely symptomatic population fraction (sspf). INSP is decreased by (1) the people who recover after a certain average infection period (aip), and (2) the normally symptomatic people who die from the disease.
(
I
N
S
P
)
′
I
N
S
P
[
t
]
-
I
N
S
P
[
t
]
a
i
p
+
E
P
[
t
]
(
1
-
s
s
p
f
[
S
P
]
)
a
i
n
c
p
-
I
N
S
P
[
t
]
μ
[
I
N
S
P
]
Infected Severely Symptomatic Population
ISSP is increased by a fraction of the people who have been exposed. That fraction is corresponds to the parameter severely symptomatic population fraction (sspf). ISSP is decreased by (1) the people who recover after a certain average infection period (aip), (2) the hospitalized severely symptomatic people who die from the disease, and (3) the non-hospitalized severely symptomatic people who die from the disease.
(
I
S
S
P
)
′
I
S
S
P
[
t
]
-
I
S
S
P
[
t
]
a
i
p
+
E
P
[
t
]
s
s
p
f
[
S
P
]
a
i
n
c
p
-
H
P
[
t
]
μ
[
H
P
]
-
(
-
H
P
[
t
]
+
I
S
S
P
[
t
]
)
μ
[
I
S
S
P
]
Note that we do not assume that severely symptomatic people recover faster if they are hospitalized, only that they have a different death rate.
Hospitalized Population
The amount of people that can be hospitalized is determined by the available Hospital Beds (HB) -- the stock Hospitalized Population (HP) is subject to a resource limitation by the stock HB.
The equation of the stock HP can be easily understood from the following dynamics description points:
◼
If the number of hospitalized people is less that the number of hospital beds we hospitalize the new ISSP people.
◼
The Available Hospital Beds (AHB) are determined by the minimum of (i) the non-occupied hospital beds, and (ii) the hospital medical supplies divided by the ISSP consumption rate.
◼
If the new ISSP people are more than AHB the hospital takes as many as AHB.
◼
Hospitalized people have the same average infection period (aip).
◼
Hospitalized (severely symptomatic) people have their own mortality rate.
Here is the HP equation:
(
H
P
)
′
H
P
[
t
]
M
i
n
H
B
[
t
]