dime-worldbank/Disease-Modelling-SSA

Make demography predetermine mortality at the first step of simulation rather than scheduling multiple times

RobertManningSmith opened this issue · 0 comments

Currently mortality is initially decided at the start of the year. Those who are determined to die do so, those that aren't have their mortality decided again once the next simulation year happens.

We could probably reduce the number of times this happens as follows:

  1. Include a simulation length variable in the sim object say N days
  2. At the start of the simulation do mortality calculations for each person for the time period that the simulation is being run. (I.e. say we run for 800 days, floor (800 / 365) = 2 (years). Calculate the probability of dying in the simulation for each person at age A as prob_dying(A) + prob_dying(A+1) to cover probability of death for both years)
  3. Schedule death for some point in the simulation using existing structures