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 simulation bug for vector allocation #90

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

joshwlambert
Copy link
Member

This PR closes #89 by fixing a bug in .sim_network_bp() whereby if the outbreak saturated but did not exceed the pre-allocated vectors in .sim_network_bp() then the calculation of the vector index (vec_idx) would be incorrect leading to a bug which failed in a replacement length zero error. This should be resolved in this PR by expanding the allocated vectors when the length of the vector is equalled as well as exceeded.

@joshwlambert joshwlambert added the internal Updates that only change internal functions label Mar 11, 2024
@joshwlambert joshwlambert merged commit 6161e1e into main Mar 11, 2024
8 checks passed
@joshwlambert joshwlambert deleted the fix_alloc_error branch March 11, 2024 14:24
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.

Errors when changing parameter values
1 participant