Skip to content

Adds a mesa geo pathogen model adaptation with compliance mechanics#418

Open
Syn-Eon wants to merge 12 commits intomesa:mainfrom
Syn-Eon:add-geo-pathogen-model
Open

Adds a mesa geo pathogen model adaptation with compliance mechanics#418
Syn-Eon wants to merge 12 commits intomesa:mainfrom
Syn-Eon:add-geo-pathogen-model

Conversation

@Syn-Eon
Copy link

@Syn-Eon Syn-Eon commented Mar 19, 2026

Summary:

This PR adds a geographic adaptation of my pathogen outbreak model from PR#359, converting it from a grid-based simulation to a real geographic map using mesa-geo.
It would be highly recommended to give that a read first as this model uses the same mechanics and that PR is a more descriptive version explaining the mechanics.

Preview of a run(default parameters)

preview_image

What this demonstrates:

Disease spread using real geographic proximity via GeoSpace instead of grid cells
Two-threshold quarantine hysteresis system with compliance rate mechanics
Geographic flee behave compliant agents move away from nearest infected agents these mechanics remain same except for the instead of manhattan distance it uses literal distances)
Agent movement bounded within the Eurasian continent using country polygons
from natural earth 110m shapefile for the country boundaries

How it differs from geo_sir:

Adds quarantine compliance mechanics - configurable fraction of citizens follow quarantine orders
Two-threshold system prevents quarantine from lifting the moment one agent recovers
Infected agents freeze in place during quarantine simulating lockdown zones
Agents bounded within Asia using polygon containment check

How to run:

pip install -r requirements.txt
solara run app.py

GSoC Checklist

Does it belong?

  • No significant overlap with existing examples (geo_sir uses no compliance mechanics)
  • Well-scoped: simplest model that demonstrates the idea
  • Showcases Mesa-geo features not well-covered by other examples
  • Showcases interesting ABM mechanics (quarantine compliance, hysteresis)

Is it correct?

  • Uses current mesa-geo APIs (GeoSpace, GeoAgent, AgentCreator)
  • Runs and visualizes out of the box
  • README explains what it does and how to run it

Is it clean?

  • No dead code or unused imports
  • Clear naming, logic readable
  • PR follows template

AI Assistance Disclosure

I used AI for searching about errors and debugging, the ai used was in my browser and not the IDE AI didn't have access to the code and no code is generated although suggestions were heavily used for debugging and understanding error messages,

@Syn-Eon Syn-Eon force-pushed the add-geo-pathogen-model branch from 4a30cdd to 03e7554 Compare March 19, 2026 21:03
@Syn-Eon Syn-Eon force-pushed the add-geo-pathogen-model branch from 3711739 to 541dc07 Compare March 19, 2026 21:13
@Syn-Eon Syn-Eon force-pushed the add-geo-pathogen-model branch from 1c73a60 to 675d35e Compare March 19, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant