Inspiration
We were inspired to make Contagion after hearing questioning about the efficacy of vaccination and quarantine during the COVID-19 pandemic. We wanted to be able to simulate test cases ourselves in order to see and graph the difference in real time.
What it does
Contagion simulates a community faced with a virus and renders a disease progression graph that can be saved as an image.
How it works
Contagion accepts simulation and viral parameters via a .toml config file (such as whether or not community members quarantine, the vaccination rate of the community, and the virus' infectivity and lethality) and simulates a community faced with two carriers of the virus. Each day, members of a household commute to work, possibly visit the store afterwards, and then return home. The status of a person can be seen by the color of the dot representing them, turquoise being vaccinated and healthy, green being unvaccinated and healthy, orange being incubating (asymptomatic but infectious), red being infected, and gray being deceased. While rendering, one can toggle a live population status graph in order to see how the population as a whole handles the virus.
How we built it
We used Rust to build our simulator, using the Macroquad library for rendering.
Challenges we ran into
We chose to implement out graphing system by hand instead of using an existing plotting library for increased flexibility, but this process had some hiccups. Properly drawing continuous, live data took more thinking than we initially thought it would.
Accomplishments that we're proud of
We are proud of our graphing system, and we are very happy with the walking algorithm we devised. It is grid-constricted to model physical walking paths like sidewalks, but it also adds some randomness to simulate the non-linearity of human walking.
What we learned
We learned that vaccination and quarantine truly do make a major impact on the wellness of a community. The phrase "flatten the curve" is not a cliché but rather something that can be seen in our graphs when comparing demos/influenza-typical.toml to demos/influenza-preventative.toml. Through our testing, we found that herd immunity has a major effect at higher vaccination rates (90-95%+), and quarantining throughout the entire duration of the infection is also key for preventing spread early on.
What's next for Contagion
In the future we'd like to model viral mutation, as this would allow us to simulate recovered individuals being exposed to new strains and how we can help deal with this problem.
Built With
- macroquad
- rust
Log in or sign up for Devpost to join the conversation.