EBT

escalator boxcar train: runs Andre de Roos' C-code using a generalized reactor

Contents

Syntax

txL23W = EBT (species, tT, tJX, x_0, V_X, h, t_max, numPar)

Description

Escalator Boxcar Train: Plots population trajectories in a generalised reactor for a selected species of cohorts that reproduce continuously. 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 present implementation ignores males. 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:

      TIME_METHOD,integr_accuracy,cycle_interval,tol_zero,time_interval_out,state_out_interval,min_cohort_nr, ...
      relTol_a,relTol_q,relTol_h_a,relTol_L,relTol_E,relTol_E_R,relTol_E_H,relTol_W, ...
      absTol_a,absTol_q,absTol_h_a,absTol_L,absTol_E,absTol_E_R,absTol_E_H,absTol_W
    Possible values for TIME_METHOD:
   	- rk2: the 2nd order Runge-Kutta integration method with fixed step size,
  	- rk4: the 4th order Runge-Kutta integration method with fixed step size,
  	- rkf45: the Runge-Kutta-Fehlberg 4/5th order integration method with an adaptive step size,
  	- rkck: the Cash-Karp Runga-Kutta integration method with adaptive step size,
  	- DOPRI5: an explicit Runge-Kutta method of order (4)5 due to Dormand & Prince with step size control and dense output.
 	- DOPRI8: an explicit Runge-Kutta method of order 8(5,3) due to Dormand & Prince with step size control and dense output.
 	- RADAU5: an implicit Runge-Kutta method of order 5 with step size  control and dense output.
   The DOPRI5, DOPRI8 and RADAU5 methods can detect and locate discontinuities or events.
   These events are signalled by the routine	EventLocation() in the program definition file.
   Integration will be carried out exactly up to the moment that the event takes place and will be restarted subsequently.
   Default: DOPRI5

Output:

Remarks

The function assumes that a C-compiler with name gcc.exe has been installed and a path to it specified. This C-code was written by Andre de Roos. This Matlab function only uses the computational core of EBTtool, which required tiny modifications; the required modified files have been copied into DEBtool_M/EBTtool

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 inidvidual level using the possibly modified parameter values. This function EBT only controls input/output; computations are done in EBTtool of Andre de Roos via get_EBT. 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. For modification of EBTtool, see manual

Example of use

plotting

report_my_pet.html

EBT_my_pet.html