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.
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: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 atregion = 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.