Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.
This release contains fixes, and several improvements and new features to the JupyterViz/Solara frontend. It's a patch release instead of a minor release because the JupyterViz frontend is still considered experimental.
Improvements
Solara/JupyterViz
Refactors
Fixes
This release improves the introductory and visualization tutorial. Ensures both are Google Colab compatible with working badges.
Changes:
This release creates mesa.experimental
namespace, this solves the issue that PyPI release will not allow git-based install.
Users should read the Mesa 2.0.0 release note, as this contains the details about the breaking changes and other major changes that were part of Mesa 2.0 release.
The mesa.experimental
currently consists of JupyterViz
, a new visualization framework that can run on a Jupyter notebook as well as standalone.
Changes:
mesa.experimental
namespace #1736Special notes
Mesa 2.0 includes:
* an experimental pure python user interface/ visualization that is also jupyter compatible please see the visualization tutorial
_
* several breaking changes that provide significant improvements to Mesa.
.. _visualization tutorial: https://mesa.readthedocs.io/en/latest/tutorials/visualization_tutorial.html Breaking Changes:
coord_iter
to return (content,(x,y))
instead of (content, x,y)
; this reduces known errors of scheduler to grid mismatch #1566, #1723get_neighbors
to get_neighborhood
; improves performance #1542Grid.get_neighborhood
#1524find_empty()
: convert this to move_to_empty()
num_agents
: removed parameter from move_to_empty()
position_agent()
: convert this to place_agent
neighbor_iter()
: convert this to iter_neighborhood()
class BatchRunner
and class BatchRunnerMP
: convert these to batch_run()
batch_run() example
_ if you would like to see an an implementation.UserSettableParameter(['number', 'slider','checkbox', 'choice', 'StaticText'])
: convert to NumberInput
, Slider
, CheckBox
, Choice
, StaticText
visualization example
_ if you would like to see an implementation... _batch_run() example: https://github.com/projectmesa/mesa-examples/blob/db2ec0383eb3b1868e91c828101e84cce97bbb63/examples/bank_reserves/batch_run.py#L188-L221 .. _visualization example: https://github.com/projectmesa/mesa-examples/blob/db2ec0383eb3b1868e91c828101e84cce97bbb63/examples/boltzmann_wealth_model/boltzmann_wealth_model/server.py#L25-L32.)
New Features:
StageActivation
#1709ChartModule
can have dynamically named properties #1685Improvements
get_heading
for toroidal space #1686const chart
for var chart
in advanced tutorial #1679Taylor release v1.2.0.
This release fixes https://github.com/projectmesa/mesa/issues/1461 where custom user-specified portrayal images don't load in the visualization server.
Full Changelog: https://github.com/projectmesa/mesa/compare/v1.1.0...v1.1.1