Skip to contents

Calculates the population density over time under the assumption that births have been happening for all negative years in the past, resulting in a perfectly periodic density with a period of 1 year.

Usage

getPeriodicNumberDensity(pars, l_max, Delta_l = 1, t_max = 1, Delta_t = 0.05)

Arguments

pars

A list containing the model parameters: k, L_inf, d, m.

l_max

The maximum size

Delta_l

The size step size (cm).

t_max

The maximum simulation time.

Delta_t

The time step size (years). Default is 0.05.

Value

A matrix holding the periodic number density u(t,l). Rows correspond to time and columns to length. The density is periodic with period 1 year.

Details

This function extends the convolution approach used in getNumberDensity() to include contributions from all past years by exploiting the periodicity of the spawning density function.

Examples

# Get periodic density for a simple parameter set
pars <- list(k = 0.2, L_inf = 100, d = 0.1, m = 0.1,
             spawning_mu = 0.5, spawning_kappa = 4)
u_periodic <- getPeriodicNumberDensity(pars, l_max = 50, t_max = 2)