R/data-sim-resource-competition.R
simulate_resource_competition.Rd
Simulate time series from the resource competition model of Huisman & Weissing (1999) <https://doi.org/10.1038/46540>. The initial state, parameters, and perturbations are for the 5-species system competing on 3 resources as described in Huisman & Weissing (2001) <https://doi.org/10.1086/319929>.
simulate_resource_competition_12sp()
is a simulation with the same
structure, but is the 12-species system competing on 5 resources, with
introductions of species 6-12 at later times.
simulate_resource_competition(params = list(r = rep.int(1, 5), m = rep.int(0.25, 5), D = 0.25, K = matrix(c(0.2, 0.05, 0.5, 0.05, 0.5, 0.15, 0.06, 0.05, 0.5, 0.3, 0.15, 0.5, 0.3, 0.06, 0.05), nrow = 3, byrow = TRUE), C = matrix(c(0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.2, 0.1, 0.1, 0.2, 0.2, 0.1), nrow = 3, byrow = TRUE)), initial_state = c(R = c(10, 10, 10), N = c(0.1, 0.1, 0.1, 0.1, 0.1)), sample_times = seq(0, 3000, by = 1), ...) sim_resource_competition_12sp(params = list(r = rep.int(1, 12), m = rep.int(0.25, 12), D = 0.25, K = matrix(c(0.39, 0.34, 0.3, 0.24, 0.23, 0.41, 0.2, 0.45, 0.14, 0.15, 0.38, 0.28, 0.22, 0.39, 0.34, 0.3, 0.27, 0.16, 0.15, 0.05, 0.38, 0.29, 0.37, 0.31, 0.27, 0.22, 0.39, 0.34, 0.3, 0.07, 0.11, 0.05, 0.38, 0.41, 0.24, 0.25, 0.3, 0.24, 0.22, 0.39, 0.34, 0.28, 0.12, 0.13, 0.27, 0.33, 0.04, 0.41, 0.34, 0.3, 0.22, 0.2, 0.39, 0.4, 0.5, 0.26, 0.12, 0.29, 0.09, 0.16), nrow = 5, byrow = TRUE), C = matrix(c(0.04, 0.04, 0.07, 0.04, 0.04, 0.22, 0.1, 0.08, 0.02, 0.17, 0.25, 0.03, 0.08, 0.08, 0.08, 0.1, 0.08, 0.14, 0.22, 0.04, 0.18, 0.06, 0.2, 0.04, 0.1, 0.1, 0.1, 0.1, 0.14, 0.22, 0.24, 0.12, 0.03, 0.24, 0.17, 0.01, 0.05, 0.03, 0.03, 0.03, 0.03, 0.09, 0.07, 0.06, 0.03, 0.03, 0.11, 0.05, 0.07, 0.09, 0.07, 0.07, 0.07, 0.05, 0.24, 0.05, 0.08, 0.1, 0.02, 0.04), nrow = 5, byrow = TRUE)), initial_state = c(R = c(6, 10, 14, 4, 9), N = c(0.11, 0.12, 0.13, 0.14, 0.15, 0, 0, 0, 0, 0, 0, 0)), sample_times = seq(0, 20000, by = 1), events = list(data = data.frame(var = c("N6", "N7", "N8", "N9", "N10", "N11", "N12"), time = c(1000, 1000, 1000, 3000, 3000, 5000, 5000), value = c(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), method = c("rep", "rep", "rep", "rep", "rep", "rep", "rep"))), ...)
params | model parameters |
---|---|
initial_state | initial conditions |
sample_times | the time values at which to make observations |
... | remaining arguments to be passed to |
events | the data.frame describing the introductions of later species |
a matrix (and deSolve
) object with the observations (and times)