Assignment #11: Pydemic#
Pydemic is a simple agent-based model of a pandemic.
Agents are perfect to teach the basics of object-oriented programming. Note that the program was written with this goal in mind, not for performance or accuracy.
Start by getting an overview of the model structure.
Sensitivity analyses: starting from the default parameter values, vary one parameter at a time and study the consequences for the temporal trajectory of the pandemic. Of particular relevance are the following: (i) agent density (number of agents per pixel), (ii) initial number of infected agents (is it possible to start a pandemic with a single infected individual? What are the settings that favor this?), (iii) agent mobility, (iv) probability of infection, (v) time until recover.
Add at least one functionality to the model, e.g.,:
add a timer for immunity loss: agents loose their immunity after N days (this can be complexified by computing the probability of infection as a function of time since infection / vaccination),
add vaccination as a way to gain immunity,
add a healthcare threshold: above a certain number of people in the hospital, the hospitalized patients are more likely to die,
add politics: when a certain contamination threshold is reached, impose a lockdown (reduce agent mobility),
etc.
You do not have to add too many of these options (unless you have a lot of fun).