Skip to main content

SABCOM is an open source, easy-to-use, spatial network, agent-based, model that can be used to simulate the effects of different lockdown policy measures on the spread of the Covid-19 virus in several (South African) cities.

Project description

License: MIT Python application

The Spatial Agent-Based Covid-19 Model (SABCOM)

SABCOM is an open source, easy-to-use-and-adapt, spatial network, multi-agent, model that can be used to simulate the effects of different lockdown policy measures on the spread of the Covid-19 virus in several (South African) cities.

Installation

Using Pip

  $ pip install sabcom

or, alternatively

  $ pip3 install sabcom

Manual

  $ git clone https://github.com/blackrhinoabm/sabcom
  $ cd sabcom
  $ python setup.py install

Usage

The application can be used to simulate the progression of Covid-19 over a city of choice. Before running the application, the user needs that make sure that all dependencies are installed. This can be done by installing the files in the requirements.txt file on Github or on your system if you did a manual installation. Given that you are in the folder that contains this file use:

  $ python -m pip install -r requirements.txt

Next, there are two options. Simulating the model (using an existing initialisation) or initialising a new model environment that can be used for the simulation.

Simulation

Five arguments need to be provided to simulate the model: a path for the input folder (-i), a path for the output folder (-o), a seed (-s), a data output mode (-d), and a scenario (-sc).

simulate -i <input folder path> -o <output folder path> -s <seed> -d <data output mode> -sc <scenario>

For example, say you want to simulate the model using input folder example_data, output folder example_data/output_data, seed 2, data output mode csv-light, and scenario no-intervention. First, make sure that all the files and folders are in your current location. Next, you type in the command line:

$ sabcom simulate -i example_data -o example_data/output_data -s 2 -d csv-light -sc no-intervention

This will simulate a no_intervention scenario for the seed_2.pkl initialisation. input files for the city of your choice, and output a csv light data file in the specified output folder.

Note how this assumes that there is already an initialisation file. If this is not the case, sabcom can be used to produce one given the input files.

Initialisation

initialise <input folder path> <seed number>

If an initialisation file is not present, you can create one using the sabcom initialise function. For example, if you want to create an initialisation with the files in input folder (assumed to be in your current working directory) example_data, Monte Carlo seed 3, the following command can be used:

$ sabcom initialise -i example_data -s 3

As a rule, creating a model initialisation takes much longer than simulating one.

Requirements

The program requires Python 3, and the packages listed in the requirements.txt file.

Website and Social Media

https://sabcom.co.za

https://twitter.com/SABCOM5

Disclaimer

This software is intended for educational and research purposes. Despite best efforts, we cannot fully rule out the possibility of errors and bugs. The use of SABCoM is entirely at your own risk.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sabcom-0.15a0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sabcom-0.15a0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file sabcom-0.15a0.tar.gz.

File metadata

  • Download URL: sabcom-0.15a0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.8

File hashes

Hashes for sabcom-0.15a0.tar.gz
Algorithm Hash digest
SHA256 ddb7eb135a6b81bac6df321d58a99172cba14f8b2988ea3e8ef1067c52a25ddc
MD5 3c23a30c5c95d4918c70fd20c24bd66a
BLAKE2b-256 10b91fcd5f9b4e284b6f58aaddb30837ddbc795e70b3e484d1c896adec9e2beb

See more details on using hashes here.

File details

Details for the file sabcom-0.15a0-py3-none-any.whl.

File metadata

  • Download URL: sabcom-0.15a0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.8

File hashes

Hashes for sabcom-0.15a0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c67f744f3ff13caaad43ee087625c14d605d4fdf4a08a9b6035a38a54fd9374
MD5 a4745f163aba9d5f4e1e46a1b52b8270
BLAKE2b-256 807595f8b406300bba4e9595bcd987c5fa62cf1b180a77173cfa07e4d33e1421

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page