Skip to content

Commit

Permalink
Merge pull request #38 from mrc-ide/v1.6.9
Browse files Browse the repository at this point in the history
patch: net-migration in artpop in first ART year
  • Loading branch information
m-maheu-giroux committed Nov 20, 2023
2 parents 200d2e4 + ebfbbbc commit a0d28ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: first90
Version: 1.6.8
Version: 1.6.9
Title: The first90 model
Description: Implements the Shiny90 model for estimating progress towards the UNAIDS "first 90" target for HIV awareness of status in sub-Saharan Africa.
Authors@R:
Expand All @@ -25,7 +25,7 @@ Encoding: UTF-8
LazyData: true
ByteCompile: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Depends:
R (>= 2.10)
Imports:
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# first90 1.6.7
# first90 1.6.9

* Bug fix: account for end-year net migration in the ART population in the first year of ART start (implemented in v1.6.0).

# first90 1.6.8

* Don't interpolate number aware outputs in Spectrum output table when using calendar year interpolation.

Expand Down
8 changes: 4 additions & 4 deletions src/eppasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ extern "C" {
pop[t][HIVP][g][a] += hmig_a;

mig_ha += hmig_a;
if (t > t_hts_start) {
if (t >= t_hts_start) {
mig_hivn_ha += nmig_a;
}
a++;
Expand All @@ -1105,17 +1105,17 @@ extern "C" {
// migration for hivpop
double migrate_ha = hivpop_ha > 0 ? mig_ha / hivpop_ha : 0.0;

if(t > t_hts_start) {
if(t >= t_hts_start) {
double migrate_hivn_ha = hivnpop_ha > 0 ? mig_hivn_ha / hivnpop_ha : 0.0;
testnegpop[t][HIVN][g][ha] *= 1+migrate_hivn_ha;
testnegpop[t][HIVP][g][ha] *= 1+migrate_ha;
}

for(int hm = 0; hm < hDS; hm++){
hivpop[t][g][ha][hm] *= 1+migrate_ha;
if(t > t_hts_start)
if(t >= t_hts_start)
diagnpop[t][g][ha][hm] *= 1+migrate_ha;
if(t > t_ART_start)
if(t >= t_ART_start)
for(int hu = 0; hu < hTS; hu++)
artpop[t][g][ha][hm][hu] *= 1+migrate_ha;
} // loop over hm
Expand Down

0 comments on commit a0d28ce

Please sign in to comment.