Add seir vaccination example
Summary
Adds a SEIR epidemic model with a government vaccination policy meta-agent.
Motive
There's no population-level epidemic spreading example in mesa-examples. The existing virus_antibody model works at the biological/cellular level, but nothing shows how a disease spreads through a population on a grid and how a policy intervention affects that. This fills that gap.
Implementation
PersonAgents move through four states --Susceptible, Exposed, Infected, Recovered, based on contact with infected neighbors. A GovernmentAgent monitors the infection rate each step and triggers vaccination campaigns when it crosses a threshold, directly moving some susceptible people to recovered. Activation is explicit and bottom-up: people act first, then the government responds. No legacy schedulers used.
Usage Examples
pip install mesa[rec]
python -m solara run app.py
Sliders let you adjust transmission rate, incubation period, infection duration, vaccination threshold, and campaign size. The grid shows agent states in color and two charts track SEIR curves and when vaccination campaigns are active.
@jackiekazil @tpike3 @EwoutH
Thanks for the PR. Could you try to fix the pre-commit issues?
done!!! @EwoutH @tpike3
You have probably pushed two different models.
Fixed! Removed the hierarchical organization model from this branch -it belongs in a separate PR. This PR now contains only the SEIR model @codebreaker32
Please remove it from README.md as well
done @codebreaker32
Updated all the feedback - used State Enum, switched to agents_by_type with shuffle_do, fixed README (removed requirements.txt, added paper citation, added model to main README). Model tested locally and running fine! @EwoutH @codebreaker32
done the changes @codebreaker32