Tutorial 3: Interventions
This tutorial adds two interventions that represent a standard malaria control package: treatment-seeking care and insecticide-treated nets (ITNs). It introduces the campaign file and shows how to compare scenarios with and without interventions.
File: tutorials/tutorial_3_interventions.py
The campaign file
The campaign file defines what interventions to distribute, to whom, and when. In emodpy-malaria
a build_campaign() function constructs this file and is passed to EMODTask via
campaign_builder=:
Interventions
build_campaign() adds the two interventions using emodpy-malaria helper functions:
Treatment seeking covers people who develop new clinical cases (70% coverage) and severe cases (90% coverage). The drug defaults to artemether-lumefantrine, the standard first-line therapy. Both interventions start on day 365, giving the population one year to reach a baseline before any control begins.
ITN distribution distributes insecticide-treated nets to 50% of the population on day 365.
receiving_itn_broadcast_event causes EMOD to fire a Received_ITN event for each person
who receives a net, which can be used to trigger follow-up events in more complex campaigns.
Comparing scenarios
Two boolean flags at the top of the script control which interventions are active:
Toggle these and re-run to compare each intervention separately against the no-intervention baseline. Each combination writes to its own output directory:
use_treatment_seeking |
use_itn |
Output directory |
|---|---|---|
| True | True | tutorial_3_results |
| True | False | tutorial_3_results_ts |
| False | True | tutorial_3_results_itn |
| False | False | tutorial_3_results_no_interventions |
Plotting with a baseline reference
plot_results() looks for tutorial_2_results/ from the previous tutorial and, if found,
uses it as the no-intervention reference (plotted in red) so the intervention impact is
visible directly. If you are starting here without having run Tutorial 2, the plot will still
work — the reference line simply will not appear.
Treatment seeking reduces the fraction of people infected; ITNs reduce the daily biting rate and vector population. Running each combination separately lets you see each effect in isolation.
Example output
Both interventions (use_treatment_seeking = True, use_itn = True)
Treatment seeking only (use_treatment_seeking = True, use_itn = False)
ITN only (use_treatment_seeking = False, use_itn = True)
No interventions (use_treatment_seeking = False, use_itn = False)
Next
Tutorial 4 introduces seasonal transmission by replacing the constant larval habitat with a LINEAR_SPLINE.



