Skip to contents

Spatial generalized Lotka-Volterra model

Usage

sglv(
  n_species,
  n_patch,
  n_timestep = 100,
  interval = 0.01,
  r,
  alpha,
  dispersal = list(adj = matrix(0, nrow = n_patch, ncol = n_patch), phi = 0, m = 0),
  n0 = list(min = 0, max = 1),
  threshold = 0,
  cpp = TRUE,
  ...
)

Arguments

n_species

Integer. Number of species

n_patch

Integer. Number of habitat patches

n_timestep

Integer. Number of time step for a simulation run

interval

Numeric. Time interval used for a numerical ODE solver

r

Numeric. Intrinsic growth rates of modeled species

alpha

n_species x n_species interaction matrix

dispersal

List. This list must contain the following parameters as named elements: adj n_patch x n_patch adjacency matrix; phi dispersal rate; m dispersal mortality rate.

n0

List. Initial densities for modeled species that are randomly generated by runif(n_species, min = min, max = max). This list must contain min and max as named elements.

threshold

Numeric. Extinction threshold. Species will be removed from a simulation if species density goes below this value

cpp

Logical. If TRUE, Rcpp function is used for the numerical solver

...

Additional arguments passed to ode

Author

Akira Terui, hanabi0111@gmail.com