Takes a MizerParams object and adds additional species with given parameters to the ecosystem. It sets the initial values for these new species to its steady-state solution in the given initial state of the existing ecosystem. This will be close to the true steady-state if the abundances of the new species are sufficiently low. Hence the abundances of the new species are set so that the maximal biomass density of each new species lies at 1/100 of the community power law. The reproductive efficiencies of the new species are set so as to keep them at that low level.

addSpecies(
  params,
  species_params,
  gear_params = data.frame(),
  interaction,
  initial_effort
)

Arguments

params

A mizer params object for the original system.

species_params

The species parameters of the new species we want to add to the system.

interaction

Interaction matrix. A square matrix giving either the interaction coefficients between all species or only those between the new species. In the latter case all interaction between an old and a new species are set to 1. If this argument is missing, all interactions involving a new species are set to 1.

Value

An object of type MizerParams

Details

After adding the new species, the background species are not retuned and the system is not run to steady state. You would have to call retuneBackground() and steady() explicitly.

See also

Examples

# \dontrun{ params <- newTraitParams(max_w_inf = 5000)
#> Note: Using f0, h, lambda, kappa and the predation kernel to calculate gamma.
params <- markBackground(params) a_m <- 0.0085 b_m <- 3.11 L_inf_m <- 24.3 L_mat <- 11.1 species_params <- data.frame( species = "mullet", w_min = 0.001, w_inf = a_m*L_inf_m^b_m, w_mat = a_m*L_mat^b_m, beta = 283, sigma = 1.8, z0 = 0, alpha = 0.6, sel_func = "knife_edge", knife_edge_size = 100, gear = "knife_edge_gear", k = 0, k_vb = 0.6, a = a_m, b = b_m ) params <- addSpecies(params, species_params)
#> Note: No h provided for some species, so using f0 and k_vb to calculate it.
#> Note: Because you have n != p, the default value is not very good.
#> Note: Using f0, h, lambda, kappa and the predation kernel to calculate gamma.
plotSpectra(params)
sim <- project(params, t_max=50, progress_bar = FALSE) plotBiomass(sim)
# }