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

Description Usage Arguments Value Examples

Description

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

Add species to a MizerParams object

Usage

1
2
3
4
5
addSpecies(params, ...)

## S4 method for signature '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## 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)

## End(Not run)

drfinlayscott/mizer documentation built on May 18, 2018, 9:20 a.m.