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
Medical Sciences
Operations Research
Social Science
Dynamic Interactivity
Equation Solving
Interface Construction
Modeling
6
Anton Antonov
[NB] Basic experiments workflow for simple epidemiological models
Anton Antonov, Accendo Data LLC
Posted
2 years ago
12138 Views
|
10 Replies
|
12 Total Likes
Follow this post
|
MODERATOR NOTE: coronavirus resources & updates:
https://wolfr.am/coronavirus
Basic experiments workflow for simple epidemiological models
Anton Antonov
MathematicaForPrediction at WordPress
SystemModeling at GitHub
March 2020
Introduction
The primary purpose of this notebook is to give a “stencil workflow” for simulations using the packages in the project
"Coronavirus simulation dynamics"
, [AAr1].
The model in this notebook -- SEI2R -- differs from
the classical SEIR model
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.
Remark:
We consider the coronavirus propagation models as instances of the more general
System Dynamics (SD)
models.
Remark:
The SEI2R model is a modification of the classic epidemic model SEIR, [Wk1].
Remark:
The interactive interfaces in the notebook can be used for attempts to calibrate SEI2R with real data. (For example, data for the
2019–20 coronavirus outbreak
, [WRI1].)
Workflow
1
.
Get one of the classical epidemiology models.
2
.
Extend the equations of model if needed or desired.
3
.
Set relevant initial conditions for the populations.
4
.
Pick model parameters to be adjust and “play with.”
5
.
Derive parametrized solutions of model’s system of equations (ODE’s or DAE’s.)
5
.
1
.
Using the parameters of the previous step.
6
.
Using an interactive interface experiment with different values of the parameters.
6
.
1
.
In order to form “qualitative understanding.”
7
.
Get real life data.
7
.
1
.
Say, for the 2019-20 coronavirus outbreak.
8
.
Attempt manual or automatic calibration of the model.
8
.
1
.
This step will most likely require additional data transformations and programming.
8
.
2
.
Only manual calibration is shown in this notebook.
Load packages of the framework
The epidemiological models framework used in this notebook is implemented in the packages [AAp1, AAp2]; the interactive plots functions are from the package [AAp3].
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
/
W
L
/
S
y
s
t
e
m
D
y
n
a
m
i
c
s
I
n
t
e
r
a
c
t
i
v
e
I
n
t
e
r
f
a
c
e
s
F
u
n
c
t
i
o
n
s
.
m
"
]
Getting the model code
Here we take the SEI2R model implemented in the package
"EpidemiologyModels.m"
, [AAp1]:
I
n
[
]
:
=
m
o
d
e
l
S
I
2
R
=
S
E
I
2
R
M
o
d
e
l
[
t
,
"
I
n
i
t
i
a
l
C
o
n
d
i
t
i
o
n
s
"
T
r
u
e
,
"
R
a
t
e
R
u
l
e
s
"
T
r
u
e
]
;
We can show a tabulated visualization of the model using the function
ModelGridTableForm
from [AAp1]:
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
I
2
R
]
O
u
t
[
]
=
S
t
o
c
k
s
#
S
y
m
b
o
l
D
e
s
c
r
i
p
t
i
o
n
1
T
P
[
t
]
T
o
t
a
l
P
o
p
u
l
a
t
i
o
n
2
S
P
[
t
]
S
u
s
c
e
p
t
i
b
l
e
P
o
p
u
l
a
t
i
o
n
3
E
P
[
t
]
E
x
p
o
s
e
d
P
o
p
u
l
a
t
i
o
n
4
I
N
S
P
[
t
]
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
5
I
S
S
P
[
t
]
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
6
R
P
[
t
]
R
e
c
o
v
e
r
e
d
P
o
p
u
l
a
t
i
o
n
7
M
L
P
[
t
]
M
o
n
e
y
o
f
L
o
s
t
P
r
o
d
u
c
t
i
v
i
t
y
,
R
a
t
e
s
#
S
y
m
b
o
l
D
e
s
c
r
i
p
t
i
o
n
1
μ
[
T
P
]
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
2
μ
[
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
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
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
]
4
′
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
-
I
S
S
P
[
t
]
μ
[
I
S
S
P
]
5
′
R
P
[
t
]
I
N
S
P
[
t
]
+
I
S
S
P
[
t
]
a
i
p
-
R
P
[
t
]
μ
[
T
P
]
6
′
M
L
P
[
t
]
l
p
c
r
[
I
S
S
P
,
I
N
S
P
]
(
-
R
P
[
t
]
-
S
P
[
t
]
+
T
P
[
0
]
)
,
R
a
t
e
R
u
l
e
s
#
S
y
m
b
o
l
V
a
l
u
e
1
T
P
[
0
]
1
0
0
0
0
0
2
μ
[
T
P
]
1
4
5
6
2
5
3
μ
[
I
S
S
P
]
0
.
0
3
5
a
i
p
4
μ
[
I
N
S
P
]
0
.
0
1
a
i
p
5
β
[
I
S
S
P
]
6
6
β
[
I
N
S
P
]
3
7
a
i
p
2
8
8
a
i
n
c
p
6
9
s
s
p
f
[
S
P
]
0
.
2
1
0
l
p
c
r
[
I
S
S
P
,
I
N
S
P
]
6
0
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
S
P
[
0
]
9
9
9
9
8
2
E
P
[
0
]
0
3
I
S
S
P
[
0
]
1
4
I
N
S
P
[
0
]
1
5
R
P
[
0
]
0
6
M
L
P
[
0
]
0
Model extensions and new models
The framework implemented with the packages [AAp1, AAp2, AAp3] can be utilized using custom made data structures that follow the structure of the models in [AAp1].
Of course, we can also just extend the models from [AAp1]. In this section we show how SEI2R can be extended in two ways:
1
.
By adding a birth rate added to the Susceptible Population equation (the birth rate is not included by default)
2
.
By adding a new equation for the infected deceased population.
Adding births term
Here are the equations of SEI2R (from [AAp1]):
I
n
[
]
:
=
M
o
d
e
l
G
r
i
d
T
a
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]
=
1
Here we make the births term using a birth rate that is the same as the death rate:
I
n
[
]
:
=
b
i
r
t
h
T
e
r
m
=
G
e
t
P
o
p
u
l
a
t
i
o
n
s
[
m
o
d
e
l
S
I
2
R
,
"
T
o
t
a
l
P
o
p
u
l
a
t
i
o
n
"
]
〚
1
〛
*
G
e
t
R
a
t
e
s
[
m
o
d
e
l
S
I
2
R
,
"
P
o
p
u
l
a
t
i
o
n
d
e
a
t
h
r
a
t
e
"
]
〚
1
〛
O
u
t
[
]
=
T
P
[
t
]
μ
[
T
P
]
Here we add the births term to the equations of new model
I
n
[
]
:
=
m
o
d
e
l
S
I
2
R
N
e
w
=
m
o
d
e
l
S
I
2
R
;
m
o
d
e
l
S
I
2
R
N
e
w
[
"
E
q
u
a
t
i
o
n
s
"
]
=
R
e
p
l
a
c
e
P
a
r
t
[
m
o
d
e
l
S
I
2
R
[
"
E
q
u
a
t
i
o
n
s
"
]
,
{
1
,
2
}
m
o
d
e
l
S
I
2
R
[
"
E
q
u
a
t
i
o
n
s
"
]
〚
1
,
2
〛
+
b
i
r
t
h
T
e
r
m
]
;
Here we display the equations of the new model:
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
I
2
R
N
e
w
]
[
"
E
q
u
a
t
i
o
n
s
"
]
O
u
t
[
]
=
#
E
q
u
a
t
i
o
n
1
′
S
P
[
t
]
-
S
P
[
t
]
μ
[
T
P
]
+
T
P
[
t
]
μ
[
T
P
]
-
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
0
]
-
I
S
S
P
[
t
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
0
]
2
′
E
P
[
t
]
-
E
P
[
t
]
1
a
i
n
c
p
+
μ
[
T
P
]
+
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
0
]
+
I
S
S
P
[
t
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
0
]
3
′
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
]
4
′
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
-
I
S
S
P
[
t
]
μ
[
I
S
S
P
]
5
′
R
P
[
t
]
I
N
S
P
[
t
]
+
I
S
S
P
[
t
]
a
i
p
-
R
P
[
t
]
μ
[
T
P
]
6
′
M
L
P
[
t
]
l
p
c
r
[
I
S
S
P
,
I
N
S
P
]
(
-
R
P
[
t
]
-
S
P
[
t
]
+
T
P
[
0
]
)
Adding infected deceased population equation
Here we add new population, equation, and initial condition that allow for tracking the deaths because of infection:
I
n
[
]
:
=
A
p
p
e
n
d
T
o
[
m
o
d
e
l
S
I
2
R
[
"
E
q
u
a
t
i
o
n
s
"
]
,
I
D
P
'
[
t
]
μ
[
I
N
S
P
]
*
I
N
S
P
[
t
]
+
μ
[
I
S
S
P
]
*
I
S
S
P
[
t
]
]
;
A
p
p
e
n
d
T
o
[
m
o
d
e
l
S
I
2
R
[
"
S
t
o
c
k
s
"
]
,
I
D
P
[
t
]
"
I
n
f
e
c
t
e
d
D
e
c
e
a
s
e
d
P
o
p
u
l
a
t
i
o
n
"
]
;
A
p
p
e
n
d
T
o
[
m
o
d
e
l
S
I
2
R
[
"
I
n
i
t
i
a
l
C
o
n
d
i
t
i
o
n
s
"
]
,
I
D
P
[
0
]
0
]
;
Here is how the model looks like:
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
I
2
R
]
[
"
E
q
u
a
t
i
o
n
s
"
]
O
u
t
[
]
=
#
E
q
u
a
t
i
o
n
1
′
S
P
[
t
]
-
S
P
[
t
]
μ
[
T
P
]
-
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
0
]
-
I
S
S
P
[
t
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
0
]
2
′
E
P
[
t
]
-
E
P
[
t
]
1
a
i
n
c
p
+
μ
[
T
P
]
+
I
N
S
P
[
t
]
S
P
[
t
]
β
[
I
N
S
P
]
T
P
[
0
]
+
I
S
S
P
[
t
]
S
P
[
t
]
β
[
I
S
S
P
]
T
P
[
0
]
3
′
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
]
4
′
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
-
I
S
S
P
[
t
]
μ
[
I
S
S
P
]
5
′
R
P
[
t
]
I
N
S
P
[
t
]
+
I
S
S
P
[
t
]
a
i
p
-
R
P
[
t
]
μ
[
T
P
]
6
′
M
L
P
[
t
]
l
p
c
r
[
I
S
S
P
,
I
N
S
P
]
(
-
R
P
[
t
]
-
S
P
[
t
]
+
T
P
[
0
]
)
7
′
I
D
P
[
t
]
I
N
S
P
[
t
]
μ
[
I
N
S
P
]
+
I
S
S
P
[
t
]
μ
[
I
S
S
P
]
Parameters and actual simulation equations code
Here are the parameters we want to experiment with (or do calibration with):
I
n
[
]
:
=
l
s
F
o
c
u
s
P
a
r
a
m
s
=
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
;
Here we set custom rates and initial conditions:
I
n
[
]
:
=
p
o
p
u
l
a
t
i
o
n
=
5
8
1
6
0
0
0
0
/
4
0
0
;
m
o
d
e
l
S
I
2
R
=
S
e
t
R
a
t
e
R
u
l
e
s
[
m
o
d
e
l
S
I
2
R
,
<
|
T
P
[
0
]
p
o
p
u
l
a
t
i
o
n
|
>
]
;
m
o
d
e
l
S
I
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p
r
e
s
s
i
o
n
:
E
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
,
I
N
S
P
P
a
r
a
m
e
t
r
i
c
F
u
n
c
t
i
o
n
E
x
p
r
e
s
s
i
o
n
:
I
N
S
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
,
I
S
S
P
P
a
r
a
m
e
t
r
i
c
F
u
n
c
t
i
o
n
E
x
p
r
e
s
s
i
o
n
:
I
S
S
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
,
R
P
P
a
r
a
m
e
t
r
i
c
F
u
n
c
t
i
o
n
E
x
p
r
e
s
s
i
o
n
:
R
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
,
M
L
P
P
a
r
a
m
e
t
r
i
c
F
u
n
c
t
i
o
n
E
x
p
r
e
s
s
i
o
n
:
M
L
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
,
I
D
P
P
a
r
a
m
e
t
r
i
c
F
u
n
c
t
i
o
n
E
x
p
r
e
s
s
i
o
n
:
I
D
P
P
a
r
a
m
e
t
e
r
s
:
{
a
i
n
c
p
,
a
i
p
,
s
s
p
f
[
S
P
]
,
β
[
I
S
S
P
]
,
β
[
I
N
S
P
]
}
(The advantage having parametrized solutions is that we can quickly compute simulation results with new parameter values without solving model’s system of ODE’s; see the interfaces below.)
Interactive interface
I
n
[
]
:
=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