A function to correct stoichiometry dynamically
correction_function(
biomasses,
cij,
CN,
p,
a,
canIMM,
dietlimits,
diet_correct = TRUE,
Conly = FALSE,
Immobilizationlimit = Inf
)
Returns the consumption rates (FMAT) and production efficiencies (p).
A vector of biomasses.
The consumption matrix from Cijfcn
A vector of C:N ratios.
A vector of production efficiency.
A vector of assimilation efficiency.
A Boolean vector of whether the nodes can immobilize nitrogen.
The diet limits matrix for the stoichiometry correction (proportion of diet)?
Boolean: Does the organism correct it's diet?
Boolean: Is the model meant for carbon only?
This is the limit of the amount of nitrogen the food web can immobilize nitrogen (NOT PLANTS). This will impact the calculations of inorganic nitrogen dynamics.
This function takes inputs from the ODE and outputs corrected consumption rates. The key difference from 'corrstoich' is that the prey DO NOT correct their feeding rates to compensate for higher consumption from the predators, so the system can leave equilibrium if a diet shift occurs.