Skip to content

Commit 67faaa7

Browse files
committed
update tutorial
1 parent 15b6625 commit 67faaa7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/tutorials/t05.ipynb

+8-5
Original file line numberDiff line numberDiff line change
@@ -311,17 +311,20 @@
311311
},
312312
{
313313
"cell_type": "markdown",
314-
"metadata": {},
314+
"metadata": {
315+
"tags": []
316+
},
315317
"source": [
316318
"## Dynamic triggering\n",
317319
"\n",
318320
"Another option is to replace the ``days`` arguments with custom functions defining additional criteria. For example, perhaps you only want your beta change intervention to take effect once infections get to a sufficiently high level. Here's a fairly complex example (feel free to skip the details) that toggles the intervention on and off depending on the current number of people who are infectious.\n",
319321
"\n",
320322
"This example illustrates a few different features:\n",
321-
"- The simplest change is just that we're supplying `days=inf_thresh` instead of a number or list. If we had `def inf_thresh(interv, sim): return [20,30]` this would be the same as just setting `days=[20,30]`.\n",
322-
"- Because the first argument this function gets is the intervention itself, we can stretch the rules a little bit and name this variable `self` -- as if we're defining a new method for the intervention, even though it's actually just a function.\n",
323-
"- We want to keep track of a few things with this intervention -- namely when it toggles on and off, and whether or not it's active. Since the intervention is just an object, we can add these attributes directly to it.\n",
324-
"- Finally, this example shows some of the flexibility in how interventions are plotted -- i.e. shown in the legend with a label and with a custom color."
323+
"\n",
324+
"* The simplest change is just that we're supplying `days=inf_thresh` instead of a number or list. If we had `def inf_thresh(interv, sim): return [20,30]` this would be the same as just setting `days=[20,30]`.\n",
325+
"* Because the first argument this function gets is the intervention itself, we can stretch the rules a little bit and name this variable `self` -- as if we're defining a new method for the intervention, even though it's actually just a function.\n",
326+
"* We want to keep track of a few things with this intervention -- namely when it toggles on and off, and whether or not it's active. Since the intervention is just an object, we can add these attributes directly to it.\n",
327+
"* Finally, this example shows some of the flexibility in how interventions are plotted -- i.e. shown in the legend with a label and with a custom color."
325328
]
326329
},
327330
{

0 commit comments

Comments
 (0)