From fc872e0e6d3531dab9a90c2d538832541c0c3a60 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sat, 8 Nov 2025 19:36:36 +0100 Subject: [PATCH 1/9] Update overview.md --- docs/overview.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/docs/overview.md b/docs/overview.md index fd5610c5d8a..60b971df744 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -298,21 +298,3 @@ This will create an interactive visualization of your model, including: - A plot of a model metric over time - A slider to adjust the number of agents -```{toctree} -:hidden: true -:maxdepth: 7 - -Overview -Creating Your First Model -Adding Space -Collecting Data -AgentSet -Basic Visualization -Dynamic Agent Visualization -Custom Visualization Components -Parameter Sweeps -Comparing Scenarios -Best Practices - - -``` From 844f60eb2193c6664196e685b6df454e1c206140 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sat, 8 Nov 2025 19:46:05 +0100 Subject: [PATCH 2/9] Update overview.md --- docs/overview.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/overview.md b/docs/overview.md index 60b971df744..a4ce4cba4e5 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -298,3 +298,23 @@ This will create an interactive visualization of your model, including: - A plot of a model metric over time - A slider to adjust the number of agents +```{toctree} +:hidden: true +:maxdepth: 7 + +Overview +Creating Your First Model +Adding Space +Collecting Data +AgentSet +Basic Visualization +Dynamic Agent Visualization +Visualisation using SpaceRenderer +Property Layer Visualization +Custom Visualization Components +Parameter Sweeps +Comparing Scenarios +Best Practices + + +``` \ No newline at end of file From 73d1fc691010ed70e00e7ca584fb49153a676aeb Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sat, 8 Nov 2025 19:53:38 +0100 Subject: [PATCH 3/9] Update overview.md --- docs/overview.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/docs/overview.md b/docs/overview.md index a4ce4cba4e5..60b971df744 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -298,23 +298,3 @@ This will create an interactive visualization of your model, including: - A plot of a model metric over time - A slider to adjust the number of agents -```{toctree} -:hidden: true -:maxdepth: 7 - -Overview -Creating Your First Model -Adding Space -Collecting Data -AgentSet -Basic Visualization -Dynamic Agent Visualization -Visualisation using SpaceRenderer -Property Layer Visualization -Custom Visualization Components -Parameter Sweeps -Comparing Scenarios -Best Practices - - -``` \ No newline at end of file From 7c4d99b9ac3ef6dd8f8dfae29117074cce30128b Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Sat, 8 Nov 2025 19:58:29 +0100 Subject: [PATCH 4/9] updates --- docs/getting_started.md | 21 +-------------------- docs/overview.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index 3237dc2700b..6a6d4a303ae 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -55,23 +55,4 @@ Enjoy modelling with Mesa, and feel free to reach out! -```{toctree} -:hidden: true -:maxdepth: 7 - -Overview -Creating Your First Model -Adding Space -Collecting Data -AgentSet -Basic Visualization -Dynamic Agent Visualization -Visualisation using SpaceRenderer -Property Layer Visualization -Custom Visualization Components -Parameter Sweeps -Comparing Scenarios -Best Practices - - -``` + diff --git a/docs/overview.md b/docs/overview.md index 60b971df744..a4ce4cba4e5 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -298,3 +298,23 @@ This will create an interactive visualization of your model, including: - A plot of a model metric over time - A slider to adjust the number of agents +```{toctree} +:hidden: true +:maxdepth: 7 + +Overview +Creating Your First Model +Adding Space +Collecting Data +AgentSet +Basic Visualization +Dynamic Agent Visualization +Visualisation using SpaceRenderer +Property Layer Visualization +Custom Visualization Components +Parameter Sweeps +Comparing Scenarios +Best Practices + + +``` \ No newline at end of file From d17a8fd89241f1bffea809d1a6cde9e8d65e20b8 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Tue, 11 Nov 2025 09:25:44 +0100 Subject: [PATCH 5/9] Update 10_comparing_scenarios.ipynb --- docs/tutorials/10_comparing_scenarios.ipynb | 311 ++++++++++++++++++-- 1 file changed, 281 insertions(+), 30 deletions(-) diff --git a/docs/tutorials/10_comparing_scenarios.ipynb b/docs/tutorials/10_comparing_scenarios.ipynb index fbc4deb087d..00a8b7d4d05 100644 --- a/docs/tutorials/10_comparing_scenarios.ipynb +++ b/docs/tutorials/10_comparing_scenarios.ipynb @@ -54,14 +54,16 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2025-11-11T08:25:06.210623Z", + "start_time": "2025-11-11T08:25:06.208637Z" } }, - "outputs": [], "source": [ "# Has multi-dimensional arrays and matrices.\n", "# Has a large collection of mathematical functions to operate on these arrays.\n", @@ -77,7 +79,9 @@ "\n", "# Import Cell Agent and OrthogonalMooreGrid\n", "from mesa.discrete_space import CellAgent, OrthogonalMooreGrid" - ] + ], + "outputs": [], + "execution_count": 10 }, { "cell_type": "markdown", @@ -92,9 +96,12 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "metadata": { + "ExecuteTime": { + "end_time": "2025-11-11T08:25:06.236288Z", + "start_time": "2025-11-11T08:25:06.231836Z" + } + }, "source": [ "def compute_gini(model):\n", " agent_wealths = [agent.wealth for agent in model.agents]\n", @@ -156,13 +163,18 @@ " self.datacollector.collect(self)\n", " self.agents.shuffle_do(\"move\")\n", " self.agents.do(\"give_money\")" - ] + ], + "outputs": [], + "execution_count": 11 }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "metadata": { + "ExecuteTime": { + "end_time": "2025-11-11T08:25:08.183010Z", + "start_time": "2025-11-11T08:25:06.256875Z" + } + }, "source": [ "params = {\"width\": 10, \"height\": 10, \"n\": range(5, 105, 5)}\n", "\n", @@ -175,7 +187,27 @@ " data_collection_period=1,\n", " display_progress=True,\n", ")" - ] + ], + "outputs": [ + { + "data": { + "text/plain": [ + " 0%| | 0/100 [00:00\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
RunIditerationStepseedwidthheightnGiniAgentIDWealthSteps_not_given
1001None101050.01.01.00.0
6002None101050.01.01.01.0
11003None101050.01.01.02.0
\n", + "" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 15 }, { "cell_type": "code", - "execution_count": null, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2025-11-11T08:25:16.240439Z", + "start_time": "2025-11-11T08:25:11.090308Z" } }, - "outputs": [], "source": [ "# Create a lineplot with error bars\n", "g = sns.lineplot(\n", @@ -289,7 +461,9 @@ " \"(mean over 100 runs, with 95% confidence interval)\"\n", ")\n", "g.set(title=plot_title, ylabel=\"Gini coefficient\");" - ] + ], + "outputs": [], + "execution_count": 16 }, { "cell_type": "markdown", @@ -330,14 +504,16 @@ }, { "cell_type": "code", - "execution_count": null, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2025-11-11T08:25:16.306564Z", + "start_time": "2025-11-11T08:25:16.282651Z" } }, - "outputs": [], "source": [ "# Calculate the mean of the wealth and the number of consecutive rounds\n", "# for all agents in each episode.\n", @@ -347,18 +523,91 @@ " .reset_index()\n", ")\n", "agg_results_df.head(3)" - ] + ], + "outputs": [ + { + "data": { + "text/plain": [ + " iteration n Step Wealth Steps_not_given\n", + "0 0 5 0 NaN NaN\n", + "1 0 5 1 1.0 0.0\n", + "2 0 5 2 1.0 1.0" + ], + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
iterationnStepWealthSteps_not_given
0050NaNNaN
10511.00.0
20521.01.0
\n", + "
" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "execution_count": 17 }, { "cell_type": "code", - "execution_count": null, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false + }, + "ExecuteTime": { + "end_time": "2025-11-11T08:25:19.502276Z", + "start_time": "2025-11-11T08:25:16.342019Z" } }, - "outputs": [], "source": [ "# Create a line plot with error bars\n", "g = sns.lineplot(\n", @@ -370,7 +619,9 @@ " \"different population sizes\\n(mean with 95% confidence interval)\",\n", " ylabel=\"Consecutive rounds without a transaction\",\n", ");" - ] + ], + "outputs": [], + "execution_count": 18 }, { "cell_type": "markdown", From 5ad0208243413999e606bd638a5fd82d6902a038 Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Tue, 11 Nov 2025 13:35:15 +0100 Subject: [PATCH 6/9] Update conf.py --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index b9ca723d82c..e6f1e5c851d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -172,6 +172,7 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = { + "overview":[], "migration_guide": [], # No sidebar migration } From 3d460b93213f396478b67dac570630c34c728cee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:36:34 +0000 Subject: [PATCH 7/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index e6f1e5c851d..531b075f1fd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -172,7 +172,7 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = { - "overview":[], + "overview": [], "migration_guide": [], # No sidebar migration } From 93aff699cd68469c33115f6f84a514f3c21d899a Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Tue, 11 Nov 2025 22:01:49 +0100 Subject: [PATCH 8/9] Update conf.py --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 531b075f1fd..b89353c41b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -172,7 +172,7 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = { - "overview": [], + "getting started": [], "migration_guide": [], # No sidebar migration } From e58f5af0e9aea7fd243e132b8af7b031695941dc Mon Sep 17 00:00:00 2001 From: Jan Kwakkel Date: Wed, 12 Nov 2025 08:16:32 +0100 Subject: [PATCH 9/9] Update conf.py --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b89353c41b2..9d6ce6a64ae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -172,7 +172,7 @@ # Custom sidebar templates, maps document names to template names. html_sidebars = { - "getting started": [], + "getting_started": [], "migration_guide": [], # No sidebar migration }