pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Treatments class manages all treatments. More...
#include <treatments.hpp>
Public Member Functions | |
Treatments (const Scheduler &scheduler) | |
~Treatments () | |
void | add_treatment (const FloatRaster &map, const Date &start_date, int num_days, TreatmentApplication treatment_application) |
Add treatment, based on parameters it is distinguished which treatment it will be. More... | |
bool | manage (unsigned current, IntegerRaster &infected, std::vector< IntegerRaster > &exposed, IntegerRaster &susceptible, IntegerRaster &resistant, IntegerRaster &total_hosts, const std::vector< std::vector< int >> &suitable_cells) |
Do management if needed. More... | |
bool | manage_mortality (unsigned current, IntegerRaster &infected, const std::vector< std::vector< int >> &suitable_cells) |
Separately manage mortality infected cohorts. More... | |
void | clear_after_step (unsigned step) |
Used to remove treatments after certain step. More... | |
Treatments class manages all treatments.
Treatments can be simple (host removal) and using pesticide (temporarily removed). Each treatment can have unique date, type (simple, pesticide), length (in case of pesticide), and treatment application.
Pesticide treatments should not overlap spatially AND temporally because of single resistance raster. In that case all resistant populations that overlap both spatially and temporally are returned to the susceptible pool when the first treatment ends.
Definition at line 329 of file treatments.hpp.
|
inline |
Definition at line 336 of file treatments.hpp.
|
inline |
Definition at line 337 of file treatments.hpp.
|
inline |
Add treatment, based on parameters it is distinguished which treatment it will be.
This works internally like a factory function separating the user from all treatment classes.
map | treatment raster |
start_date | date when treatment is applied |
num_days | for simple treatments should be 0, otherwise number of days host is resistant |
treatment_application | if efficiency < 100% how should it be applied to infected/susceptible |
increase_by_step | function to increase simulation step |
Definition at line 357 of file treatments.hpp.
|
inline |
Used to remove treatments after certain step.
Needed for computational steering.
step | simulation step |
Definition at line 439 of file treatments.hpp.
|
inline |
Do management if needed.
Should be called before every simulation step. Decides internally whether any treatment needs to be activated/deactivated.
current | simulation step |
infected | raster of infected host |
susceptible | raster of susceptible host |
resistant | raster of resistant host |
Definition at line 387 of file treatments.hpp.
|
inline |
Separately manage mortality infected cohorts.
current | simulation step |
infected | raster of infected host |
Definition at line 421 of file treatments.hpp.