What to do
The tasks below are described in a way that assumes everything is in units of MONTHS (rate parameters, therefore, have units of inverse months). If any quantity is not given in those units, you need to convert it first (e.g. if it says a year, you need to convert it to 12 months).
Some of the simulations might take a few seconds to run. Be patient.
Task 1:
- Set the model parameters such that it corresponds to the following setting:
- 1000 initially susceptible hosts, 1 initially infected and presymptomatic host, simulation duration (approximately) 10 years.
- Assume that only symptomatic individuals transmit, at rate bI = 0.002 and that there is no seasonal variation.
- Assume that the duration of the symptomatic period is 1 month long. (Hint: The parameter gI is the inverse of this period.)
- Assume that the duration of the presymptomatic period is approximately 6 days long. (Make sure you convert units correctly.)
- Assume that there are no asymptomatic infections. You can, therefore, set the rate of recovery of asymptomatics, gA to anything, it doesn’t matter because nobody will be asymptomatic.
- Assume nobody dies due to disease, and immunity does not wane.
- Assume that there are no births and non-disease deaths occurring.
- With parameters set to correspond to the scenario just described, run the simulation and ensure you get a single outbreak.
Task 2:
- Next, turn on births and deaths. It’s always good to check parts of a model. Here, we want to first look at births and deaths in the absence of disease. Therefore, set initial number of presymptomatic to 0, keep the numer of susceptible at 1000.
- Set the natural death rate, n, to a value that corresponds to an average lifespan of 41 years. Recall that the unit of n needs to be in 1/months. You, therefore, need to convert lifespan to months, then take the inverse to get the death rate. Round to the first significant digit (i.e. 0.00X).
- Set the birth rate to m=4 per month.
- Also increase the simulation duration to 1000 years. (Depending on the speed of your computer, it will take several seconds for the simulation to finish).
- It is possible to compute the steady state population size of susceptibles in the absence of infection, by setting the differential equation for S to 0 and solving for S as a function of birth and death parameters. Compute this quantity and make sure it’s the same you get from the simulation (once it has settled down to a steady state).
Task 3:
- Try out different values for the initial population size, run the simulation and note what you get for the final, steady-state population size.
- Try out different values for the birth and death rate and note how that influences the final, steady-state population size.
- Compare with the theory/math and your expectations.
Task 4:
- Next, set the birth and death rate as in task #2 and also adjust the population size to the steady state value you found in task #2. We do that because we don’t want a mixing of underlying population growth/decline dynamics on top if the ID dynamics. That would make it more complicated to understand what’s going on. (You get to do that later).
- Ensure that if you run the simulation now, nothing changes.
- Now introduce an infected individual, with other values as set in task #1. If needed, adjust the simulation duration to see the initial pattern and have everything reach the steady state.
- What do you expect to see? Run the simulation, compare expectations with results.
Task 5:
- It is also possible to compute the steady state value of S for the endemic scenario for an SIR model (see e.g. (Vynnycky and White 2010) or (Keeling and Rohani 2008)). Since individuals spend a very short time in P compared to I, and nobody enters A and D, we are approximately running an SIR model. Let the model run to the steady state, record the number of susceptibles at the end of the simulation (make sure you set the simulation time long enough for the system to settle into a steady-state).
- Compare the value obtained from the simulation with that from the endemic steady state equation for S found by solving the equations. They should (approximately) agree.
- You can also check it for I and R.
Task 6:
- The patterns we’ve seen so far are oscillations/cycles (i.e. repeated outbreaks) that eventually settle down to a steady state. The oscillations are what is often referred to as intrinsic, purely produced by the interplay between depletion of susceptibles due to infection and replenishment due to birth.
- Waning immunity is another mechanism of resource replenishment. To investigate that, set everything as in task #1 (i.e. no more births and deaths). Do a quick run to ensure you get a single outbreak.
- Now, assume that immunity wanes within on average 10 months.
- Think about your expectations, run the simulation and check with what you expected.
- Double the duration of immunity. What do you expect? What do you see?
Task 7:
- Now combine births and deaths with waning immunity. Explore how the two different mechanisms interact and influence the observed ID dynamics.
Task 8:
- So far, the cycles were due to the intrinsic dynamics of the system. Now we’ll explore what happens if some outside phenomenon - e.g. the weather - influences some model parameters. This is systematically different than before, where we kept all parameters constant while the simulation was running. This is not the case when we use the s parameter. Specifically, the model allows you to let the transmission rates vary sinusoidally with a period of 1 year.
- Set everything as in task #1, do a quick run to make sure you only get one outbreak.
- Now try different non-zero values for the parameter s. Think about your expectations. Run the model and compare. Figure out why you see what you see.
Task 9:
- Assume now that immunity wanes within 10 months. Also, set the strength of seasonal variation to 0.5.
- Think about your expectations. Run the model and compare. Adjust the simulation time to “zoom in/out”.
- Play around with Sigma and the duration of immunity, see how different values affect the patterns you see.
- Contemplate the main difference between the pattern you now observe and the ones you’ve seen so far with no external/seasonal driver.
Task 10:
- Go crazy! You can let people enter the A and D compartments, have an underlying growing or declining population in the absence of disease and let the disease run on top of it, allow for birth/death, waning immunity and seasonality, etc.
- There is lots to explore. While it can be fun running simulations with random parameters, I suggest a more deliberate exploration. Before you run a simulation, think about what you expect. Then run and compare results with expectations. If they don’t agree, try to figure out what’s going on. This way, you will gain more and more insight into how the different components and processes influence the observed outcome - the basics of a systems science approach.