Description Usage Arguments Value Note See Also Examples
Rate of change in planktivores and juvenile bass per time step
1 | fishStep2D(X, pars = c(qE = 1), ...)
|
X |
length 2 named vector of state variables. Names are should be J0 (juveniles) and F0 (planktivores) |
pars |
a named vector of model parameters; in partiular, qE is harvest |
... |
Optional model parameters (e.g., see arguments in |
length-2 named vector (J0 and F0) indicating the rate of change per unit time in the abundances of juvenile bass (J0) and planktivores (F0).
pars
and ...
are largely redundant. Their separation is merely for compatability with other functions, or for organizational purposes. The intended use is that parameters in pars
correspond to parameters varied systematically to effect stability properties, whereas parameters specified through ...
are being altered for exploration purposes, but would generally not be supplied because the defaults in ecoStep
are suitable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # set up parameter, initials, roots
p <- c(qE=0.65) # harvest rate
state1 <- c(A0=1, F0=1, J0=1) # initial values
state2 <- c(A0=1E3, F0=1, J0=1E3) # alternate initials
r1 <- getRoot(state1, pars=p)[c("J0","F0")] # first root
r2 <- getRoot(state2, pars=p)[c("J0","F0")] # second root (alt stbl states)
# test dState/dt at root
fishStep2D(r1, pars=p) # 0 at lower root
fishStep2D(r2, pars=p) # 0 at upper root
# test dState/dt near, but not at, root
fishStep2D(r1+rnorm(2), pars=p) # non-0 away from root
fishStep2D(r2+rnorm(2), pars=p) # non-0 away from root
# test dState/dt at r1 and r2, but different qE
fishStep2D(r1) # qE defaults to 1; r1 ~0 for qE=1 & =0.65
fishStep2D(r2) # r2 ~0 for qE=0.65, not for qE=1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.