-
Notifications
You must be signed in to change notification settings - Fork 153
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
Mesa implementation of Ising Model #138
base: main
Are you sure you want to change the base?
Commits on Jul 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2925aac - Browse repository at this point
Copy the full SHA 2925aacView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec724b3 - Browse repository at this point
Copy the full SHA ec724b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff3b7fa - Browse repository at this point
Copy the full SHA ff3b7faView commit details
Commits on Jul 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d60038e - Browse repository at this point
Copy the full SHA d60038eView commit details
Commits on Jul 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for df3b9e0 - Browse repository at this point
Copy the full SHA df3b9e0View commit details
Commits on Jul 22, 2024
-
Make batch_run pytestable by adding main() functions (projectmesa#143)
Added a main() function to bank_reserves `batch_run.py` and sugarscape_g1mt `run.py` scripts to facilitate testing and script execution. The `main()` function encapsulates the primary script logic, allowing for easier modular testing and execution. By defining script operations within `main()`, we can directly invoke this function in testing environments without relying on command-line execution. This practice enhances code readability, maintainability, and testability, providing a clear entry point for the script's functionality.
Configuration menu - View commit details
-
Copy full SHA for e137a60 - Browse repository at this point
Copy the full SHA e137a60View commit details
Commits on Aug 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b5ad740 - Browse repository at this point
Copy the full SHA b5ad740View commit details -
CI: Don't test stable builds (until Mesa 3.0 is released)
Stop testing stable mesa builds, which can be enabled again when Mesa 3.0 is released. This allows us to start updating Mesa example to break with 2.x conventions, towards development of Mesa 3.0. Mesa 2.x examples can be found on the mesa-2.x branch.
Configuration menu - View commit details
-
Copy full SHA for 72cfb9e - Browse repository at this point
Copy the full SHA 72cfb9eView commit details
Commits on Aug 6, 2024
-
[pre-commit.ci] pre-commit autoupdate (projectmesa#149)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.6](astral-sh/ruff-pre-commit@v0.5.0...v0.5.6) - [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.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 fe7f71e - Browse repository at this point
Copy the full SHA fe7f71eView commit details
Commits on Aug 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 17c65ce - Browse repository at this point
Copy the full SHA 17c65ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 68b6d31 - Browse repository at this point
Copy the full SHA 68b6d31View commit details -
This allows seeing which tests are collected, passed, etc. See https://docs.pytest.org/en/7.1.x/how-to/output.html#verbosity
Configuration menu - View commit details
-
Copy full SHA for 352ac32 - Browse repository at this point
Copy the full SHA 352ac32View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebb7976 - Browse repository at this point
Copy the full SHA ebb7976View commit details
Commits on Aug 11, 2024
-
Use SolaraViz instead of JupyterViz in examples
This updates all the examples to use the renamed and stabilized SolaraViz.
Configuration menu - View commit details
-
Copy full SHA for 78b8a36 - Browse repository at this point
Copy the full SHA 78b8a36View commit details
Commits on Aug 12, 2024
-
sugerscape_g1mt: Refactor using AgentSet functionality
Resolves 4 warnings by using the AgentSet select(), shuffle() and do() functionality. Also removes the now unused scheduler.
Configuration menu - View commit details
-
Copy full SHA for cc65481 - Browse repository at this point
Copy the full SHA cc65481View commit details -
Don't pass the position parameter, but just use place_agent. Resolves the duplicate position warning.
Configuration menu - View commit details
-
Copy full SHA for 923a83e - Browse repository at this point
Copy the full SHA 923a83eView commit details -
Don't pass the position parameter, but just use place_agent. Resolves the duplicate position warning.
Configuration menu - View commit details
-
Copy full SHA for fbf80af - Browse repository at this point
Copy the full SHA fbf80afView commit details -
wolf_sheep: Replace custom scheduler with AgentSet functionality
This resolves all warnings outputted by this model. For the model step, the behavior of the old RandomActivationByType scheduler when using step(shuffle_types=True, shuffle_agents=True) is replicated. Conceptually, it can be argued that this should be modelled differently. The verbose prints are also removed.
Configuration menu - View commit details
-
Copy full SHA for 4dac7dc - Browse repository at this point
Copy the full SHA 4dac7dcView commit details -
Don't pass the position parameter, but just use place_agent. Resolves the duplicate position warning.
Configuration menu - View commit details
-
Copy full SHA for 487561d - Browse repository at this point
Copy the full SHA 487561dView commit details -
CI: Let pytest treat warnings as errors
Uses the -Werror option of pytest to treat warnings as errors. See https://docs.python.org/3/using/cmdline.html#cmdoption-W
Configuration menu - View commit details
-
Copy full SHA for 86cdf99 - Browse repository at this point
Copy the full SHA 86cdf99View commit details -
sugerscape_g1mt: Use model.get_agents_of_type instead of .select()
Use model.get_agents_of_type instead of model.agents.select() to select all agents of a certain type. It should be faster, since it's a direct dictionary call.
Configuration menu - View commit details
-
Copy full SHA for 3e0d16f - Browse repository at this point
Copy the full SHA 3e0d16fView commit details
Commits on Aug 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 274a1bc - Browse repository at this point
Copy the full SHA 274a1bcView commit details
Commits on Aug 19, 2024
-
Replace model.schedule.agents with model.agents AgentSet
Replace all usages of model.schedule.agents with the use of the model.agents AgentSet in all examples.
Configuration menu - View commit details
-
Copy full SHA for bd17361 - Browse repository at this point
Copy the full SHA bd17361View commit details -
Replace RandomActivation scheduler with AgentSet
Replace the old RandomActivation scheduler with AgentSet functionality. self.agents.shuffle.do("step") is equivalent and self.schedule.step() with an RandomActivation scheduler, and model behavior should not change.
Configuration menu - View commit details
-
Copy full SHA for 642a9ad - Browse repository at this point
Copy the full SHA 642a9adView commit details -
Replace SimultaneousActivation scheduler by AgentSet
The SimultaneousActivation scheduler used a "step" and "advanced" function in the Agent. These have been renamed for each model to be more descriptive (like "determine_state" and "assume_state"), and then the model step was replace by something like: self.agents.do("determine_state") self.agents.do("assume_state") Docstring was also updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for 8e0ccf6 - Browse repository at this point
Copy the full SHA 8e0ccf6View commit details -
Remove adding agents to schedulers
Schedulers don't exist anymore, so we don't need to add agents anymore. Agents are automatically added to model.agents on Agent initialisation.
Configuration menu - View commit details
-
Copy full SHA for dbedf6f - Browse repository at this point
Copy the full SHA dbedf6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b66a64 - Browse repository at this point
Copy the full SHA 4b66a64View commit details -
Restore Sugerscape and Wolf-sheep schedulers
These models use complex schedulers which warrant an separate PR.
Configuration menu - View commit details
-
Copy full SHA for c0ea5a2 - Browse repository at this point
Copy the full SHA c0ea5a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fa7a25 - Browse repository at this point
Copy the full SHA 1fa7a25View commit details -
bank_reserves/charts: Don't make Bank an Agent
It doesn't have a step function and there is only one, so it shouldn't be an Agent, just an Python object.
Configuration menu - View commit details
-
Copy full SHA for 0c6366c - Browse repository at this point
Copy the full SHA 0c6366cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ebc4d1 - Browse repository at this point
Copy the full SHA 0ebc4d1View commit details
Commits on Aug 22, 2024
-
Revert PR projectmesa#161: Replace schedulers with AgentSet functiona…
…lity (projectmesa#170) This commit reverts PR projectmesa#161 projectmesa#161 That PR assumed that time advancement would be done automatically, like proposed in projectmesa/mesa#2223 We encountered some underlying issues with time, which we couldn't resolve in time.
Configuration menu - View commit details
-
Copy full SHA for 43622b9 - Browse repository at this point
Copy the full SHA 43622b9View commit details
Commits on Aug 24, 2024
-
Ant Colony Optimization (projectmesa#157)
* adding first ant * Ant path building * Implementing stigmergy and ACO * TSP benchmark * refactor 01 * app fix * simple fix, isort, clean * lint * readme * adding default args to pass unit tests * addressing PR comments * comment fix 2 * PR comments iter --------- Co-authored-by: Zak Jost <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2b944ff - Browse repository at this point
Copy the full SHA 2b944ffView commit details
Commits on Aug 25, 2024
-
gis: Use relative imports in all models
Use relative imports in all models. This way models can be ran from different locations, which will help with testing them.
Configuration menu - View commit details
-
Copy full SHA for 2fd8945 - Browse repository at this point
Copy the full SHA 2fd8945View commit details -
Create script to test GIS examples
Co-Authored-By: rht <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7ecbb93 - Browse repository at this point
Copy the full SHA 7ecbb93View commit details -
CI: Modernize examples test script
- Rename workflow - Run on each push (which allows developing on test branches in this repo) - Run only on changes to the example models, the test script or the CI config - Allow multiple commits after each other (to allow continuous trial and error
Configuration menu - View commit details
-
Copy full SHA for eed4f7d - Browse repository at this point
Copy the full SHA eed4f7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2f4a73 - Browse repository at this point
Copy the full SHA c2f4a73View commit details -
Configuration menu - View commit details
-
Copy full SHA for efffb67 - Browse repository at this point
Copy the full SHA efffb67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49342ea - Browse repository at this point
Copy the full SHA 49342eaView commit details -
Add super().__init__() to Mesa model initalization (projectmesa#175)
When inheriting from a Mesa Model you always need to initialize it by calling super().__init__(). This commit fixes that in two gis models.
Configuration menu - View commit details
-
Copy full SHA for 4fe5c71 - Browse repository at this point
Copy the full SHA 4fe5c71View commit details -
Fix 3 data path imports in gis models (projectmesa#176)
Fix the data path import errors in the geo_schelling, geo_schelling_points and geo_sir models.
Configuration menu - View commit details
-
Copy full SHA for bbf5ad2 - Browse repository at this point
Copy the full SHA bbf5ad2View commit details
Commits on Aug 26, 2024
-
Fix data paths and model passing in GIS examples (projectmesa#177)
This commit addresses several of the remaining issues across the GIS examples: - Corrects data file paths in the population, rainfall, and urban growth models to use relative paths from the script directory. - Fixes the urban growth model by passing the model object to City and UrbanCell classes, as required by mesa-geo 0.8.0. - Updates the population model to pass the model object when creating agents, ensuring they can access Model variables and properties. - Corrects the use of `/vsigzip/` paths for GDAL compatibility. The `/vsigzip/` situation is super weird. It isn't part of the file path, but it's a "marker" a GDAL convention. See the PR message, mesa-geo#235 and https://gdal.org/user/virtual_file_systems.html#vsigzip-gzipped-file for more details.
Configuration menu - View commit details
-
Copy full SHA for 269ff1a - Browse repository at this point
Copy the full SHA 269ff1aView commit details
Commits on Aug 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3c71ea9 - Browse repository at this point
Copy the full SHA 3c71ea9View commit details
Commits on Aug 28, 2024
-
Co-authored-by: Ewout ter Hoeven <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6e59b9a - Browse repository at this point
Copy the full SHA 6e59b9aView commit details -
Ensure grasspatches info is only collected if gras is true (projectme…
…sa#181) the datacollector allways includes grasspatches even if grass is False. This is breaking (the proposed changes to agent storage in Model. The underlying problem is that Model.get_agents_of_type now raises a KeyError if type does not exist. I think this is desirable behavior becuase errrors should not be passed over in silence. But this requires fixing the wolf sheep example as done here.
Configuration menu - View commit details
-
Copy full SHA for 1d67252 - Browse repository at this point
Copy the full SHA 1d67252View commit details
Commits on Aug 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2bc3a2d - Browse repository at this point
Copy the full SHA 2bc3a2dView commit details -
schelling_experimental: Remove temporary _advance_time() method (proj…
…ectmesa#162) Remove the remove temporary _advance_time() method from schelling_experimental. This isn't needed anymore, because in Mesa 3.0 time will be automatically increased.
Configuration menu - View commit details
-
Copy full SHA for 3e5ebd1 - Browse repository at this point
Copy the full SHA 3e5ebd1View commit details
Commits on Aug 30, 2024
-
GoL_fast: Add fast PropertyLayer implementation of Game of Life
A special implementation of Conway's Game of Life, using only the PropertyLayer, without needing a Grid or even any Agents.
Configuration menu - View commit details
-
Copy full SHA for 2ece0cf - Browse repository at this point
Copy the full SHA 2ece0cfView commit details -
GoL_fast: Add minimal Solara visualisation
Add minimal Solara visualisation, to control model parameters.
Configuration menu - View commit details
-
Copy full SHA for 541b004 - Browse repository at this point
Copy the full SHA 541b004View commit details -
GoL_fast: Add metrics, datacollector and measure viz
- Add two metrics to the model - Collect those with the datacollector - Plot them as measures in SolaraViz
Configuration menu - View commit details
-
Copy full SHA for aee22c1 - Browse repository at this point
Copy the full SHA aee22c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0d50a8 - Browse repository at this point
Copy the full SHA a0d50a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 875110a - Browse repository at this point
Copy the full SHA 875110aView commit details -
pytest: Don't raise FutureWarning to Error
Otherwise we can't use this experimental feature.
Configuration menu - View commit details
-
Copy full SHA for eb66dae - Browse repository at this point
Copy the full SHA eb66daeView commit details -
Configuration menu - View commit details
-
Copy full SHA for be57796 - Browse repository at this point
Copy the full SHA be57796View commit details -
GoL_fast: Remove advance_time()
`steps` is now increased automatically, it's not needed anymore!
Configuration menu - View commit details
-
Copy full SHA for fc18ece - Browse repository at this point
Copy the full SHA fc18eceView commit details -
Reinstate PR projectmesa#161: Replace schedulers with AgentSet functi…
…onality This reinstates PR projectmesa#161 after the previous revert.
Configuration menu - View commit details
-
Copy full SHA for 0fd7f82 - Browse repository at this point
Copy the full SHA 0fd7f82View commit details -
test_examples: assert model.steps == 10
Confirm that model.steps is correctly increased to 10, and not some other value
Configuration menu - View commit details
-
Copy full SHA for 3d29e4c - Browse repository at this point
Copy the full SHA 3d29e4cView commit details
Commits on Sep 2, 2024
-
gis: Use gzip.open opener in RasterLayer.from_file (projectmesa#184)
Use pass the new rio_opener argument with gzip.open in RasterLayer.from_file(). This prevents having to do the weird /vsigzip/ stuff. Note that urban_growth uses the rasterio opener directly, while the other two examples pass it via the mesa_geo.raster_layers.RasterLayer.open_file() method.
Configuration menu - View commit details
-
Copy full SHA for dee6363 - Browse repository at this point
Copy the full SHA dee6363View commit details -
gis: Pass model to RasterLayer.from_file (projectmesa#186)
Fixes the population and rainfall models by passing model to RasterLayer.from_file(). > The RasterLayer creates Cells, Cells inherit from Agents, Agents need model input, but RasterLayer doesn't have access to model.
Configuration menu - View commit details
-
Copy full SHA for 89f9379 - Browse repository at this point
Copy the full SHA 89f9379View commit details
Commits on Sep 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6312ebe - Browse repository at this point
Copy the full SHA 6312ebeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f24626e - Browse repository at this point
Copy the full SHA f24626eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 679b677 - Browse repository at this point
Copy the full SHA 679b677View commit details -
[pre-commit.ci] pre-commit autoupdate (projectmesa#188)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.3](astral-sh/ruff-pre-commit@v0.5.6...v0.6.3) 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 330b4d9 - Browse repository at this point
Copy the full SHA 330b4d9View commit details -
gis: fix user warning when testing geo schelling example
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci update
Configuration menu - View commit details
-
Copy full SHA for aca30a2 - Browse repository at this point
Copy the full SHA aca30a2View commit details -
Replace
get_agents_of_type
method withagents_by_type
property (p……rojectmesa#190) The Model method `get_agents_of_type()` is replaced by the `agents_by_type` property, which directly returns the dict. Instead of using: ```Python model.get_agents_of_type(Wolf) ``` You should now use: ```Python model.agents_by_type[Wolf] ```
Configuration menu - View commit details
-
Copy full SHA for e7345de - Browse repository at this point
Copy the full SHA e7345deView commit details -
Readme: Add note about Mesa-Geo version compatiblity
Note that examples on the main branch work on the latest Mesa-Geo development branch, and examples Mesa-Geo 0.8.x are available on the mesa-2.x branch.
Configuration menu - View commit details
-
Copy full SHA for 831be82 - Browse repository at this point
Copy the full SHA 831be82View commit details
Commits on Sep 4, 2024
-
Add seeding RL examples folder (projectmesa#178)
Add seeding RL examples folder (projectmesa#178) --------- 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 c4b4c75 - Browse repository at this point
Copy the full SHA c4b4c75View commit details -
aoc_tsp: Replace scheduler with AgentSet functionality (projectmesa#191)
Also use the new, standardized order of count-do-collect.
Configuration menu - View commit details
-
Copy full SHA for ec07d89 - Browse repository at this point
Copy the full SHA ec07d89View commit details
Commits on Sep 5, 2024
-
Remove unique_id and model.next_id (projectmesa#194)
All examples can be updated to no longer pass a unique id, nor use model.next_id. This only fixes the examples, not the gis-examples or rl examples. Co-authored-by: Ewout ter Hoeven <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 660102f - Browse repository at this point
Copy the full SHA 660102fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d79f74e - Browse repository at this point
Copy the full SHA d79f74eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b43544 - Browse repository at this point
Copy the full SHA 2b43544View commit details
Commits on Sep 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9c30387 - Browse repository at this point
Copy the full SHA 9c30387View commit details
Commits on Sep 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 31537d8 - Browse repository at this point
Copy the full SHA 31537d8View commit details
Commits on Sep 21, 2024
-
Use performance optimized shuffle_do() method (projectmesa#201)
Replace shuffle().do() in 18 models with the performance optimized shuffle_do() method.
Configuration menu - View commit details
-
Copy full SHA for 9a5396f - Browse repository at this point
Copy the full SHA 9a5396fView commit details -
Replace the remaining schedulers with AgentSet functionality (project…
…mesa#202) This PR completes the migration from schedulers to AgentSet functionality across the mesa-examples repository for all regular (non-`gis`/-`rl`) examples. Key changes include: - Replaced `RandomActivation`, `SimultaneousActivation`, and `RandomActivationByType` schedulers with appropriate AgentSet methods - Updated `Model.step()` implementations to use AgentSet activation - Removed references to `schedule.steps`, `schedule.agents`, and `schedule.agents_by_type` - Updated agent addition/removal logic to work with AgentSets - Adjusted data collection and visualization code to use `Model.steps` and `Model.agents` For more details on migrating from schedulers to AgentSets, see the migration guide: https://mesa.readthedocs.io/en/latest/migration_guide.html#time-and-schedulers
Configuration menu - View commit details
-
Copy full SHA for 8d0c722 - Browse repository at this point
Copy the full SHA 8d0c722View commit details
Commits on Sep 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ed6f910 - Browse repository at this point
Copy the full SHA ed6f910View commit details -
Configuration menu - View commit details
-
Copy full SHA for 561f1f1 - Browse repository at this point
Copy the full SHA 561f1f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecb8aab - Browse repository at this point
Copy the full SHA ecb8aabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44a3ed5 - Browse repository at this point
Copy the full SHA 44a3ed5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d75683 - Browse repository at this point
Copy the full SHA 7d75683View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a01780 - Browse repository at this point
Copy the full SHA 1a01780View commit details
Commits on Sep 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cd2eb61 - Browse repository at this point
Copy the full SHA cd2eb61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0704d13 - Browse repository at this point
Copy the full SHA 0704d13View commit details