Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.08 KB

README.md

File metadata and controls

53 lines (37 loc) · 2.08 KB

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