Conversation
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.
|
I computed a raster which is a difference 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: Before (max 6)After (max 3.8) |
Modified code and modified testFor 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.
Relative difference for average infected
Difference for average infected
|
…use treatment of infected is based on mortality groups
|
TODO: Split this into multiple PR to clear identify the source of differences. |
Replaces flooring in quarantine by rounding. The tests here still pass. The r.pops.spread test requires adjustment which can be previewed here: #218
Replaces flooring in quarantine by rounding. The tests here still pass. The r.pops.spread test requires adjustment which can be previewed here: #218
|
This is meant to be closed, but still using it now to track if all planned changes were done in individual PRs. |
|
No changes with the treatments being on main. Closing. (Replaced by individual rounding PRs.) |







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.