Skip to main content

PythonABM

Documentation Status PyPI version License GitHub

PythonABM makes complex agent-based modeling (ABM) simulations in Python accessible by providing an efficient base framework for constructing ABMs. More information on PythonABM can be found below.

Installation

Assuming you have Python 3.7-3.10, the latest version of the PythonABM library can be installed using the following command.

pip install pythonabm

PythonABM can also be built from source once downloaded from GitHub.

python setup.py install

Running a simulation

Calling the start() method in the Simulation class will launch the ABM platform and run it as follows. (See the example.py script as a template for building a simulation.) A text-based UI will prompt for a name of the simulation and a corresponding mode (described below).

  • 0: New simulation
  • 1: Continue a previous simulation
  • 2: Convert a previous simulation’s images to a video
  • 3: Archive (ZIP) a previous simulation’s outputs

To avoid the text-based UI, the name and mode can be passed at the command line by using flags (without the parentheses). Note: the simulation file does not have to be named “main.py”.

python main.py -n (name) -m (mode)

When continuing a previous simulation (mode=1), the ABM will prompt for the updated end-step number, though this can be passed like above.

python main.py -n (name) -m (mode) -es (end-step)

NVIDIA CUDA support

For GPU parallelization, PythonABM requires a CUDA compatible GPU and NVIDIA’s CUDA toolkit. If you don’t have the toolkit, download the toolkit either directly from NVIDIA here or with Anaconda's conda command show below.

conda install cudatoolkit

Metadata

Release files for pythonabm 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythonabm 0.3.3
File Size Uploaded
pythonabm-0.3.3.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pythonabm 0.3.3
File Interpreter ABI Platform
pythonabm-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 34.2 kB

Release files / pythonabm-0.3.3.tar.gz

Download URL pythonabm-0.3.3.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
22151249f6ca18928d1c2a86b2adca16d4e06ba0d5d466f64a7672ef323a06c2
BLAKE2b-256 checksum
How to use checksums
669ec4baca1af0830f1d29d2d5c3824ecebcd7d0971c7726221299e57eac4437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / pythonabm-0.3.3-py3-none-any.whl

Download URL pythonabm-0.3.3-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d1ebf506fcbb603c1bb40fbd05baa50809d724c85d8da28f24b084e89189180
BLAKE2b-256 checksum
How to use checksums
decaf104de0f5761266ecfe3a1a49bdfbc00a6eabcb69adbe8e3c5904ce12fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page