Skip to content

Commit

Permalink
Update intro_tutorial.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tpike3 committed Aug 25, 2024
1 parent b32c1e0 commit a860984
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docs/tutorials/intro_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/projectmesa/mesa-geo/blob/main/docs/tutorials/intro_tutorial.ipynb)\n",
"\n",
"\\*Based on a recent Google Colab update currently, Solara visuals are not rendering. However, the link still provides a easy way to download the jupyter file. \n",
"\\*Based on a recent Google Colab update currently, Solara visuals are not rendering. However, the link still provides a easy way to download the jupyter file. You can see the issue on the [Solara GitHub site](https://github.com/widgetti/solara/issues/323)\n",
"\n",
"You can also [download the file directly from GitHub](https://github.com/projectmesa/mesa-geo/blob/main/docs/tutorials/intro_tutorial.ipynb)\n"
]
Expand Down Expand Up @@ -99,7 +99,7 @@
"\n",
"import mesa\n",
"import mesa_geo as mg\n",
"import mesa_geo.visualization as mgv\n"
"import mesa_geo.visualization as mgv # the warning that appears from Solara is fixed in Mesa 3.0 you can install the pre-release with pip install -U --pre-mesa\n"
]
},
{
Expand Down Expand Up @@ -342,6 +342,7 @@
" self, pop_size=30, mobility_range=500, init_infection=0.2, exposure_dist=500, max_infection_risk=0.2,\n",
" max_recovery_time=5\n",
" ):\n",
" super().__init__()\n",
" self.schedule = mesa.time.RandomActivationByType(self)\n",
" self.space = mg.GeoSpace(warn_crs_conversion=False)\n",
" \n",
Expand Down Expand Up @@ -638,10 +639,7 @@
"execution_count": null,
"id": "50aab416-959f-4d72-abd9-844ed42c784d",
"metadata": {
"has_explanation": true,
"jupyter": {
"source_hidden": true
}
"has_explanation": true
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -775,6 +773,7 @@
" self, pop_size=30, mobility_range=500, init_infection=0.2, exposure_dist=500, max_infection_risk=0.2,\n",
" max_recovery_time=5\n",
" ):\n",
" super().__init__()\n",
" #Scheduler\n",
" self.schedule = mesa.time.RandomActivationByType(self)\n",
" #Space\n",
Expand Down Expand Up @@ -1093,6 +1092,14 @@
"# This is required to render the visualization in the Jupyter notebook\n",
"page"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "324cabe0-68be-4aab-a70d-10ffcd328114",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -1111,7 +1118,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down

0 comments on commit a860984

Please sign in to comment.