Agent Based Epidemiological Simulator

During a special topics course on Epidemiology simulations, I worked on an agent-based simulation. The program was written in C++ and designed to run on the Linux platform. While another student worked on an OpenGL visualizer and interface for the simulation, I concentrated on the simulation itself. Unfortunately, the other student never got the fancy 3-D interface working, but I was able to render the simulation on the Linux console using the NCurses library. This was enough of a visualizer to depict the events in the simulation. Below are screenshots of four major phases of the project.

Phase 1

Simple Agent based simulation

The first version of the agent simulation simply had random moving agents that passed an imaginary pathogen on agent-to-agent contact in the simulated environment. In this screenshot, the infected agent is shown in red, represented by the B.
(click on the image to enlarge)

Phase 2

Agent based simulation with objects

The second version of the simulation added better pathogen propagation tracking, where each new pass of the pathogen made the infected agent appear in a new color. In addition, the agents became cognizant of walls and other impassable objects.
(click on the image to enlarge)

Phase 3

Agent based simulation with pathing

The third stage of development changed the movement of the agents from random 'jitter' movement, to determined paths. The agents still randomly choose a destination, but then would move along a path to that destination before choosing a new destination cell.
(click on the image to enlarge)

Phase 4

Agent based simulation with atmosphere and pathing

The final version attempted brought a new method for pathogen propagation. Agents now 'breathed' and thus sick agents exhaled pathogens into the air, and other agents could then inhale these pathogens. The airborne pathogens then had a settling/decay rate, much like real TB spread. If an infected agent lingered too long in one area, that area would receive a concentrated cloud (seen as white blocks) of pathogens which increased the probability of propagation to another agent. This version also added more tracking parameters seen on the bottom of the screen.
(click on the image to enlarge)

Further Work

At the end of the semester for which I was working on this simulator, I was at the point of adding partial artificial intelligence to the agents. The goal was to make the agent movement less random and more life-like. Each agent had need thresholds, such as needing sleep, food, drink, communication, etc. These needs grew over time, and when a certain threshold was reached, the agent would move towards a location in the virtual world that could fulfill the need. This development was not completed by the end of the semester, but others have continued to work on this agent-based epidemiology simulation model while I have focused more on cellular automata models and the implications of high-performance computing (clusters) for epidemiology.