We have an application modeling Influenza in the United States. You can download it here. Macintosh OS X is required. The associated paper, Space-time influenza model with demographic, mobility, and vaccine parameters,
can be found here.
This application models HIV in Africa. You can download it here. Macintosh OS X is required.
We have developed a suite of software for deep combinatorial modeling of epidemic scenarios with a variety of mathematical models. The tools are written in C and Objective C and run on Macintosh OS X versions 10.2 and later.
Preparing a simulation
The software has a modular design allowing us to use different mathematical models. The suite currently consists of three epidemic models and two tools to interact with these models. A simple front end makes it easy to run a simulation with any model. The result is then saved into a file which can be replayed with the viewer tool.
Our current models are based on a simple conflagration model and the SIR (Susceptible, Infected, Recovered) model. We have an analog variant and a digital probabilistic variant of each model. We are running the models at Reed College's Center for Advanced Computation in order to investigate the fractal nature of survivor sets discovered by the project in the previous year.
A smallpox simulation
NLViewer is a visual tool for observing graphical representations of simulations on a 2-D lattice. Specifically, NLViewer provides a convenient, user-friendly method of investigating computations performed with the sirmodel tools.
The front end for the SIR model simplifies the process of creating one computation using a predefined distribution or a simple radial distribution to be viewed in NLViewer.
NLViewer is a visual tool for observing graphical representations of simulations on a 2-D lattice. Specifically, NLViewer provides a convenient, user-friendly method of investigating computations performed with sirmodel tools.
Although NLViewer is compatible with any application that makes use of history files (.tt) and lattice snapshots (.matrix), this documentation will focus primarily on the use of NLViewer with files created by running batchrecorder.
The NLViewer Icon
NLViewer does not perform any new computations of a model. Instead, NLViewer works like QuickTime or a VCR, displaying a visual representation of computations that were previously recorded to disk.
Inside this folder you'll find:
Contents of NLViewerDemo.dmg
Three windows will appear:
The Controls window |
The Viewer window |
|
The Details window |
Changing the path to the repository.
Select the NLViewerDemo volume, and click Open.
The ouline view table will now contain entries corresponding to the directories in the NLViewerDemo volume.
The Recordings row expands to display two new items: Other and SIRModel
Your table should now look like that in the picture below.
NLViewer after expanding items in the table
The table has three columns, labeled File, Size, and Transitions.
If a row in the table refers to a directory, then:
If a row in a table refers to a computational run, then:
Let's take a look at some of the computations that were recorded with batchrecorder.
The Viewer window is now updated to display a snapshot of the final state of the computational run you selected. The epidemic has run its course, and now only recovered (blue), susceptible (green), and dead (black) individuals remain. You'll notice that many of the buttons in the Controls window are now enabled.
Viewing the final state of a computation
Since the threeStageSIR computation was done on a 256 by 256 grid of cells, NLViewer automatically displays the image at twice its original size
Restarting the recorded computation
The Viewer window now displays a single clump of red and orange cells in the center of the window. These are the initially infected individuals that will seed an epidemic. The colors for infected individuals are as follows:
Zooming in
You can zoom in and out to get a closer view.
The red blotch will change position. You can move the image around like this with the mouse to view specific parts of the image close up.
Resetting the zoom
Now the entire lattice is visible in the Viewer window.
Stepping through the computation
The infection spreads. Orange cells appear, indicating that some individuals have proceeded to the second stage of infection.
The infection continues to spread. Yellow cells appear, indicating that some individuals have proceeded to the third stage of infection. In addition, there are now some black cells, representing those that have died during stage 2 or 3 of the infection.
Instead of clicking the button, you can also just press 'S' on the keyboard.
Speeding up the playback
Many frames (the number is specified to the right of the slider) were skipped before updating the display. This way you can speed up the animation.
As the epidemic progresses, blue cells appear, representing those that have recovered from the infection.
Playing a recorded computation
The Viewer window displays, like a movie, the spread of the epidemic. When no infected individuals remain, the animation stops. Notice that while the animation is playing, the Play button remains depressed. You can stop the animation at any time by pressing the Play button again.
You can now click on the Step button to proceed slowly through the animation. You can also zoom in and drag the image around to get a closer look.
Viewing the final state of the swathFire computation
A different image appears in the Viewer window, showing the final state of an epidemic in which no one survived. This is actually a conflagration model - a model of a forest fire. It is an SIR model with a single infected stage from which no cell recovers. Susceptible cells are perhaps dry trees that will burn if exposed to fire. Infected cells are burning trees, and recovered cells are burnt out trees.
All of this information is available in the Details window.
Reading the contents of the Details window
Infection Stage 1: (0.300000,0.000000,0.400000)
The second line of the Details window gives us some information about the infected stage for swathFire.
The first value tells us that at every step the probability of a fire jumping from a burning tree to a susceptible neighboring tree is 0.3.
The second value (0.000000) says that cells never recover (survive) the infection.
The last value (0.400000) says that at every step a burning tree has a 40% chance of burning out.
Other computations may have additional infection stages.
Fractal Dimension: 1.875675
The third line of the Details window shows the measured fractal dimension of the set of susceptible cells (in this case, also the survival set
) at the end of the computation. This number is obtained using a box-counting method and generally represents the self-similarity of the spreading infection over the space of the lattice.
Number of Transitions: 157222
The fourth line of the Details window shows the total number of times a cell changed its state during the course of the computation. This higher this number, the more voracious the disease, depending of course on how many infected stages it has.
Number of Steps: 1365
The total number of steps in this computation.
Seed: 0.990000
The number used to seed the random number generator.
Neighborhood Type: Standard
The neighborhood type determines whether two cells are adjacent.
Boundary Type: Horizontal
The boundary type determines how the edge of the grid interacts with the spread of the disease.
Survivors: 0
The number of recovered (blue) cells at the end of the computation.
Deaths: 78611
The number of burnt out (black) trees at the end of the computation.
Distribution: swath512_long.dist.tt
The file used to create the initial distribution of infected individuals.
We'll now watch this epidemic spread in Fullscreen mode. The image in the Viewer window will fill the screen (and you can no longer read this HTML file!) Since you will no longer have access to the menu or the Controls window, you'll need to use some hotkeys.
The most important hotkey: You can exit Fullscreen mode by pressing Command-F.
Enabling Fullscreen Mode
The Viewer window grows to fill the screen. You can zoom in by pressing Command-'+', and you can zoom out by pressing Command-'-'. You can still use the mouse to drag the image around.
Additionally, you can start and stop an animation by pressing Command-P. You can Restart the animation by pressing Command-S and you can step through the animation by pressing just 'S'. Press '+' to speed up the animation, and press '-' to slow it down.
You will notice that almost all of the commands can also be found in the menu items at the top of the screen, together with their corresponding hotkeys.
Most commands can be found in the menu, along with their associated hotkey.
The Mac OS X frontend for sirmodel simplifies the process of creating one computation using a predefined distribution or a simple radial distribution to be viewed in NLViewer.
The SIRModel Icon
This frontend for SIRModel does not display any graphics relating to the model. Currently it only provides the necessary files to be used with NLViewer.
Inside this folder you'll find:
The SIRModel Window
Contents of SIRFrontend.dmg
You must copy this file to your hard drive for the application to be able to output any files, since this application will output any files it makes into a folder named "data". If the folder does not exist, it will be created. Default values will be in place as an example of what kinds of input the application expects.
The first set of arguments are pretty much self explanatory:
The Neighborhood Menu
The Boundary Menu
There are three different variables you can set:
The Infection Stages Box
You can only add a new infection stage when the item selected is NEW
. If you select an existing infection stage from within the Stages Menu, you will be given a choice to remove or edit that infection stage.
A List of Infection Stages
Editing an Infection Stage
When removing an infection stage, the list will collapse so that there will be no gaps between infection stages. For example, if Infection 2
was removed from the list shown above, Infection 3
would become Infection 2
. Add as many or as few infection stages as you would like, but currently the maximum number allowed is 256.
The Initial Distribution Box
There is a choice of 2 types of initial distributions availible:
The Custom Distribution Tab