View source: R/01-consumption.R
| calculate_consumption | R Documentation |
Main consumption calculation function called from simulation loop
calculate_consumption(
temperature,
weight,
p_value,
processed_consumption_params,
method = "rate"
)
temperature |
Water temperature (°C) |
weight |
Fish weight (g) |
p_value |
Proportion of maximum consumption (0-5) |
processed_consumption_params |
List with processed consumption parameters |
method |
Calculation method ("maximum", "rate", "specific") |
A non-negative numeric scalar giving the daily specific consumption
rate in g prey per g fish per day. Returns 0 when the
temperature-dependence factor is zero (e.g. temperature \ge CTM in
equation 2). The value depends on method: "rate" (default)
scales by p_value (C_{\max} \cdot p \cdot F(T)); "maximum"
and "specific" return the unscaled value (C_{\max} \cdot F(T)).
# CEQ 1: simple exponential temperature dependence
params <- list(CEQ = 1, CA = 0.303, CB = -0.275, CQ = 0.06)
calculate_consumption(temperature = 15, weight = 100, p_value = 0.5,
processed_consumption_params = params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.