Model-M: An agent-based epidemic model of a middle-sized municipality

Luděk Berec, Tomáš Diviák, Aleš Kuběna, René Levı́nský, Roman Neruda, Gabriela Suchopárová, Josef Šlerka, Martin Šmíd, Ján Trnka, Vít Tuček, Petra Vidnerová, Milan Zajíček, František ZapletalmedRxiv 2021 · DOI

Abstract

This report presents a technical description of Model-M, an agent-based epidemic model of a particular middle-sized municipality. We have developed a realistic model with 56,000 inhabitants and 2.7 million social contacts. These form a multi-layer social network that serves as the base of our epidemic simulation. The disease is modeled by an extended SEIR model with parameters fitted to real epidemic data for the Czech Republic. The model is able to simulate a whole range of non-pharmaceutical interventions on an individual level, such as protective measures, physical distancing, testing, contact tracing, isolation, and quarantine.

Introduction: Beyond Homogeneous Models

Early in the COVID-19 pandemic, many epidemiological models relied on "stylized" network structures or simple compartmental models (SIR/SEIR) that treated populations as homogeneous masses. While useful for broad predictions, these models struggle to answer specific policy questions regarding targeted interventions: What happens if we close restaurants but keep schools open? How effective is contact tracing if people only remember 50% of their casual encounters?

Model-M addresses this gap by building a high-resolution, data-driven "digital twin" of Hodonín county in the Czech Republic. By reflecting the actual geography, economic activity, and social behavior of a real population, it provides a solid basis for evidence-based policy testing.

Methodology: The Extended SEIR Framework

The core of Model-M is an SEIRS model expanded to include states for presymptomatic, asymptomatic, and "false symptomatic" individuals (those with symptoms but not infected by COVID-19). A critical feature is the inclusion of "detected" versions of these states (denoted with a superscript $d$), which allows the model to simulate the impact of testing, quarantine, and isolation policies.

The extended SEIR model state transitions, including detected (superscript 'd') states.

The model operates on a multi-layer contact graph with 30 distinct layers representing interaction contexts such as households, work sectors, school classes, shopping, and public transport. To ensure realistic contact volumes, the researchers used a "censored Poisson" approach, recognizing that physical space and social habits limit the daily contacts of an individual regardless of the total group size in a location.

Data and Parameters

The model is built on a foundation of local and global data. Baseline demographics (age, gender, household structure) were derived from the 2011 Czech Census. Sociological surveys from 2019-2020 were used to adjust agent behavior, such as mask-wearing and frequency of social visits. Epidemiological parameters, such as incubation periods and the duration of infectiousness, were drawn from meta-analyses of early 2020 COVID-19 data to ground the simulation in empirical reality.

Key epidemiological parameters used in Model-M, sourced from early COVID-19 literature.

Key Insights and Results

Model-M successfully replicated the dynamics of the COVID-19 "first wave" in the Czech Republic. By splitting "work" into specific sectors (e.g., Agriculture, Industry, IT), the model can simulate sector-specific lockdowns, revealing that certain industries contribute disproportionately to the total "infectious volume."

Furthermore, the model explicitly tracks the ratio between all active cases and detected cases. This provides crucial visibility into the "hidden" epidemic of asymptomatic spreaders that traditional surveillance might miss. In a clever validation step, the researchers checked their geographic preference model by comparing simulated travel patterns to the actual capacity of the local bus and train network.

Conclusion and Future Work

While the model is limited by the age of its census data (2011) and its geographic boundary (treating the municipality as a semi-isolated system), its modular nature allows for easy adaptation. The entire implementation is written in Python and is available as open-source software, enabling other researchers to swap out contact graphs or transition matrices to model different regions or infectious diseases.

Model-M is available at: www.github.com/epicity-cz/model-m/releases

Summary updated

Abstract

Abstract This report presents a technical description of our agent-based epidemic model of a particular middle-sized municipality. We have developed a realistic model with 56 thousand inhabitants and 2.7 millions of social contacts. These form a multi-layer social network that serves as a base of our epidemic simulation. The disease is modeled by our extended SEIR model with parameters fitted to real epidemics data for Czech Republic. The model is able to simulate a whole range of non-pharmaceutical interventions on individual level, such as protective measures and physical distancing, testing, contact tracing, isolation and quarantine. The effect of government-issued measures such as contact restrictions in different environments (schools, restaurants, vendors, etc.) can also be simulated. The model is implemented in Python and is available as open source at: www.github.com/epicity-cz/model-m/releases
BibTeX
@misc{berec2021model,
  author = {Luděk Berec and Tomáš Diviák and Aleš Kuběna and René Levı́nský and Roman Neruda and Gabriela Suchopárová and Josef Šlerka and Martin Šmíd and Ján Trnka and Vít Tuček and Petra Vidnerová and Milan Zajíček and František Zapletal},
  title = {{Model-M: An agent-based epidemic model of a middle-sized municipality}},
  year = {2021},
  doi = {10.1101/2021.05.13.21257139},
  howpublished = {medRxiv},
}
Figure