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

Fix time delay bug #95

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Fix time delay bug #95

merged 2 commits into from
Mar 21, 2024

Conversation

joshwlambert
Copy link
Member

@joshwlambert joshwlambert commented Mar 21, 2024

This PR addresses #92 by finding and fixing an error in the .sim_network_bp() function. Previously, the time delay between contacts (which also then influenced times of hospitalisation and death) were not being correctly added to the time of their ancestor due to a vector indexing bug. This PR attempts to fix this by correctly indexing the ancestors time of infection and adds the new time delay of the newly infected individual.

This should resolve the issue raised in #92 that the distribution of times of an outbreak is only a few days even when modifying the simulation parameters.

Snapshots for tests of sim_*() function have been updated with the new dates from the fix.

@joshwlambert joshwlambert added the internal Updates that only change internal functions label Mar 21, 2024
@joshwlambert joshwlambert merged commit feae880 into main Mar 21, 2024
7 checks passed
@joshwlambert joshwlambert deleted the fix_alloc_bug branch March 21, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Updates that only change internal functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant