Epidemic Simulator

HooHacks 2020

Go to Simulator!

Introduction

Welcome to our epidemic simulator created by Jack Liu and Victor Pham for HooHacks 2020. Inspired by the recent global crisis around Covid-19, we wanted to create a tool to help people understand how epidemics spread and what factors influence the final outcome. This simulation runs based on the SIR epidemic model where the population is categorized as either susceptible, infected, or removed. We modified this slightly to account for infected individuals who display no symptoms (carriers) as well as those who have unfortunately succumbed to the disease.

How it works

The simulation involves 6 communities with individuals represented as dots and the quantity of each type of individual graphed over time. In the beginning, there is a single infected individual and each person is moving randomly. For each successive frame of the simulation, there are 5 algorithms that are performed to determine the next state:

  • Transmission: For each susceptible individual within the transmission radius of an infected individual, there is a chance to pass on the disease.
  • Travel: For each community, there is a chance that one individual in that community travels to the center of another community.
  • Movement: Initially, each individual wanders around randomly.
  • Recovery: Each infected individual has a chance to recover from the disease that increases based on the length of time they had been infected. This is governed by the function (t*Recovery factor/200)^3 where t is time spent infected.
  • Death: Similarly, each infected individual also has a chance to succumb to the disease. The function for death is (t*Lethality factor/200)^3 where t is time spent infected.

This loop continues until a certain critical number of infected individuals is detected (does not include carriers). Once these thresholds are met, several changes to the previous algorithms are implemented.

  • Social Distancing: Social distancing changes the movement of individuals so that they attempt to avoid others as much as possible. However, the number of individuals who practice social distancing is influenced by the participation rate.
  • Travel Restrictions: Travel restrictions mean that there is no longer the chance of travel between communities hopefully slowing down the spread of infection.

Where you come in

The power of this simulation is that almost every parameter of the simulation is variable. This means that you can use this simulation to investigate when is the best time to implement travel restrictions, or what impacts a few individuals that do not participate in social distancing has on the overall outcome. Try to experiment and see what factors have the greatest impact on flattening the curve. The sliders control the values of each parameter and using the space bar pauses the simulation while the "r" key resets it from the beginning.

Parameter Explanations

  • Disease
    • Transmission radius - the distance the disease can spread
    • Lethality factor - the larger the factor, the more deadly the disease
    • Recovery factor - the larger the factor, the faster individuals recover
    • Carrier chance - the chance an individual is a carrier for the disease and shows no symptoms
  • Travel
    • Travel factor - How likely is it that an individual will travel to another community
    • Travel threshold - At what percentage of the population is known to have contracted the disease will travel be restricted
  • Population
    • Population size - How many individuals start off in each community
  • Social Distancing
    • Participation rate - What percentage of the population will participate in social distancing
    • Participation threshold - At what percentage of the population is known to have contracted the disease will social distancing kick in.