Open wenzeslaus opened 6 months ago
I computed a raster which is a difference original_dead - new_dead
.
There are only cells with -1 in the first year (sum -414):
For the last year, it is more variable (min: -10, max: 13, sum: 5650, mean: 0.201901, mean excluding zeros: 1.13614):
The pattern copies the data.
The overall impact on the average infected count (5 runs) is significant:
For a selected r.pops.spread test (test_outputs_mortality_treatment, Check mortality together with treatment), the following counts of dead hosts are produced for the original version with floor (and some ceil) and the version with round.
In the test, I changed mortality from 0.5 to 0.4 for the new version with round which creates more aligned totals and the image is visually also more aligned with the original. This similarity is supported by the differences between average of infected.
year | floor, 0.5 | round, 0.4 |
---|---|---|
2019 | 782 | 713 |
2020 | 2483 | 2374 |
2021 | 6552 | 6771 |
2022 | 15037 | 16143 |
old - new) / ((old + new) / 2)
n: 15188
minimum: -2
maximum: 2
range: 4
mean: -0.0647932
mean of absolute values: 1.04301
standard deviation: 1.31813
sum: -984.079422039648
total null and non-null cells: 27984
total null cells: 12796
old - new
n: 27984
minimum: -4
maximum: 3.2
range: 7.2
mean: -0.0437536
mean of absolute values: 0.272727
standard deviation: 0.512051
sum: -1224.4
TODO: Split this into multiple PR to clear identify the source of differences.
Instead of floor or ceil, always round to the nearest integer value as soon as the floating point calculation is finished.
This changes results in r.pops.spread and presumably in rpops, too.