Skip to content

Penaeid shrimp growth

The growth of one penaeid shrimp from the juvenile stage.

  • Class: PenaeidShrimpSystem
  • Import: from skcomplex.systems.biology.ecology import PenaeidShrimpSystem
  • Field: biology/ecology
  • Topics: individual growth, bioenergetics, aquaculture, stocks and flows, ode
  • References:
    • Franco et al. 2006
    • Bala et al. 2017

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.biology.ecology import PenaeidShrimpSystem

trajectory = PenaeidShrimpSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
gut 0.5
biomass 1.0
ration 2.5
respiration 0.05
L_inf 29.9
K 0.013
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class PenaeidShrimpSystem(DynamicalSystem):
    """The growth of one penaeid shrimp from the juvenile stage.

    The growth is forced by the food and the water temperature.

    The individual ingests food up to a maximum ration set by its biomass and the water temperature, assimilates its
    gut content, respires, and spawns, while its gonads grow and its carapace length follows von Bertalanffy's curve
    `L(t) = L_inf (1 - exp(-K t))` from zero, which nears its asymptote after six to eight months. The gut content
    settles near `I / A_e`, the ingestion over the assimilation efficiency.

    The coefficients are those of the listing of Bala et al. (2017). With them the respiration of a juvenile at 28 C,
    `respiration exp(0.07 T) (phi B)^0.185`, is about half its biomass per day, more than its maximum ration, so the
    total biomass declines slowly while the gonads and the length grow. The weight gain the source describes needs a
    lower `respiration` coefficient, such as 0.02. The system has the states `shrimp.gut`, `shrimp.biomass`,
    `shrimp.gonads`, and `shrimp.length`.

    Args:
        gut:
            The initial gut content, in grams of dry weight.

        biomass:
            The initial total biomass, in grams of dry weight.

        ration:
            The factor of the maximum ration, lower for males.

        respiration:
            The coefficient of the weight-specific respiration, per day.

        L_inf:
            The asymptotic carapace length, in millimetres.

        K:
            The growth coefficient of the length, per day.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.biology.ecology import PenaeidShrimpSystem
        >>> PenaeidShrimpSystem().prepare().system_.elements[0].values['K']
        0.013
    """

    field = 'biology/ecology'
    topics = ('individual growth', 'bioenergetics', 'aquaculture', 'stocks and flows', 'ode')
    references = ('Franco et al. 2006', 'Bala et al. 2017')
    until = 60.0
    dt = 0.5

    def __init__(
        self,
        gut: float = 0.5,
        biomass: float = 1.0,
        *,
        ration: float = 2.5,
        respiration: float = 0.05,
        L_inf: float = 29.9,
        K: float = 0.013,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label=label, solver=solver, backend=backend)
        self.gut = gut
        self.biomass = biomass
        self.ration = ration
        self.respiration = respiration
        self.L_inf = L_inf
        self.K = K

    def _get_element_label(self) -> str:
        """Return the label of the element that holds the states."""
        return 'shrimp'

    def _get_states(self) -> dict[str, object]:
        """Return the initial value of every state by name."""
        return {
            'gut': self.gut,
            'biomass': self.biomass,
            'gonads': 0.0001,
            'length': 0.0,
        }

    def _get_parameters(self) -> dict[str, object]:
        """Return the value of every parameter by name."""
        return {
            'ration': self.ration,
            'k': 0.12,
            'assimilation': 0.8,
            'respiration': self.respiration,
            'phi': 5.0,
            'gsi': 0.05,
            'egg_weight': 2.0e-6,
            'L_inf': self.L_inf,
            'K': self.K,
        }

    def _get_equations(self) -> Equations:
        """Return the ingestion, assimilation, respiration, spawning, and growth laws."""
        return {
            'gut': lambda s: self._get_ingestion(s) - self._get_assimilated(s),
            'biomass': lambda s: self._get_assimilated(s) - self._get_respired(s) - self._get_spawning(s),
            'gonads': lambda s: s.target.biomass * s.target.gsi,
            'length': lambda s: s.target.K * (s.target.L_inf - s.target.length),
        }

    def _get_food(self, s: SimpleNamespace) -> Expression:
        """Return `food` from the namespace of an equation."""
        return series(s.t, DAYS, FOOD)

    def _get_temperature(self, s: SimpleNamespace) -> Expression:
        """Return `temperature` from the namespace of an equation."""
        return series(s.t, DAYS, TEMPERATURE)

    def _get_max_ration(self, s: SimpleNamespace) -> Expression:
        """Return `max_ration` from the namespace of an equation."""
        return series(s.target.biomass, *ALLOMETRY) * series(self._get_temperature(s), *THERMAL) * s.target.ration

    def _get_ingestion(self, s: SimpleNamespace) -> Expression:
        """Return `ingestion` from the namespace of an equation."""
        return self._get_max_ration(s) * (1 - exp(-s.target.k * self._get_food(s)))

    def _get_assimilated(self, s: SimpleNamespace) -> Expression:
        """Return `assimilated` from the namespace of an equation."""
        return s.target.gut * s.target.assimilation

    def _get_respired(self, s: SimpleNamespace) -> Expression:
        """Return `respired` from the namespace of an equation."""
        return (
            s.target.respiration
            * exp(0.07 * self._get_temperature(s))
            * (s.target.biomass * s.target.phi) ** 0.185
            * s.target.biomass
        )

    def _get_spawning(self, s: SimpleNamespace) -> Expression:
        """Return `spawning` from the namespace of an equation."""
        return 9.3 * s.target.length**2.8 * s.target.egg_weight

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

class AnnotatedElement(Element):
    """An element of values by name, with the allowed values and quantities of some.

    It holds what a class would write in `Annotated`, for values known only as data. The values
    `{'n': 40.0}` with `allowed={'n': RealSet.closed_open(0, oo)}` and `quantities={'n': 'people'}` are read as
    `n: Annotated[float, RealSet.closed_open(0, oo), Quantity('people')] = 40.0`, so a negative `n` is rejected and the
    conservation monitor follows the people. The generic systems that build one element from a mapping of states, such
    as `DynamicalSystem` and `StockFlowSystem`, build this element.

    Unlike `Element`, whose subclass writes the allowed values and quantities in `Annotated` on its arguments, it takes
    them as data. Choose it when the names of the values are known only when a system is built.

    It appears in many fields. The stocks of a bathtub, the people of a diffusion of innovations, and the oil of an
    economy are each its values.

    Args:
        label:
            The name of the element, unique among the components of its system, such as `'population'`.

        values:
            The values by name, such as `{'n': 40.0, 'r': 0.5}`, or `None` for none.

        allowed:
            The allowed values of some values by name, a `RealSet` such as `RealSet.closed_open(0, oo)` or a set such
            as `{'S', 'I', 'R'}`, or `None` for none.

        quantities:
            The quantity some values hold by name, such as `{'n': 'people'}`, or `None` for none.

    Examples:
        >>> from sage.all__sagemath_symbolics import oo
        >>> from sage.sets.real_set import RealSet
        >>> from skcomplex.systems.general.dynamics import AnnotatedElement
        >>> from skcomplex.core.errors import ValidationError
        >>> from skcomplex.core.systems import System
        >>> tank = AnnotatedElement('tank', values={'level': -1.0}, allowed={'level': RealSet.closed_open(0, oo)})
        >>> try:
        ...     System(elements=[tank]).prepare()
        ... except ValidationError as error:
        ...     print(error)
        The system is not valid, with 1 error(s):
        - tank: tank.level = -1.0 is not in its domain [0, +oo). Correct the component as the message describes. [value]
    """

    def __init__(
        self,
        label: str,
        *,
        values: Mapping[str, object] | None = None,
        allowed: Mapping[str, object] | None = None,
        quantities: Mapping[str, str] | None = None,
    ) -> None:
        super().__init__(label, values=values)
        self.allowed = allowed
        self.quantities = quantities

    def _get_hints(self) -> dict[str, object]:
        """Return the hint of every value with allowed values or a quantity.

        Each hint is what `Annotated` would write. The arguments `allowed` and `quantities` describe the values, so they
        are no values themselves.
        """
        allowed, quantities = self.allowed or {}, self.quantities or {}
        hints: dict[str, object] = {}
        for name in [*allowed, *(name for name in quantities if name not in allowed)]:
            items = [allowed[name]] if name in allowed else []
            items += [Quantity(quantities[name])] if name in quantities else []
            hints[name] = Annotated[object, *items]
        return hints

class EquationInteraction(Interaction):
    """An interaction that gives one state of an element its rate or its next value.

    In continuous time the equation is the rate of the state, or of its derivative of order `k` when the state is named
    with `k` primes, such as `"x''"` for an acceleration, and a noise amplitude adds a noise in the Itô or Stratonovich
    convention. In discrete time the equation is the next value of the state, read from the values at the start of the
    step. An equation and a noise are functions of the namespace whose `target` holds the values of the element and
    whose `t` holds the time.

    Unlike `Interaction`, which a subclass gives laws of its own, it takes the equation as a function. Choose it when
    one state follows one formula, with no class of its own.

    It appears in many fields. The decay of a tank, the logistic map of a population, and the income of an economy are
    each one equation of one state.

    Args:
        label:
            The label of the interaction, unique among the components of its system.

        target:
            The path of the element whose state the equation changes.

        state:
            The name of the state, with a prime for every order of the derivative the equation gives.

        equation:
            The rate or the next value as a function of the namespace, or `None` for a noise alone.

        noise:
            The noise amplitude as a function of the namespace or a number, or `None` for none.

        convention:
            The stochastic calculus of the noise, `'ito'` or `'stratonovich'`.

        time:
            The time of the equation, `'continuous'` for a rate or `'discrete'` for a next value.

    Examples:
        >>> from skcomplex.core.components.elements import Element
        >>> from skcomplex.core.systems import System
        >>> from skcomplex.systems.general.dynamics import EquationInteraction
        >>> decay = EquationInteraction('decay', target='tank', state='x', equation=lambda s: -s.target.k * s.target.x)
        >>> system = System(elements=[Element('tank', values={'x': 1.0, 'k': 0.5})], interactions=[decay])
        >>> round(float(system.prepare().simulate(until=2.0, dt=2.0).get_values('tank.x')[-1]), 4)
        0.3679
    """

    law_classes: ClassVar[tuple[type[BaseLaw], ...]] = (RateLaw, NoiseLaw, UpdateLaw)

    def __init__(
        self,
        label: str,
        *,
        target: Role,
        state: str,
        equation: Callable[[SimpleNamespace], object] | None = None,
        noise: Callable[[SimpleNamespace], object] | float | None = None,
        convention: str = 'ito',
        time: str = 'continuous',
    ) -> None:
        super().__init__(label)
        self.target = target
        self.state = state
        self.equation = equation
        self.noise = noise
        self.convention = convention
        self.time = time

    def _get_tags(self) -> Tags:
        """Return the tags of the update, or of the rate and the noise the equation has."""
        if self.time == 'discrete':
            return self._get_variant_tags((UpdateLaw,))
        classes = (RateLaw,) if self.equation is not None else ()
        return self._get_variant_tags((*classes, NoiseLaw) if self.noise is not None else classes)

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the rate and the noise, or the next value, of the state.

        Args:
            context:
                The namespace of the element.
        """
        super()._prepare(context)
        name = self.state.rstrip("'")
        order = len(self.state) - len(name)
        state = getattr(context.target, name)
        laws: list[BaseLaw] = []
        if self.time == 'discrete' and self.equation is not None:
            laws.append(UpdateLaw(state, self.equation(context)))
        elif self.equation is not None:
            laws.append(RateLaw(state.diff(context.t, max(order, 1)), self.equation(context)))
        if self.time != 'discrete' and self.noise is not None:
            noise = self.noise(context) if callable(self.noise) else self.noise
            laws.append(NoiseLaw(state.diff(context.t, max(order, 1)), noise, convention=self.convention))
        self.laws_: list[BaseLaw] = laws

Equations

The equations are those that symbolic returns for the system with its default parameters.

shrimp.gut: diff(gut_shrimp(t), t) == -ration_shrimp*(e^(-k_shrimp*where(t < 0.0, 695.0, where(t < 175.0, where(t < 87.5, where(t < 29.2, 1.8835616438356164*t + 695.0, where(t < 58.3, 750.0, -0.684931506849315*t + 789.931506849315)), where(t < 117.0, -0.3389830508474576*t + 759.6610169491526, where(t < 146.0, -0.3448275862068966*t + 760.3448275862069, 710.0))), where(t < 263.0, where(t < 204.0, 0.8620689655172413*t + 559.1379310344828, where(t < 233.0, -1.7241379310344827*t + 1086.7241379310344, -1.8333333333333333*t + 1112.1666666666667)), where(t < 321.0, where(t < 292.0, 1.206896551724138*t + 312.58620689655174, 1.896551724137931*t + 111.20689655172418), where(t < 350.0, -0.3448275862068966*t + 830.6896551724138, 710.0)))))) - 1)*where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 25.0, 0.902, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 28.5, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 26.4, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 25.7, 0.025714285714285762*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) + 0.259142857142856, 0.044285714285714206*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) - 0.21814285714285508), where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 27.1, 0.05571428571428554*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) - 0.5198571428571385, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 27.8, 0.042857142857142934*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) - 0.17142857142857348, 0.057142857142857245*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) - 0.5685714285714314))), where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 30.6, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 29.2, 0.028571428571428623*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) + 0.24571428571428422, where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 29.9, 1.08, 0.01428571428571424*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) + 0.6528571428571442)), where(where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) < 31.3, 0.014285714285714311*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8))))) + 0.6528571428571421, 1.1))))*where(biomass_shrimp(t) < 1.0, 0.15, where(biomass_shrimp(t) < 5.5, where(biomass_shrimp(t) < 2.8, where(biomass_shrimp(t) < 1.9, 0.10333333333333333*biomass_shrimp(t) + 0.04666666666666666, 0.09333333333333337*biomass_shrimp(t) + 0.06566666666666662), where(biomass_shrimp(t) < 3.7, 0.0733333333333333*biomass_shrimp(t) + 0.12166666666666676, where(biomass_shrimp(t) < 4.6, 0.09000000000000001*biomass_shrimp(t) + 0.05999999999999994, 0.0766666666666667*biomass_shrimp(t) + 0.12133333333333318))), where(biomass_shrimp(t) < 8.2, where(biomass_shrimp(t) < 6.4, 0.07999999999999992*biomass_shrimp(t) + 0.10300000000000048, where(biomass_shrimp(t) < 7.3, 0.05333333333333341*biomass_shrimp(t) + 0.2736666666666661, 0.049999999999999954*biomass_shrimp(t) + 0.2980000000000004)), where(biomass_shrimp(t) < 9.1, 0.030000000000000016*biomass_shrimp(t) + 0.46199999999999986, where(biomass_shrimp(t) < 10.0, 0.016666666666666677*biomass_shrimp(t) + 0.5833333333333333, 0.75))))) - assimilation_shrimp*gut_shrimp(t)
shrimp.biomass: diff(biomass_shrimp(t), t) == -9.3*egg_weight_shrimp*length_shrimp(t)^2.8 - (phi_shrimp*biomass_shrimp(t))^0.185*respiration_shrimp*biomass_shrimp(t)*e^(0.07*where(t < 0.0, 27.3, where(t < 175.0, where(t < 87.5, where(t < 29.2, 0.07534246575342463*t + 27.3, where(t < 58.3, 0.03436426116838488*t + 28.49656357388316, -0.136986301369863*t + 38.486301369863014)), where(t < 117.0, 0.027118644067796634*t + 24.127118644067796, where(t < 146.0, 0.05172413793103448*t + 21.248275862068965, 0.09310344827586205*t + 15.206896551724142))), where(t < 263.0, where(t < 204.0, -0.06896551724137931*t + 43.56896551724138, where(t < 233.0, -0.1275862068965517*t + 55.527586206896544, 0.05666666666666664*t + 12.596666666666673)), where(t < 321.0, where(t < 292.0, 0.01034482758620692*t + 24.77931034482758, 0.058620689655172385*t + 10.682758620689661), where(t < 350.0, 0.01034482758620692*t + 26.179310344827577, 29.8)))))) + assimilation_shrimp*gut_shrimp(t)
shrimp.gonads: diff(gonads_shrimp(t), t) == gsi_shrimp*biomass_shrimp(t)
shrimp.length: diff(length_shrimp(t), t) == K_shrimp*(L_inf_shrimp - length_shrimp(t))