We want to keep track of the total number of people in each disease state at each time interval of the simulation. Since this is a micropopulation, not a macropopulation model, we need to do a census. If you prefer, you may do this. See how this census accumulator is declared in simulator.h and used in simulator.c . We have sketched a diagram that describes how we would like the state transitions to be performed.
Additional notes clarify the transition processes.
The parameters and methods are declared in Flu.h . Notice that we have also added short comments describing some of the methods. In Flu.c , default values are assigned to the constants and the methods are fleshed out. Describing the force of infection, which moves people from susceptible to infectious, is probably the most controversal issue in mathematical epidemiology. In this example we have chosen not to model these contacts explicitly.