Skip to contents

This function takes a tuned, non-interacting allometric model (where initially \(h = \infty\) and \(k_s = 0\)) and determines the new maximum intake rate \(h\) and metabolic loss \(k_s\) parameters. It does this by adjusting metabolic loss, encounter rate, and maximum intake rate so that the energy available for reproduction and growth remains unchanged, despite changes in the feeding level and critical feeding level.

Usage

setFeedingLevels(params, f, f_c)

Arguments

params

A MizerParams object.

f

The target feeding level \(f\) for each species. Must be a vector with one value for each species or a single value used for all. Defaults to species parameter f0 if exists or else to 0.6.

f_c

The feeding level \(f_c\) at which growth/repro is zero. Defaults to species parameter fc if exists or else to 0.2.

Value

A MizerParams object with updated \(h, k_s\), and ext_encounter rates. The new \(h\) and \(k_s\) are also recorded in the given species parameters, so that they are not reverted to \(h = \infty\) and \(k_s = 0\) the next time a species parameter is changed.

Details

In order to keep the energy for growth and reproduction \(E_r\) unchanged, the function recalculates the encounter rate \(E\), metabolic loss rate \(k\) and maximum intake rate \(h\) as follows:

$$E=E_r\frac{f}{\alpha(f-f_c)(1-f)}$$ $$h = E_r\frac{1}{\alpha(f-f_c)}$$ $$k_s = E_r\frac{f_c}{f-f_c}$$

This methodology allows you to set a desired feeding level for each species without altering the underlying energy balance established during the initial tuning phase.

Mandatory Prerequisites

This function will throw an error unless the following conditions are met:

  • Allometric Scaling: The model must use allometric rates where the intake exponent (\(n\)) and metabolism exponent (\(p\)) are equal. This ensures the balance remains consistent across all fish sizes.

  • Initial State: The species parameters h and ks must have the values h = Inf and ks = 0.

  • Non-interacting Model: All encounter must be external encounter. This function is not compatible with models where species interact with a dynamically realized resource. If interactions exist, call makeNoninteracting() first.