{"id":26183002,"url":"https://github.com/csdms/bmi-example-agentpy","last_synced_at":"2025-07-08T12:39:00.624Z","repository":{"id":280903017,"uuid":"935077660","full_name":"csdms/bmi-example-agentpy","owner":"csdms","description":"An example of wrapping a model written with AgentPy with a Python BMI","archived":false,"fork":false,"pushed_at":"2025-03-05T22:48:43.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-05T23:28:50.519Z","etag":null,"topics":["agentpy","bmi","csdms","python"],"latest_commit_sha":null,"homepage":"https://bmi.csdms.io","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-18T21:40:20.000Z","updated_at":"2025-03-05T22:48:46.000Z","dependencies_parsed_at":"2025-03-05T23:29:03.475Z","dependency_job_id":"80e35581-c025-4e06-8efd-d538f6b03e8e","html_url":"https://github.com/csdms/bmi-example-agentpy","commit_stats":null,"previous_names":["csdms/bmi-example-agentpy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-agentpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-agentpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-agentpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-example-agentpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/bmi-example-agentpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243125690,"owners_count":20240274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentpy","bmi","csdms","python"],"created_at":"2025-03-11T22:33:41.957Z","updated_at":"2025-07-08T12:39:00.617Z","avatar_url":"https://github.com/csdms.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Basic Model Interface](https://img.shields.io/badge/CSDMS-Basic%20Model%20Interface-green.svg)](https://bmi.csdms.io/)\n[![Test](https://github.com/csdms/bmi-example-agentpy/actions/workflows/test.yml/badge.svg)](https://github.com/csdms/bmi-example-agentpy/actions/workflows/test.yml)\n\n# bmi-example-agentpy\n\nAn example of using the\n[Python mappings](https://github.com/csdms/bmi-python)\nfor the CSDMS [Basic Model Interface](https://bmi.csdms.io) (BMI)\nto wrap a model written with [AgentPy](https://agentpy.readthedocs.io),\nan open-source library for developing and analyzing agent-based models in Python.\n\n## Overview\n\nThis is an example of implementing a BMI for a statistical model of diffusion\non a uniform rectangular plate.\nThe model, [DiffusionModel](./diffusion/diffusion_model.py),\nis written with AgentPy.\nIn the model,\na configurable number of agents are placed at a location on the plate.\nIn each time step,\nthe agents are randomly moved zero to one grid cell,\nwith the probability of moving modified by a pseudo-diffusivity.\nThe number of agents is conserved,\nso if one reaches a boundary,\nit is reflected back onto the plate.\n\nThis repository is organized with the following directories:\n\n\u003cdl\u003e\n    \u003cdt\u003ediffusion\u003c/dt\u003e\n        \u003cdd\u003eSource for the model and a BMI implementation for the model\u003c/dd\u003e\n    \u003cdt\u003eexamples\u003c/dt\u003e\n        \u003cdd\u003ePython scripts and Jupyter Notebooks that demonstrate how to run the model standalone and through its BMI\u003c/dd\u003e\n    \u003cdt\u003etests\u003c/dt\u003e\n        \u003cdd\u003eTests that cover the model and its BMI\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Build/Install\n\nThis example can be built and installed on Linux, macOS, and Windows.\n\nWe recommend setting up a virtual environment--e.g., through `venv` or `conda`--to install the packages required for this example.\n\nUse `pip` to install this example and the dependencies needed to run the sample notebooks.\n```bash\npip install -e \".[examples]\"\n```\n\n## Use\n\nTry the example notebooks and scripts in the [examples](./examples/) directory. \n\n## Acknowledgments\n\nThis work is supported by the U.S. National Science Foundation under Award No.\n[2148762](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2148762),\n*Collaborative Research: Facility: CSDMS: Engaging a thriving community of practice in Earth-surface dynamics*.\n\nThe AgentPy package:\n\n\u003e 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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-agentpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fbmi-example-agentpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-example-agentpy/lists"}