Skip to content

Commit

Permalink
Set minimum monthly EIR to 1% of the max monthly EIR (#380)
Browse files Browse the repository at this point in the history
* set minimum monthly EIR to 1% of the max monthly EIR

* update tests
  • Loading branch information
acavelan authored Jan 17, 2024
1 parent 505fc6c commit 7f78dd7
Show file tree
Hide file tree
Showing 9 changed files with 2,127 additions and 2,110 deletions.
9 changes: 5 additions & 4 deletions model/Transmission/transmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,18 @@ inline Anopheles::AnophelesModel *createAnophelesModel(size_t i, const scnXml::A
const scnXml::MonthlyValues::ValueSequence seq = seasM.getValue();
assert(seq.size() == N_m); // enforced by schema
vector<double> months(N_m);
double sum = 0.0;
double maxEIR = months[0];
for (size_t i = 0; i < N_m; ++i)
{
months[i] = seq[i];
sum += months[i];
if(months[i] > maxEIR)
maxEIR = months[i];
}
// arbitrary minimum we allow (cannot have zeros since we take the logarithm)
double min = sum / 1000.0;
double min = maxEIR / 100.0;
for (size_t i = 0; i < N_m; ++i)
{
if (months[i] < min) months[i] = min;
if (months[i] < min) months[i] += min;
}

FSCoeffic.assign(5, 0.0);
Expand Down
290 changes: 145 additions & 145 deletions test/expected/ctsout2ITNs.txt

Large diffs are not rendered by default.

290 changes: 145 additions & 145 deletions test/expected/ctsoutIRS30.txt

Large diffs are not rendered by default.

290 changes: 145 additions & 145 deletions test/expected/ctsoutRach5IC.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 7f78dd7

Please sign in to comment.