Skip to content

The behavioral model of a data-driven agent-based COVID-19 simulation

License

Notifications You must be signed in to change notification settings

A-Practical-Agent-Programming-Language/Normative-COVID-19-Simulation

Repository files navigation

DOI GitHub GitHub release (latest by date)

A large-scale data-driven agent-based simulation model where individual agents reason about their beliefs, objectives, trust in government, and the norms imposed by the government to model the public's response to behavioral interventions to mitigate the spread of novel diseases. The agents' internal and external attitudes are based on actual data concerning daily activities of individuals, their political orientation, and norms being enforced in the US state of Virginia.

Experiment

The agents' behavior and the disease propagation probabilities were calibrated independently, by minimizing the Root Mean Square Error (RMSE) between simulation outcome and results observed in the real world in the period between March 1 and June 28 2020 using Nelder-Mead minimization.

After calibration, an experiment was conducted to understand the relative impact of the 9 executive orders (EOs) issued in that period on the spread of COVID-19 through 10 counterfactual runs E0 ... E9. In each experiment Ei, only the first i EOs were activated in the corresponding simulation. For example, in E0, no behavioral interventions took place, in E1, only the first intervention (Encouraging telework and allow residents of Virginia to wear facial masks) were activated (See the norm schedule for details).

These are the Susceptible-Infected-Recovered (SIR) plots for these experiments, showing the size of the outbreak in each experiment.

SIR plot for E<sub>0</sub> SIR plot for E<sub>1</sub>
SIR plot for E<sub>2</sub> SIR plot for E<sub>3</sub>
SIR plot for E<sub>4</sub> SIR plot for E<sub>5</sub>
SIR plot for E<sub>6</sub> SIR plot for E<sub>7</sub>
SIR plot for E<sub>8</sub> SIR plot for E<sub>9</sub>

In conjunction with PanSim, which acts both as the environment and disease progression simulation for the agents and as the simulation distribution framework, we have been able to run simulations employing the full population (~8 million agents) of Virginia.

Invoking program

See manual.txt for command line arguments, or call --help when running the application Note the flag -c (or --connect-pansim) should be used to share data with the PanSim simulation environment, which is the required configuration when modeling disease progression, and also allows distributing the simulation across multiple compute nodes.

We have provided a library containing many utilities for automated repeated runs of the simulation (e.g., for calibration, running experiments, sensitivity analysis) at https://github.com/A-Practical-Agent-Programming-Language/covid-19-simulation-utilities

The library is a work in progress, so checkout the v2.0.0 version tag to ensure compatibility with the version of this repository. Also note not all parts of the code are strictly documented. Running with the -h flag does show manual pages for the core parts of the code. The scripts directory contains stand-alone scripts that may be helpful for analysis. The library comes with absolutely no warranties.

In the resource directory, an example configuration TOML file is given. Any parameter (or county) can be uncommented to ignore it. For repeatable simulations, make sure to specify the global seed, and a seed for each county (uncommented in the example configuration). The files referenced in the configuration TOML file are explained in our description of the synthetic population we use

The JAR file is automatically generated and placed in the target directory. In order to use the JAR file, make sure to use the Java version also used by Maven, and call

$ java -jar sim2apl-episimpledemic-simulation-1.0-SNAPSHOT-jar-with-dependencies.jar [args]

For setting up and running PanSim, see the (PanSim) repository.

Build instructions

This section describes how to set up the code in your own development environment.

Prerequisites

This manual assumes Maven is installed for easy package management

Prerequisites:

Sim-2APL

Download Sim-2APL from Github, and, to ensure compatibility, checkout the v2.0.0 version tag.

$ git clone https://github.com/A-Practical-Agent-Programming-Language/Sim-2APL.git sim-2apl
$ cd sim-2apl
$ git checkout v2.0.0

Install the package using Maven:

$ mvn -U clean install

This will automatically add the library to your local Maven repository, so no further action is required here.

This library

Clone the master branch of this library and install with Maven, or open in an IDE with Maven support (e.g. VSCode, Idea Intellij, Eclipse or NetBeans) and let the IDE set up the project.

$ git clone https://github.com/A-Practical-Agent-Programming-Language/Normative-COVID-19-Simulation.git
$ cd COVID-19-simulation
$ git checkout v2.0.0
$ mvn -U clean install

The application requires various arguments, either when invoked from the command line or when used in an IDE. See manual.txt for more information, or invoke the program with the argument --help

An example of a configuration file (using the TOML language) is given in src/main/resources/config.toml

License

This library contains free software; The code can be freely used under the Mozilla Public License 2.0. See the license file for details. This code comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.`