The 2.2.0 release of the Mesa library introduces several updates and new features for managing and scheduling agents and modelling the environment, along with an experimental release policy aimed at enhancing development speed and community feedback. Below are key highlights of the new (experimental) features in this release. Mesa 2.2.0 supports Python 3.9+.
Despite the minor version number, this is one of our biggest releases yet.
This release introduces an experimental feature policy aimed at accelerating development and gathering community feedback. Features like #1890, #1898, and #1916 are marked as experimental under this policy.
Policy overview:
Experimental features can be added or changed in any release, even patch releases.
They don’t need a diligent review for every change, allowing for quicker development cycles.
Community feedback is encouraged through discussion threads.
Native support for multiple Agent types (PR #1894)
This update introduces a agents variable to the Mesa Model class, offering a first step in supporting multiple agent types as first class citizens. Each Model is now initialized with an self.agents variable (an AgentSet) in which all the agents are tracked. You can now always ask which agents are in the model with model.agents. It's the foundation which will allow us to solve problems with scheduling, data collection and visualisation of multiple agent types in the future.
The new AgentSet class encapsulates and manages collections of agents, streamlining the process of selecting, sorting, and applying actions to groups of agents.
Key features:
Flexible and efficient agent management and manipulation.
Methods like select, shuffle, sort, and do for intuitive operations.
Example:
# Applying a method to each agent
model.agents.do('step')
The introduction of PropertyLayer and the extension of SingleGrid and MultiGrid classes to support cell properties mark a significant enhancement in Mesa's environmental modeling capabilities. It allows to add different layers of variables to grids, that can be used to represent spatial environmental properties, such as elevation, pollution, flood levels or foliage.
Key features:
Efficient management of environmental properties like terrain types and resources.
Dynamic interaction between agents and their environment.
Fast modification and selection of cells based on one or multiple properties
This release incorporates several majors changes to Mesa. Notably, this provides two experimental features. (1) It reimagines Mesa's agent handling to have agents in the model class and store them in sets (you may submit feedback at https://github.com/projectmesa/mesa/discussions/1919). The intent is to make Mesa more efficient and give users more control over agent scheduling to allow for innumerable options. (2) It adds property layer and property grid so users can layer on multiple grids making Mesa and Geo-Mesa more similar (you may submit feedback at https://github.com/projectmesa/mesa/discussions/1932).
This release has some critical fixes to JupyterViz/Solara frontend to prevent
flickering and improve the display of the jupyter plots. It also has
improvements to datacollection and the documentation.
Improvements
datacollection: check if model reporters is a partial function (#1872)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps mesa from 1.1.1 to 2.2.0.
Release notes
Sourced from mesa's releases.
... (truncated)
Changelog
Sourced from mesa's changelog.
... (truncated)
Commits
c2f091d
maintenance: updates for 2.2.0 released2eb502
Fix import formatting manuallye57faa6
Apply ruff --fix .d1e7bd1
Apply pyupgrade --py39-plus4ef37ce
Drop support for Python 3.80bd4429
space: Implement PropertyLayer and _PropertyGrid (#1898)811b605
update init docstrings to reflect agents kwarg75ee7c3
Update time.pyff6a73a
remove added back in4c69792
Fix for remove_warningDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show