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

Set minimum monthly EIR to 1% of the max monthly EIR #380

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading