-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is a simulation done in C++ for studying the spread of an infectious disease through a community. Visualization of the data is done using MATLAB. The result is to be compared to the ODE model of the SIR system. The ultimate goal is to compute the eigenvalues of the system using the agent based model only. Once this is done, we can add more complexity to the system that cannot be captured by the ODE model, and try and study its eigenvalues.
The original ODE model is nonlinear system with three independent variables.
- S, Population of susceptible people.
- I, Population of infected people.
- R, Population of recovered people.
The following is the list of C++ classes that are used to implement the simulation.
-
Domain: This class basically defines the "city" or the domain in which the population lives. It has a name and a unique ID.
-
Location: This class represents locations such as homes, schools work places or cemetery. For each instance, there is a unique ID, name, and a list of occupants at any given time.
-
Disease
-
Person
-
Architect
-
Storage
This class basically defines the "city" or the domain in which the population lives. It has a name and a unique ID.
This class represents locations such as homes, schools work places or cemetery. For each instance, there is a unique ID, name, and a list of occupants at any given time.
Class for creating a disease. It specifies the name of the disease, average incubation, infection and recovery periods.
Use to instantiate each person. Important members are name, ID, state, location, coordinates, time.
Manages time. Marches the simulation forward and calls the update function which in turn calls the Move and UpdateDisease functions for each person.
Used to tally and store data.
Data visualization is done using MATLAB. A class call Visualization is written to produce both time series plots and video of time laps the population moving through space and contracting the disease.
- The following shows population plots with the following parameters:
-
2000 people.
-
Incubation Period: N(24,5)
-
Recovery Period: N(24,5)
-
Fatality time: N(30,5)
The following shows population plots with the following parameters:
-
2000 people.
-
Incubation Period: N(24,5)
-
Recovery Period: N(30,5)
-
Fatality time: N(30,5)
The following shows population plots with the following parameters:
-
2000 people.
-
Incubation Period: N(30,5)
-
Recovery Period: N(24,5)
-
Fatality time: N(30,5)