
Calculate daily egestion (Mid-level - Main function)
Source:R/03-egestion-excretion.R
calculate_egestion.RdMain egestion calculation function called from simulation loop
Value
A non-negative numeric scalar giving the daily egestion rate in
J per g fish per day. Returns 0 when consumption is zero.
The equation used depends on processed_egestion_params$EGEQ
(1 = constant fraction; 2-3 = temperature- and ration-dependent;
4 = temperature-dependent only). The result is always capped at
consumption (egestion cannot exceed intake).
Examples
# EGEQ 1: constant fraction of consumption
params <- list(EGEQ = 1, FA = 0.16)
calculate_egestion(consumption = 5.0, temperature = 15, p_value = 0.5,
processed_egestion_params = params)
#> [1] 0.8