SSM
Semi Structured Model: runs a semi stage-structured population model in a generalized reactor
Contents
Syntax
txNL23W = SSM (species, tT, tJX, x_0, V_X, h, t_max)
Description
Semi Structured Model: Plots population trajectories in a generalised reactor for a selected species that reproduce as a continuous flux. 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. 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 (d) and temperature (K). If scalar, the temperature is assumed to be constant (K, default scalar: T_typical)
- tJX: optional (nX,2)-array with time (d) and food supply (mol/d); If scalar, the food supply is assumed to be constant (mol/d, default scalar: 100 times max ingestion rate)
- h: optional vector with dilution and background hazards (1/d, default [h_X, h_B] = [0 0])
- V_X: optional scalar with reactor volume (L, default 1000*V_m, where V_m is max struct volume)
- x_0: optional scalar with initial food density as fraction of half saturation constant (-, default: 0)
- t_max: optional scalar with simulation time (d, default 250*365).
Output:
- txNL23W: (n,7)-array with times and densities of scaled food, total number, length, squared length, cubed length, weight
Remarks
If species is specified by string (rather than by data), its parameters are obtained from allStat.mat. Empty inputs are allowed, default values are then used. The (first) html-page has traits at individual level using the possibly modified parameter values. All embryo's start with f=1. Background hazards do not depend on temperature, ageing hazards do. Despite its simplicity, the function is not fast since knots for splines for a_b, a_p, L_b and L_p for a range of values of f are created first, and interpolated are each evaluation time.
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)
- SSM('Torpedo_marmorata');
- SSM('Torpedo_marmorata', C2K(18));