-
Notifications
You must be signed in to change notification settings - Fork 1
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
Births to WLHIV #39
Closed
Closed
Births to WLHIV #39
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
37c5b3c
compiling, but looks like the adult population is not aligned
a899cd7
merge
bde0f00
something wrong with inputs files
94167c3
building
b3860ee
fixed indexing issue with cd4 eligilibity
1589b32
workingo n getting age 15 entrants in
77190fc
Get code compiling
r-ash ed5559e
going to abandon these changes
34a57f6
Add missing parameter into code generation
r-ash 9c9eb4f
just needing to align 15 yo entrants
6e8c62c
art dropout for adults, survival, and mig must be set to zero to get …
0fb53e4
note to self, see email with notes on issues here
c8ec536
quick save
b02d6fd
pushing for Rob, something is not resetting when it is run twice
c585c83
aligning births and adult populations
2c695b1
input files updated
cf7152e
Fix issue where input data was being modified
r-ash fb270fe
Merge branch 'mkw_births_wlhiv' of github.com:mrc-ide/frogger into mk…
r-ash 1ad0cd5
changed elig input to int
6127d20
Update inst/include/child_model_simulation.hpp
mwalte10 7d9af54
Update inst/include/child_model_simulation.hpp
mwalte10 14bd4c1
Update inst/include/child_model_simulation.hpp
mwalte10 543b2d9
Update inst/include/child_model_simulation.hpp
mwalte10 4a27ec9
removed testing
3d68e33
Merge branch 'main' into mkw_births_wlhiv
r-ash 5f1a70c
Upgrade before installing valgrind
r-ash 1effc7a
Fix up codefactor issues
r-ash 7356db2
More formatting
r-ash 5b3a2c1
More spacing fixes
r-ash 67ee6a6
Merge branch 'main' into mkw_births_wlhiv
r-ash 17a9f75
creating more standard data
cd082ea
test data created for adult population, must be on the master branch …
a98aef4
Make script executable
r-ash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,14 +42,19 @@ void run_age_15_entrants(int time_step, | |
static_assert(ModelVariant::run_child_model, | ||
"run_hiv_child_infections can only be called for model variants where run_child_model is true"); | ||
constexpr auto ss = StateSpace<ModelVariant>().base; | ||
constexpr auto ss_child = StateSpace<ModelVariant>().children; | ||
constexpr auto hc_ss = StateSpace<ModelVariant>().children; | ||
|
||
|
||
//TO DO: add ART entrants here | ||
for (int g = 0; g < ss.NS; ++g) { | ||
for (int hm = 0; hm < ss.hDS; ++hm) { | ||
for (int htm = 0; htm < ss_child.hcTT; ++htm) { | ||
intermediate.children.age15_hiv_pop(hm, g) += state_curr.children.hc2_hiv_pop(hm, htm, ss_child.hc2AG, g); | ||
for (int htm = 0; htm < hc_ss.hcTT; ++htm) { | ||
intermediate.children.age15_hiv_pop(hm, g) += state_curr.children.hc2_hiv_pop(hm, htm, (hc_ss.hc2AG-1), g); | ||
} | ||
} | ||
} | ||
for (int g = 0; g < ss.NS; ++g) { | ||
for (int hm = 0; hm < hc_ss.hc2DS; ++hm) { | ||
for (int hu = 0; hu < ss.hTS; ++hu) { | ||
intermediate.children.age15_art_pop(hu, hm, g) += state_curr.children.hc2_art_pop(hu, hm, (hc_ss.hc2AG-1), g); | ||
} | ||
} | ||
} | ||
|
@@ -62,6 +67,8 @@ void run_hiv_and_art_stratified_ageing(int time_step, | |
State<ModelVariant, real_type> &state_next, | ||
IntermediateData<ModelVariant, real_type> &intermediate) { | ||
constexpr auto ss = StateSpace<ModelVariant>().base; | ||
constexpr auto hc_ss = StateSpace<ModelVariant>().children; | ||
const auto cpars = pars.children; | ||
// age coarse stratified HIV population | ||
for (int g = 0; g < ss.NS; ++g) { | ||
int a = pars.base.options.p_idx_hiv_first_adult; | ||
|
@@ -99,19 +106,30 @@ void run_hiv_and_art_stratified_ageing(int time_step, | |
} | ||
|
||
// TODO: add HIV+ 15 year old entrants see https://github.com/mrc-ide/leapfrog/issues/8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this TODO be removed now? |
||
for (int g = 0; g < ss.NS; ++g) { | ||
for (int hm = 0; hm < ss.hDS; ++hm) { | ||
state_next.base.h_hiv_adult(hm, 0, g) = | ||
if constexpr (ModelVariant::run_child_model) { | ||
for (int g = 0; g < ss.NS; ++g) { | ||
for (int hm = 0; hm < ss.hDS; ++hm) { | ||
for (int hm_adol = 0; hm_adol < hc_ss.hc2DS; ++hm_adol){ | ||
state_next.base.h_hiv_adult(hm, 0, g) += intermediate.children.age15_hiv_pop(hm_adol, g) * cpars.children.adult_cd4_dist(hm, hm_adol); | ||
if ((time_step > pars.base.options.ts_art_start)) { | ||
for (int hu = 0; hu < ss.hTS; ++hu) { | ||
state_next.base.h_art_adult(hu,hm, 0, g) += intermediate.children.age15_art_pop(hu, hm_adol, g) * cpars.children.adult_cd4_dist(hm, hm_adol); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
} else { | ||
for (int g = 0; g < ss.NS; ++g) { | ||
for (int hm = 0; hm < ss.hDS; ++hm) { | ||
state_next.base.h_hiv_adult(hm, 0, g) = | ||
(1.0 - intermediate.base.hiv_age_up_prob(0, g)) * state_curr.base.h_hiv_adult(hm, 0, g); | ||
// ADD HIV+ entrants here | ||
if (time_step > pars.base.options.ts_art_start) { | ||
for (int hu = 0; hu < ss.hTS; ++hu) { | ||
state_next.base.h_art_adult(hu, hm, 0, g) = | ||
(1.0 - intermediate.base.hiv_age_up_prob(0, g)) * | ||
if (time_step > pars.base.options.ts_art_start) { | ||
for (int hu = 0; hu < ss.hTS; ++hu) { | ||
state_next.base.h_art_adult(hu, hm, 0, g) = (1.0 - intermediate.base.hiv_age_up_prob(0, g)) * | ||
state_curr.base.h_art_adult(hu, hm, 0, g); | ||
// ADD HIV+ entrants here | ||
// artpop_t(hu, hm, 0, g, t) += paedsurv_g * | ||
// paedsurv_artcd4dist(hu, hm, g, t) * entrantartcov(g, t); | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted about this but I think worth making this a
int
whilst you're here