Skip to main content

An Agent-Based Model Framework for Python

Project description


Pied Piper

An Agent-Based Model Framework for simulating society resilience

Python Version PyPI Version GitHub License: MIT

KeePied Piper of HamelinpDelta

Introduction

Whenever environments condition change for species, the living entities start to react to the new new condition. This projects aims at modeling the Alaskan communities that are heavily affected by the global warming.

Installation

Install the package using pip:

pip install piperabm

Usage

Once a Model instance is created, it automatically includes interconnected infrastructure and society components. The simulation is designed to explore how changes in one domain, such as agent behavior or infrastructure layout, affect the other over time. This interdependence forms the core of agent-based modeling within PiperABM.

import piperabm as pa

model = pa.Model()
model.infrastructure.add_street(pos_1=[0, 0], pos_2=[-60, 40], name='road')
model.infrastructure.add_home(pos=[5, 0], id=1, name='home 1')
model.infrastructure.add_home(pos=[-60, 40], id=1, name='home 2')
model.infrastructure.bake()
model.society.generate(num=2, gini_index=0.4, average_balance=1000)
model.run(n=100, step_size=60)

For more usage examples, refer to the examples folder in the project repository.

Supported Python Versions

It has been tested and verified to work with Python versions 3.10 to 3.13. While it is expected to work with older versions of Python (given compatible dependency versions), these environments have not been tested and are not officially supported.

Contributing

Contributions are welcome! Feel free to:

  • Report issues.
  • Submit feature requests.
  • Create pull requests.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Project details


Download files

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

Source Distribution

piperabm-0.1.1.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

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

piperabm-0.1.1-py3-none-any.whl (95.8 kB view details)

Uploaded Python 3

File details

Details for the file piperabm-0.1.1.tar.gz.

File metadata

  • Download URL: piperabm-0.1.1.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for piperabm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4061f21c0fba48cd038196a2c42eae5132b618bde807fc5103ec3f82f3518d76
MD5 7b7bec8548834007cedb294cba2e81dd
BLAKE2b-256 ddc3959075777746dff19148b6c24a3c0fd990b98c327ca173a8ec5b962038a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for piperabm-0.1.1.tar.gz:

Publisher: pypi-release.yml on cmudrc/pied-piper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piperabm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: piperabm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 95.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for piperabm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b05d2940e64608fba56f4b8759f9ff9bc00d2f44b9b6d84e6d166827e0c6393
MD5 f6c03497b85ccd02d87ed1804f03979a
BLAKE2b-256 25a246891845ff204100a2ab46acb59a3515bd2594c6c7c3e12646255f15e2a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for piperabm-0.1.1-py3-none-any.whl:

Publisher: pypi-release.yml on cmudrc/pied-piper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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