50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

mizer (version 1.0.1)

addSpecies: Add more species into an ecosystem with background species.

Description

Takes a '>MizerParams object and adds an additional species with given parameters to the ecosystem.

Usage

addSpecies(params, ...)

# S4 method for MizerParams addSpecies(params, species_params, SSB = NA, rfac = 10, effort = 0)

Arguments

params

A mizer params object for the original system.

...

Other arguments (unused)

species_params

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

SSB

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.

rfac

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.

effort

Default value is 0.

Value

An object of type '>MizerParams

Examples

Run this code
# 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