Skip to content

Commit e7bbfd2

Browse files
committed
"try yourself" Exercises 1,3,5
1 parent 8127614 commit e7bbfd2

4 files changed

Lines changed: 41 additions & 1 deletion

File tree

exercises/exercise01.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,20 @@ def _(osecir, plt, result):
315315
return
316316

317317

318+
@app.cell
319+
def _(mo):
320+
mo.md(r"""
321+
## Try yourself
322+
323+
You have seen how to set up and run MEmilio's ODE-SECIR model. You can now explore the model yourself. Here are some suggestions what you can do:
324+
325+
- **Controlling the transmission process**: What happens if you modify the transmission probability or the contact frequency in the same way?
326+
- **Diseases with severe courses**: Increase the proportion of severe or critical cases. What happens to the number of deaths?
327+
- **Asymptomatic courses**: How does disease dynamics behave if we only have pre-symptomatic and no asymptomatic cases? What happens if we increase the average time in the non-symptomatic state?
328+
""")
329+
return
330+
331+
318332
@app.cell
319333
def _(mo):
320334
mo.md(r"""
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def _():
105105
@app.cell
106106
def _(mo):
107107
mo.md(r"""
108-
After the model initialization, we add a contact reduction (`Damping`) that represents an NPI like e.g. mask wearing or social distancing. Dampings are a factor applied to the contact frequency and can be added to the model at fixed simulation time points before simulating. They have a *Level* and a *Type*. A damping with a given level and type replaces the previously active one with the same level and type, while all currently active dampings of one level and different types are summed up. If two dampings have different levels (independent of the type) they are combined multiplicatively. In the following we apply a `Damping` of 0.9 after 10 days and another damping of 0.6 after 20 days which means that the contacts are reduced by 10% and 40%, respectively. In general, it is also possible to increase the contact rate by using negative Damping values. To always retain a minimum level of contacts, a minimum contact frequency can be set that is never deceeded. In our example we set this minimum contact rate to 0.
108+
After the model initialization, we add a contact reduction (`Damping`) that represents an NPI like e.g. mask wearing or social distancing. Dampings are a factor applied to the contact frequency and can be added to the model at fixed simulation time points before simulating. They have a *Level* and a *Type*. A damping with a given level and type replaces the previously active one with the same level and type, while all currently active dampings of one level and different types are summed up. If two dampings have different levels (independent of the type) they are combined multiplicatively. In the following we apply a `Damping` of 0.9 after 10 days and another damping of 0.6 after 20 days which means that the contacts are reduced by 10% and 40%, respectively. In general, it is also possible to increase the contact rate by using Damping values greater than 1. To always retain a minimum level of contacts, a minimum contact frequency can be set that is never deceeded. In our example we set this minimum contact rate to 0.
109109
""")
110110
return
111111

@@ -220,5 +220,18 @@ def _(osecir, plt, result):
220220
return
221221

222222

223+
@app.cell
224+
def _(mo):
225+
mo.md(r"""
226+
## Try yourself
227+
228+
After having learned how to use dampings, you can now try out yourself. Some suggestions what you can try are:
229+
230+
- **Lifting non-pharmaceutical interventions (NPIs)**: Can you temporarily implement an NPI and lift it again after 2 weeks?
231+
- **Increasing contact rates**: Increase the contact rate after 20 days. What does this do to the simulated disease spread?
232+
""")
233+
return
234+
235+
223236
if __name__ == "__main__":
224237
app.run()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,19 @@ def _(osecir, plt, result):
235235
return
236236

237237

238+
@app.cell
239+
def _(mo):
240+
mo.md(r"""
241+
## Try yourself
242+
243+
Now you can explore an age-resolved SECIR-model yourself. Examples what you can do are:
244+
245+
- **Even more age groups**: Initialize a model with 5 (age) groups with each group having a 2 times higher risk of dying from critical infection than the group before.
246+
- **Age-dependent contact rates**: How can you include varying contact rates between age groups? Increase the contact rate within age group 1 and between age group 1 and 2.
247+
""")
248+
return
249+
250+
238251
@app.cell
239252
def _(mo):
240253
mo.md(r"""

0 commit comments

Comments
 (0)