Mesa 1.1.0__tar.gz → 1.2.0__tar.gz
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-1.1.0 → Mesa-1.2.0}/HISTORY.rst +89 -1
- {Mesa-1.1.0 → Mesa-1.2.0}/LICENSE +1 -1
- {Mesa-1.1.0 → Mesa-1.2.0/Mesa.egg-info}/PKG-INFO +14 -13
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/SOURCES.txt +1 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/requires.txt +1 -1
- {Mesa-1.1.0/Mesa.egg-info → Mesa-1.2.0}/PKG-INFO +14 -13
- {Mesa-1.1.0 → Mesa-1.2.0}/README.rst +12 -10
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/__init__.py +8 -9
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/agent.py +2 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/batchrunner.py +19 -28
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/datacollection.py +15 -28
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/main.py +4 -4
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/model.py +2 -6
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/space.py +379 -286
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/time.py +21 -22
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/ModularVisualization.py +11 -9
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/TextVisualization.py +0 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/UserParam.py +8 -11
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/__init__.py +0 -1
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/BarChartVisualization.py +7 -8
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/CanvasGridVisualization.py +1 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/ChartVisualization.py +2 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/HexGridVisualization.py +1 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/NetworkVisualization.py +1 -2
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/PieChartVisualization.py +2 -6
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/GridDraw.js +6 -10
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/HexDraw.js +5 -9
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/InteractionHandler.js +0 -2
- Mesa-1.2.0/pyproject.toml +46 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/setup.py +12 -13
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_batchrunner.py +3 -4
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_batchrunnerMP.py +4 -4
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_datacollector.py +2 -2
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_examples.py +8 -5
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_grid.py +104 -37
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_import_namespace.py +0 -1
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_lifespan.py +4 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_main.py +5 -1
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_scaffold.py +2 -1
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_space.py +13 -20
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_time.py +44 -14
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_tornado.py +4 -2
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_usersettableparam.py +4 -3
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_visualization.py +4 -8
- {Mesa-1.1.0 → Mesa-1.2.0}/MANIFEST.in +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/dependency_links.txt +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/entry_points.txt +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/not-zip-safe +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/Mesa.egg-info/top_level.txt +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/cookiecutter-mesa/cookiecutter.json +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/flat/__init__.py +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/flat/visualization.py +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/modules/__init__.py +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/css/visualization.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.rtl.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.rtl.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.rtl.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-grid.rtl.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.rtl.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.rtl.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.rtl.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-reboot.rtl.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.rtl.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.rtl.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.rtl.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap-utilities.rtl.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.rtl.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.rtl.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.rtl.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/css/bootstrap.rtl.min.css.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.bundle.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.bundle.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.esm.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.esm.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.esm.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.esm.min.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-5.1.3-dist/js/bootstrap.min.js.map +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.github/CONTRIBUTING.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.github/ISSUE_TEMPLATE.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.gitignore +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.npmignore +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.npmrc +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.nvmrc +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.sass-lint.yml +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/.travis.yml +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/CHANGELOG.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/Gruntfile.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/LICENSE.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/README.md +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/bower.json +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/composer.json +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dependencies/css/highlightjs-github-theme.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dependencies/js/highlight.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dependencies/js/jquery.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dependencies/js/modernizr.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dist/bootstrap-slider.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dist/bootstrap-slider.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dist/css/bootstrap-slider.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/dist/css/bootstrap-slider.min.css +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/package.json +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/scripts/build-preview.sh +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/scripts/release.sh +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/scripts/update-gh-pages.sh +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/src/js/bootstrap-slider.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/src/sass/_mixins.scss +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/src/sass/_rules.scss +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/src/sass/_variables.scss +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/src/sass/bootstrap-slider.scss +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/phantom_bind_polyfill.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/AccessibilitySpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/AriaValueTextFormatterSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/AutoRegisterDataProvideSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/ConflictingOptionsSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/DestroyMethodTests.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/DraggingHandlesSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/ElementDataAttributesSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/EventsSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/FocusOptionSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/KeyboardSupportSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/LockToTicksSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/LogarithmicScaleSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/LowAndHighTrackSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/NamespaceSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/OrientationSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/PublicMethodsSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/RangeHighlightsSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/RefreshMethodSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/ResizeSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/RtlOptionsSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/ScrollableBodySpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/ScrollableContainerSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/StepReachMaxValueSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TickClickingBehaviorSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TickLabelSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TickMarksSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TooltipMouseOverOptionSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TooltipPositionOptionSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TooltipSplitOptionSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/TouchCapableSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/offMethodSpec.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/tpl/SpecRunner.tpl +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/external/bootstrap-slider-11.0.2/tpl/index.tpl +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/BarChartModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/CanvasHexModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/CanvasModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/ChartModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/NetworkModule_d3.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/PieChartModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/TextModule.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/external/chart-3.6.1.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/external/d3-7.4.3.min.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/js/runcontrol.js +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/mesa/visualization/templates/modular_template.html +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/setup.cfg +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/__init__.py +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_batch_run.py +0 -0
- {Mesa-1.1.0 → Mesa-1.2.0}/tests/test_model.py +0 -0
|
@@ -3,6 +3,92 @@
|
|
|
3
3
|
Release History
|
|
4
4
|
---------------
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
1.2.0 (2023-03-09) Taylor
|
|
8
|
+
++++++++++++++++++++++++++
|
|
9
|
+
|
|
10
|
+
**Special notes**
|
|
11
|
+
|
|
12
|
+
New features:
|
|
13
|
+
|
|
14
|
+
* Implement radius for NetworkGrid.get_neighbors #1564
|
|
15
|
+
|
|
16
|
+
Some highlights for the perf improvements:
|
|
17
|
+
|
|
18
|
+
* Use getattr for attribute strings in model data collection #1590 this is a 2x speedup over the relevant line
|
|
19
|
+
* Faster is_integer function for common cases #1597 is for 1.3x speedup for grid access (grid[x, y])
|
|
20
|
+
* Refactor iter/get_cell_list_contents methods #1570 at least 1.3x speedup for iter/get_cell_list_contents
|
|
21
|
+
* Evaluate empties set more lazily #1546 (comment) ~1.3x speedup for place_agent, remove_agent, and move_agent
|
|
22
|
+
|
|
23
|
+
**Improvements**
|
|
24
|
+
|
|
25
|
+
* ci: Add testing on Python 3.11 #1519
|
|
26
|
+
* Remove auto-update GH Actions for Pipfile.lock #1558
|
|
27
|
+
* ruff
|
|
28
|
+
* ruff: Add isort #1594
|
|
29
|
+
* ci: Replace flake8 with Ruff #1587
|
|
30
|
+
* ruff: Add more rules based on Zulip's config #1596
|
|
31
|
+
* perf: faster is_integer function for common cases #1597
|
|
32
|
+
* Remove _reporter_decorator #1591
|
|
33
|
+
* Change index at DataFrame creation in get_agent_vars_dataframe #1586
|
|
34
|
+
* Make Grid class private #1575
|
|
35
|
+
* Make the internal grid and empties_built in Grid class private #1568
|
|
36
|
+
* Simplify code in ContinuousSpace #1536
|
|
37
|
+
* Improve docstrings of ContinuousSpace #1535
|
|
38
|
+
* Simplify accept_tuple_argument decorator in space.py #1531
|
|
39
|
+
* Enhance schedulers to support intra-step removal of agents #1523
|
|
40
|
+
* perf: Refactor iter_cell_list_contents Performance #1527
|
|
41
|
+
* Replace two loops with dictionary comprehension, list- with generator comprehension #1458
|
|
42
|
+
* Make MultiGrid.place_agent faster #1508
|
|
43
|
+
* Update space module-level docstring summary #1518
|
|
44
|
+
* Update NetworkGrid.__init__ docstring #1514
|
|
45
|
+
* Deprecate SingleGrid.position_agent #1512
|
|
46
|
+
* Make swap_pos part of Grid instead of SingleGrid #1507
|
|
47
|
+
* Refactor NetworkGrid docstrings and iter/get_cell_list_contents #1498
|
|
48
|
+
* Hexgrid: use get_neighborhood in iter_neighbors #1504
|
|
49
|
+
* Auto update year for copyright in docs #1503
|
|
50
|
+
* Refactor Grid.move_to_empty #1482
|
|
51
|
+
* Put "Mesa" instead of "it" in README #1490
|
|
52
|
+
* Batchrunner: Remove unnecessary dict transformation, .keys() in len() #1460
|
|
53
|
+
* Add Dependabot configuration for GitHub Actions update check #1480
|
|
54
|
+
* Use list transformation only when shuffled is True #1478
|
|
55
|
+
* Implement swap_pos #1474
|
|
56
|
+
* Clean up DataCollector #1475
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
**Fixes**
|
|
60
|
+
|
|
61
|
+
* Update resources in README #1605
|
|
62
|
+
* Fix accident from https://github.com/projectmesa/mesa/pull/1488 #1489
|
|
63
|
+
* pre-commit autoupdate #1598, #1576, #1548, #1494
|
|
64
|
+
* Fix docstring of DataCollector #1592
|
|
65
|
+
* Update Pipfile.lock (dependencies) #1495 #1487
|
|
66
|
+
* build(deps):
|
|
67
|
+
* build(deps): bump codecov/codecov-action from 2 to 3 dependencies Pull requests that update a dependency file #1486
|
|
68
|
+
* build(deps): bump actions/upload-artifact from 2 to 3 dependencies Pull requests that update a dependency file #1485
|
|
69
|
+
* build(deps): bump peter-evans/create-pull-request from 3 to 4 dependencies Pull requests that update a dependency file #1484
|
|
70
|
+
* build(deps): bump actions/setup-python from 3 to 4 dependencies Pull requests that update a dependency file #1483
|
|
71
|
+
* Establish reproducibility for NetworkGrid.get_neighbors when radius > 1 #1569
|
|
72
|
+
* Format js code #1554
|
|
73
|
+
* Add some missing const declarations #1549
|
|
74
|
+
* fix tutorial url in examples #1538
|
|
75
|
+
* Update cookiecutter to flat import style. #1525
|
|
76
|
+
* Fix bug in Grid.get_neighborhood #1517
|
|
77
|
+
* Revert changes of #1478 and #1456 #1516
|
|
78
|
+
* Fix return types of some NetworkGrid methods #1505
|
|
79
|
+
* Update year for copyright #1501
|
|
80
|
+
* Add default_value function to NetworkGrid #1497
|
|
81
|
+
* Remove extraneous spaces from docstrings in modules 2 #1496
|
|
82
|
+
* Remove extraneous spaces from docstrings in modules #1493
|
|
83
|
+
* SingleGrid: Remove extraneous attribute declaration (empties) #1491
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
1.1.1 (2022-10-21)
|
|
88
|
+
++++++++++++++++++
|
|
89
|
+
|
|
90
|
+
This release fixes https://github.com/projectmesa/mesa/issues/1461 where custom user-specified portrayal images don't load in the visualization server.
|
|
91
|
+
|
|
6
92
|
1.1.0 (2022-10-10) Safford
|
|
7
93
|
++++++++++++++++++++++++++
|
|
8
94
|
|
|
@@ -138,7 +224,7 @@ Release History
|
|
|
138
224
|
|
|
139
225
|
* Dependency updates
|
|
140
226
|
* build(deps): bump cookiecutter from 2.1.0 to 2.1.1 dependencies #1360
|
|
141
|
-
* Update Pipfile.lock (dependencies) #1350, #1301, #1224, #1203, #1135 by github-actions bot
|
|
227
|
+
* Update Pipfile.lock (dependencies) #1374, #1350, #1301, #1224, #1203, #1135 by github-actions bot
|
|
142
228
|
* Migrate D3 from v4 to v7 #1088
|
|
143
229
|
|
|
144
230
|
* Other Improvements
|
|
@@ -193,6 +279,8 @@ Release History
|
|
|
193
279
|
* examples: correcting comment in examples/pd_grid/pd_grid/agent.py #1247
|
|
194
280
|
* space: Clarify the return object of get_cell_list_contents #1242
|
|
195
281
|
* width and height were changed up #1149
|
|
282
|
+
* fix typo in best-practices.rst #1368
|
|
283
|
+
* fix: examples: Make space x, y order consistent #1366
|
|
196
284
|
|
|
197
285
|
|
|
198
286
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Mesa
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Agent-based modeling (ABM) in Python 3+
|
|
5
5
|
Home-page: https://github.com/projectmesa/mesa
|
|
6
6
|
Author: Project Mesa Team
|
|
@@ -12,7 +12,6 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Life
|
|
|
12
12
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -20,7 +19,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
20
19
|
Classifier: Operating System :: OS Independent
|
|
21
20
|
Classifier: Development Status :: 3 - Alpha
|
|
22
21
|
Classifier: Natural Language :: English
|
|
23
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.8
|
|
24
23
|
Provides-Extra: dev
|
|
25
24
|
Provides-Extra: docs
|
|
26
25
|
License-File: LICENSE
|
|
@@ -40,7 +39,7 @@ Mesa: Agent-based modeling in Python 3+
|
|
|
40
39
|
.. image:: https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix
|
|
41
40
|
:target: https://matrix.to/#/#project-mesa:matrix.org
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
Mesa allows users to quickly create agent-based models using built-in core components (such as spatial grids and agent schedulers) or customized implementations; visualize them using a browser-based interface; and analyze their results using Python's data analysis tools. Its goal is to be the Python 3-based alternative to NetLogo, Repast, or MASON.
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
.. image:: https://raw.githubusercontent.com/projectmesa/mesa/main/docs/images/Mesa_Screenshot.png
|
|
@@ -84,19 +83,21 @@ Or any other (development) branch on this repo or your own fork:
|
|
|
84
83
|
|
|
85
84
|
$ pip install -U -e git+https://github.com/YOUR_FORK/mesa@YOUR_BRANCH#egg=mesa
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
For resources or help on using Mesa, check out the following:
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* `
|
|
92
|
-
* `Docs`_
|
|
93
|
-
* `
|
|
94
|
-
* `
|
|
88
|
+
* `Intro to Mesa Tutorial`_ (An introductory model, the Boltzmann Wealth Model, for beginners or those new to Mesa.)
|
|
89
|
+
* `Complexity Explorer Tutorial`_ (An advanced-beginner model, SugarScape with Traders, with instructional videos)
|
|
90
|
+
* `Mesa Examples`_ (A repository of seminal ABMs using Mesa and examples of employing specific Mesa Features)
|
|
91
|
+
* `Docs`_ (Mesa's documentation, API and useful snippets)
|
|
92
|
+
* `Discussions`_ (GitHub threaded discussions about Mesa)
|
|
93
|
+
* `Matrix Chat`_ (Chat Forum via Matrix to talk about Mesa)
|
|
95
94
|
|
|
96
95
|
.. _`Intro to Mesa Tutorial` : http://mesa.readthedocs.org/en/main/tutorials/intro_tutorial.html
|
|
96
|
+
.. _`Complexity Explorer Tutorial` : https://www.complexityexplorer.org/courses/172-agent-based-models-with-python-an-introduction-to-mesa
|
|
97
|
+
.. _`Mesa Examples` : https://github.com/projectmesa/mesa-examples/tree/main/examples
|
|
97
98
|
.. _`Docs` : http://mesa.readthedocs.org/en/main/
|
|
98
|
-
.. _`
|
|
99
|
-
.. _`
|
|
99
|
+
.. _`Discussions` : https://github.com/projectmesa/mesa/discussions
|
|
100
|
+
.. _`Matrix Chat` : https://matrix.to/#/#project-mesa:matrix.org
|
|
100
101
|
|
|
101
102
|
Running Mesa in Docker
|
|
102
103
|
------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Mesa
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Agent-based modeling (ABM) in Python 3+
|
|
5
5
|
Home-page: https://github.com/projectmesa/mesa
|
|
6
6
|
Author: Project Mesa Team
|
|
@@ -12,7 +12,6 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Life
|
|
|
12
12
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -20,7 +19,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
20
19
|
Classifier: Operating System :: OS Independent
|
|
21
20
|
Classifier: Development Status :: 3 - Alpha
|
|
22
21
|
Classifier: Natural Language :: English
|
|
23
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.8
|
|
24
23
|
Provides-Extra: dev
|
|
25
24
|
Provides-Extra: docs
|
|
26
25
|
License-File: LICENSE
|
|
@@ -40,7 +39,7 @@ Mesa: Agent-based modeling in Python 3+
|
|
|
40
39
|
.. image:: https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix
|
|
41
40
|
:target: https://matrix.to/#/#project-mesa:matrix.org
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
Mesa allows users to quickly create agent-based models using built-in core components (such as spatial grids and agent schedulers) or customized implementations; visualize them using a browser-based interface; and analyze their results using Python's data analysis tools. Its goal is to be the Python 3-based alternative to NetLogo, Repast, or MASON.
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
.. image:: https://raw.githubusercontent.com/projectmesa/mesa/main/docs/images/Mesa_Screenshot.png
|
|
@@ -84,19 +83,21 @@ Or any other (development) branch on this repo or your own fork:
|
|
|
84
83
|
|
|
85
84
|
$ pip install -U -e git+https://github.com/YOUR_FORK/mesa@YOUR_BRANCH#egg=mesa
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
For resources or help on using Mesa, check out the following:
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* `
|
|
92
|
-
* `Docs`_
|
|
93
|
-
* `
|
|
94
|
-
* `
|
|
88
|
+
* `Intro to Mesa Tutorial`_ (An introductory model, the Boltzmann Wealth Model, for beginners or those new to Mesa.)
|
|
89
|
+
* `Complexity Explorer Tutorial`_ (An advanced-beginner model, SugarScape with Traders, with instructional videos)
|
|
90
|
+
* `Mesa Examples`_ (A repository of seminal ABMs using Mesa and examples of employing specific Mesa Features)
|
|
91
|
+
* `Docs`_ (Mesa's documentation, API and useful snippets)
|
|
92
|
+
* `Discussions`_ (GitHub threaded discussions about Mesa)
|
|
93
|
+
* `Matrix Chat`_ (Chat Forum via Matrix to talk about Mesa)
|
|
95
94
|
|
|
96
95
|
.. _`Intro to Mesa Tutorial` : http://mesa.readthedocs.org/en/main/tutorials/intro_tutorial.html
|
|
96
|
+
.. _`Complexity Explorer Tutorial` : https://www.complexityexplorer.org/courses/172-agent-based-models-with-python-an-introduction-to-mesa
|
|
97
|
+
.. _`Mesa Examples` : https://github.com/projectmesa/mesa-examples/tree/main/examples
|
|
97
98
|
.. _`Docs` : http://mesa.readthedocs.org/en/main/
|
|
98
|
-
.. _`
|
|
99
|
-
.. _`
|
|
99
|
+
.. _`Discussions` : https://github.com/projectmesa/mesa/discussions
|
|
100
|
+
.. _`Matrix Chat` : https://matrix.to/#/#project-mesa:matrix.org
|
|
100
101
|
|
|
101
102
|
Running Mesa in Docker
|
|
102
103
|
------------------------
|
|
@@ -13,7 +13,7 @@ Mesa: Agent-based modeling in Python 3+
|
|
|
13
13
|
.. image:: https://img.shields.io/matrix/project-mesa:matrix.org?label=chat&logo=Matrix
|
|
14
14
|
:target: https://matrix.to/#/#project-mesa:matrix.org
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Mesa allows users to quickly create agent-based models using built-in core components (such as spatial grids and agent schedulers) or customized implementations; visualize them using a browser-based interface; and analyze their results using Python's data analysis tools. Its goal is to be the Python 3-based alternative to NetLogo, Repast, or MASON.
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
.. image:: https://raw.githubusercontent.com/projectmesa/mesa/main/docs/images/Mesa_Screenshot.png
|
|
@@ -57,19 +57,21 @@ Or any other (development) branch on this repo or your own fork:
|
|
|
57
57
|
|
|
58
58
|
$ pip install -U -e git+https://github.com/YOUR_FORK/mesa@YOUR_BRANCH#egg=mesa
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
For resources or help on using Mesa, check out the following:
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* `
|
|
65
|
-
* `Docs`_
|
|
66
|
-
* `
|
|
67
|
-
* `
|
|
62
|
+
* `Intro to Mesa Tutorial`_ (An introductory model, the Boltzmann Wealth Model, for beginners or those new to Mesa.)
|
|
63
|
+
* `Complexity Explorer Tutorial`_ (An advanced-beginner model, SugarScape with Traders, with instructional videos)
|
|
64
|
+
* `Mesa Examples`_ (A repository of seminal ABMs using Mesa and examples of employing specific Mesa Features)
|
|
65
|
+
* `Docs`_ (Mesa's documentation, API and useful snippets)
|
|
66
|
+
* `Discussions`_ (GitHub threaded discussions about Mesa)
|
|
67
|
+
* `Matrix Chat`_ (Chat Forum via Matrix to talk about Mesa)
|
|
68
68
|
|
|
69
69
|
.. _`Intro to Mesa Tutorial` : http://mesa.readthedocs.org/en/main/tutorials/intro_tutorial.html
|
|
70
|
+
.. _`Complexity Explorer Tutorial` : https://www.complexityexplorer.org/courses/172-agent-based-models-with-python-an-introduction-to-mesa
|
|
71
|
+
.. _`Mesa Examples` : https://github.com/projectmesa/mesa-examples/tree/main/examples
|
|
70
72
|
.. _`Docs` : http://mesa.readthedocs.org/en/main/
|
|
71
|
-
.. _`
|
|
72
|
-
.. _`
|
|
73
|
+
.. _`Discussions` : https://github.com/projectmesa/mesa/discussions
|
|
74
|
+
.. _`Matrix Chat` : https://matrix.to/#/#project-mesa:matrix.org
|
|
73
75
|
|
|
74
76
|
Running Mesa in Docker
|
|
75
77
|
------------------------
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
Mesa Agent-Based Modeling Framework
|
|
3
3
|
|
|
4
4
|
Core Objects: Model, and Agent.
|
|
5
|
-
|
|
6
5
|
"""
|
|
7
6
|
import datetime
|
|
8
7
|
|
|
9
|
-
from mesa.model import Model
|
|
10
|
-
from mesa.agent import Agent
|
|
11
|
-
|
|
12
|
-
import mesa.time as time
|
|
13
|
-
import mesa.space as space
|
|
14
8
|
import mesa.flat.visualization as visualization
|
|
9
|
+
import mesa.space as space
|
|
10
|
+
import mesa.time as time
|
|
11
|
+
from mesa.agent import Agent
|
|
12
|
+
from mesa.batchrunner import batch_run
|
|
15
13
|
from mesa.datacollection import DataCollector
|
|
16
|
-
from mesa.
|
|
14
|
+
from mesa.model import Model
|
|
17
15
|
|
|
18
16
|
__all__ = [
|
|
19
17
|
"Model",
|
|
@@ -26,6 +24,7 @@ __all__ = [
|
|
|
26
24
|
]
|
|
27
25
|
|
|
28
26
|
__title__ = "mesa"
|
|
29
|
-
__version__ = "1.
|
|
27
|
+
__version__ = "1.2.0"
|
|
30
28
|
__license__ = "Apache 2.0"
|
|
31
|
-
|
|
29
|
+
_this_year = datetime.datetime.now(tz=datetime.timezone.utc).date().year
|
|
30
|
+
__copyright__ = f"Copyright {_this_year} Project Mesa Team"
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
The agent class for Mesa framework.
|
|
3
3
|
|
|
4
4
|
Core Objects: Agent
|
|
5
|
-
|
|
6
5
|
"""
|
|
7
6
|
# Mypy; for the `|` operator purpose
|
|
8
7
|
# Remove this __future__ import once the oldest supported Python is 3.10
|
|
9
8
|
from __future__ import annotations
|
|
10
9
|
|
|
10
|
+
from random import Random
|
|
11
|
+
|
|
11
12
|
# mypy
|
|
12
13
|
from typing import TYPE_CHECKING
|
|
13
|
-
from random import Random
|
|
14
14
|
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
16
|
# We ensure that these are not imported during runtime to prevent cyclic
|
|
@@ -35,7 +35,6 @@ class Agent:
|
|
|
35
35
|
|
|
36
36
|
def step(self) -> None:
|
|
37
37
|
"""A single step of the agent."""
|
|
38
|
-
pass
|
|
39
38
|
|
|
40
39
|
def advance(self) -> None:
|
|
41
40
|
pass
|
|
@@ -3,16 +3,13 @@ Batchrunner
|
|
|
3
3
|
===========
|
|
4
4
|
|
|
5
5
|
A single class to manage a batch run or parameter sweep of a given model.
|
|
6
|
-
|
|
7
6
|
"""
|
|
8
7
|
import copy
|
|
9
8
|
import itertools
|
|
10
9
|
import random
|
|
11
|
-
from collections import OrderedDict
|
|
12
10
|
from functools import partial
|
|
13
11
|
from itertools import count, product
|
|
14
12
|
from multiprocessing import Pool, cpu_count
|
|
15
|
-
from warnings import warn
|
|
16
13
|
from typing import (
|
|
17
14
|
Any,
|
|
18
15
|
Dict,
|
|
@@ -24,6 +21,7 @@ from typing import (
|
|
|
24
21
|
Type,
|
|
25
22
|
Union,
|
|
26
23
|
)
|
|
24
|
+
from warnings import warn
|
|
27
25
|
|
|
28
26
|
import pandas as pd
|
|
29
27
|
from tqdm import tqdm
|
|
@@ -285,14 +283,13 @@ class FixedBatchRunner:
|
|
|
285
283
|
collected at the level of each agent present in the model at
|
|
286
284
|
the end of the run.
|
|
287
285
|
display_progress: Display progress bar with time estimation?
|
|
288
|
-
|
|
289
286
|
"""
|
|
290
287
|
self.model_cls = model_cls
|
|
291
288
|
if parameters_list is None:
|
|
292
289
|
parameters_list = []
|
|
293
290
|
self.parameters_list = list(parameters_list)
|
|
294
291
|
self.fixed_parameters = fixed_parameters or {}
|
|
295
|
-
self._include_fixed = len(self.fixed_parameters
|
|
292
|
+
self._include_fixed = len(self.fixed_parameters) > 0
|
|
296
293
|
self.iterations = iterations
|
|
297
294
|
self.max_steps = max_steps
|
|
298
295
|
|
|
@@ -310,9 +307,8 @@ class FixedBatchRunner:
|
|
|
310
307
|
if self.agent_reporters:
|
|
311
308
|
self.agent_vars = {}
|
|
312
309
|
|
|
313
|
-
|
|
314
|
-
self.
|
|
315
|
-
self.datacollector_agent_reporters = OrderedDict()
|
|
310
|
+
self.datacollector_model_reporters = {}
|
|
311
|
+
self.datacollector_agent_reporters = {}
|
|
316
312
|
|
|
317
313
|
self.display_progress = display_progress
|
|
318
314
|
|
|
@@ -361,7 +357,7 @@ class FixedBatchRunner:
|
|
|
361
357
|
model = self.model_cls(**kwargs)
|
|
362
358
|
results = self.run_model(model)
|
|
363
359
|
if param_values is not None:
|
|
364
|
-
model_key = tuple(param_values)
|
|
360
|
+
model_key = (*tuple(param_values), run_count)
|
|
365
361
|
else:
|
|
366
362
|
model_key = (run_count,)
|
|
367
363
|
|
|
@@ -370,7 +366,7 @@ class FixedBatchRunner:
|
|
|
370
366
|
if self.agent_reporters:
|
|
371
367
|
agent_vars = self.collect_agent_vars(model)
|
|
372
368
|
for agent_id, reports in agent_vars.items():
|
|
373
|
-
agent_key = model_key
|
|
369
|
+
agent_key = (*model_key, agent_id)
|
|
374
370
|
self.agent_vars[agent_key] = reports
|
|
375
371
|
# Collects data from datacollector object in model
|
|
376
372
|
if results is not None:
|
|
@@ -395,7 +391,6 @@ class FixedBatchRunner:
|
|
|
395
391
|
|
|
396
392
|
If your model runs in a non-standard way, this is the method to modify
|
|
397
393
|
in your subclass.
|
|
398
|
-
|
|
399
394
|
"""
|
|
400
395
|
while model.running and model.schedule.steps < self.max_steps:
|
|
401
396
|
model.step()
|
|
@@ -407,19 +402,19 @@ class FixedBatchRunner:
|
|
|
407
402
|
|
|
408
403
|
def collect_model_vars(self, model):
|
|
409
404
|
"""Run reporters and collect model-level variables."""
|
|
410
|
-
model_vars =
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
405
|
+
model_vars = {
|
|
406
|
+
var: reporter(model) for var, reporter in self.model_reporters.items()
|
|
407
|
+
}
|
|
414
408
|
return model_vars
|
|
415
409
|
|
|
416
410
|
def collect_agent_vars(self, model):
|
|
417
411
|
"""Run reporters and collect agent-level variables."""
|
|
418
|
-
agent_vars =
|
|
412
|
+
agent_vars = {}
|
|
419
413
|
for agent in model.schedule._agents.values():
|
|
420
|
-
agent_record =
|
|
421
|
-
|
|
422
|
-
|
|
414
|
+
agent_record = {
|
|
415
|
+
var: getattr(agent, reporter)
|
|
416
|
+
for var, reporter in self.agent_reporters.items()
|
|
417
|
+
}
|
|
423
418
|
agent_vars[agent.unique_id] = agent_record
|
|
424
419
|
return agent_vars
|
|
425
420
|
|
|
@@ -471,12 +466,10 @@ class FixedBatchRunner:
|
|
|
471
466
|
|
|
472
467
|
df = pd.DataFrame(records)
|
|
473
468
|
rest_cols = set(df.columns) - set(index_cols)
|
|
474
|
-
ordered = df[index_cols +
|
|
469
|
+
ordered = df[index_cols + sorted(rest_cols)]
|
|
475
470
|
ordered.sort_values(by="Run", inplace=True)
|
|
476
471
|
if self._include_fixed:
|
|
477
|
-
for param in self.fixed_parameters.
|
|
478
|
-
val = self.fixed_parameters[param]
|
|
479
|
-
|
|
472
|
+
for param, val in self.fixed_parameters.items():
|
|
480
473
|
# avoid error when val is an iterable
|
|
481
474
|
vallist = [val for i in range(ordered.shape[0])]
|
|
482
475
|
ordered[param] = vallist
|
|
@@ -539,7 +532,6 @@ class BatchRunner(FixedBatchRunner):
|
|
|
539
532
|
Note that by default, the reporters only collect data at the *end* of the
|
|
540
533
|
run. To get step by step data, simply have a reporter store the model's
|
|
541
534
|
entire DataCollector object.
|
|
542
|
-
|
|
543
535
|
"""
|
|
544
536
|
|
|
545
537
|
def __init__(
|
|
@@ -582,7 +574,6 @@ class BatchRunner(FixedBatchRunner):
|
|
|
582
574
|
collected at the level of each agent present in the model at
|
|
583
575
|
the end of the run.
|
|
584
576
|
display_progress: Display progress bar with time estimation?
|
|
585
|
-
|
|
586
577
|
"""
|
|
587
578
|
warn(
|
|
588
579
|
"BatchRunner class has been replaced by batch_run function. Please see documentation.",
|
|
@@ -722,7 +713,7 @@ class BatchRunnerMP(BatchRunner): # pragma: no cover
|
|
|
722
713
|
if self.agent_reporters:
|
|
723
714
|
agent_vars = self.collect_agent_vars(model)
|
|
724
715
|
for agent_id, reports in agent_vars.items():
|
|
725
|
-
agent_key = model_key
|
|
716
|
+
agent_key = (*model_key, agent_id)
|
|
726
717
|
self.agent_vars[agent_key] = reports
|
|
727
718
|
if hasattr(model, "datacollector"):
|
|
728
719
|
if model.datacollector.model_reporters is not None:
|
|
@@ -735,9 +726,9 @@ class BatchRunnerMP(BatchRunner): # pragma: no cover
|
|
|
735
726
|
] = model.datacollector.get_agent_vars_dataframe()
|
|
736
727
|
|
|
737
728
|
# Make results consistent
|
|
738
|
-
if len(self.datacollector_model_reporters
|
|
729
|
+
if len(self.datacollector_model_reporters) == 0:
|
|
739
730
|
self.datacollector_model_reporters = None
|
|
740
|
-
if len(self.datacollector_agent_reporters
|
|
731
|
+
if len(self.datacollector_agent_reporters) == 0:
|
|
741
732
|
self.datacollector_agent_reporters = None
|
|
742
733
|
|
|
743
734
|
def run_all(self):
|