CPM
Cohort Projection Model: runs a cohort projection model using a generalized reactor
Contents
Syntax
[txNL23W, M_N, M_L, M_L2, M_L3, M_W, NL23Wt] = CPM (species, tT, tJX, x_0, V_X, h, n_R, t_R)
Description
Cohort Projection Model: Plots population trajectories in a generalised reactor for a selected species of cohorts that periodically reproduce synchroneously. Opens 2 html-pages in system browser to report species traits and ebt parameter settings, and plots 4 figures. The parameters of species are obtained either from allStat.mat, or from a cell-string {par, metaPar, metaData}. The 3 cells are obtained by loading a copy of results_my_pet.mat. Structure metadata is required to get species-name, T_typical and ecoCode, metaPar to get model. If dioecy applies, the sex-ratio is assumed to be 1:1 and fertilisation is assumed to be sure. The energy cost for male-production is taken into account by halving kap_R, but male parameters are assumed to be the same as female parameters. The initial population is a single fertilized (female) egg. Starvation parameters are added to parameter structure, if not present. Like all parameters, default settings can be changed by changing structure par in cell-string input. If specified background hazards in 6th input are too high, the population goes extinct.
Input:
- species: character-string with name of entry or cell-string with structures: {metaData, metaPar, par}
- tT: optional (nT,2)-array with time and temperature in Kelvin (default: T_typical); time scaled between 0 (= start) and 1 (= end of cycle) If scalar, the temperature is assumed to be constant
- tJX: optional (nX,2)-array with time and food supply; time scaled between 0 (= start) and 1 (= end of cycle) If scalar, the food supply is assumed to be constant (default 100 times max ingestion rate)
- h: optional vector with dilution and background hazards for each stage (depending on the model) and boolean for thinning Default value for the std model: [h_D, h_B0b, h_Bbp, h_Bpi, thin] = [0 0 0 0 0]
- V_X: optional scalar with reactor volume (default 1000*V_m, where V_m is max struct volume)
- x_0: optional scalar with initial scaled food density as fraction of half saturation constant (default: 0)
- n_R: optional scalar with number of reproduction events to be simulated (default 150).
- t_R: optional scalar with time period between reproduction events (default 1 yr)
Output:
- txNL23W: (n,7)-array with times and densities of scaled food, total number, length, squared length, cubed length, weight
- M_N: (n_c,n_c)-array with map for N: N(t+t_R) = M_N * N(t)
- M_L: (n_c,n_c)-array with map for N: L(t+t_R) = M_N * L(t)
- M_L2: (n_c,n_c)-array with map for N: L^2(t+t_R) = M_N * L^2(t)
- M_L3: (n_c,n_c)-array with map for V: L^3(t+t_R) = M_N * L^3(t)
- M_W: (n_c,n_c)-array with map for W: W(t+t_R) = M_W * W(t)
- NL23Wt: (n_c.5)-array with values for N, L, L^2, L^3, W of cohorts at final time
Remarks
If species is specified by string (rather than by data), its parameters are obtained from allStat.mat. The starvation parameters can only be set different from the default values by first input in the form of data and adding them to the par-structure. Empty inputs are allowed, default values are then used. The (first) html-page has traits at individual level using the possibly modified parameter values. The last 5 outputs (the linear maps for N, L, L^2, L^3 and W) are only not-empty if the number of cohorts did not change long enough. CPM only controls input/output; computations are done in get_CPM, which calls dCPMmod. Temperature changes during embryo-period are ignored; age at birth uses T(0); All embryo's start with f=1. Background hazards do not depend on temperature, ageing hazards do. During execution, the number of time-intervals of length n_R and the number of cohorts are printed to screen
Example of use
- If results_My_Pet.mat exists in current directory (where "My_Pet" is replaced by the name of some species, but don't replace "my_pet"): load('results_My_Pet.mat'); prt_my_pet_pop({metaData, metaPar, par}, [], T, f, destinationFolder)
- CPM('Torpedo_marmorata');
- CPM('Torpedo_marmorata', C2K(18));