MemoSimagent-based modeling studio

Library/Health and life sciences

Non pharmaceutical interventions and behavior

This is an illustrative, uncalibrated agent-based model of how non-pharmaceutical interventions (NPIs) — specifically mask-wearing and physical distancing — affect the spread of an infectious disease in a bounded population.

Run in your browser Download .nlogox Get MemoSim verified in NetLogo Web · or open in MemoSim
Read the assumptions first. The model itself says it is illustrative and uncalibrated. Treat its output as a demonstration of a mechanism, not an estimate of a real system.

Overview

This is an illustrative, uncalibrated agent-based model of how non-pharmaceutical interventions (NPIs) — specifically mask-wearing and physical distancing — affect the spread of an infectious disease in a bounded population. It is a teaching tool, not a scientifically validated prediction.

Mechanism

  • People (turtles) move randomly on a toroidal (wrapping) 2D grid.
  • Each person is in one of four states: Susceptible (yellow), Exposed (orange), Infected (red), Recovered (green).
  • Transmission: an infected person can infect a susceptible neighbor with a probability that is reduced by the NPI coverage rates.
  • NPIs:
  • - Mask coverage (0–1): fraction of the population wearing masks. Each mask reduces transmission by up to 50%. - Distancing coverage (0–1): fraction of the population practicing physical distancing. Each distancing person reduces transmission by up to 60%.

  • State transitions:
  • - Susceptible → Exposed: on contact with an infected person (probability = transmission-prob × (1 − mask-effect) × (1 − distancing-effect)). - Exposed → Infected: after incubation-days ticks. - Infected → Recovered: after infectious-days ticks. - Recovered: immune (no further infection).

Controls

| Parameter | Range | Default | Meaning | |---|---|---|---| | population-size | 50–300 | 150 | Number of people in the world | | initial-infected | 1–20 | 3 | Number of people seeded as exposed at start | | transmission-prob | 0.05–0.5 | 0.2 | Base per-contact infection probability | | mask-coverage | 0–1 | 0.5 | Fraction of people wearing masks | | distancing-coverage | 0–1 | 0.3 | Fraction of people distancing | | incubation-days | 1–10 | 3 | Ticks from exposure to becoming infectious | | infectious-days | 1–14 | 5 | Ticks a person is infectious before recovering |

Monitors & Plots

  • Monitors: counts of Susceptible, Exposed, Infected, Recovered, and total cumulative infections.
  • Plot: "Epidemic curve" shows the time series of Susceptible, Infected, and Recovered counts.

Assumptions & Limitations

  • The model is illustrative and uncalibrated: parameters are not fitted to any real disease.
  • Transmission is purely spatial (8-neighborhood); there is no social network structure.
  • NPIs are modeled as uniform population-level coverage, not individual behavior.
  • There is no waning immunity, no variants, no hospitalization, and no death.
  • Movement is random-walk; no clustering, no household structure.
  • The world is small (40×40 patches) and the population is bounded (≤300).
  • Results are stochastic; run multiple times for a sense of variability.

How to use

1. Press Setup to initialize the world. 2. Press Go to start the simulation (it runs continuously). 3. Adjust sliders while running to see how NPI coverage changes the epidemic trajectory. 4. Watch the epidemic curve plot and monitors to compare scenarios.

Field
Health and life sciences
Model file
Non-pharmaceutical-interventions-and-behavior-6efded1e5f42.nlogox · 42 KB
Controls
population-size, initial-infected, transmission-prob, mask-coverage, distancing-coverage, incubation-days, infectious-days
Reporters
mask-effect, distancing-effect
Procedures
setup, go, mask-effect, distancing-effect
Experiment
none pinned in this file
Documentation
6/7 · 405 words in the Info tab