Match the model’s total consumption to observed estimates
Source:R/matchConsumption.R
matchConsumption.Rd
This function sets the metabolic respiration rate so that the total consumption
matches the parameter consumption_observed
for each species. The function preserves
the energy available for growth and reproduction by increasing external encounter
rates to compensate for changes in metabolic loss.
Details
Thus the function also adjusts the external encounter rate to compensate for the
changed respiration rate. To do this the function assumes that both the encounter rate
and the metabolic respiration rate are given by power laws with the same exponent
n
, so it sets the species parameter p
to the same value as n
. A warning
is issued if the exponent p
had to be changed for any species.
Any of the selected species for which consumption_observed
is NA will be
quietly ignored.
If the resulting metabolic loss rate is less than 10% of the production rate, the function will set the metabolic loss rate to 10% of the production rate and issue a warning.
Unless the function issues a warning that it has changed p
, the energy
available for growth and reproduction is not changed and hence the steady
state spectra are also unchanged.
See also
Other match functions:
matchCatch()
,
matchDiet()
,
matchExtMortOnce()
,
matchGonadicProportionOnce()
,
matchProduction()
,
matchRespirationOnce()
Examples
params <- matchConsumption(celtic_params)
# The consumption now matches the observation
all.equal(getConsumption(params),
species_params(params)$consumption_observed,
check.attributes = FALSE)
#> [1] TRUE
# The energy available for growth and reproduction is not changed
all.equal(getEReproAndGrowth(params),
getEReproAndGrowth(celtic_params))
#> [1] TRUE