Nested functions for population dispersal.
Modular functions for the population simulator for performing dispersal of stage abundance at a specified time step via dispersal rates provided.
population_dispersal( replicates, time_steps, years_per_step, populations, demographic_stochasticity, density_stages, dispersal, dispersal_stages, dispersal_source_n_k, dispersal_target_k, dispersal_target_n, simulator )
replicates |
Number of replicate simulation runs. |
time_steps |
Number of simulation time steps. |
years_per_step |
Number of years per time step. |
populations |
Number of populations. |
demographic_stochasticity |
Boolean for optionally choosing demographic stochasticity for the transformation. |
density_stages |
Array of booleans or numeric (0,1) for each stage to indicate which stages are affected by density. |
dispersal |
Either a matrix of dispersal rates between populations (source columns to target rows) or a list of data frames of non-zero dispersal rates and indices for constructing a compact dispersal matrix, and optional changing rates over time (as per class
returns the post-dispersal abundance matrix |
dispersal_stages |
Array of relative dispersal (0-1) for each stage to indicate the degree to which each stage participates in dispersal (default is 1 for all stages). |
dispersal_source_n_k |
Dispersal proportion (p) density dependence via source population abundance divided by carrying capacity (n/k), where p is reduced via a linear slope (defined by two list items) from n/k <= cutoff (p = 0) to n/k >= threshold or visa-versa. |
dispersal_target_k |
Dispersal rate (r) density dependence via target population carrying capacity (k), where r is reduced via a linear slope (through the origin) when k <= threshold. |
dispersal_target_n |
Dispersal rate (r) density dependence via target population abundance (n), where r is reduced via a linear slope (defined by two list items) from n >= threshold to n <= cutoff (r = 0) or visa-versa. |
simulator |
|
Dispersal function: function(r, tm, carrying_capacity, stage_abundance, occupied_indices)
, where:
r
Simulation replicate.
tm
Simulation time step.
carrying_capacity
Array of carrying capacity values for each population at time step.
stage_abundance
Matrix of abundance for each stage (rows) and population (columns) at time step.
occupied_indices
Array of indices for populations occupied at time step.
returns
New stage abundance matrix with dispersal applied.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.