Takes a '>MizerParams object and adds an additional species with given parameters to the ecosystem.
addSpecies(params, ...)# S4 method for MizerParams
addSpecies(params, species_params, SSB = NA,
rfac = 10, effort = 0)
A mizer params object for the original system.
Other arguments (unused)
The species parameters of the new species we want to add to the system.
The spawning stock biomass of the new species. If not provided, the abundance of the new species will be chosen so that its maximal biomass density lies at half the community power law.
A number that determines the strength of the non-linearity in the Beverton-Holt stock-recruitment relationship. The maximal recruitment will be set to rfac times the normal steady-state recruitment. Default value is 10.
Default value is 0.
# NOT RUN {
params <- set_scaling_model(max_w_inf = 5000)
params <- setBackground(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)
plotSpectra(params)
sim <- project(params, t_max=50)
plotBiomass(sim)
# }
Run the code above in your browser using DataLab