| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a crude simulation of an edpidemic using Python and pygame.
The simulation consists of a 2-dimensional space in which a configurable number of epidemiological hosts move and transmit a contagious state with variable linear velocity.
Each host exists in a state of unexposed, infected, or recovered.
The laws below govern the simulation:
Several preventative measures can be simulated. A configurable percentage of the population adopting preventative measure can be chosen. Given a percentage of PREVENTATIVE_MEASURE_ADHERENCE, a random sample of the population is chosen to behave accordingly.
The SHELTER_IN_PLACE preventative measure sets the velocity of adhering hosts to 0 (permanent)
The VACCINATE_POP preventative measure provides the adhering hosts with a recovery multiplier. The vaccination for any host provides is a random value between 0 and VACCINATION_DRIP, which is added to the recovery constant for any host. VACCINATION_DRIP is intended to simulate the idea that of the percentage of units that adhere, each vaccinates at a variable time. Vaccination effect takes place immediately, even if a host is in unexposed state.
The LIMIT_TRAVEL preventative measure sets the initial velocity of adhering hosts to 50%
Python 3 is required.
Install dependencies:
Customize parameters
Run the simulation
A Makefile is provided for convenience.
Thank you to Vue Minh Khue's example, from which I adapted basic 2-dimensional particle interactions for simulating collisions between circular objects in pygame.
Improvements, additions, and corrections to the simulation are welcome. Please create a pull request if you would like to contribue.
| Back | FazBrowse Home | New Git URL |