-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voronoi Tesselation based Discrete Space #2084
base: main
Are you sure you want to change the base?
Commits on Mar 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fa8c15d - Browse repository at this point
Copy the full SHA fa8c15dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 301a5ff - Browse repository at this point
Copy the full SHA 301a5ffView commit details
Commits on Mar 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a8a17ab - Browse repository at this point
Copy the full SHA a8a17abView commit details
Commits on Mar 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7e4d79e - Browse repository at this point
Copy the full SHA 7e4d79eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a892ee - Browse repository at this point
Copy the full SHA 8a892eeView commit details
Commits on Jul 15, 2024
-
warn if placing already placed agent
While it might be desired in a specific model to have the same agent be placed in multiple spots simultaneously, the typical use case is that one agent has one position at every given moment. This commit decorates the place_agent() method in a way that it emits a warning when called with an agent which already has a location. Fixes: projectmesa#1522
Configuration menu - View commit details
-
Copy full SHA for a079b95 - Browse repository at this point
Copy the full SHA a079b95View commit details -
ci: Use uv pip for faster build (projectmesa#2038)
uv is a fast drop-in pip, pip-compile, virtualenv etc replacement created by the creator of Ruff.
Configuration menu - View commit details
-
Copy full SHA for 6b8e760 - Browse repository at this point
Copy the full SHA 6b8e760View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63bffa4 - Browse repository at this point
Copy the full SHA 63bffa4View commit details -
Update Ruff to 0.3.4; apply ruff format . (projectmesa#2088)
* Update Ruff to 0.3.4; apply ruff format . * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 1e6b37c - Browse repository at this point
Copy the full SHA 1e6b37cView commit details -
docs: Fixes typos and header level error in introductory tutorial (pr…
…ojectmesa#2087) This fixes - some minor grammatical errors, - an incorrect header indentation level,
Configuration menu - View commit details
-
Copy full SHA for c72dbff - Browse repository at this point
Copy the full SHA c72dbffView commit details -
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.4 → v0.3.5](astral-sh/ruff-pre-commit@v0.3.4...v0.3.5) - [github.com/asottile/pyupgrade: v3.15.0 → v3.15.2](asottile/pyupgrade@v3.15.0...v3.15.2)
Configuration menu - View commit details
-
Copy full SHA for 36adaff - Browse repository at this point
Copy the full SHA 36adaffView commit details -
Support discrete event scheduling (projectmesa#2066)
# Summary This PR adds an experiment feature that puts event scheduling at the heart of how MESA works. An earlier draft of this code was shown and discussed in projectmesa#2032. This code generalizes projectmesa#1890 by making discrete event scheduling central to how mesa models are run. This makes it trivial to maintain discrete time progression while allowing for event scheduling, thus making it possible to build hybrid ABM-DEVS models. # Motive Agent-based models can be quite slow because, typically, they involve the activation of all agents at each tick. However, this can become very expensive if it can be known upfront that the agent is not active. Combining ABM tick-based activation with event scheduling makes it easy to avoid activating dormant agents. For example, in Epstein's civil violence model, agents who are in jail need not be activated until they are released from jail. This release from jail can be scheduled as an event, thus avoiding unnecessary agent activations. Likewise, in Wolf-Sheep with grass, the regrowth of grass patches can be scheduled instead of activating all patches for each tick only to decrement a counter. # Implementation The experimental feature adds three core new classes: Simulator, EventList, and SimulationEvent. The simulator is analogous to a numerical solver for ODEs. Theoretically, the idea of a Simulator is rooted in the work of [Zeigler](https://www.sciencedirect.com/book/9780128133705/theory-of-modeling-and-simulation), The Simulator is responsible for controlling and advancing time. The EventList is a heapq sorted list of SimulationEvents. SimulationEvents are sorted based on their time of execution, their priority, and their unique_id. A SimulationEvent is, in essence, a callable that is to be executed at a particular simulation time instant. This PR adds two specific simulators: ABMSimulator and DEVSSimulator. ABMSimulator uses integers as the base unit of time and automatically ensures that `model.step` is scheduled for each tick. DEVSSimulator uses float as the base unit of time. It allows for full discrete event scheduling. Using these new classes requires a minor modification to a Model instance. It needs a simulator attribute to be able to schedule events. # Usage The basic usage is straightforward as shown below. We instantiate an ABMSimulator, instantiate the model, and call `simulator.setup`. Next, we can run the model for, e.g., 100 time steps). ```python simulator = ABMSimulator() model = WolfSheep(simulator,25, 25, 60, 40, 0.2, 0.1, 20, seed=15,) simulator.setup(model) simulator.run(100) print(model.time) # prints 100 simulator.run(50) print(model.time) # prints 150 ``` The simulator comes with a whole range of methods for scheduling events: `schedule_event_now`, `schedule_event_relative`, `schedule_event_absolute`, and the ABMSimulator also has a `schedule_event_next_tick`. See `experimental/devs/examples/*.*` for more details on how to use these methods.
Configuration menu - View commit details
-
Copy full SHA for a0de92f - Browse repository at this point
Copy the full SHA a0de92fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f99202 - Browse repository at this point
Copy the full SHA 6f99202View commit details -
Configuration menu - View commit details
-
Copy full SHA for d399cd1 - Browse repository at this point
Copy the full SHA d399cd1View commit details -
Update version number and release notes for 2.3.0 release (projectmes…
…a#2116) * Update version number and release notes for 2.3.0 release * Fix 2.3.0 date * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for e09d26b - Browse repository at this point
Copy the full SHA e09d26bView commit details -
Make agent move to actual random closest position (projectmesa#2119)
This fixes a bug in which move_agent_to_one_of is deterministic when pos has multiple closest choices and selection="closest".
Configuration menu - View commit details
-
Copy full SHA for 3f61d41 - Browse repository at this point
Copy the full SHA 3f61d41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2066164 - Browse repository at this point
Copy the full SHA 2066164View commit details -
flocking benchmark: Remove unneeded passing of pos
pos is not a part of the Boid init, which is causing an error. It can be safely removed, because it's already initialized the line below with `self.space.place_agent(boid, pos)`
Configuration menu - View commit details
-
Copy full SHA for 2b769c2 - Browse repository at this point
Copy the full SHA 2b769c2View commit details -
Set the Mesa version to 3.0.0-dev for development towards 3.0!
Configuration menu - View commit details
-
Copy full SHA for 13633e6 - Browse repository at this point
Copy the full SHA 13633e6View commit details -
CI: Add weekly scheduled run to all CI workflows
Adds a weekly scheduled run to all CI workflows, which run each Monday at 06:00 UTC. A periodically scheduled run can detect errors and warnings appearing in changes in upstream dependencies or the build environment. By having a scheduled run they can be traced back easier to a dependency or environment change, then if they would pop up in a random PR. Also enabled triggering a run manually (the workflow_dispatch).
Configuration menu - View commit details
-
Copy full SHA for ccb793e - Browse repository at this point
Copy the full SHA ccb793eView commit details -
Drop support for Python 3.9, require Python >= 3.10 (projectmesa#2132)
* Drop support for Python 3.9, require Python >= 3.10 Starting development for Mesa 3.0 and following SPEC 0 we can drop Python 3.9 support and require Python 3.10 or higher for future development. This allows adopting more modern Python features and simplifies the testing and CI configurations. See the Python 3.10 release notes: https://docs.python.org/3/whatsnew/3.10.html The 2.3.x release series will keep supporting Python 3.9. * Update type hinting for Python 3.10 `X | Y` can now be used for type annotations, including making a variable optional with `X | None` * intro_tutorial.ipynb: Require Python 3.10 * typing: Replace Union with pipe (|) We can do this now in Python 3.10!
Configuration menu - View commit details
-
Copy full SHA for c60ef30 - Browse repository at this point
Copy the full SHA c60ef30View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4684ac - Browse repository at this point
Copy the full SHA e4684acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 152b32c - Browse repository at this point
Copy the full SHA 152b32cView commit details -
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Configuration menu - View commit details
-
Copy full SHA for 69802b1 - Browse repository at this point
Copy the full SHA 69802b1View commit details -
datacollector: store separate snapshots of model data per step (proje…
…ctmesa#2129) * datecollector: store separate snapshots of model data per step - Ensure `DataCollector` stores unique copies of the data at each model step. - Use `deepcopy` in `collect` method to avoid storing references that lead to each step holding the same data. - Fixes the issue where PropertyLayer data was stored identically for all steps, preventing accurate visualization and analysis of model progression. * datacollection: Add deepcopy comment
Configuration menu - View commit details
-
Copy full SHA for c5feb55 - Browse repository at this point
Copy the full SHA c5feb55View commit details -
[pre-commit.ci] pre-commit autoupdate (projectmesa#2131)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.4.3](astral-sh/ruff-pre-commit@v0.3.5...v0.4.3) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 911c853 - Browse repository at this point
Copy the full SHA 911c853View commit details -
Configuration menu - View commit details
-
Copy full SHA for af59fdd - Browse repository at this point
Copy the full SHA af59fddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 502b256 - Browse repository at this point
Copy the full SHA 502b256View commit details -
Add experimental features to the docs (projectmesa#2154)
Adding the objects from experimental.cell_space and experimental.devs to the ReadTheDocs documentation.
Configuration menu - View commit details
-
Copy full SHA for 1af245a - Browse repository at this point
Copy the full SHA 1af245aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74cec55 - Browse repository at this point
Copy the full SHA 74cec55View commit details -
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Configuration menu - View commit details
-
Copy full SHA for 069bfa1 - Browse repository at this point
Copy the full SHA 069bfa1View commit details -
[pre-commit.ci] pre-commit autoupdate (projectmesa#2151)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.3...v0.5.0) - [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](asottile/pyupgrade@v3.15.2...v3.16.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](codespell-project/codespell@v2.2.6...v2.3.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 32407f1 - Browse repository at this point
Copy the full SHA 32407f1View commit details -
Remove mesa.flat namespace (projectmesa#2091)
This doesn't seem to be used as often as the current simple namespace.
Configuration menu - View commit details
-
Copy full SHA for b5d7d96 - Browse repository at this point
Copy the full SHA b5d7d96View commit details -
Fix pre-commit issues: Codespel and typecheck (projectmesa#2161)
Fixes two things pre-commit detected: - Some codespell errors - A case of E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
Configuration menu - View commit details
-
Copy full SHA for 5694d54 - Browse repository at this point
Copy the full SHA 5694d54View commit details -
Remove visualization_old (mesa-viz-tornado) (projectmesa#2133)
Removing the old, legacy visualisation. It will still be available in 2.3.x. Checkout the Visualization Tutorial (https://mesa.readthedocs.io/en/latest/tutorials/visualization_tutorial.html) to migrate to the new visualisation.
Configuration menu - View commit details
-
Copy full SHA for 6fda3fc - Browse repository at this point
Copy the full SHA 6fda3fcView commit details -
Jupyter_viz: Allow measures to be None (projectmesa#2163)
Currently measures crashed when it's None (which is the default). The only way to circumvent this is adding [], but that's non-ideal and not obvious. This PR fixes that, so that measures can actually be the default value of None. This also proves we need to test Jupyter viz in notebooks, not only in console, since both have different code paths.
Configuration menu - View commit details
-
Copy full SHA for 27c2ce4 - Browse repository at this point
Copy the full SHA 27c2ce4View commit details -
Extend visualization documentation (projectmesa#2162)
- Add docstring to Jupyter viz module and functions - Render the docstring in Read the Docs: https://mesa.readthedocs.io/en/latest/apis/visualization.html
Configuration menu - View commit details
-
Copy full SHA for 95e8d81 - Browse repository at this point
Copy the full SHA 95e8d81View commit details -
Jupyter Viz: Don't avoid interactive backend (projectmesa#2165)
* Jupyter Viz: Don't avoid interactive backend We were avoiding the interactive backend, but that isn't recommended anymore and Solara should take care of that itself. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0c0fb53 - Browse repository at this point
Copy the full SHA 0c0fb53View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec4233a - Browse repository at this point
Copy the full SHA ec4233aView commit details -
Set version to 3.0.0a0 and update release notes (projectmesa#2167)
Sets the version to 3.0.0a0 for the first Mesa 3.0 pre-release, and updates the release notes with 2.3.1 and 3.0.0a0 changelog
Configuration menu - View commit details
-
Copy full SHA for fb4177c - Browse repository at this point
Copy the full SHA fb4177cView commit details -
Add .venv/ to .gitignore (projectmesa#2172)
Don't track virtual environment files in Git
Configuration menu - View commit details
-
Copy full SHA for 998965f - Browse repository at this point
Copy the full SHA 998965fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a7090fc - Browse repository at this point
Copy the full SHA a7090fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 909831f - Browse repository at this point
Copy the full SHA 909831fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 981473f - Browse repository at this point
Copy the full SHA 981473fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b66f73 - Browse repository at this point
Copy the full SHA 5b66f73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 554dc43 - Browse repository at this point
Copy the full SHA 554dc43View commit details -
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Configuration menu - View commit details
-
Copy full SHA for 0939e3c - Browse repository at this point
Copy the full SHA 0939e3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab1d1b6 - Browse repository at this point
Copy the full SHA ab1d1b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2d7379 - Browse repository at this point
Copy the full SHA c2d7379View commit details