Mesa 3.1.4__py3-none-any.whl → 3.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Mesa might be problematic. Click here for more details.
- mesa/__init__.py +1 -1
- mesa/batchrunner.py +6 -3
- mesa/examples/README.md +9 -4
- {mesa-3.1.4.dist-info → mesa-3.1.5.dist-info}/METADATA +1 -1
- {mesa-3.1.4.dist-info → mesa-3.1.5.dist-info}/RECORD +8 -8
- {mesa-3.1.4.dist-info → mesa-3.1.5.dist-info}/WHEEL +0 -0
- {mesa-3.1.4.dist-info → mesa-3.1.5.dist-info}/licenses/LICENSE +0 -0
- {mesa-3.1.4.dist-info → mesa-3.1.5.dist-info}/licenses/NOTICE +0 -0
mesa/__init__.py
CHANGED
mesa/batchrunner.py
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
To take advantage of parallel execution of experiments, `batch_run` uses
|
|
4
4
|
multiprocessing if ``number_processes`` is larger than 1. It is strongly advised
|
|
5
5
|
to only run in parallel using a normal python file (so don't try to do it in a
|
|
6
|
-
jupyter notebook).
|
|
6
|
+
jupyter notebook). This is because Jupyter notebooks have a different execution
|
|
7
|
+
model that can cause issues with Python's multiprocessing module, especially on
|
|
8
|
+
Windows. The main problems include the lack of a traditional __main__ entry
|
|
9
|
+
point, serialization issues, and potential deadlocks.
|
|
10
|
+
|
|
11
|
+
Moreover, best practice when using multiprocessing is to
|
|
7
12
|
put the code inside an ``if __name__ == '__main__':`` code black as shown below::
|
|
8
13
|
|
|
9
14
|
from mesa.batchrunner import batch_run
|
|
@@ -21,8 +26,6 @@ put the code inside an ``if __name__ == '__main__':`` code black as shown below:
|
|
|
21
26
|
display_progress=True,
|
|
22
27
|
)
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
29
|
"""
|
|
27
30
|
|
|
28
31
|
import itertools
|
mesa/examples/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Mesa
|
|
2
|
-
|
|
1
|
+
# Mesa Core Examples
|
|
2
|
+
This repository contains a curated set of classic agent-based models implemented using Mesa. These core examples are maintained by the Mesa development team and serve as both demonstrations of Mesa's capabilities and starting points for your own models.
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
## Overview
|
|
5
|
+
The examples are categorized into two groups:
|
|
6
|
+
1. **Basic Examples** - Simpler models that use only stable Mesa features; ideal for beginners
|
|
7
|
+
2. **Advanced Examples** - More complex models that demonstrate additional concepts and may use some experimental features
|
|
8
|
+
|
|
9
|
+
> **Note:** Looking for more examples? Visit the [mesa-examples](https://github.com/projectmesa/mesa-examples) repository for user-contributed models and showcases.
|
|
5
10
|
|
|
6
11
|
## Basic Examples
|
|
7
12
|
The basic examples are relatively simple and only use stable Mesa features. They are good starting points for learning how to use Mesa.
|
|
@@ -34,4 +39,4 @@ Grid-based demographic prisoner's dilemma model, demonstrating how simple rules
|
|
|
34
39
|
This is Epstein & Axtell's Sugarscape model with Traders, a detailed description is in Chapter four of *Growing Artificial Societies: Social Science from the Bottom Up (1996)*. The model shows how emergent price equilibrium can happen via decentralized dynamics.
|
|
35
40
|
|
|
36
41
|
### [Wolf-Sheep Predation Model](examples/advanced/wolf_sheep)
|
|
37
|
-
Implementation of an ecological model of predation and reproduction, based on the NetLogo [Wolf Sheep Predation](http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation) model.
|
|
42
|
+
Implementation of an ecological model of predation and reproduction, based on the NetLogo [Wolf Sheep Predation](http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation) model.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
mesa/__init__.py,sha256=
|
|
1
|
+
mesa/__init__.py,sha256=GhG2LX8PxjjqywkipcK1yI9TMrGbX9CYuyNMGeaLT28,611
|
|
2
2
|
mesa/agent.py,sha256=4CXMOFA9KhvTypaV_OHZGqxOR4GVwyX4x8DOtQENUQA,26130
|
|
3
|
-
mesa/batchrunner.py,sha256=
|
|
3
|
+
mesa/batchrunner.py,sha256=ZeBOQw6-SLnECMUyKSRThh7vecP0DV6F6fGGk8UAboA,8041
|
|
4
4
|
mesa/datacollection.py,sha256=vxW0KEmx6BHMM6SnKrRJJr7Eb_siGLyofwuyN8pSWXg,18483
|
|
5
5
|
mesa/mesa_logging.py,sha256=PEDqUaQ2Y4bkYBkrHVkGT0sF86gUdbSH1T3vCg3qQeE,4949
|
|
6
6
|
mesa/model.py,sha256=VkdBea_mkWcBMxMq-pwuU23UlI1gbG4TOIyqkBfeiFo,8354
|
|
7
7
|
mesa/space.py,sha256=MNCblKf862pdkoIAa-VpjaurmI8GJtb02W3q3QWFjTE,64458
|
|
8
|
-
mesa/examples/README.md,sha256=
|
|
8
|
+
mesa/examples/README.md,sha256=TSVX0wD5C2iNAWW8OE0gl3SBZqxooJopmGKTk-7Fj2k,3262
|
|
9
9
|
mesa/examples/__init__.py,sha256=pyPWFRUxyYtQilJECbH7LY1eYBk8VB0Yg-_SbFEEvFA,825
|
|
10
10
|
mesa/examples/advanced/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
mesa/examples/advanced/epstein_civil_violence/Epstein Civil Violence.ipynb,sha256=yh50ZAK2BVJyJIKsQTTxywnasqWn1IiQUVrwmZKue4w,29032
|
|
@@ -89,8 +89,8 @@ mesa/visualization/utils.py,sha256=lJHgRKF5BHLf72Tw3YpwyiWuRoIimaTKQ7xBCw_Rx3A,1
|
|
|
89
89
|
mesa/visualization/components/__init__.py,sha256=Bq3nrPikcaIo9BSs0O3zptWVLlUmAkLo3s0mEmpH1RE,3022
|
|
90
90
|
mesa/visualization/components/altair_components.py,sha256=7OdVdZOvAx4p3j6iux6FqUYrWT0OADBIhFGf6EeGcb4,6071
|
|
91
91
|
mesa/visualization/components/matplotlib_components.py,sha256=xQETaFyHIfmL_9JwrLIgubuIQ7-pp7TMoXT1WMmozus,5441
|
|
92
|
-
mesa-3.1.
|
|
93
|
-
mesa-3.1.
|
|
94
|
-
mesa-3.1.
|
|
95
|
-
mesa-3.1.
|
|
96
|
-
mesa-3.1.
|
|
92
|
+
mesa-3.1.5.dist-info/METADATA,sha256=53ulsosj9Q4C7l43NSV8ZLN_Y9a7KGCFTPM_ayHcYTA,10197
|
|
93
|
+
mesa-3.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
94
|
+
mesa-3.1.5.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
95
|
+
mesa-3.1.5.dist-info/licenses/NOTICE,sha256=GbsWoK0QWv1JyZ_xer2s-jNilv0RtWl-0UrtlJANHPg,578
|
|
96
|
+
mesa-3.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|