-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use rounding for treatments #203
base: main
Are you sure you want to change the base?
Conversation
Update to PoPS Core with rounding for treatments.
this->get_treated(i, j, host_pool.infected_at(i, j)); | ||
std::vector<double> remove_mortality; | ||
// Treated infected are computed as a sum of treated in mortality groups. | ||
int remove_infected = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't remove infected individuals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails tests and leaves all infected in the cells. The susceptible call above works as it should though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more complex than I thought yesterday, i.e., it is not a simple oversight. This is an initial value of a sum. The infected ones are computed as a sum of removed individuals from mortality groups (line 184), and then they are passed to HostPool::completely_remove_hosts_at just like before (lines 191-197). The infected is passed as a 5th argument and simply subtracted in that function from the infected raster/matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ncsu-landscape-dynamics/pops-core#225 now has the update which allows for treatments with no mortality. I added a low level test for that to pops-core.
Merge branch 'main' of https://github.com/ncsu-landscape-dynamics/rpops into round-treatments # Conflicts: # inst/cpp/pops-core # inst/include/actions.hpp # inst/include/host_pool.hpp # inst/include/quarantine.hpp # inst/include/treatments.hpp
Update to PoPS Core with rounding for treatments.