pops-core  0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
Public Member Functions | List of all members
pops::Treatments< IntegerRaster, FloatRaster > Class Template Reference

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...
 

Detailed Description

template<typename IntegerRaster, typename FloatRaster>
class pops::Treatments< IntegerRaster, FloatRaster >

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.

Constructor & Destructor Documentation

◆ Treatments()

template<typename IntegerRaster , typename FloatRaster >
pops::Treatments< IntegerRaster, FloatRaster >::Treatments ( const Scheduler scheduler)
inline

Definition at line 336 of file treatments.hpp.

◆ ~Treatments()

template<typename IntegerRaster , typename FloatRaster >
pops::Treatments< IntegerRaster, FloatRaster >::~Treatments ( )
inline

Definition at line 337 of file treatments.hpp.

Member Function Documentation

◆ add_treatment()

template<typename IntegerRaster , typename FloatRaster >
void pops::Treatments< IntegerRaster, FloatRaster >::add_treatment ( const FloatRaster &  map,
const Date start_date,
int  num_days,
TreatmentApplication  treatment_application 
)
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.

Parameters
maptreatment raster
start_datedate when treatment is applied
num_daysfor simple treatments should be 0, otherwise number of days host is resistant
treatment_applicationif efficiency < 100% how should it be applied to infected/susceptible
increase_by_stepfunction to increase simulation step

Definition at line 357 of file treatments.hpp.

Here is the call graph for this function:

◆ clear_after_step()

template<typename IntegerRaster , typename FloatRaster >
void pops::Treatments< IntegerRaster, FloatRaster >::clear_after_step ( unsigned  step)
inline

Used to remove treatments after certain step.

Needed for computational steering.

Parameters
stepsimulation step

Definition at line 439 of file treatments.hpp.

◆ manage()

template<typename IntegerRaster , typename FloatRaster >
bool pops::Treatments< IntegerRaster, FloatRaster >::manage ( unsigned  current,
IntegerRaster &  infected,
std::vector< IntegerRaster > &  exposed,
IntegerRaster &  susceptible,
IntegerRaster &  resistant,
IntegerRaster &  total_hosts,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Do management if needed.

Should be called before every simulation step. Decides internally whether any treatment needs to be activated/deactivated.

Parameters
currentsimulation step
infectedraster of infected host
susceptibleraster of susceptible host
resistantraster of resistant host
Returns
true if any management action was necessary

Definition at line 387 of file treatments.hpp.

Here is the caller graph for this function:

◆ manage_mortality()

template<typename IntegerRaster , typename FloatRaster >
bool pops::Treatments< IntegerRaster, FloatRaster >::manage_mortality ( unsigned  current,
IntegerRaster &  infected,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Separately manage mortality infected cohorts.

Parameters
currentsimulation step
infectedraster of infected host
Returns
true if any management action was necessary

Definition at line 421 of file treatments.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: