Skip to content

An example of wrapping a model written with AgentPy with a Python BMI

License

Notifications You must be signed in to change notification settings

csdms/bmi-example-agentpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Model Interface Test

bmi-example-agentpy

An example of using the Python mappings for the CSDMS Basic Model Interface (BMI) to wrap a model written with AgentPy, an open-source library for developing and analyzing agent-based models in Python.

Overview

This is an example of implementing a BMI for a statistical model of diffusion on a uniform rectangular plate. The model, DiffusionModel, is written with AgentPy.

This repository is organized with the following directories:

diffusion
Source for the model and a BMI implementation for the model
examples
Python scripts and Jupyter Notebooks that demonstrate how to run the model standalone and through its BMI
tests
Tests that cover the model and its BMI

Build/Install

This example can be built and installed on Linux, macOS, and Windows.

We recommend setting up a virtual environment--e.g., through venv or conda--to install the packages required for this example.

Use pip to install this example and the dependencies needed to run the sample notebooks.

pip install -e ".[examples]"

Use

Try the example notebooks and scripts in the examples directory.

Acknowledgments

This work is supported by the U.S. National Science Foundation under Award No. 2148762, Collaborative Research: Facility: CSDMS: Engaging a thriving community of practice in Earth-surface dynamics.

The AgentPy package:

Foramitti, J., (2021). AgentPy: A package for agent-based modeling in Python. Journal of Open Source Software, 6(62), 3065, https://doi.org/10.21105/joss.03065

About

An example of wrapping a model written with AgentPy with a Python BMI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages