Chapter 8 Numerical settings
The values of the following options, modifying the numerical program settings, can be changed by means of #define statements in the model-specific file as illustrated in the code blocks 2.3.1.2 and 3.3.1.2 for models implemented in R and in code blocks 2.3.2.1 and 3.3.2.1 for models implemented in C.
Setting name | Default value | Interpretation |
---|---|---|
MIN_SURVIVAL | \(10^{-9}\) | Minimum survival probability at which an individual is considered dead |
MAX_AGE | \(10^{6}\) | Absolute maximum age after which an individual is considered dead |
DYTOL | \(10^{-7}\) | Variable tolerance. The Newton iteration has converged when the norm of the right-hand side of the equations is less than RHSTOL and the norm of the consecutive adjustments to the solution vector of unknowns is less than DYTOL |
RHSTOL | \(10^{-8}\) | Right-hand side tolerance. The Newton iteration has converged when the norm of the right-hand side of the equations is less than RHSTOL and the norm of the consecutive adjustments to the solution vector of unknowns is less than DYTOL |
ALLOWNEGATIVE | \(0\) | If equal to 1 negative solution values are permissible, otherwise the program stops when a component of the solution vector becomes negative |
FULLSTATEOUTPUT | \(2\) | If equal to 0 no output of the complete population state is produced. If equal to 1, output of the population state is produced in a binary file with .csb extension, with individuals originating from different states-at-birth weighted according to the stable distribution of produced offspring over states-at-birth and lumped into cohorts. If equal to 2, output of the population state is produced and individuals originating from different states-at-birth are stored as separate subpopulations. |
COHORT_NR | \(100\) | Sets the number of cohorts in the output of the population state |
ODESOLVE_INIT_STEP | \(0.1\) | Initial step size in the numerical integration of the ODEs. Initializes the globally accessible variable Odesolve_Init_Step. |
ODESOLVE_MIN_STEP | \(10^{-8}\) | Smallest possible step size in the numerical integration of the ODEs. Initializes the globally accessible variable Odesolve_Min_Step. |
ODESOLVE_MAX_STEP | \(10.0\) | Largest possible step size in the numerical integration of the ODEs. Initializes the globally accessible variable Odesolve_Max_Step. |
ODESOLVE_FIXED_STEP | - | If defined, determines a value \(\Delta t\), which forces the ODE integration method to include all time values \(t=n\Delta t\) with \(n=0,1,\ldots\) among its integration time steps in addition to possibly intervening time values enforced by the adaptive step size mechanism. Initializes the globally accessible variable Odesolve_Fixed_Step. |
ODESOLVE_ABS_ERR | \(10^{-10}\) | Absolute error in the numerical integration of the ODEs. Initializes the globally accessible variable Odesolve_Abs_Err. |
ODESOLVE_REL_ERR | \(10^{-8}\) | Relative error in the numerical integration of the ODEs. Initializes the globally accessible variable Odesolve_Rel_Err. |
ODESOLVE_FUNC_TOL | \(10^{-8}\) | Threshold value determining whether a stopping event in the numerical integration routine has been detected. Initializes the globally accessible variable Odesolve_Func_Tol. |
JACOBIAN_MIN_STEP | \(10^{-7}\) | Absolute minimum change in variable when computing Jacobian matrix. Initializes the globally accessible variable Jacobian_Min_Step. |
JACOBIAN_STEP | \(10^{-4}\) | Relative change in variable when computing Jacobian matrix. Initializes the globally accessible variable Jacobian_Step. |
JACOBIAN_UPDATES | \(5\) | Number of Newton adjustments before the Jacobian matrix is computed anew. Initializes the globally accessible variable Jacobian_Updates. |
EBTMETHOD | \(1\) | Type of EBT method to use for simulating ecological dynamics. Possible values are 0 for using the simplified EBT method proposed by Brännström, Carlsson and Simpson (2013) or 1 to use the original EBT method (de Roos (1988)). |