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

Ebola model based on Getz and Dougherty #71

Merged
merged 51 commits into from
Aug 7, 2023
Merged

Conversation

pratikunterwegs
Copy link
Collaborator

@pratikunterwegs pratikunterwegs commented Jul 14, 2023

This PR adds an initial implementation of an SEIR ebola model using Erlang passage times, based on Getz and Dougherty (2017), and adpated from Epirecipes.

This PR also fixes #77, and this issue was only picked up during local testing on Ubuntu 23.04.

@pratikunterwegs pratikunterwegs self-assigned this Jul 14, 2023
@pratikunterwegs pratikunterwegs added Enhancement C++ Related to C++ code New model Propose or discuss a new model for {epidemics} labels Jul 14, 2023
@pratikunterwegs
Copy link
Collaborator Author

Checks failing on Linux, and intermittently on Windows due to a memory error - will work this out in time.

@pratikunterwegs
Copy link
Collaborator Author

Calling @TimTaylor and @BlackEdder - any idea why this PR fails checks on Linux and Windows? I'm not able to fix or even diagnose the issue on my Linux machine.

@TimTaylor
Copy link
Contributor

Errors for me. Fedora 38, gcc 13.1.1, R 4.3.1. Afraid I've no time to debug this so you probably need to spin up a Rocker Container and trying to reproduce in there.

@TimTaylor
Copy link
Contributor

Errors for me. Fedora 38, gcc 13.1.1, R 4.3.1. Afraid I've no time to debug this so you probably need to spin up a Rocker Container and trying to reproduce in there.

Here is the error message though:

/usr/include/c++/13/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = double; _Alloc = std::allocator<double>; reference = double&; size_type = long unsi
       │ gned int]: Assertion '__n < this->size()' failed.

Suggests that you've gone over a bound somewhere in the new ebola model.

@pratikunterwegs
Copy link
Collaborator Author

Thanks @TimTaylor, now debugging on my Ubuntu machine and get something different but related to bounds as well. Surprising that this passes on MacOS though.

@TimTaylor
Copy link
Contributor

probably gcc being stricter than clang (in a good way). Maybe there are some flags you can set but 🤷

@pratikunterwegs
Copy link
Collaborator Author

Thanks - the issue turned out to be in .prob_discrete_erlang(). Still surprising since there are equivalence checks between this and the R implementation.

@pratikunterwegs pratikunterwegs marked this pull request as ready for review August 1, 2023 16:47
@pratikunterwegs pratikunterwegs merged commit a3b308b into main Aug 7, 2023
12 checks passed
@pratikunterwegs pratikunterwegs deleted the feature/ebola-model branch August 7, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Related to C++ code New model Propose or discuss a new model for {epidemics}
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Correct cumulative intervention implementation code
2 participants