|
| Model (const Config &config) |
|
void | run_step (int step, IntegerRaster &infected, IntegerRaster &susceptible, IntegerRaster &total_populations, IntegerRaster &total_hosts, IntegerRaster &dispersers, IntegerRaster &total_exposed, std::vector< IntegerRaster > &exposed, std::vector< IntegerRaster > &mortality_tracker, IntegerRaster &died, const std::vector< FloatRaster > &temperatures, const FloatRaster &weather_coefficient, Treatments< IntegerRaster, FloatRaster > &treatments, IntegerRaster &resistant, std::vector< std::tuple< int, int >> &outside_dispersers, SpreadRate< IntegerRaster > &spread_rate, QuarantineEscape< IntegerRaster > &quarantine, const IntegerRaster &quarantine_areas, const std::vector< std::vector< int >> movements, const Network< RasterIndex > &network, std::vector< std::vector< int >> &suitable_cells) |
| Run one step of the simulation. More...
|
|
template<typename IntegerRaster, typename FloatRaster, typename RasterIndex>
class pops::Model< IntegerRaster, FloatRaster, RasterIndex >
Definition at line 40 of file model.hpp.
template<typename IntegerRaster , typename FloatRaster , typename RasterIndex >
SwitchDispersalKernel<IntegerRaster, RasterIndex> pops::Model< IntegerRaster, FloatRaster, RasterIndex >::create_anthro_kernel |
( |
const IntegerRaster & |
dispersers, |
|
|
const Network< RasterIndex > & |
network |
|
) |
| |
|
inlineprotected |
Create anthropogenic kernel.
Same structure as the natural kernel, but the parameters are for anthropogenic kernel when available.
- Parameters
-
dispersers | The disperser raster (reference, for deterministic kernel) |
network | Network (initialized or not) |
- Returns
- Created kernel
Definition at line 147 of file model.hpp.
template<typename IntegerRaster , typename FloatRaster , typename RasterIndex >
SwitchDispersalKernel<IntegerRaster, RasterIndex> pops::Model< IntegerRaster, FloatRaster, RasterIndex >::create_overpopulation_movement_kernel |
( |
const IntegerRaster & |
dispersers, |
|
|
const Network< RasterIndex > & |
network |
|
) |
| |
|
inlineprotected |
Create overpopulation movement kernel.
Same as the natural kernel. The natural kernel parameters are used, but the scale for radial and deterministic kernel is multiplied by the leaving scale coefficient.
- Parameters
-
dispersers | The disperser raster (reference, for deterministic kernel) |
network | Network (initialized or not) |
- Returns
- Created kernel
Definition at line 105 of file model.hpp.
template<typename IntegerRaster , typename FloatRaster , typename RasterIndex >
void pops::Model< IntegerRaster, FloatRaster, RasterIndex >::run_step |
( |
int |
step, |
|
|
IntegerRaster & |
infected, |
|
|
IntegerRaster & |
susceptible, |
|
|
IntegerRaster & |
total_populations, |
|
|
IntegerRaster & |
total_hosts, |
|
|
IntegerRaster & |
dispersers, |
|
|
IntegerRaster & |
total_exposed, |
|
|
std::vector< IntegerRaster > & |
exposed, |
|
|
std::vector< IntegerRaster > & |
mortality_tracker, |
|
|
IntegerRaster & |
died, |
|
|
const std::vector< FloatRaster > & |
temperatures, |
|
|
const FloatRaster & |
weather_coefficient, |
|
|
Treatments< IntegerRaster, FloatRaster > & |
treatments, |
|
|
IntegerRaster & |
resistant, |
|
|
std::vector< std::tuple< int, int >> & |
outside_dispersers, |
|
|
SpreadRate< IntegerRaster > & |
spread_rate, |
|
|
QuarantineEscape< IntegerRaster > & |
quarantine, |
|
|
const IntegerRaster & |
quarantine_areas, |
|
|
const std::vector< std::vector< int >> |
movements, |
|
|
const Network< RasterIndex > & |
network, |
|
|
std::vector< std::vector< int >> & |
suitable_cells |
|
) |
| |
|
inline |
Run one step of the simulation.
The total_populations can be total number of hosts in the basic case or it can be the total size of population of all relevant species both host and non-host if dilution effect should be applied. When movement is applied, total_populations needs to be only the total number of hosts because movement does not support non-host individuals.
No treatment can be applied when movement is active because host movement does not support resistant hosts.
dispersers is for internal use and for tracking dispersers creation. The input values are ignored and the output is not the current existing dispersers, but only the number of dispersers generated (and subsequently used) in this step. There are no dispersers in between simulation steps.
- Parameters
-
| step | Step number in the simulation. |
[in,out] | infected | Infected hosts |
[in,out] | susceptible | Susceptible hosts |
[in,out] | total_hosts | All host individuals in the area. Is equal to infected + exposed + susceptible in the cell. |
[in,out] | total_populations | All host and non-host individuals in the area |
[out] | dispersers | Dispersing individuals (used internally) |
| exposed[in,out] | Exposed hosts (if SEI model is active) |
| mortality_tracker[in,out] | Mortality tracker used to generate died. Expectation is that mortality tracker is of length (1/mortality_rate + mortality_time_lag) |
| died[out] | Infected hosts which died this step based on the mortality schedule |
| temperatures[in] | Vector of temperatures used to evaluate lethal temperature |
| weather_coefficient[in] | Weather coefficient (for the current step) |
| treatments[in,out] | Treatments to be applied (also tracks use of treatments) |
| resistant[in,out] | Resistant hosts (host temporarily removed from susceptible hosts) |
| outside_dispersers[in,out] | Dispersers escaping the rasters (adds to the vector) |
| spread_rate[in,out] | Spread rate tracker |
| quarantine[in,out] | Quarantine escape tracker |
| quarantine_areas[in] | Quarantine areas |
| movements[in] | Table of host movements |
| network | Network (initialized or Network::null_network() if unused) |
- Note
- The parameters roughly correspond to Simulation::disperse() and Simulation::disperse_and_infect() functions, so these can be used for further reference.
Definition at line 248 of file model.hpp.