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

Births to WLHIV #39

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
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
Aug 8, 2023
a899cd7
merge
Sep 15, 2023
bde0f00
something wrong with inputs files
Sep 15, 2023
94167c3
building
Sep 15, 2023
b3860ee
fixed indexing issue with cd4 eligilibity
Sep 15, 2023
1589b32
workingo n getting age 15 entrants in
Sep 20, 2023
77190fc
Get code compiling
r-ash Sep 28, 2023
ed5559e
going to abandon these changes
Sep 28, 2023
34a57f6
Add missing parameter into code generation
r-ash Sep 28, 2023
9c9eb4f
just needing to align 15 yo entrants
Sep 28, 2023
6e8c62c
art dropout for adults, survival, and mig must be set to zero to get …
Sep 29, 2023
0fb53e4
note to self, see email with notes on issues here
Sep 29, 2023
c8ec536
quick save
Oct 2, 2023
b02d6fd
pushing for Rob, something is not resetting when it is run twice
Oct 2, 2023
c585c83
aligning births and adult populations
Oct 2, 2023
2c695b1
input files updated
Oct 2, 2023
cf7152e
Fix issue where input data was being modified
r-ash Oct 2, 2023
fb270fe
Merge branch 'mkw_births_wlhiv' of github.com:mrc-ide/frogger into mk…
r-ash Oct 2, 2023
1ad0cd5
changed elig input to int
Oct 2, 2023
6127d20
Update inst/include/child_model_simulation.hpp
mwalte10 Oct 7, 2023
7d9af54
Update inst/include/child_model_simulation.hpp
mwalte10 Oct 7, 2023
14bd4c1
Update inst/include/child_model_simulation.hpp
mwalte10 Oct 7, 2023
543b2d9
Update inst/include/child_model_simulation.hpp
mwalte10 Oct 7, 2023
4a27ec9
removed testing
Oct 9, 2023
3d68e33
Merge branch 'main' into mkw_births_wlhiv
r-ash Oct 12, 2023
5f1a70c
Upgrade before installing valgrind
r-ash Oct 12, 2023
1effc7a
Fix up codefactor issues
r-ash Oct 12, 2023
7356db2
More formatting
r-ash Oct 12, 2023
5b3a2c1
More spacing fixes
r-ash Oct 12, 2023
67ee6a6
Merge branch 'main' into mkw_births_wlhiv
r-ash Oct 20, 2023
17a9f75
creating more standard data
Oct 24, 2023
cd082ea
test data created for adult population, must be on the master branch …
Oct 24, 2023
a98aef4
Make script executable
r-ash Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/valgrind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
- uses: actions/checkout@v2

- name: install valgrind
run: sudo apt-get -y install valgrind
run: |
sudo apt-get update
sudo apt-get -y install valgrind

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
8 changes: 7 additions & 1 deletion R/generate_cpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,13 @@ generate_return <- function() {
" hc2_art_mort,",
" hc_art_isperc,",
" hc_art_val,",
" hc_art_init_dist",
" hc_art_init_dist,",
" adult_cd4_dist,",
" fert_mult_by_age,",
" fert_mult_offart,",
" fert_mult_onart,",
" total_fertility_rate,",
" local_adj_factor",
" };",
" const leapfrog::ChildModelParameters<ModelVariant, real_type> child_model_params = {",
" child",
Expand Down
8 changes: 7 additions & 1 deletion inst/cpp_generation/model_input.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ paed_cd4_prog,hc1_cd4_prog,real_type,ModelVariant::run_child_model,,FALSE,1,chil
adol_cd4_prog,hc2_cd4_prog,real_type,ModelVariant::run_child_model,,FALSE,1,children.hc2DS,,,
ctx_effect,ctx_effect,real_type,ModelVariant::run_child_model,,FALSE,1,1,,,
ctx_val,ctx_val,real_type,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
paed_art_elig_age,hc_art_elig_age,real_type,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
paed_art_elig_age,hc_art_elig_age,int,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
paed_art_elig_cd4,hc_art_elig_cd4,real_type,ModelVariant::run_child_model,,TRUE,2,options.p_idx_hiv_first_adult,proj_years,,
Copy link
Contributor

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

mort_art_rr,hc_art_mort_rr,real_type,ModelVariant::run_child_model,,FALSE,3,base.hTS,options.p_idx_hiv_first_adult,proj_years,
paed_art_mort,hc1_art_mort,real_type,ModelVariant::run_child_model,,FALSE,3,children.hc1DS,base.hTS,children.hc1AG,
adol_art_mort,hc2_art_mort,real_type,ModelVariant::run_child_model,,FALSE,3,children.hc2DS,base.hTS,children.hc2AG,
artpaeds_isperc,hc_art_isperc,int,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
paed_art_val,hc_art_val,real_type,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
init_art_dist,hc_art_init_dist,real_type,ModelVariant::run_child_model,,FALSE,2,options.p_idx_hiv_first_adult,proj_years,,
adult_cd4_dist,adult_cd4_dist,real_type,ModelVariant::run_child_model,,FALSE,2,base.hDS,children.hc2DS,,
fert_mult_by_age,fert_mult_by_age,real_type,ModelVariant::run_child_model,,FALSE,1,options.p_fertility_age_groups,,,
fert_mult_offart,fert_mult_offart,real_type,ModelVariant::run_child_model,,FALSE,1,base.hDS,,,
fert_mult_onart,fert_mult_onart,real_type,ModelVariant::run_child_model,,FALSE,1,options.p_fertility_age_groups,,,
tfr,total_fertility_rate,real_type,ModelVariant::run_child_model,,FALSE,1,proj_years,,,
laf,local_adj_factor,real_type,ModelVariant::run_child_model,,FALSE,1,1,,,
1 change: 1 addition & 0 deletions inst/cpp_generation/model_input.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ leapfrog::Parameters<ModelVariant, real_type> setup_model_params(const Rcpp::Lis
initiation_mortality_weight
};


const leapfrog::BaseModelParameters<real_type> base_model_params = {
options,
demography,
Expand Down
1 change: 1 addition & 0 deletions inst/cpp_generation/model_output.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ hc2_noart_aids_deaths,hc2_noart_aids_deaths,REAL,ModelVariant::run_child_model,5
hc1_art_aids_deaths,hc1_art_aids_deaths,REAL,ModelVariant::run_child_model,5,base.hTS,children.hc1DS,children.hc1AG,base.NS,output_years
hc2_art_aids_deaths,hc2_art_aids_deaths,REAL,ModelVariant::run_child_model,5,base.hTS,children.hc2DS,children.hc2AG,base.NS,output_years
hc_art_num,hc_art_num,REAL,ModelVariant::run_child_model,1,output_years,,,,
hiv_births,hiv_births,REAL,ModelVariant::run_child_model,1,output_years,,,,
96 changes: 79 additions & 17 deletions inst/include/child_model_simulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void hc_initiate_art_by_cd4(int time_step,
for (int cat = 0; cat < hc_ss.hcTT; ++cat) {
for (int a = cpars.hc_art_elig_age(time_step); a < pars.base.options.p_idx_fertility_first; ++a) {
for (int hd = 0; hd < hc_ss.hc1DS; ++hd) {
if (hd >= cpars.hc_art_elig_cd4(a, time_step)) {
if (hd >= (cpars.hc_art_elig_cd4(a, time_step))) {
if (a < hc_ss.hc2_agestart) {
intermediate.children.hc_art_need(hd, cat, a, s) += state_next.children.hc1_hiv_pop(hd, cat, a, s);
} else if (hd < hc_ss.hc2DS) {
Expand Down Expand Up @@ -318,7 +318,7 @@ void hc_adjust_art_initiates_for_mort(int time_step,
for (int dur = 0; dur < ss.hTS; ++dur) {
if (intermediate.children.hc_art_init(hd, cat, a, s) < 0) {
intermediate.children.hc_art_init(hd, cat, a, s) = 0.0;
}else{
} else {
intermediate.children.hc_art_init(hd, cat, a, s) = intermediate.children.hc_art_init(hd, cat, a, s);
}
}// end ss.hTS
Expand Down Expand Up @@ -403,7 +403,7 @@ void hc_art_num_num(int time_step,
for (int dur = 0; dur < ss.hTS; ++dur) {
if (a < hc_ss.hc2_agestart) {
state_next.children.hc_art_num -= state_next.children.hc1_art_pop(dur, hd, a, s);
}else if (hd < (hc_ss.hc2DS)) {
} else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc_art_num -= state_next.children.hc2_art_pop(dur, hd, a-hc_ss.hc2_agestart, s);
}
}// end ss.hTS
Expand Down Expand Up @@ -438,7 +438,7 @@ void hc_art_pct_pct(int time_step,
if (a < hc_ss.hc2_agestart) {
state_next.children.hc_art_num += state_next.children.hc1_art_pop(dur, hd, a, s);
state_next.children.hc_art_num += state_next.children.hc1_art_aids_deaths(dur,hd, a, s);
}else if (hd < (hc_ss.hc2DS )) {
} else if (hd < (hc_ss.hc2DS )) {
state_next.children.hc_art_num += state_next.children.hc2_art_pop(dur, hd, a-hc_ss.hc2_agestart, s);
state_next.children.hc_art_num += state_next.children.hc2_art_aids_deaths(dur,hd, a-hc_ss.hc2_agestart, s);
}
Expand All @@ -455,7 +455,7 @@ void hc_art_pct_pct(int time_step,
for (int dur = 0; dur < ss.hTS; ++dur) {
if (a < hc_ss.hc2_agestart) {
state_next.children.hc_art_num -= state_next.children.hc1_art_pop(dur, hd, a, s);
}else if (hd < (hc_ss.hc2DS)) {
} else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc_art_num -= state_next.children.hc2_art_pop(dur, hd, a-hc_ss.hc2_agestart, s);
}
} // end ss.hTS
Expand Down Expand Up @@ -535,7 +535,7 @@ void hc_art_pct_num(int time_step,
for (int dur = 0; dur < ss.hTS; ++dur) {
if (a < hc_ss.hc2_agestart) {
state_next.children.hc_art_num -= state_next.children.hc1_art_pop(dur, hd, a, s);
}else if (hd < (hc_ss.hc2DS)) {
} else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc_art_num -= state_next.children.hc2_art_pop(dur, hd, a-hc_ss.hc2_agestart, s);
}
} // end ss.hTS
Expand Down Expand Up @@ -591,7 +591,7 @@ void hc_art_initiation_by_age(int time_step,
} // end ss.NS
if (intermediate.children.hc_initByAge == 0.0) {
intermediate.children.hc_adj = 1.0 ;
}else{
} else {
intermediate.children.hc_adj = state_next.children.hc_art_num / intermediate.children.hc_initByAge;
}
for (int s = 0; s <ss.NS; ++s) {
Expand All @@ -600,25 +600,24 @@ void hc_art_initiation_by_age(int time_step,
for (int hd = 0; hd < hc_ss.hc1DS; ++hd) {
if ((intermediate.children.hc_adj * cpars.hc_art_init_dist(a, time_step)) > 1.0) {
intermediate.children.hc_art_scalar = 1.0;
}else{
} else {
intermediate.children.hc_art_scalar = intermediate.children.hc_adj * cpars.hc_art_init_dist(a, time_step);
}
if (state_next.children.hc_art_num > 0.0) {
intermediate.children.hc_art_scalar = intermediate.children.hc_art_scalar;
}else{
} else {
intermediate.children.hc_art_scalar = 0.0;
}
if (a < hc_ss.hc2_agestart) {
state_next.children.hc1_art_pop(0, hd, a, s) += intermediate.children.hc_art_scalar * intermediate.children.hc_art_init(hd, cat, a, s);
}else if (hd < (hc_ss.hc2DS)) {
} else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc2_art_pop(0, hd, a - hc_ss.hc2_agestart, s) += intermediate.children.hc_art_scalar * intermediate.children.hc_art_init(hd, cat, a, s);
}
if (a < hc_ss.hc2_agestart) {
state_next.children.hc1_hiv_pop(hd, cat, a, s) -= intermediate.children.hc_art_scalar * intermediate.children.hc_art_init(hd, cat, a, s);
}else if (hd < (hc_ss.hc2DS )) {
} else if (hd < (hc_ss.hc2DS )) {
state_next.children.hc2_hiv_pop(hd, cat, a - hc_ss.hc2_agestart, s) -= intermediate.children.hc_art_scalar * intermediate.children.hc_art_init(hd, cat, a, s);
}

} //end ss.hc1DS
} // end a
} // end hcTT
Expand Down Expand Up @@ -650,10 +649,10 @@ void run_child_art_initiation(int time_step,
state_next.children.hc1_art_pop(1, hd, a, s) += state_next.children.hc1_art_pop(0, hd, a, s);
state_next.children.hc1_art_pop(0, hd, a, s) -= state_next.children.hc1_art_pop(0, hd, a, s);
}
}else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc2_art_pop(1, hd, a-hc_ss.hc2_agestart, s) += state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s);
state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s) -= state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s);
}
} else if (hd < (hc_ss.hc2DS)) {
state_next.children.hc2_art_pop(1, hd, a-hc_ss.hc2_agestart, s) += state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s);
state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s) -= state_next.children.hc2_art_pop(0, hd, a-hc_ss.hc2_agestart, s);
}
}//end ss.NS
}// end a
}// end ss.hc1DS
Expand Down Expand Up @@ -723,6 +722,67 @@ void run_child_art_mortality(int time_step,
}// end ss.hc1DS
}


template<typename ModelVariant, typename real_type>
void run_wlhiv_births(int time_step,
const Parameters<ModelVariant, real_type> &pars,
const State<ModelVariant, real_type> &state_curr,
State<ModelVariant, real_type> &state_next,
IntermediateData<ModelVariant, real_type> &intermediate) {
static_assert(ModelVariant::run_child_model,
"run_wlhiv_births can only be called for model variants where run_child_model is true");
constexpr auto ss = StateSpace<ModelVariant>().base;
const auto cpars = pars.children.children;
const auto demog = pars.base.demography;

for (int a = 0; a < pars.base.options.p_fertility_age_groups; ++a) {
intermediate.children.asfr_sum += demog.age_specific_fertility_rate(a, time_step);
} // end a

intermediate.children.births_sum = state_next.base.births;


for (int a = 0; a < pars.base.options.p_fertility_age_groups; ++a) {
intermediate.children.nHIVcurr = 0.0;
intermediate.children.nHIVlast = 0.0;
intermediate.children.df = 0.0;

for (int hd = 0; hd < ss.hDS; ++hd) {
intermediate.children.nHIVcurr += state_next.base.h_hiv_adult(hd, a, 1);
intermediate.children.nHIVlast += state_curr.base.h_hiv_adult(hd, a, 1);
for (int ht = 0; ht < ss.hTS; ++ht) {
intermediate.children.nHIVcurr += state_next.base.h_art_adult(ht, hd, a, 1);
intermediate.children.nHIVlast += state_curr.base.h_art_adult(ht, hd, a, 1);
} //end hTS
} //end hDS

intermediate.children.prev = intermediate.children.nHIVcurr / state_next.base.p_total_pop(a + 15,1);

for (int hd = 0; hd < ss.hDS; ++hd) {
intermediate.children.df += cpars.local_adj_factor * cpars.fert_mult_by_age(a) * cpars.fert_mult_offart(hd) * ((state_next.base.h_hiv_adult(hd, a, 1) + state_curr.base.h_hiv_adult(hd, a, 1)) / 2);
//women on ART less than 6 months use the off art fertility multiplier
intermediate.children.df += cpars.local_adj_factor * cpars.fert_mult_by_age(a) * cpars.fert_mult_offart(hd) * ((state_next.base.h_art_adult(0, hd, a, 1) + state_curr.base.h_art_adult(0, hd, a, 1)) / 2);
for (int ht = 1; ht < ss.hTS; ++ht) {
intermediate.children.df += cpars.local_adj_factor * cpars.fert_mult_onart(a) * ((state_next.base.h_art_adult(ht, hd, a, 1) + state_curr.base.h_art_adult(ht, hd, a, 1)) / 2);
} //end hTS
} // end hDS

if (intermediate.children.nHIVcurr > 0) {
intermediate.children.df = intermediate.children.df / ((intermediate.children.nHIVcurr + intermediate.children.nHIVlast) / 2);
} else {
intermediate.children.df = 1;
}

intermediate.children.birthsCurrAge = (intermediate.children.nHIVcurr + intermediate.children.nHIVlast) / 2 * cpars.total_fertility_rate(time_step) * intermediate.children.df / (intermediate.children.df * intermediate.children.prev + 1 - intermediate.children.prev) * demog.age_specific_fertility_rate(a, time_step) / intermediate.children.asfr_sum ;
intermediate.children.birthsHE += intermediate.children.birthsCurrAge;
if (a < 9) {
intermediate.children.births_HE_15_24 += intermediate.children.birthsCurrAge;
}
} // end a

state_next.children.hiv_births = intermediate.children.birthsHE;
}

}// namespace internal

template<typename ModelVariant, typename real_type>
Expand All @@ -732,15 +792,17 @@ void run_child_model_simulation(int time_step,
State<ModelVariant, real_type> &state_next,
internal::IntermediateData<ModelVariant, real_type> &intermediate) {
internal::run_child_ageing(time_step, pars, state_curr, state_next, intermediate);
internal::run_child_hiv_infections(time_step, pars, state_curr, state_next, intermediate);
internal::run_child_natural_history(time_step, pars, state_curr, state_next, intermediate);
internal::run_child_hiv_mort(time_step, pars, state_curr, state_next, intermediate);
internal::add_child_grad(time_step, pars, state_curr, state_next, intermediate);
//This is only the order for nosocomial infectiosn
internal::run_child_hiv_infections(time_step, pars, state_curr, state_next, intermediate);
// this function may need to be broken up, its around 350 lines
// !!!TODO: also need to fix the looping order for some loops
// !!!TODO: put this in an if statement to only run if the first year of ART has passed
internal::run_child_art_initiation(time_step, pars, state_curr, state_next, intermediate);
internal::run_child_art_mortality(time_step, pars, state_curr, state_next, intermediate);
internal::run_wlhiv_births(time_step, pars, state_curr, state_next, intermediate);
}

} // namespace leapfrog
1 change: 1 addition & 0 deletions inst/include/frogger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace leapfrog {


template<typename ModelVariant, typename real_type>
OutputState<ModelVariant, real_type> run_model(int time_steps,
std::vector<int> save_steps,
Expand Down
50 changes: 34 additions & 16 deletions inst/include/hiv_demographic_projection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand All @@ -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;
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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);
}
}
}
}
Expand Down
Loading
Loading