Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RobertManningSmith opened this issue Apr 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@RobertManningSmith
Copy link
Collaborator

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
@RobertManningSmith RobertManningSmith added the enhancement New feature or request label Apr 26, 2024
@RobertManningSmith RobertManningSmith self-assigned this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant