Calculates the carrion biomass at the next timestep from the current carrion biomass.
Arguments
- params
A MizerParams object
- n
A matrix of current species abundances (species x size)
- n_other
Other dynamic components. Only
n_other$carrion
is used.- rates
A list of rates as returned by
getRates()
- dt
Time step size
- ...
Unused
Details
The time evolution of the carrion biomass \(B\) is described by $$dB/dt = \tt{production} - \tt{consumption} * B$$ where
consumption
is the mass-specific rate of consumption due to consumption calculated withcarrion_consumption_ms()
,production
is the rate at which the rest of the system produces carrion biomass, calculated withgetCarrionProduction()
.
The dynamical equation is solved analytically to $$B(t+dt) = B(t)\exp(-\tt{consumption} \cdot dt) +\frac{\tt{production}}{\tt{consumption}} (1-\exp(-\tt{consumption} \cdot dt)).$$ This avoids the stability problems that would arise if we used the Euler method to solve the equation numerically.