This function calculates the resource abundance at time t + dt from all abundances and rates at time t.

resource_semichemostat(
params,
n,
n_pp,
n_other,
rates,
t,
dt,
resource_rate,
resource_capacity,
...
)

Arguments

params A MizerParams object A matrix of species abundances (species x size) A vector of the resource abundance by size A list with the abundances of other components A list of rates as returned by mizerRates() The current time Time step Resource replenishment rate Resource carrying capacity Unused

Value

Vector containing resource spectrum at next timestep

Details

The time evolution of the resource spectrum is described by a semi-chemostat equation $$\frac{\partial N_R(w,t)}{\partial t} = r_R(w) \Big[ c_R (w) - N_R(w,t) \Big] - \mu_R(w, t) N_R(w,t)$$

Here $$r_R(w)$$ is the resource regeneration rate and $$c_R(w)$$ is the carrying capacity in the absence of predation. These parameters are changed with setResource(). The mortality $$\mu_R(w, t)$$ is due to predation by consumers and is calculate with getResourceMort().

This function uses the analytic solution of the above equation, keeping the mortality fixed during the timestep.

It is also possible to implement other resource dynamics, as described in the help page for setResource().

See also

Other resource dynamics: resource_constant()

Examples

if (FALSE) {
params <- newMultispeciesParams(NS_species_params_gears, NS_interaction,
resource_dynamics = "resource_semichemostat")
}