The Epidemic Environment Simulation is a simulation that shows the spread of a disease with no vaccine on humans over many days on a visual grid. All humans start as uninfected except for 1 human from each age class (Child/Adult/Elder). Humans may move each day and the infection will spread based on age/distance from the infected/if the virus was previously had.
Epidemic
Environment
Simulation
Date: September 2022
Role: Sole Programmer
Technologies Used: Visual Studio | C++
Code Samples
Constructed the grid with a 2D Vector

Shows the construciton of the 2D Vector and the simulation. Also displays the code that runs through the simulation.

Fills the inserted 2D Vector with the humans at random locations. The amount of humans in each age group is specified by the user.

Shows the construciton of the 2D Vector and the simulation. Also displays the code that runs through the simulation.
The entire program revolves around a 2D Vector made up of "Human" objects which are constructed at the start of the program. Humans with specific stats chosen by the user are then loaded into the vector. After that, the vector can be manipulated by a "movePeople" function that allows humans with specific stats to move to a different spot on the grid.
Implementing Spread of Infection
There are multiple functions involved in deciding the spread of infection and stage of infection. First, it is checked if an uninfected human is near an infected human. If that is true then another function triggers deciding if they get infected. Lastly, there is a function to decide the progress of the infection within infected humans.

This function goes through the entire vector and if there is an infected human 1 or 2 spaces away from any uninfected human. It then calls a function respective to that situation.

This function goes through the entire vector and if there is an infected human 1 or 2 spaces away from any uninfected human. It then calls a function respective to that situation.
Displaying Daily Stats

Prints out all the stats on a chart, and then prints out the current grid within ASCII symbols


Prints out all the stats on a chart, and then prints out the current grid within ASCII symbols