ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

Computation of Scotland population is off slightly #751

Open peter-t-fox opened 3 years ago

peter-t-fox commented 3 years ago

In the ModelCommon.cpp source, the computation of the total population of Scotland is a sum of the populations of each health region. It is computed as:

    int scotlandPopulation = 0;
    for (unsigned int region = 0; region < obs.cases.size() - 1; ++region) {
        scotlandPopulation += obs.cases[region][0];
    }

However, obs.cases[0] is a header row which contains "-1" in column 0, which should not be included in the sum. The loop should start at region = 1

The effect on the results will be negligible (may in fact have no effect at all due to subsequent rounding), but it should be fixed. Note that a fix has already been implemented in the pipeline branch.

github-actions[bot] commented 3 years ago

Heads up @thibaud-porphyre @peter-t-fox - the "Covid19_EERAModel" label was applied to this issue.