Skip to content

Add: Fast-Spreading Pathogen Model with Quarantine Compliance Mechanics #356

@Syn-Eon

Description

@Syn-Eon

Summary

A SIR-based pathogen outbreak model with no exposed/latency period —
inspired loosely by Plague Inc, though the goal here is containment
rather than world domination. The model simulates how quarantine(lockdown)
compliance rates at the population level affect outbreak dynamics, analyzing
changes in infection, death and immunity rates.

Motivation

Started building this after the Boltzmann tutorial felt too simple and
I wanted to model something with real behavioural stakes. It was inspired
from an old game called Plague Inc, although the idea is completely different —
thats where it began to take its shape. Mesa-examples currently has
nothing that shows:

  • Individual agentic behavioural response to disease outbreak (flee vs ignore quarantine)
  • A two-threshold system for quarantine analysis in ABM
  • Agent flee mechanics based on distance maximisation during quarantine

The existing virus_antibody model works at the cellular/biological level.
This one sits at the population level - citizens making movement decisions
in response to a spreading outbreak, driven by behaviour rather than
policy intervention.

What This Model Demonstrates

  • Two-threshold quarantine system - quarantine triggers when infected
    count exceeds an upper threshold and lifts only when it drops below a
    lower one, this prevents quarantine to be removed the moment someone recovers which is
    not realistic and which occurs with a single
    threshold variable.

  • Compliance rate - a configurable fraction of citizens actually follow
    quarantine orders, modelling real-world partial adherence. The rest
    (shown as squares) keep moving freely against orders.

  • Flee behaviour - compliant healthy agents use Manhattan distance
    maximisation to move away from infected agents during quarantine.

  • Infected agents freeze - simulating a government isolating an infected
    zone. Non-compliant agents ignore this entirely.

  • Immunity/recovery - agents recover to full immunity after 10 steps(for now)
    of being infected with a 1% death probability. Dead agents remain
    on the grid as a visual indicator of outbreak severity.

  • Outcomes - compliance rate is the main variable it determines at what level
    the quarantine actually contain the outbreak also it can be to analyze how does changing
    population size affect infection and death rates as healthy agents
    have more room to flee from quarantined zones.

Research Questions

  • At what quarantine compliance rate does behavioural policy step in to intervene
    meaningfully to slow down a fast-spreading pathogen?
  • How does population density interact with flee behaviour i.e do agents
    have enough room to actually escape?
  • What happens when the quarantine threshold is set too high and triggers
    too late or the lower threshold is too low for the virus starts to spread again?

Mesa Features Used

  • MultiGrid
  • DataCollector
  • SolaraViz with make_space_component and make_plot_component
  • AgentSet.do()
  • Custom Solara components for live quarantine status indicator

Mesa Version

3.5

PR

Will follow shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions