The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
commondata Module Reference

COMMONDATA – definitions of global constants and procedures. More...

Data Types

type  timer_cpu
 CPU timer container object for debugging and speed/performance control. Arbitrary timers can be instantiated for different parts of the code and also global. Using a specific timer (stopwatch) is like this: More...
 
interface  gamma2gene
 Sigmoidal relationship between environmental factor and the organism response, as affected by the genotype and environmental error, e.g. perception and neuronal response or intrinsic baseline and phenotypic hormone levels. More...
 
interface  gene2gamma
 
interface  add_to_history
 Simple history stack function, add to the end of the stack. We need only to add components on top (end) of the stack and retain HISTORY_SIZE_SPATIAL elements of the prior history (for a spatial moving object). The stack works as follows, assuming 100 and 200 are added:
[1 2 3 4 5 6 7 8 9 10]
[2 3 4 5 6 7 8 9 10 100]
[3 4 5 6 7 8 9 10 100 200]. More...
 
interface  cm2m
 Convert cm to m. More...
 
interface  m2cm
 Convert m to cm. More...
 
interface  mm2m
 Convert mm to m. More...
 
interface  rescale
 Arbitrary rescales value(s) from one range (A:B) to another (A1:B1). More...
 
interface  within
 Force a value within the range set by the vmin and vmax dummy parameter values. More...
 
interface  is_within
 Logical function to check if a value is within a specific range, lower <= X <= upper. More...
 
interface  is_near_zero
 Checks if a real number is near 0.0. Thus function can be used for comparing two real values like this: More...
 
interface  float_equal
 Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like this: More...
 
interface  operator(.feq.)
 "Float equality" operator: Check if two real values are nearly equal using the commondata::is_near_zero() function. Thus function can be used for comparing two real values like the below. More...
 
interface  operator(.approx.)
 "Approximatel equality" operator: Check if two real values are approximately equal using the commondata::is_near_zero() function. Thus function can be used for comparing two real values like the below. More...
 
interface  operator(.within.)
 Interface operators .within. for testing whether a value (first argument) lies within the limits set by a two-element array (second argument). All the values/parameters are Fortran intrinsic types, real or integer. Usage of the operator: More...
 
interface  operator(.cat.)
 Concatenate two arrays a and b. This procedure uses array slices which would be faster in most cases than the intrinsic [a,b] method. More...
 
interface  average
 Calculate an average of an array excluding missing code values. More...
 
interface  is_maxval
 Check if a value is the maximum value of an array. More...
 
interface  is_minval
 Check if a value is the minimum value of an array. More...
 
interface  operator(.radd.)
 Interface operator .radd. performs a random addition or subtraction of two numbers with equal probability. See commondata::random_add_subtract(). The operator can be used as follows: More...
 

Functions/Subroutines

elemental real(srp) function, private cm2m_r (value_cm)
 Convert cm to m. More...
 
elemental real(hrp) function, private cm2m_hr (value_cm)
 Convert cm to m. More...
 
elemental real(srp) function, private cm2m_i (value_cm)
 Convert cm to m. More...
 
elemental real(srp) function, private m2cm_r (value_m)
 Convert m to cm. More...
 
elemental real(hrp) function, private m2cm_hr (value_m)
 Convert m to cm. More...
 
elemental real(srp) function, private m2cm_i (value_m)
 Convert m to cm. More...
 
elemental real(srp) function, private mm2m_r (value_mm)
 Convert mm to m. More...
 
elemental real(srp) function, private mm2m_i (value_mm)
 Convert mm to m. More...
 
elemental real(srp) function carea (R)
 Calculate a circle area. More...
 
elemental real(srp) function length2sidearea_fish (body_length)
 A function linking body length with the body area in fish. More...
 
elemental real(srp) function, private rescale_full (value_in, A, B, A1, B1)
 Rescale a real variable with the range A:B to have the new range A1:B1. More...
 
elemental real(srp) function, private rescale_1 (value_in, A1, B1)
 Rescale a real variable with the range 0:1 to have the new range A1:B1. More...
 
elemental real(srp) function, private within_r (value_in, vmin, vmax)
 Force a value within the range set by the vmin and vmax dummy parameter values. If the value is within the range, it does not change, if it falls outside, the output force value is obtained as min( max( value, FORCE_MIN ), FORCE_MAX ) More...
 
elemental integer function, private within_i (value_in, vmin, vmax)
 Force a value within the range set by the vmin and vmax dummy parameter values. If the value is within the range, it does not change, if it falls outside, the output force value is obtained as min( max( value, FORCE_MIN ), FORCE_MAX ) More...
 
elemental logical function, private is_within_r (x, lower, upper)
 Logical function to check if a value is within a specific range, lower <= X <= upper. The reverse (upper <= x <= lower) range limits can also be used; a corrective adjustment is automatically made. More...
 
elemental logical function, private is_within_i (x, lower, upper)
 Logical function to check if a value is within a specific range, lower <= X <= upper. The reverse (upper <= x <= lower) range limits can also be used; a corrective adjustment is automatically made. More...
 
pure logical function, private is_within_operator_r (x, limits)
 A wrapper function for commondata::is_within() to build a user defined operator. Basically, it is the same as is_within, but the lower and upper limits are set as a two-element array. Usage of the operator: More...
 
pure logical function, private is_within_operator_i (x, limits)
 A wrapper function for commondata::is_within() to build a user defined operator. Basically, it is the same as is_within, but the lower and upper limits are set as a two-element array. Usage of the operator: More...
 
pure real(srp) function, private average_r (array_in, missing_code, undef_ret_null)
 Calculate an average value of a real array, excluding MISSING values. More...
 
pure real(srp) function, private average_i (array_in, missing_code, undef_ret_null)
 Calculate an average value of an integer array, excluding MISSING values. More...
 
real(srp) function std_dev (array_in, missing_code, undef_ret_null)
 Calculate standard deviation using trivial formula: More...
 
pure real(srp) function, dimension(:), allocatable, private stack2arrays_r (a, b)
 Concatenate two arrays a and b. This procedure uses array slices which would be faster in most cases than the intrinsic [a,b] method. More...
 
pure integer function, dimension(:), allocatable, private stack2arrays_i (a, b)
 Concatenate two arrays a and b. This procedure uses array slices which would be faster in most cases than the intrinsic [a,b] method. More...
 
elemental logical function, private is_near_zero_srp (test_number, epsilon)
 Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below. More...
 
elemental logical function, private is_near_zero_hrp (test_number, epsilon)
 Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below. More...
 
elemental logical function, private float_equal_srp (value1, value2, epsilon)
 Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding): More...
 
elemental logical function, private float_equal_hrp (value1, value2, epsilon)
 Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding): More...
 
elemental logical function, private float_equal_srp_operator (value1, value2)
 This is a wrapper for the commondata::float_equal_srp() for building the user defined operator .feq. with default tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding): More...
 
elemental logical function, private float_equal_hrp_operator (value1, value2)
 This is a wrapper for the commondata::float_equal_hrp() for building the user defined operator .feq. with default tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding): More...
 
elemental logical function, private float_approx_srp_operator (value1, value2)
 This is a wrapper for the commondata::float_equal_srp() for building the user defined operator .approx. with very high tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding): More...
 
elemental logical function, private float_approx_hrp_operator (value1, value2)
 This is a wrapper for the commondata::float_equal_hrp() for building the user defined operator .approx. with very high tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding): More...
 
subroutine do_sanitise (array, lvalid, hvalid, substval, only_wrong, tnote)
 Sanitize a real commondata::srp array, so that any value that is smaller than the minimum sensible value lvalid or greater then the maximum sensible value hvalid is substituted with substval. The procedure also checks the input value for IEEE validity: overflow, underflow, invalid and inexact. More...
 
integer function ieee_error_reporting (reset, tnote)
 Check if an IEEE error condition has occurred. More...
 
real(srp) function zeroin (ax, bx, f, tol)
 This function calculates a zero of a function f(x) in the interval (ax,bx). More...
 
elemental real(srp) function allelescale (raw_value)
 Converts and rescales integer allele value to real value for neural response function. More...
 
elemental real(srp) function alleleconv (raw_value)
 
elemental real(srp) function cv2variance (cv, mean)
 Calculate the variance from the coefficient of variation. More...
 
real(srp) function, private gamma2gene_additive_i4 (gs, gh, signal, erpcv)
 The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response. More...
 
real(srp) function, private gamma2gene_additive_r4 (gs, gh, signal, erpcv)
 The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response. More...
 
elemental real(srp) function, private gamma2gene_fake_vals (signal, gs, gh, n_acomps)
 This "fake" version of the gamma2gene is used to guess the response values in calculations. More...
 
elemental real(srp) function, private gamma2gene_reverse (neuronal_response, gs, gh, nc)
 Reverse-calculate perception value from the given neural response value. More...
 
pure subroutine, private add_to_history_i4 (history_array, add_this)
 Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history (for a spatial moving object). The stack works as follows, assuming 100 and 200 are added:
[1 2 3 4 5 6 7 8 9 10];
[2 3 4 5 6 7 8 9 10 100];
[3 4 5 6 7 8 9 10 100 200]. More...
 
pure subroutine, private add_to_history_r (history_array, add_this)
 Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history (for a spatial moving object). More...
 
pure subroutine, private add_to_history_char (history_array, add_this)
 Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history. More...
 
elemental integer function conv_l2i (flag, code_false, code_true)
 Converts logical to integer following a rule, default FALSE = 0, TRUE = 1. More...
 
elemental real(srp) function conv_l2r (flag, code_false, code_true)
 Converts logical to standard (kind SRP) real, .FALSE. => 0, .TRUE. => 1. More...
 
pure logical function, private is_maxval_r (value, array, tolerance)
 Function to check if the value is the maximum value of an array (returns TRUE), or not (return FALSE). More...
 
pure logical function, private is_maxval_i (value, array)
 Function to check if the value is the maximum value of an array (returns TRUE), or not (return FALSE). Integer version. More...
 
pure logical function, private is_minval_r (value, array, tolerance)
 Function to check if the value is the minimum value of an array (returns TRUE), or not (return FALSE). More...
 
pure logical function, private is_minval_i (value, array)
 Function to check if the value is the minimum value of an array (returns TRUE), or not (return FALSE). Integer version. More...
 
subroutine, private timer_cpu_start (this, timer_title)
 Start the timer object, stopwatch is now ON. More...
 
real(srp) function, private timer_cpu_elapsed (this)
 Calculate the time elapsed since the stopwatch subroutine was called for this instance of the timer container object. Can be called several times showing elapsed time since the grand start. More...
 
character(len=:) function, allocatable, private timer_cpu_title (this)
 Return the title of the current timer object. More...
 
character(len=:) function, allocatable, private timer_cpu_show (this)
 A ready to use in output function that returns a formatted string for a timer combining its title and the elapsed time. For example: Calculating decomposition took 20s. More...
 
character(len=:) function, allocatable, private timer_cpu_log (this)
 A ready to use shortcut function to be used in logger, just adds the TIMER: tag in front of the normal showoutput.
Example use: More...
 
subroutine call_external (command, suppress_output, suppress_error, is_background_task, cmd_is_success, exit_code)
 Call an external program using a command line. Wrapper to two alternative system shell calling intrinsic procedures. More...
 
logical function check_external (exec)
 Check if an external procedure is executable and can be run. More...
 
subroutine log_check_external (exec, debug_only, is_valid)
 Check if an external procedure can be called and log the result. More...
 
subroutine debug_histogram_save (x_data, delete_csv, csv_out_file, enable_non_debug)
 Produce a debug plot of histogram using an external program hthist from HEDTOOLS tools. More...
 
subroutine debug_scatterplot_save (x_data, y_data, delete_csv, csv_out_file, enable_non_debug)
 Produce a debug plot of 2-d scatterplot using an external program htscatter from HEDTOOLS tools. More...
 
subroutine debug_interpolate_plot_save (grid_xx, grid_yy, ipol_value, algstr, output_file, enable_non_debug)
 Produce a debug plot of the interpolation data using an external program htinterp from the HEDTOOLS tools. More...
 
subroutine file_delete (file_name, success)
 Delete a file from the local file system using Fortran open status=delete or fast POSIX C call. More...
 
real(srp) function, private random_add_subtract (x, y)
 Random operator, adds or subtracts two values with equal probability, used in the random walk functions. More...
 
subroutine system_init ()
 Initialises the system environment and sets basic parameters. More...
 
subroutine system_halt (is_error, message, ignore_lockfile)
 Halt execution of the system with a specific message and exit code. The exit code is normally passed to the operating system. However, this behaviour is implementation dependent and can be unexpected on specific the platform(s) and the compiler(s). More...
 
subroutine, private logger_init ()
 logger_init Initialise the system and the system logger. More...
 
subroutine log_dbg (message_string, procname, modname)
 LOG_DBG: debug message to the log. The message goes to the logger only when running in the DEBUG mode. More...
 
subroutine log_ieee (ttag, always_log, reset_flags)
 LOG_IEEE: Check and log IEEE signalling flags. Logging normally occurs only if any nonzero output from ieee_error_reporting() is found. More...
 
character(len=:) function, allocatable, private parse_svn_version ()
 Parse and cut revision number in form of string from the whole SVN revision string. SVN revision number can therefore be included into the model outputs and output file names. This is convenient because the model version is identified by a single SVN revision number. More...
 
character(len=long_label_length) function, dimension(:), allocatable parse_abstract (file_name)
 Get and parse the model abstract. Model abstract is a short descriptive text that can span several lines and is kept in a separate file that is defined by the commondata::model_abstract_file. More...
 
character(len=:) function, allocatable, private tag_mmdd ()
 Date (YYYYMMDD) tag for file names and logs. More...
 

Variables

Precision control for real type and IEEE float math in the model
integer, parameter, public s_prec_32 = selected_real_kind( 6, 37)
 Standard precision for real data type. We first define 32, 64 and 128 bit real kinds. More...
 
integer, parameter, public d_prec_64 = selected_real_kind(15, 307)
 
integer, parameter, public q_prec_128 = selected_real_kind(33, 4931)
 
integer, parameter, public srp = S_PREC_32
 Definition of the standard real type precision (SRP). More...
 
integer, parameter, public hrp = Q_PREC_128
 Definition of the high real precision (HRP). This real type kind is used in pieces where a higher level of FPU precision is required, e.g. to avoid overflow/underflow and similar errors. More...
 
integer, parameter, public long = selected_int_kind(16)
 In some (perhaps quite rare) cases of exponentiation we may also need huge integers, those in 64 bit would probably be enough. So whenever we need such a big integer, declare it as: More...
 
Accessory parameters
character(len= *), parameter, private modname = "(COMMONDATA)"
 MODNAME always refers to the name of the current module for use by the LOGGER function LOG_DBG. Note that in the debug mode (if IS_DEBUG=TRUE) LOGGER should normally produce additional messages that are helpful for debugging and locating possible sources of errors. MODNAME is declared private and is not accessible outside of this module. Each procedure should also have a similar private constant commondata::procname. More...
 
character(len= *), parameter, private procname = ""
 PROCNAME is the procedure name for logging and debugging (with commondata::modname). More...
 
character(len= *), parameter, public svn_version_string = "$Revision: 9552 $"
 Subversion or Mercurial revision number (or ID) of the model code. More...
 
character(len=:), allocatable, public, protected svn_version
 Subversion or Mercurial revision number that is parsed by commondata::parse_svn_version(). It is shorter than commondata::svn_version_string and does not contain blanks. Therefore, it can be used for building output file names. More...
 
logical, parameter, public true =.TRUE.
 Safety parameter avoid errors in logical values, so we can now refer to standard Fortran .TRUE. and .FALSE. as YES and NO or TRUE and FALSE More...
 
logical, parameter, public false =.FALSE.
 
logical, parameter, public yes =.TRUE.
 
logical, parameter, public no =.FALSE.
 
real(srp), parameter, public zero = epsilon(0.0_SRP)
 Some parameters should never be zero or below. In such cases they could be set to some smallest distinguishable non-zero value. Here set as the Fortran intrinsic epsilon function, a value that is almost negligible compared to one, i.e. the smallest real number E such that $ 1 + E > 1 $. In some cases it is also reasonable to set the tolerance limit to this parameter (see Float point computations). More...
 
real(srp), parameter, public tiny_srp =tiny(1.0_SRP)
 The smallest positive number in the commondata::srp standard real model. More...
 
real(hrp), parameter, public tiny_hrp =tiny(1.0_HRP)
 The smallest positive number in the commondata::hrp high precision real model. See Float point computations. More...
 
real(srp), parameter, public lo_valid_sanitised = TINY_SRP * 10.0_SRP
 Lower bound for do_sanitise() procedure. This is the lowest value that considered valid. More...
 
real(srp), parameter, public hi_valid_sanitised = huge(1.0_SRP)/100.0_SRP
 Higher bound for do_sanitise() procedure. This is the highest value that considered valid. More...
 
real(srp), parameter, public tolerance_low_def_srp = TINY_SRP * 5.0_SRP
 Default value of low tolerance (high precision). This is the standard commondata::srp precision. See Float point computations. More...
 
real(hrp), parameter, public tolerance_low_def_hrp = TINY_HRP * 5.0_HRP
 Default value of low tolerance (high precision). This is the high commondata::hrp precision. See Float point computations. More...
 
real(srp), parameter, public tolerance_high_def_srp = ZERO * 1000.0_SRP
 Default value of high tolerance (low precision). This is the standard commondata::srp precision real. See Float point computations. More...
 
real(hrp), parameter, public tolerance_high_def_hrp = epsilon(0.0_HRP) * 1000.0_HRP
 Default value of high tolerance (low precision). This is the high commondata::hrp precision real. See Float point computations. More...
 
real(srp), parameter, public missing = -9999.0_SRP
 Numerical code for missing and invalid real type values. More...
 
real(srp), parameter, public invalid = -9999.0_SRP
 
integer, parameter, public unknown = -9999
 Numerical code for invalid or missing integer counts. More...
 
real(srp), parameter, public pi =4.0_SRP*atan(1.0_SRP)
 The PI number. More...
 
character(len= *), parameter, public csv =".csv"
 Standard data file extension for data output is now .csv. More...
 
character(len= *), parameter, public ps =".ps"
 Standard file extension for debug and other PostScript plots. More...
 
integer, parameter, public filename_length = 255
 Set the standard length of the file name, are 255 characters enough? More...
 
logical, parameter, public use_posix_fs_utils = .TRUE.
 Logical flag for setting if POSIX direct filesystem procedures are used. These utilities are implemented in HEDTOOLS for standard POSIX C call via the Fortran interface. They should work safer, better and faster than indirect procedure wrappers (e.g. calling system()) but are not fully portable and might not work as expected on all systems and compilers. More...
 
integer, parameter, public label_length = 14
 The length of standard character string labels. We use labels for various objects, like alleles, perceptual and neural components / bundles etc. For simplicity, they all have the same length. It should be big enough to fit the longest whole label. More...
 
integer, parameter, public long_label_length = 128
 The length of long labels. More...
 
integer, parameter, public label_cst = 97
 This parameter defines the range of characters that is used for generating random labels, 97:122 corresponds to lowercase Latin letters. More...
 
integer, parameter, public label_cen = 122
 
character(len= *), parameter lock_file = "lock_simulation_running.lock"
 The name of the lock file. The lock file is created at the start of the simulation and is deleted at the end of the simulation. It can be used to signal that simulation is still ongoing to external utilities and scripts. See The lock file. More...
 
integer, public, protected lock_file_unit
 This is the unit number that identifies the lock file. The lock file is created at the start of the simulation and is deleted at the end of the simulation. It can be used to signal that simulation is still ongoing to external utilities and scripts. See The lock file. More...
 
character(len= *), parameter stop_file = "stop_simulation_running.lock"
 The name of the stop file. The stop file is checked before each new generation of the Genetic Algorithm. If this file is found, simulation does not go to the next generation and just stops. See The stop file. More...
 
integer, parameter, public platform_windows = 100
 Runtime platform ID constants. Use these constants for determining the current runtime platform, e.g. Platform_Running = PLATFORM_WINDOWS. See commondata::platform_running. More...
 
integer, parameter, public platform_unix = 111
 
integer, public platform_running
 Global variable that shows what is the current platform. Should use the above platform constants, e.g. Platform_Running = PLATFORM_WINDOWS. See commondata::platform_windows and commondata::platform_unix. More...
 
character(len= *), parameter, public exec_interpolate = "htintrpl.exe"
 There are a few external programs which are called from the model code. The name of the interpolation program (htintrpl.f90 from HEDTOOLS) executable. More...
 
character(len= *), parameter, public exec_scatterplot = "htscatter.exe"
 The name of the scatterplot program (htscatter.f90 from HEDTOOLS) executable. More...
 
character(len= *), parameter, public exec_histogram = "hthist.exe"
 The name of the histogram program (hthist.f90 from HEDTOOLS) executable. More...
 
character(len= *), parameter, public ltag_major = "IMPORTANT: "
 Tag prefixes for the logger system. The log may use tags for some common information pieces, so they are easily found within. The tags are normally set the prefix for the log: 017-01-31 13:33:22 INFO: Saving histogram, data: debug_hist.csv Some common tags are: STAGE STAGE: 2017-01-31 16:03:15 INFO: Generation 7 took 448.3279s. INFO INFO: some information TIMER TIMER: Calculating distances took 0.001 s Tag meaning:
More...
 
character(len= *), parameter, public ltag_stage = "STAGE: "
 
character(len= *), parameter, public ltag_info = "INFO: "
 
character(len= *), parameter, public ltag_warn = "WARNING: "
 
character(len= *), parameter, public ltag_error = "ERROR: "
 
character(len= *), parameter, public ltag_crit = "CRITICAL: "
 
character(len= *), parameter, public ltag_timer = "TIMER: "
 
character(len= *), parameter, public ltag_stats = "STATS: "
 
System-wide fatal errors

The description of errors that pertain to the whole system.

character(len= *), parameter, public error_no_autoalloc = "No automatic array allocation"
 Error message for **"no automatic intrinsic array allocation"**. Fortran compilers support automatic allocation of arrays on intrinsic assignment. This feature should work by default in GNU gfortran v.4.6 and Intel ifort v.17.0.1. Automatic allocation allows to avoid a possible bug when the number of array elements in the allocate statement is not updated when the components of the array are updated in the array constructor. More...
 
character(len= *), parameter, public error_auto_param_arrays = "No automatic size in parameter arrays"
 Error message for **"no automatic determination of the size in parameter"** arrays in the style: More...
 
character(len= *), parameter, public error_allocation_fail = "Cannot allocate array or object"
 Error message **"Cannot allocate array or object"** is issued if an array or an object is checked and turns out to be not allocated while it must be. More...
 
character(len= *), parameter, public error_lock_preexists = "Lock file '" // LOCK_FILE // "' exists. Is another simulation running?"
 
General Parameters
character(len= *), parameter, public model_name = "HEDG2_04"
 Model name for tags, file names etc. Must be very short. See Model descriptors. More...
 
character(len= *), parameter, public model_descr = "AHA, single fear, body size non-genetic."
 Model description - a fixed descriptive text, used in text outputs etc. See Model descriptors. More...
 
character(len= *), parameter, private model_abstract_file = "abstract.txt"
 The name of the file that contains the Model abstract, a short description that can span several lines of text ans is kept in a separate file. The file is read, if it exists, and its contents is logged at the start the simulation. The separate Model Abstract file is useful because it can integrate dynamic information, such as the latest version control log(s) via Subversion or Mercurial hooks mechanism. See Model descriptors. More...
 
logical, public, protected is_debug =.FALSE.
 Sets the model in the debug mode if TRUE. The Debug mode generates huge additional outputs and logs. Also, the logs by default go to the screen (standard output). See commondata::system_init() for details. More...
 
logical, public, protected is_plotting =.TRUE.
 This parameter controls if the debug plots are produced. They can be huge number that takes lots of space. Also, debug plots are called as separate processes that can run at the background and easily exceed the system-specific limit on child processes (if run in asynchronous mode). Generation of debug plots can be controlled by the environment variable AHA_DEBUG_PLOTS: if it is set to TRUE, 1, or YES, debug plots are enabled. See commondata::system_init() for details. More...
 
logical, public, protected is_screen_output =.FALSE.
 Sets the model in screen output mode. If TRUE, the logger output goes to the screen (standard output device). Can be manipulated using the environment variable AHA_SCREEN. If AHA_SCREEN is set to TRUE or 1 or yes, logger screen output is enabled. See commondata::system_init() for details. More...
 
logical, public, protected is_zip_outputs =.FALSE.
 This parameter enables or disables post-processing compression of the data: if TRUE, the data are compressed using the command defined by the commondata::cmd_zip_output string parameter. Note that not all data files are compressed, only potentially big ones are (e.g. agent population data and habitat data). More...
 
logical, parameter, public zip_outputs_background =.TRUE.
 This parameter defines if the output files are compressed in the background in the parallel mode or the program should wait for termination of the child zipping process. More...
 
character(len= *), parameter, public cmd_zip_output = "gzip"
 This parameter defines the compression program that is executed to "zip" the data files if commondata::is_zip_outputs is enabled (TRUE). The normal compression utility is "gzip," that is found on almost any Linux/Unix system. gzip compresses each file individually and by default automatically deletes the original file. The compressed file extension is defined by commondata::zip_file_extenssion. See http://www.gzip.org/. Alternative compressors that are fairly widespread are bzip2, lzma and xz. More...
 
character(len= *), parameter, public zip_file_extenssion = ".gz"
 This parameter defines the compressed file extension for the external compression utility defined by the commondata::cmd_zip_output. More...
 
logical, parameter, public enable_save_agents_each_timestep = .FALSE.
 This parameter defines if all agents data is saved at each time step of the life cycle. See the_evolution::lifecycle_preevol(). More...
 
character(len=:), allocatable, public, protected mmdd
 MMDD tag, year, month and day, used in file names and outputs. The value of the tag should be obtained only once at the start of the simulation, normally by calling the commondata::tag_mmdd() function at commondata::system_init(). It does not make much sense to generate these data tags on the fly as the simulations can be very long, several days, and so the file tags will be inconsistent. More...
 
integer, parameter, public popsize = 10000
 Maximum population size. More...
 
integer, parameter, public generations = 100
 Maximum number of generations in GA. More...
 
integer, public global_generation_number_current
 The current global generation number. This is a global non fixed-parameter variable that is updated in subroutines. More...
 
integer, parameter, public lifespan = 14000
 Number of time steps in the agent's maximum life length. More...
 
integer, parameter, public preevol_tsteps = 560
 Number of time steps in the agent's life at the pre-evolution stage. More...
 
integer, parameter, public preevol_tsteps_force_debug = 280
 Number of time steps in the agent's life at the fixed fitness pre-evolution stage. This parameter forces a smaller fixed value that is used for debugging only. Thus, adaptive time steps calculated by the_evolution::preevol_steps_adaptive() are disabled. To enable this fixed time steps, set this parameter commondata::preevol_tsteps_force_debug_enabled to TRUE. More...
 
logical, parameter, public preevol_tsteps_force_debug_enabled = .FALSE.
 This parameter enables the forced smaller fixed number of time steps set by the commondata::preevol_tsteps_force_debug parameter. More...
 
logical, parameter, public lifecycle_predation_disabled_debug = .FALSE.
 This parameter completely disables predation in the GA life cycle procedure. More...
 
integer, public global_time_step_model_current
 The current global time step of the model. This is a global non fixed-parameter variable that is updated in subroutines. More...
 
integer, public global_frame_number
 The current global time frame. Frames are time steps within the time step defined by the commondata::global_time_step_model_current. More...
 
real(srp), parameter, public percept_error_cv_def = 0.01_SRP
 Default perception error in the commondata::gamma2gene() neuronal response functions. Note that this parameter defines stochastic error as the Coefficient of Variation (CV). More...
 
Basic agent parameters
real(srp), parameter, public body_length_min = 0.2_SRP
 Minimum body length possible. More...
 
real(srp), parameter, public body_length_max = 100.0_SRP
 Maximum body length. More...
 
real(srp), parameter, public body_mass_min = 0.1_SRP
 Minimum possible body mass, hard limit. More...
 
logical, parameter, public init_agents_depth_is_fixed = .FALSE.
 This parameter determines if the agents are initialised at a fixed depth at the initialisation. Agents are normally placed uniformly, the_environment::uniform(), at the initialisation. However, the depth can be fixed. In such a case they are scattered uniformly in the X and Y coordinates but with fixed depth that is set by the commondata::init_agents_depth parameter. More...
 
logical, parameter, public init_agents_depth_is_gauss = .TRUE.
 This parameter determines if the agents are initialised at a fixed depth at the initialisation. Agents are placed uniformly, the_environment::uniform(), at the initialisation. However, the depth can be a Gaussian value with the. More...
 
real(srp), parameter, public init_agents_depth = 1833.0_SRP
 The fixed depth at which the agents are initialised at the start of the simulation. The other coordinates are normally set the_environment::uniform() within the initialisation environment container. See the_population::member_population::place_uniform(). More...
 
real(srp), parameter, public init_agents_depth_cv = 0.2_SRP
 This parameter sets the Coefficient of Variation for the Gaussian depth initialisation of the agents that is controlled by commondata::init_agents_depth_is_gauss. See the_population::member_population::place_uniform(). More...
 
real(srp), parameter, public reproduction_cost_body_mass_fix = 0.2_SRP
 The energetic cost of reproduction in terms of the agent's body mass loss. More...
 
real(srp), parameter, public reproduction_cost_offspring_fract_male = 0.3_SRP
 The component of the energetic cost of reproduction in males that is proportional to the total offspring mass. For details see the procedure the_body::reproduction_cost_energy_dynamic(). More...
 
real(srp), parameter, public reproduction_cost_offspring_fract_female = 1.0_SRP
 The component of the energetic cost of reproduction in females that is proportional to the total offspring mass. For details see the procedure the_body::reproduction_cost_energy_dynamic(). More...
 
real(srp), parameter, public reproduction_cost_body_mass_factor_male = 0.4_SRP
 The component of the energetic cost of reproduction in males that is proportional to the agent's body mass. For details see the procedure the_body::reproduction_cost_energy_dynamic(). More...
 
real(srp), parameter, public reproduction_cost_body_mass_factor_female = 0.1
 The component of the energetic cost of reproduction in females that is proportional to the agent's body mass. For details see the procedure the_body::reproduction_cost_energy_dynamic(). More...
 
real(srp), parameter, public reproduction_cost_unsuccess = 0.1_SRP
 The energetic cost of unsuccessful reproduction in terms of the agent's body mass lost. This is a fraction of the full cost of reproduction, that is described by the REPRODUCTION_COST_BODY_MASS parameter. More...
 
real(srp), dimension(*), parameter, public reproduct_body_mass_offspr_abscissa = [ BODY_MASS_MIN, 3.0_SRP, 10.5_SRP, 12.0_SRP ]
 The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the agent's body mass and the overall mass of all offspring as a fraction of the agent's body mass. More...
 
real(srp), dimension(*), parameter, public reproduct_body_mass_offspr_ordinate = [ 0.0_SRP, 0.1_SRP, 0.199_SRP, 0.20_SRP ]
 The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the agent's body mass and the overall mass of all offspring as a fraction of the agent's body mass. Plotting command for the interpolator: More...
 
Parameters of the environment
real(srp), dimension(3), parameter, public universe_min_coord_notuse = [0.0_SRP, 0.0_SRP, 0.0_SRP]
 Overall size of the global 3D universe of the model. More...
 
real(srp), dimension(3), parameter, public universe_whole_size_notuse = [20000.0_SRP, 10000.0_SRP, 3000.0_SRP]
 
integer, parameter, public dielcycles = 100
 Number of days and nights in a lifespan, DIELCYCLES=500. More...
 
integer, parameter, public history_size_spatial = 50
 The size of the history for spatial moving objects, i.e. how many time steps positions to remember in stack arrays. More...
 
real(srp), dimension(3), parameter, public habitat_safe_min_coord = [0.0_SRP, 0.0_SRP, 0.0_SRP]
 Definition of the habitat spatial limits. More...
 
real(srp), dimension(3), parameter, public habitat_safe_max_coord = [10000.0_SRP, 10000.0_SRP, 3000.0_SRP]
 
real(srp), dimension(3), parameter, public habitat_danger_min_coord = [10000.0_SRP, 0.0_SRP, 0.0_SRP]
 
real(srp), dimension(3), parameter, public habitat_danger_max_coord = [20000.0_SRP, 10000.0_SRP, 3000.0_SRP]
 
integer, parameter, public predators_num_habitat_safe = 100
 The number of predators in the safe habitat. More...
 
integer, parameter, public predators_num_habitat_danger = 500
 The number of predators in the dangerous habitat. More...
 
integer, parameter, public food_abundance_habitat_safe = 20000
 The food abundance in the safe habitat. More...
 
integer, parameter, public food_abundance_habitat_danger = 40000
 The food abundance in the dangerous habitat. More...
 
real(srp), parameter, public other_risks_def = 0.01_SRP
 Default level of other mortality risks in the habitat. More...
 
real(srp), parameter, public other_risks_habitat_safe = 0.01_SRP
 Habitat-specific mortality risk (not linked with predation) in the safe habitat. More...
 
real(srp), parameter, public other_risks_habitat_danger = 0.05_SRP
 Habitat-specific mortality risk (not linked with predation) in the dangerous habitat. More...
 
real(srp), parameter, public eggmortality_def = 0.01_SRP
 Default level of egg mortality in the habitat. More...
 
real(srp), parameter, public individual_mortality_risk_def = 0.01_SRP
 Default individually-specific mortality risk. It can increase or decrease depending on various factors. The individually-specific mortality risk is normally a Gaussian variable with the variability set by the commondata::individual_mortality_risk_cv. More...
 
real(srp), parameter, public individual_mortality_risk_cv = 0.05_SRP
 The coefficient of variation for Gaussian stochastic individually-specific mortality risk of the agent. More...
 
real(srp), parameter, public predator_body_size = 100.0_SRP
 The body size of the predator. In this version all predators have the same body size set by this parameter, but can be Gaussian stochastic. Moreover, in such a case predator attack efficiency can depend on the body size, e.g. larger predators are more dangerous. compare to the agents maximum body size BODY_LENGTH_MAX=100.0 More...
 
real(srp), parameter, public predator_attack_rate_default = 0.9_SRP
 Mean rate of a single predator attack. More...
 
real(srp), parameter, public predator_attack_rate_cv = 0.1_SRP
 Coefficient of variation for a single predator attack among the whole population of stochastic predators. More...
 
real(srp), parameter, public predator_attack_capture_probability_half = 0.8_SRP
 The probability of capture of a fish agent by a predator at the distance equal to 1/2 of the visual range. For more details see the_environment::predator_capture_risk_calculate_fish(). More...
 
real(srp), parameter, public predator_attack_capture_probability_min = 0.1_SRP
 Minimum probability of capture, e.g. at a distance exceeding the visual range. The latter assumes that the predator could detect the agent beyond the visual range and pursue it. For more details see the_environment::predator_capture_risk_calculate_fish(). More...
 
real(srp), parameter, public predator_attack_capture_prob_frz_50 = 0.10_SRP
 A parameter factor defining the probability of capture of an immobile (freezing) agent by a predator: interpolation ordinate for the distance equal to 0.25 of the visual range. See the_environment::predator_capture_risk_calculate_fish() for details. More...
 
real(srp), parameter, public predator_attack_capture_prob_frz_75 = 0.01_SRP
 A parameter factor defining the probability of capture of an immobile (freezing) agent by a predator: interpolation ordinate for the distance equal to 0.40 of the visual range. See the_environment::predator_capture_risk_calculate_fish() for details. More...
 
logical, parameter, public agent_can_assess_predator_attack_rate = .TRUE.
 A logical flag of whether the agents can assess the individual inherent attack rates of the predators. If yes, these inherent individual attack rates are collated into the perception object. If no, the default attack rate set by the commondata::predator_attack_rate_default parameter is used. More...
 
integer, parameter, public predator_risk_group_select_index_partial = 20
 Sets the limit for partial indexing and ranking of prey agents in the visual range of the predator. The risk of predation, i.e. the probability of attack and capture of each agent in a group of agents, will be calculated individually for distance-ranked agents only up to this parameter value. More...
 
real(srp), dimension(*), parameter, public predator_risk_group_dilution_ordinate = [1.0_SRP, 0.3_SRP, 0.1_SRP]
 The array defining the ordinate grid values for the weighting nonparametric function linking the distance rank of the agent within the visual field of the predator and the weighting factor adjusting for predator confusion and predator dilution effects. The grid abscissa is calculated dynamically in the the_environment::predator_capture_risk_calculate_fish_group() procedure. More...
 
real(srp), parameter, public food_item_size_default = 2.1_SRP
 Default size of a single food item. More...
 
real(srp), parameter, public food_item_mean_size = FOOD_ITEM_SIZE_DEFAULT
 The above is also the average size of a stochastic Gaussian food items. More...
 
real(srp), parameter, public food_item_size_default_cv = 0.1_SRP
 Coefficient of variation for Gaussian food items. More...
 
real(srp), parameter, public food_item_minimum_size = 1.0_SRP
 The minimum size of a food item. This is the "floor" in case the stochastically generated (e.g. Gaussian) value gets zero or below. More...
 
real(srp), parameter, public food_item_density = 0.1_SRP
 The (physical) density of a single food item. TODO: need to parametrise! More...
 
real(srp), parameter, public food_item_capture_prop_cost = 0.05_SRP
 The cost of the food item catching, in terms of the food item mass (proportional cost). So, if the agent does an unsuccessful attempt to catch a food item, the cost still applies. More...
 
real(srp), parameter, public food_item_capture_probability = 0.99_SRP
 The baseline probability that the food item is captured. See the_neurobio::food_item_capture_probability_calc(). More...
 
real(srp), parameter, public food_item_capture_probability_min = 0.1_SRP
 The minimum probability of capture a food item, when the item is at a distance equal to the visual range from the predator agent. More...
 
real(srp), parameter, public food_item_capture_probability_subjective_errorr_cv = 0.1
 Subjective error assessing the food item capture probability when assessing the subjective GOS expectancies of food items. The subjective assessment value of the capture probability is equal to the objective value plus random error with the CV equal to this parameter. More...
 
real(srp), parameter, public food_item_migrate_xy_mean = FOOD_ITEM_SIZE_DEFAULT * 10.0_SRP
 Mean shift parameter for the local random walk movement of food items in the horizontal plane. More...
 
real(srp), parameter, public food_item_migrate_depth_mean = FOOD_ITEM_SIZE_DEFAULT * 100.0_SRP
 Mean shift parameter for the local random walk movement of food items in the vertical (depth) plane. More...
 
real(srp), parameter, public food_item_migrate_xy_cv = FOOD_ITEM_SIZE_DEFAULT_CV
 Coefficient of variation parameter for the local random walk movement of food items in the horizontal plane. More...
 
real(srp), parameter, public food_item_migrate_depth_cv = 0.8_SRP
 Coefficient of variation parameter for the local random walk movement of food items in the vertical (depth) plane. More...
 
real(srp), parameter, public daylight =500.0_SRP
 Maximum above-surface light intensity at midday, DAYLIGHT=500.0. More...
 
logical, parameter, public daylight_stochastic = .TRUE.
 Flag for stochastic daylight pattern (if TRUE) or deterministic sinusoidal (when FALSE). Check out the next parameter DAYLIGHT_CV for variability. More...
 
real(srp), parameter, public daylight_cv =0.2_SRP
 Coefficient of variation for stochastic DAYLIGHT,. More...
 
real(srp), parameter, public beamatt =1.0_SRP
 Beam attenuation coefficient of water (m-1),BEAMATT = 1.0. More...
 
real(srp), parameter, public preycontrast_default = 1.0_SRP
 Inherent contrast of prey, CONTRAST =1.0. More...
 
real(srp), parameter, public preyarea_default =3.E-6_SRP
 Area of prey (m2), PREYAREA = 3.E-6. More...
 
real(srp), parameter, public viscap =1.6E6_SRP
 Dimensionless descriptor of fish eye quality, VISCAP=1.6E6. More...
 
real(srp), parameter, public eyesat =500.0_SRP
 Saturation parameter of eye (Ke) (uE m-2 s-1), EYESAT=500.0. More...
 
real(srp), parameter, public lightdecay = 0.002_SRP
 Vertical conservation of light, per depth (old code lightdecay=0.2). More...
 
Genetic architecture parameters
integer, parameter, public allelerange_min = 1
 The minimum possible value of alleles (allele range minimum) See implementation notes on the_genome::gene::allele_value component of the the_genome::gene derived type and commondata::alleleconv() and commondata::allelescale() functions. More...
 
integer, parameter, public allelerange_max = 10000
 The maximum possible value of alleles (allele range maximum) See implementation notes on the_genome::gene::allele_value component of the the_genome::gene derived type and commondata::alleleconv() and commondata::allelescale() functions. More...
 
real(srp), parameter, public allelescale_max = 20.0_SRP
 Conversion parameter that defines the scaling of the integer allele values ::ALLELERANGE_MIN to ALLELERANGE_MAX are converted to zero to this parameter value as the maximum. See allelescale() for details. More...
 
integer, parameter, public additive_comps = 3
 Number of additive allele components. More...
 
real(srp), parameter, public mutationrate_point = 0.1_SRP
 Mutation rate for point allele mutations. More...
 
real(srp), parameter, public ga_mutationrate_point_max = 0.25_SRP
 Maximum point mutation rate in the adaptive Fixed Fitness Genetic Algorithm. More...
 
real(srp), parameter, public mutationrate_batch = 0.05_SRP
 Mutation rate for point allele mutations, a whole batch of allele components. More...
 
real(srp), parameter, public ga_mutationrate_batch_max = 0.1_SRP
 Maximum batch mutation rate in the adaptive Fixed Fitness Genetic Algorithm. More...
 
real(srp), parameter, public relocation_swap_rate = 0.05_SRP
 Mutation rate for chromosome relocation, i.e. probability of a gene moving to a different position on the same chromosome: There are two kinds of relocations, swapping genes between two positions and moving a gene with subsequent shift. So we have two constants for the respective rates. More...
 
real(srp), parameter, public relocation_shift_rate = 0.01_SRP
 
integer, parameter, public n_chromosomes = 6
 The number of chromosomes for the agents. More...
 
integer, dimension(n_chromosomes), parameter, public len_chromosomes = [ 6, 5, 12, 12, 12, 12 ]
 The number of alleles in each of the chromosomes. NOTE: This must be an array (vector) of the size commondata::n_chromosomes. We use new Fortran array constructor here to set the array values. More...
 
integer, parameter, public max_nalleles = 12
 This parameter defines the maximum number of alleles within the chromosome It IS NOT intended to vary freely/independently. Used in definitions of _GENOTYPE_PHENOTYPE matrices, equal to the maxval(LEN_CHROMOSOMES). More...
 
character(len= *), dimension(n_chromosomes), parameter, public lab_chromosomes = [ "C_1_SEX ", "C_2_BODY", "C_3_HORM", "C_4_HUNG", "C_5_FEAR", "C_6_REPR" ]
 Set the labels of the chromosomes. NOTE, must be an array(vector) ) of the size commondata::n_chromosomes. We use new Fortran array constructor here to set the array values. More...
 
integer, parameter, public chromosome_ploidy = 2
 The ploidy of the chromosome set. Can theoretically be haploid (=1), diploid (=2) or, polyploid (>2). More...
 
real(srp), parameter, public genome_recombination_ratio_mother = 0.8_SRP
 The ratio of the genome that inherited from the mother. The other part is inherited from the father. See implementation details of the random independent genetic recombination procedure procedures the_genome::individual_genome::recombine(). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public genome_crossover_fixed_mother = reshape ( [ YES,YES,YES,YES,YES,YES, YES,YES,YES,YES,YES,YES, YES,YES,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Boolean 2D matrix that determines the pattern of fixed chromosome crossover. For each chromosome, the alleles that are marked with the TRUE (YES) values are inherited from the mother whereas those marked FALSE (NO) are inherited from the father. See implementation details of the fixed genetic crossover procedure procedures the_genome::individual_genome::crossover(). More...
 
real(srp), parameter, public sex_ratio = 0.5_SRP
 Sex ratio for initialising genomes. More...
 
character(len=label_length), parameter sexlocus_label ="SEX_LOCUS"
 Labels for the sex locus alleles (gene) - vector as we don't need to label individual alleles. LABEL_LENGTH is here to avoid a GF warning. More...
 
character(len= *), parameter, public male ="male"
 Set names of the sexes – the allele labels. More...
 
character(len= *), parameter, public female ="female"
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public sex_genotype_phenotype = reshape ( [ YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Sex definition can be implemented differently from all other traits. Here is an example of the phenotype x genotype matrix code for sex determination: More...
 
Hormonal parameters
logical, dimension(max_nalleles, n_chromosomes), parameter, public growhorm_genotype_phenotype = reshape ( [ NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for growth hormone. More...
 
real(srp), parameter, public growhorm_init = 0.5_SRP
 Genotype to phenotype gamma2gene initialisation value for growth hormone More...
 
real(srp), parameter, public growhorm_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public thyroid_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for thyroid. More...
 
real(srp), parameter, public thyroid_init = 0.5_SRP
 Genotype to phenotype gamma2gene initialisation value for thyroid More...
 
real(srp), parameter, public thyroid_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public adrenaline_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for adrenaline More...
 
real(srp), parameter, public adrenaline_init = 0.5_SRP
 Genotype to phenotype gamma2gene initialisation value for adrenaline More...
 
real(srp), parameter, public adrenaline_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public cortisol_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for cortisol. More...
 
real(srp), parameter, public cortisol_init = 0.5_SRP
 Genotype to phenotype gamma2gene initialisation value for cortisol More...
 
real(srp), parameter, public cortisol_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public testosterone_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for testosterone. More...
 
real(srp), parameter, public testosterone_init = 0.01_SRP
 Genotype to phenotype gamma2gene initialisation value for testosterone More...
 
real(srp), parameter, public testosterone_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public estrogen_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 Genotype x Phenotype matrix for ESTROGEN. More...
 
real(srp), parameter, public estrogen_init = 0.01_SRP
 Genotype to phenotype gamma2gene initialisation value for estrogen More...
 
real(srp), parameter, public estrogen_gerror_cv = 0.5_SRP
 Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0). More...
 
integer, parameter, public sex_steroids_check_history = 3
 The number of the latest historical values that are checked for change when setting an increment of the sex steroid hormones. More...
 
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_age_curve_abscissa = [ 0.0_SRP, real(LIFESPAN, SRP)*0.25_SRP, real(LIFESPAN, SRP) ]
 The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the age of the agent and the steroid increment factor for this specific age. More...
 
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_age_curve_ordinate = [ 0.0_SRP, 0.01_SRP, 0.1_SRP ]
 The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the age of the agent and the steroid increment factor for this specific age. More...
 
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_len_curve_abscissa = [ 0.0_SRP, BODY_LENGTH_MAX*0.2_SRP, BODY_LENGTH_MAX ]
 The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the body length of the agent and the steroid increment factor for this specific length. More...
 
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_len_curve_ordinate = [ 0.0_SRP, 0.01_SRP, 0.1_SRP ]
 The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the body length of the agent and the steroid increment factor for this specific length. More...
 
Body parameters, individual physiology and condition
integer, parameter, public history_size_agent_prop = 100
 History stack size for the agent's basic properties, such as body length and body mass. Normally they are saved only for the analysis and currently not used in the perception. More...
 
real(srp), parameter, public living_cost = 4.0_SRP
 Living cost in terms of food consumed. metabolic costs, p roportional to body size. More...
 
real(srp), parameter, public mass_growth_threshold = 0.0001_SRP
 A minimum body mass increment when any linear growth is possible, in units of the body mass (e.g. 0.05 = 5%) More...
 
real(srp), parameter, public linear_growth_exponent = 3.0_SRP
 Growth exponent linking linear growth and body mass growth. Based on Fulton's condition factor "cube law.". More...
 
real(srp), dimension(*), parameter, public linear_growth_hormone_increment_factor_curve_abscissa = [ 0.0_SRP, GROWHORM_INIT, GROWHORM_INIT*3.0_SRP, GROWHORM_INIT*5.0_SRP, GROWHORM_INIT*20.0_SRP ]
 The array defining the abscissa (X) of the nonparametric function curve that defines the function linking the relationship between the growth hormone and the relative linear growth increment. More...
 
real(srp), dimension(*), parameter, public linear_growth_hormone_increment_factor_curve_ordinate = [0.0_SRP, 0.6_SRP, 0.9_SRP, 0.98, 1.00_SRP]
 The array defining the ordinate (Y) of the nonparametric function curve that defines the function linking the relationship between the growth hormone and the relative linear growth increment. More...
 
real(srp), parameter, public max_stomach_capacity_def = 0.15_SRP
 Set the maximum stomach capacity default value – fraction of the body mass available for food. Can be overriden in different agent types. Normally 15%. More...
 
real(srp), parameter, public stomach_content_emptify_factor = 100.0_SRP
 Stomach content emptify factor at each step. More...
 
real(srp), parameter, public stomach_content_init = 0.01_SRP
 Set average stomach capacity at birth/init in units of body weight,. More...
 
real(srp), parameter, public stomach_content_init_cv = 0.05_SRP
 Set the coefficient of variation for the stomach capacity at init. More...
 
real(srp), parameter, public swimming_speed_cost_burst = 0.1E-4_SRP
 Set the weighting factor parameter of burst swimming cost in terms of the agent body size and the distance expressed in terms of the agent body lengths. In the_body::condition_cost_swimming_burst(), this parameter sets the $ \beta $ coefficient. More...
 
real(srp), parameter, public cost_factor_foraging_smr = 0.1E-5_SRP
 Set the cost of foraging in terms of SMR. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public energy_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The initial value of the energy reserves at birth is genetically determined. This is the Genotype x Phenotype matrix for energy reserves. More...
 
real(srp), parameter, public energy_init = 0.18
 This is the initial value of the energy reserves, non-genetic mean. More...
 
real(srp), parameter, public energy_gerror_cv = 0.01
 Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the ENERGY_INIT value. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public body_length_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The initial value of the body length at birth is genetically determined. This is the Genotype x Phenotype matrix for body length. More...
 
real(srp), parameter, public body_length_init = 2.3_SRP
 The initial value of body length, the average (gon-genetic). More...
 
real(srp), parameter, public body_length_gerror_cv = 0.1_SRP
 Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the BODY_LENGTH_INIT value. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public control_unselected_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The initial value of the control unselected trait. This trait is is genetically determined but is not selected or used. So it can be used to control for random genetic drift. This is the Genotype x Phenotype matrix. More...
 
real(srp), parameter, public control_unselected_init = 0.5_SRP
 The initial value of the control unselected trait that goes through the gamma2gene. More...
 
real(srp), parameter, public control_unselected_gerror_cv = 0.5_SRP
 Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the control unselected trait. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public smr_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The initial value of the standard metabolic rate (SMR) at birth is genetically determined. This is the Genotype x Phenotype matrix for SMR. More...
 
real(srp), parameter, public smr_init = 0.5_SRP
 This is the initial value of SMR that goes through the gamma2gene. More...
 
real(srp), parameter, public smr_gerror_cv = 0.5_SRP
 Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the SMR_LENGTH_INIT value. More...
 
real(srp), parameter, public smr_min = 0.01_SRP
 Minimum SMR value, anything lower is not allowed. More...
 
real(srp), parameter swimming_cost_exponent_laminar = 0.5_SRP
 Default swimming cost body mass exponent parameter for laminar flow. See doi:10.1242/jeb.01484 (https://dx.doi.org/10.1242/jeb.01484) and the_body::condition_cost_swimming_burst() for details. More...
 
real(srp), parameter swimming_cost_exponent_turbulent = 0.6_SRP
 Default swimming cost body mass exponent parameter for turbulent flow. See doi:10.1242/jeb.01484 (https://dx.doi.org/10.1242/jeb.01484) and the_body::condition_cost_swimming_burst() for details. More...
 
real(srp), parameter, public swimming_cost_factor_buoyancy_down = 0.01_SRP
 This parameter defines the cost of the buoyancy-based locomotion as a fraction of normal laminar flow propulsion for lowering downwards. More...
 
real(srp), parameter, public swimming_cost_factor_buoyancy_up = 0.1_SRP
 This parameter defines the cost of the buoyancy-based locomotion as a fraction of normal laminar flow propulsion for lowering downwards. More...
 
Parameters of the neurobiological architecture
integer, parameter, public food_select_items_index_partial = 20
 Sets the limit for partial indexing and ranking of food items in the visual range of the agents. More...
 
integer, parameter, public consp_select_items_index_partial = 20
 Sets the limit for partial indexing and ranking of conspecifics in the visual range of the agent. More...
 
integer, parameter, public pred_select_items_index_partial = 20
 Sets the limit for partial indexing and ranking of predators in the visual range of the agent. More...
 
real(srp), parameter, public individual_visual_contrast_default = 1.0_SRP
 Inherent contrast of the agent, It is used in determining the visual range of an agent in perception of conspecifics, and also for assessing the agent's detectability by predator. Default Contrast of food items is set separately. More...
 
integer, parameter, public history_size_perception = HISTORY_SIZE_SPATIAL
 Sets the size of the perception memory stack. More...
 
integer, parameter, public history_size_motivation = HISTORY_SIZE_SPATIAL
 Sets the size of the emotional state memory stack. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public light_hunger_genotype_neuronal = reshape ( [ NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for light perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public light_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for light perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public depth_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for depth perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public depth_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for depth perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public foodcount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public foodcount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public food_mem_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public food_mem_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public conspcount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for conspecifics number perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public conspcount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for conspecifics number count perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_direct_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for direct predation perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_direct_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for direct predation perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_meancount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for mean predator number perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_meancount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for mean predator number perception effects on hunger. More...
 
real(srp), parameter, public predation_risk_weight_immediate = 0.7
 The weight of the immediately seen predators over those in the perceptual memory stack. Those in the memory then have this weight in the predation risk estimate: 1-PREDATION_RISK_WEIGHT_IMMEDIATE. See the_neurobio::predation_risk_backend(). More...
 
integer, parameter, public predation_risk_weight_memory_window = nint(HISTORY_SIZE_PERCEPTION / 2.0)
 The length of the perceptual memory window that is taken into account and weighted against the currently seen number of predators when calculating the motivation value. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public stom_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for stomach perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public stom_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for stomach perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public bodymass_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for body mass perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public bodymass_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for body mass perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public energy_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for energy reserves perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public energy_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for energy reserves perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public age_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for age perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public age_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for age perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public reprfac_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for reproductive factor perception effects on hunger that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public reprfac_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for reproductive factor perception effects on hunger. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public light_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for light perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public light_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for light perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public depth_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for depth perception effects on active avoidance that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public depth_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for depth perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public foodcount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public foodcount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public food_mem_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public food_mem_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public conspcount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for conspecifics number perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public conspcount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for conspecifics number count perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_direct_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for direct predation perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_direct_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for direct predation perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_meancount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for mean predator number perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_meancount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for mean predator number perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public stom_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for stomach perception effects on active avoidance that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public stom_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for stomach perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public bodymass_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for body mass perception effects on active avoidance that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public bodymass_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for body mass perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public energy_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for energy reserves perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public energy_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for energy reserves perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public age_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for age perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public age_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for age perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public reprfac_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for reproductive factor perception effects on fear state that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public reprfac_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for reproductive factor perception effects on fear state. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public light_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for light perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public light_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for light perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public depth_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for depth perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public depth_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for depth perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public foodcount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public foodcount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public food_mem_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for food items count perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public food_mem_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for food items count perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public conspcount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for conspecifics number perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public conspcount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for conspecifics number count perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_direct_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for direct predation perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_direct_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for direct predation perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public pred_meancount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for mean predator number perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public pred_meancount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for mean predator number perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public stom_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for stomach perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public stom_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for stomach perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public bodymass_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for body mass perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public bodymass_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for body mass perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public energy_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for energy reserves perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public energy_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for energy reserves perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public age_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for age perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public age_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for age perception effects on reproduction. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public reprfac_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for age perception effects on reproduction that goes via gamma2gene perception to neuronal response. More...
 
real(srp), parameter, public reprfac_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF
 Gaussian perception error parameter (cv) for age perception effects on reproduction. More...
 
logical, parameter, public modulation_appraisal_disable_all = .FALSE.
 Disable developmental or genetic modulation of the APPRAISAL completely. If set to TRUE, no modulation is performed and the final motivation values are just equal to the primary modulation values in APPRAISAL. More...
 
real(srp), parameter, public reprod_modulation_devel_agestart = LIFESPAN / 2.0_SRP
 Developmental modulation of reproductive motivation. This parameter defines the starting age (time steps) at which reproductive motivation can rise above zero (at all previous ages weight=0.0). See the_neurobio::appraisal_motivation_modulation_non_genetic(). More...
 
real(srp), parameter, public reprod_modulation_devel_agefull = REPROD_MODULATION_DEVEL_AGESTART + REPROD_MODULATION_DEVEL_AGESTART * 2.0_SRP / 3.0_SRP
 Developmental modulation of reproductive motivation. This parameter defines the age (time steps) at which reproductive motivation is weighted fully (weight = 1.0). See the_neurobio::appraisal_motivation_modulation_non_genetic(). More...
 
real(srp), dimension(*), parameter reprod_modulation_devel_abscissa = [ REPROD_MODULATION_DEVEL_AGESTART, REPROD_MODULATION_DEVEL_AGESTART + ( REPROD_MODULATION_DEVEL_AGEFULL - REPROD_MODULATION_DEVEL_AGESTART ) / 3.0_SRP, REPROD_MODULATION_DEVEL_AGEFULL ]
 Developmental modulation of reproductive motivation. This is the interpolation grid abscissa defining at which age reproduction motivation can have non-zero values (reproduction is possible). It defines the weighting factor applied to reproductive motivation. More...
 
real(srp), parameter, public reprod_modulation_devel_w2 = 0.1_SRP
 Developmental modulation of reproductive motivation. This parameter sets the interpolation array weight that defines how fast the reproduction motivation the_neurobio::state_reproduce is allowed to raise when the age of the agent exceeds the reproductive age. For details see the_neurobio::appraisal_motivation_modulation_non_genetic(). More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public sex_male_modulation_reproduce_genotype = reshape ( [ NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for sex modulation coefficient affecting reproduction motivation state in males. More...
 
real(srp), parameter, public sex_male_modulation_reproduce_gerror_cv = 0.1_SRP
 Gaussian error parameter (cv) for the sex modulation coefficient affecting reproduction motivation state in males. More...
 
logical, dimension(max_nalleles, n_chromosomes), parameter, public sex_female_modulation_reproduce_genotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )
 The genotype structure for sex modulation coefficient affecting reproduction motivation state in females. More...
 
real(srp), parameter, public sex_female_modulation_reproduce_gerror_cv = 0.1_SRP
 Gaussian error parameter (cv) for the sex modulation coefficient affecting reproduction motivation state in females. More...
 
real(srp), parameter, public attention_switch_hunger_light = 0.0_SRP
 Baseline attention switches $ \Psi _{i,j} $ control which perception components (i) can affect each of the motivational state (j). They should be defined for all combinations between the perception components (light, depth... food... predators... etc) and the motivational states. See Cognitive architecture. More...
 
real(srp), parameter, public attention_switch_hunger_depth = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_food_dir = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_food_mem = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_conspec = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_pred_dir = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_predator = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_stomach = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_bodymass = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_energy = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_age = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_hunger_reprfac = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_light = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_depth = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_food_dir = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_food_mem = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_conspec = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_pred_dir = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_predator = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_stomach = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_bodymass = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_energy = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_age = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_avoid_act_reprfac = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_light = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_depth = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_food_dir = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_food_mem = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_conspec = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_pred_dir = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_predator = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_stomach = 0.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_bodymass = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_energy = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_age = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), parameter, public attention_switch_reproduce_reprfac = 1.0_SRP
 Baseline attention switch, see commondata::attention_switch_hunger_light. More...
 
real(srp), dimension(*), parameter, public attention_modulation_curve_abscissa =[0.0_SRP, 0.3_SRP, 0.5_SRP, 1.0_SRP]
 The array defining the abscissa (X) of the nonparametric function that defines the attention modulation curve by the current Global Organismic State (GOS). More...
 
real(srp), dimension(*), parameter, public attention_modulation_curve_ordinate =[1.0_SRP, 0.98_SRP, 0.9_SRP, 0.0_SRP]
 The array defining the ordinate (Y) of the nonparametric function that defines the attention modulation curve by the current Global Organismic State (GOS). More...
 
real(srp), dimension(*), parameter, public motivation_compet_threshold_curve_abscissa = [0.0_SRP, 0.2_SRP, 0.60_SRP, 0.80_SRP, 0.90_SRP, 1.0_SRP, 1.1_SRP]
 The array defining the abscissa (X) of the nonparametric function curve that defines the threshold for motivation competition in GOS. More...
 
real(srp), dimension(*), parameter, public motivation_compet_threshold_curve_ordinate = [1.0_SRP, 0.3_SRP, 0.04_SRP, 0.01_SRP, 0.001_SRP, 0.0_SRP, 0.0_SRP]
 The array defining the ordinate (Y) of the nonparametric function curve that defines the threshold for motivation competition in GOS. More...
 
real(srp), parameter, public arousal_gos_dissipation_factor = 0.5_SRP
 Spontaneous arousal dissipation level when a simple fixed dissipation factor pattern is used. At each step, gos_arousal is reduced by a constant factor, AROUSAL_GOS_DISSIPATION_FACTOR` (e.g. reduced by 0.5) independently on the current GOS time step. More...
 
real(srp), dimension(*), parameter, public arousal_gos_dissipation_nonpar_abscissa = [ 1.0, 2.00, 5.00, 10.0, 15.0, 18.0, 20.0 ]
 This is the array defining the abscissa (X) of the nonparametric spontaneous arousal dissipation factor function involving polynomial (or linear) interpolation is used. More...
 
real(srp), dimension(*), parameter, public arousal_gos_dissipation_nonpar_ordinate = [ 1.0, 0.98, 0.80, 0.40, 0.22, 0.18, 0.17 ]
 This is the array defining the ordinate (Y) of the nonparametric spontaneous arousal dissipation factor function involving polynomial (or linear) interpolation is used. More...
 
real(srp), public global_rescale_maximum_motivation
 Global maximum sensory information that is updated for the whole population of agents. More...
 
integer, parameter, public history_size_behaviours = HISTORY_SIZE_SPATIAL
 The size of the behaviour labels history stack, i.e. for how many time steps should the stack remember record the behaviour labels. More...
 
real(srp), parameter, public probability_reproduction_base_factor = 0.90
 Default weighting factor for the baseline probability of successful reproduction $ \varphi $. See implementation details for the function the_neurobio::reproduce_do_probability_reproduction_calc(). More...
 
real(srp), dimension(*), parameter, public probability_reproduction_delta_mass_abscissa = [0.5_SRP, 1.0_SRP, 2.0_SRP]
 Interpolation grid abscissa for the body mass ratio factor that scales the probability of reproduction. For details see the_neurobio::reproduce_do_probability_reproduction_calc() procedure. Commands (template) to produce interpolation plots: More...
 
real(srp), dimension(*), parameter, public probability_reproduction_delta_mass_ordinate = [0.0_SRP, 1.0_SRP, 1.8_SRP]
 Interpolation grid ordinate for the body mass ratio factor that scales the probability of reproduction. For details see the_neurobio::reproduce_do_probability_reproduction_calc() procedure. Commands (template) to produce interpolation plots: More...
 
real(srp), parameter, public sex_steroids_reproduction_threshold = 1.3_SRP
 This parameter defines the threshold of the current gonadal steroids level that should exceed the baseline value determined by the genome, for reproduction to be possible. More...
 
real(srp), parameter, public walk_random_distance_default_factor = 10.0_SRP
 The weighting factor used in calculation of the default random walk distance, in terms of the agent's body length. More...
 
real(srp), parameter, public walk_random_distance_stochastic_cv = 0.5_SRP
 The coefficient of variation of the distance for stochastic Gaussian random walk (distance is in terms of the agent's body length). Note that for deterministic walk, cv is zero. More...
 
real(srp), parameter, public walk_random_food_gain_hope = 4.0_SRP
 The maximum walk distance, in units of the average distance to food items in the current perception object, when the expected food gain is calculated on the bases of the current food availability, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the expectancy is based on the the_behaviour::hope() function. More...
 
real(srp), parameter, public walk_random_food_gain_hope_agentl = 100.0_SRP
 The maximum walk distance, in units of the agent body length, when the expected food gain is calculated on the bases of the current food availability, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the expectancy is based on the the_behaviour::hope() function. More...
 
real(srp), parameter, public walk_random_pred_risk_hope_agentl = 150.0_SRP
 The maximum walk distance, in units of the agent body length, when the expected predation risk is calculated on the basis of the current perception value, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the risk expectancy is based on the the_behaviour::hope() function. More...
 
real(srp), parameter, public walk_random_vertical_shift_ratio = 0.5_SRP
 The ratio of the vertical to main horizontal shift parameters of the agent's Gaussian random walk. Random walk is done in the "2.5D" mode (the_environment::spatial_moving::rwalk25d()), i.e. with separate parameters for the main horizontal shift and the vertical depth shift. This is done to avoid a potentially too large vertical displacement of the agent during the movement. Thus, the vertical shift distance should normally be smaller than the horizontal shift. The difference between the main horizontal and (the smaller) vertical shifts is defined by this parameter. For example, if it is equal to 0.5, then the vertical depth shift is 0.5 of the main horizontal shift. See the_behaviour::walk_random_do_execute() for more details. More...
 
real(srp), parameter, public walk_random_vertical_shift_cv_ratio = 1.0_SRP
 The ratio of the vertical to the main horizontal coefficients of variation for the vertical depth distance in the stochastic Gaussian random walk of the agent. Should normally be equal to the main default value set by commondata::walk_random_distance_stochastic_cv. That is 1.0. More...
 
real(srp), dimension(*), parameter, public walk_random_food_hope_abscissa = [ 0.0_SRP, 1.0_SRP, 3.5_SRP ]
 This parameter defines the hope function for calculating the food perception expectancy in the the_behaviour::walk_random behaviour. This is the abscissa for the hope function grid array. Plotting: htintrpl.exe [0 1 3.5 ] [2, 1, 0]. See the_behaviour::walk_random_do_this(). More...
 
real(srp), dimension(*), parameter, public walk_random_food_hope_ordinate = [ 2.0_SRP, 1.0_SRP, 0.0_SRP ]
 This parameter defines the hope function for calculating the food perception expectancy in the the_behaviour::walk_random behaviour. This is the ordinate for the hope function grid array. Plotting: htintrpl.exe [0 1 3.5 ] [2, 1, 0]. See the_behaviour::walk_random_do_this(). More...
 
real(srp), parameter, public approach_offset_default = TOLERANCE_HIGH_DEF_SRP
 Default offset for approach, offset is the difference between the approaching agent and the target object. More...
 
real(srp), parameter, public approach_conspecfic_dilute_general_risk = 0.5_SRP
 Multiplication factor for the general risk of predation used when the agent evaluates the approach to a target conspecific. More...
 
real(srp), parameter, public approach_conspecfic_dilute_adjust_pair_behind = 0.5_SRP
 Multiplication factor for subjective assessment of the direct risk of predation when the actor agent moves behind the target conspecific, i.e. when the distance between the agent and predator is going to become longer than the distance between the target conspecific and the agent. See the_behaviour::approach_conspecifics_do_this() for details. More...
 
real(srp), dimension(*), parameter, public approach_food_gain_compet_factor_abscissa = [ 0.00_SRP, 0.10_SRP, 1.00_SRP, 1.50_SRP ]
 The grid abscissa defining the nonparametric relationship that determines the expected food gain for the "approach conspecifics" behaviour (the_behaviour::approach_conspec class). The function is a weighting factor depending on the ratio of the agent body mass to the target conspecific body mass, for the baseline expected food gain. More...
 
real(srp), dimension(*), parameter, public approach_food_gain_compet_factor_ordinate = [ 0.00_SRP, 0.01_SRP, 0.50_SRP, 1.00_SRP ]
 The grid ordinate defining the nonparametric relationship that determines the expected food gain for the "approach conspecifics" behaviour (the_behaviour::approach_conspec class). The function is a weighting factor depending on the ratio of the agent body mass to the target conspecific body mass, for the baseline expected food gain. More...
 
real(srp), parameter, public dist_expect_food_uncertain_fact = 0.7_SRP
 The weighting factor for the distance to the expected food item if the actual distance is uncertain (e.g. no food items currently in perception). See the_behaviour::walk_random_motivations_expect(). More...
 
real(srp), parameter, public history_perception_window_pred = 0.3_SRP
 The size of the memory window that is used in the assessment of predation risk, as a portion of the commondata::history_size_perception. See the_behaviour::walk_random_do_this() and the_behaviour::walk_random_motivations_expect(). More...
 
real(srp), parameter, public history_perception_window_food = 0.3_SRP
 The size of the memory window that is used in the assessment of food gain, as a portion of the commondata::history_size_perception. See the_behaviour::walk_random_do_this() and the_behaviour::walk_random_motivations_expect(). More...
 
real(srp), parameter, public escape_dart_distance_default_factor = 1.5_SRP
 The weighting factor used in calculation of the default escape distance. The escape distance is equal to the visibility range of the predator multiplied by this factor. Therefore, it should normally exceed 1.0. Otherwise, the escaping object is still within the visibility range of the predator after the escape. See the_behaviour::escape_dart_do_this() for more details. More...
 
real(srp), parameter, public escape_dart_distance_default_stoch_cv = 0.5_SRP
 For stochastic escape, this parameter determines the coefficient of variation of the escape walk. See the_behaviour::escape_dart_do_this() for more details. More...
 
real(srp), parameter, public up_down_walk_step_stdlength_factor = 4.0_SRP
 The default size of the up and down walks performed by the GO_DOWN_DEPTH and GO_UP_DEPTH, see the_behaviour::go_down_depth and the_behaviour::go_up_depth classes as well as the_behaviour::go_down_do_this() and the_behaviour::go_up_do_this() methods. More...
 
real(srp), parameter, public migrate_dist_max_step = 800.0_SRP
 The maximum distance (in units of the agent body length) a migrating agent can pass for a single time step of the model. This is basically limited by (an implicit) maximum speed of the agent, in terms of its body length. This parameter sets the limit on the length of a single migration bout. More...
 
real(srp), parameter, public migrate_random_max_dist_target = 10.0_SRP
 Default maximum distance towards the target environment (in units of the agent's body size) when the agent could emigrate into this target environment. See the_behaviour::behaviour_do_migrate_random() for details. More...
 
real(srp), parameter, public migrate_dist_penetrate_offset = 1.0_SRP
 The offset, in terms of the body length of the actor agent, for initial penetrating into the target environment when the agent is migrating into this environment. See the_environment::migrate_do_this(). More...
 
real(srp), parameter, public migrate_food_gain_maximum_hope = 2.0_SRP
 This parameter defines the hope function for calculating the food gain expectancy in the migration behaviour. This is the maximum value of the hope function that is achieved at zero ratio of the old to new food gain memory values. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this(). More...
 
real(srp), parameter, public migrate_food_gain_ratio_zero_hope = 3.5_SRP
 This parameter defines the hope function for calculating the food gain expectancy in the migration behaviour. This is the maximum ratio of the old to new food gain memory values that leads to virtually zero value of the hope function. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this(). More...
 
real(srp), parameter, public migrate_predator_maximum_hope = 2.0_SRP
 This parameter defines the hope function for calculating the general predation risk expectancy in the migration behaviour. This is the maximum value of the hope function that is achieved at zero ratio of the old to new predation values in the memory stack. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this(). More...
 
real(srp), parameter, public migrate_predator_zero_hope = 3.5_SRP
 This parameter defines the hope function for calculating the general predation risk expectancy in the migration behaviour. This is the maximum ratio of the old to new predation values in the memory stack that leads to virtually zero value of the hope function. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this(). More...
 
real(srp), dimension(*), parameter, public behav_walk_step_stdlen_static = [ 1.0_SRP, 10.0_SRP, 25.0_SRP, 50.0_SRP, 100.0_SRP ]
 This parameter array defines the repertoire of predetermined static walk step sizes, in units of the agent's body length, for the the_behaviour::walk_random behavioural unit as executed in the the_behaviour::behaviour::walk_random class level. See the_behaviour::behaviour::select() method for details. More...
 
real(srp), dimension(*), parameter, public behav_go_up_down_step_stdlen_static = [ 10.0_SRP, 20.0_SRP, 50.0_SRP, 75.0_SRP, 100.0_SRP ]
 This parameter array defines the step sizes, in units of the agent's body length, for the the_behaviour::go_down_depth and the_behaviour::go_up_depth behavioural unit as executed in the the_behaviour::behaviour::depth_down and the_behaviour::behaviour::depth_up class level(s). See the_behaviour::behaviour::select() method for details. More...
 
Parameters of the Genetic Algorithm
real(srp), parameter, public ga_reproduce_pr = 0.05_SRP
 Percentage of the best reproducing agents in the pre-evolution phase. More...
 
integer, parameter, public ga_reproduce_n = int(POPSIZE * GA_REPRODUCE_PR)
 Upper limit on the number of reproducing individuals in the fixed-fitness pre-evolution phase. More...
 
integer, parameter, public ga_fitness_dead = 400000000
 Fitness value ascribed to dead agent in pre-evol. See the_individual::individual_agent::fitness_calc(). Also note that huge(integer)) = 2147483647. More...
 
integer, parameter, public ga_fitness_select = 900
 Fitness threshold for the inclusion of the agent into the reproducing elite group. More...
 
real(srp), parameter, public ga_reproduce_min_prop = 0.05_SRP
 Minimum proportion of reproducing agents, but note that the number of number reproducers cannot be smaller than the absolute minimum commondata::ga_reproduce_n_min. See the_population::population::ga_reproduce_max(). More...
 
integer, parameter, public ga_reproduce_n_min = 20
 Absolute minimum number of reproducing agents in the adaptive GA procedure. See the_population::population::ga_reproduce_max(). More...
 

Detailed Description

COMMONDATA – definitions of global constants and procedures.

Commondata module

Module COMMONDATA is used for defining various global parameters like model name, tags, population size etc. Everything that has global scope and should be passed to many subroutines/functions, should be defined in COMMONDATA. It is also safe to include public keyword to declarations. COMMONDATA may also include subroutines/functions that have general scope and used by many other modules of the model.

Accessibility of objects

By default, all data objects in COMMONDATA should be accessible to all other modules. However, procedures defined here must have granular access rights, with the generic name declared public while specific implementations private.

Function/Subroutine Documentation

◆ cm2m_r()

elemental real(srp) function, private commondata::cm2m_r ( real(srp), intent(in)  value_cm)
private

Convert cm to m.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version gets real type argument.

This is needed because some of the the sizes are expressed in cm but certain functions (e.g. visual range estimator SRGETR) require parameters in m. E.g. FOOD_ITEM_SIZE_DEFAULT is set around 0.5 cm while SRGETR requires prey area in m².

Definition at line 5550 of file m_common.f90.

◆ cm2m_hr()

elemental real(hrp) function, private commondata::cm2m_hr ( real(hrp), intent(in)  value_cm)
private

Convert cm to m.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version uses the high HRP numerical precision model.

Definition at line 5564 of file m_common.f90.

◆ cm2m_i()

elemental real(srp) function, private commondata::cm2m_i ( integer, intent(in)  value_cm)
private

Convert cm to m.

Returns
value in m
Parameters
value_cmvalue in cm
Note
This version gets integer argument (albeit returns real).

Definition at line 5578 of file m_common.f90.

◆ m2cm_r()

elemental real(srp) function, private commondata::m2cm_r ( real(srp), intent(in)  value_m)
private

Convert m to cm.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version gets real type argument.

Definition at line 5592 of file m_common.f90.

◆ m2cm_hr()

elemental real(hrp) function, private commondata::m2cm_hr ( real(hrp), intent(in)  value_m)
private

Convert m to cm.

Returns
value in m
Parameters
value_cmvalue in cm
Note
This version uses the high HRP numerical precision model.

Definition at line 5606 of file m_common.f90.

◆ m2cm_i()

elemental real(srp) function, private commondata::m2cm_i ( integer, intent(in)  value_m)
private

Convert m to cm.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version gets integer argument (albeit returns real).

Definition at line 5620 of file m_common.f90.

◆ mm2m_r()

elemental real(srp) function, private commondata::mm2m_r ( real(srp), intent(in)  value_mm)
private

Convert mm to m.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version gets real type argument.

Definition at line 5634 of file m_common.f90.

◆ mm2m_i()

elemental real(srp) function, private commondata::mm2m_i ( integer, intent(in)  value_mm)
private

Convert mm to m.

Parameters
value_cmvalue in cm
Returns
value in m
Note
This version gets integer argument (albeit returns real).

Definition at line 5648 of file m_common.f90.

◆ carea()

elemental real(srp) function commondata::carea ( real(srp), intent(in)  R)

Calculate a circle area.

Calculate the area of the circle.

Parameters
Rcircle radius.
Note
Food items are viewed as circular objects with the default radius equal to the size FOOD_ITEM_SIZE_DEFAULT or FOOD_ITEM_MEAN_SIZE.

Definition at line 5664 of file m_common.f90.

Here is the caller graph for this function:

◆ length2sidearea_fish()

elemental real(srp) function commondata::length2sidearea_fish ( real(srp), intent(in)  body_length)

A function linking body length with the body area in fish.

For fish, based on the paper by O'Shea et al., 2006, DOI: 10.1111/j.1365-2761.2006.00728.x Approximate formula for the the whole surface area is

\[ S = 0.7 \cdot L^{1.9} . \]

Because the side area is 1/2 of the total surface area (0.7 / 2 = 0.35), the function takes this half. So the final formula is:

\[ S = 0.35 \cdot L ^{1.8} . \]

Definition at line 5681 of file m_common.f90.

Here is the caller graph for this function:

◆ rescale_full()

elemental real(srp) function, private commondata::rescale_full ( real(srp), intent(in)  value_in,
real(srp), intent(in)  A,
real(srp), intent(in)  B,
real(srp), intent(in)  A1,
real(srp), intent(in)  B1 
)
private

Rescale a real variable with the range A:B to have the new range A1:B1.

Linear transformation of the input value value_in such k * value_in + beta, where the k and beta coefficients are found by solving a simple linear system: $ \left\{\begin{matrix} A_{1}= k \cdot A + \beta; \\ B_{1}= k \cdot B + \beta \end{matrix}\right. $. It has this solution: $ k=\frac{A_{1}-B_{1}}{A-B}, \beta=-\frac{A_{1} \cdot B-A \cdot B_{1}}{A-B} $

Warning
The function does not check if value_in lies within [A:B].
Note
Code for wxMaxima equation solve:
solve( [a1=a*k+b, b1=b*k+b] ,[k,b] );

Implementation details

First, find the linear coefficients ck and cb from the simple linear system.

Second, do the actual linear rescale of the input value.

Definition at line 5706 of file m_common.f90.

◆ rescale_1()

elemental real(srp) function, private commondata::rescale_1 ( real(srp), intent(in)  value_in,
real(srp), intent(in)  A1,
real(srp), intent(in)  B1 
)
private

Rescale a real variable with the range 0:1 to have the new range A1:B1.

Warning
The function does not check if value_in lies within [0:1].
Note
Code for wxMaxima equation solve:
solve( [a1=0*k+b, b1=1*k+b] ,[k,b] );

Implementation details

First, find the linear coefficients ck and cb from the simple linear system.

Second, do the actual linear rescale of the input value.

Definition at line 5734 of file m_common.f90.

◆ within_r()

elemental real(srp) function, private commondata::within_r ( real(srp), intent(in)  value_in,
real(srp), intent(in), optional  vmin,
real(srp), intent(in)  vmax 
)
private

Force a value within the range set by the vmin and vmax dummy parameter values. If the value is within the range, it does not change, if it falls outside, the output force value is obtained as min( max( value, FORCE_MIN ), FORCE_MAX )

Parameters
[in]value_inInput value for forcing transformation.
[in]vminminimum value of the force-to range (lower limit), if not present, a lower limit of 0.0 is used.
[in]vmaxmaximum value of the force-to range (upper limit)
Returns
an input value forced to the range.
Note
Note that this is the real precision version of the generic within function.

Definition at line 5766 of file m_common.f90.

◆ within_i()

elemental integer function, private commondata::within_i ( integer, intent(in)  value_in,
integer, intent(in), optional  vmin,
integer, intent(in)  vmax 
)
private

Force a value within the range set by the vmin and vmax dummy parameter values. If the value is within the range, it does not change, if it falls outside, the output force value is obtained as min( max( value, FORCE_MIN ), FORCE_MAX )

Parameters
[in]value_inInput value for forcing transformation.
[in]vminminimum value of the force-to range (lower limit), if not present, a lower limit of 0.0 is used.
[in]vmaxmaximum value of the force-to range (upper limit)
Returns
an input value forced to the range.
Note
Note that this is the integer version of the generic within function.

Definition at line 5798 of file m_common.f90.

◆ is_within_r()

elemental logical function, private commondata::is_within_r ( real(srp), intent(in)  x,
real(srp), intent(in)  lower,
real(srp), intent(in)  upper 
)
private

Logical function to check if a value is within a specific range, lower <= X <= upper. The reverse (upper <= x <= lower) range limits can also be used; a corrective adjustment is automatically made.

Note
This is the real type version.
See commondata::is_within_operator_r() and commondata::is_within_operator_i() for a related user-defined operator .within..
Parameters
[in]xthe value to test
[in]lowerthe lower limit for the range tested.
[in]upperthe upper limit of the range tested.
Returns
Returns TRUE if x lies within [lower,upper] and FALSE otherwise.

First, make sure the lower bound is actually smaller than the upper bound. If not, swapped bounds are used to set the range: [upper,lower].

Definition at line 5831 of file m_common.f90.

Here is the caller graph for this function:

◆ is_within_i()

elemental logical function, private commondata::is_within_i ( integer, intent(in)  x,
integer, intent(in)  lower,
integer, intent(in)  upper 
)
private

Logical function to check if a value is within a specific range, lower <= X <= upper. The reverse (upper <= x <= lower) range limits can also be used; a corrective adjustment is automatically made.

Note
This is the integer type version.
See commondata::is_within_operator_r() and commondata::is_within_operator_i() for a related user-defined operator .within..
Parameters
[in]xthe value to test
[in]lowerthe lower limit for the range tested.
[in]upperthe upper limit of the range tested.
Returns
Returns TRUE if x lies within [lower,upper] and FALSE otherwise.

First, make sure the lower bound is actually smaller than the upper bound. If not, swapped bounds are used to set the range: [upper,lower].

Definition at line 5868 of file m_common.f90.

Here is the caller graph for this function:

◆ is_within_operator_r()

pure logical function, private commondata::is_within_operator_r ( real(srp), intent(in)  x,
real(srp), dimension(2), intent(in)  limits 
)
private

A wrapper function for commondata::is_within() to build a user defined operator. Basically, it is the same as is_within, but the lower and upper limits are set as a two-element array. Usage of the operator:

if ( value .within. [lower, upper] ) then
Note
This is real type version of the procedure.
Parameters
[in]xx the value to test
[in]limitslimits an array of two elements that sets the lower and upper limits for the range tested.
Returns
Returns TRUE if x lies within [lower,upper] and FALSE otherwise.

The implementation just calls the real type function commondata::is_within_r().

Definition at line 5902 of file m_common.f90.

Here is the call graph for this function:

◆ is_within_operator_i()

pure logical function, private commondata::is_within_operator_i ( integer, intent(in)  x,
integer, dimension(2), intent(in)  limits 
)
private

A wrapper function for commondata::is_within() to build a user defined operator. Basically, it is the same as is_within, but the lower and upper limits are set as a two-element array. Usage of the operator:

if ( value .within. [lower, upper] ) then
Note
This is an integer type version of the procedure.
Parameters
[in]xx the value to test
[in]limitslimits an array of two elements that sets the lower and upper limits for the range tested.
Returns
Returns TRUE if x lies within [lower,upper] and FALSE otherwise.

The implementation just calls the integer type function commondata::is_within_i().

Definition at line 5927 of file m_common.f90.

Here is the call graph for this function:

◆ average_r()

pure real(srp) function, private commondata::average_r ( real(srp), dimension(:), intent(in)  array_in,
real(srp), intent(in), optional  missing_code,
logical, intent(in), optional  undef_ret_null 
)
private

Calculate an average value of a real array, excluding MISSING values.

Parameters
vector_inThe input data vector
missing_codeOptional parameter setting the missing data code, to be excluded from the calculation of the mean.
undef_ret_nullOptional parameter, if TRUE, the function returns zero rather than undefined if the sample size is zero.
Returns
The mean value of the vector.
Note
This is a real array version.

Implementation details

Check if missing data code is provided from dummy input. If not, use global parameter.

Fist, count how many valid values are there in the array.

If there are no valid values in the array, mean is undefined.

still return zero if undef_ret_null is TRUE.

Definition at line 5952 of file m_common.f90.

◆ average_i()

pure real(srp) function, private commondata::average_i ( integer, dimension(:), intent(in)  array_in,
integer, intent(in), optional  missing_code,
logical, intent(in), optional  undef_ret_null 
)
private

Calculate an average value of an integer array, excluding MISSING values.

Returns
The mean value of the vector
Parameters
vector_inThe input data vector
missing_codeOptional parameter setting the missing data code, to be excluded from the calculation of the mean.
undef_ret_nullOptional parameter, if TRUE, the function returns zero rather than undefined if the sample size is zero.
Note
This is an integer array version.

Implementation details

Check if missing data code is provided from dummy input. If not, use global parameter.

Fist, count how many valid values are there in the array.

If there are no valid values in the array, mean is undefined.

still return zero if undef_ret_null is TRUE.

Definition at line 6022 of file m_common.f90.

◆ std_dev()

real(srp) function commondata::std_dev ( real(srp), dimension(:), intent(in)  array_in,
real(srp), intent(in), optional  missing_code,
logical, intent(in), optional  undef_ret_null 
)

Calculate standard deviation using trivial formula:

\[ \sigma=\sqrt{\frac{\sum (x-\overline{x})^{2}}{N-1}} . \]

Note
This is a real array version.
Parameters
[in]array_invector_in The input data vector
[in]missing_codemissing_code Optional parameter setting the missing data code, to be excluded from the calculation of the mean.
[in]undef_ret_nullundef_ret_null Optional parameter, if TRUE, the function returns zero rather than undefined if the sample size is zero.
Returns
The standard deviation of the data vector.

Check if missing data code is provided from dummy input. If not, use global parameter.

If there are no valid values in the array, std. dev. is undefined.

still return zero if undef_ret_null is TRUE.

Definition at line 6088 of file m_common.f90.

Here is the caller graph for this function:

◆ stack2arrays_r()

pure real(srp) function, dimension(:), allocatable, private commondata::stack2arrays_r ( real(srp), dimension(:), intent(in)  a,
real(srp), dimension(:), intent(in)  b 
)
private

Concatenate two arrays a and b. This procedure uses array slices which would be faster in most cases than the intrinsic [a,b] method.

Note
This is the real type version.
Parameters
[in]aparam[in] a first array
[in]bparam[in] b second array
Returns
return an array [a, b]

Definition at line 6156 of file m_common.f90.

◆ stack2arrays_i()

pure integer function, dimension(:), allocatable, private commondata::stack2arrays_i ( integer, dimension(:), intent(in)  a,
integer, dimension(:), intent(in)  b 
)
private

Concatenate two arrays a and b. This procedure uses array slices which would be faster in most cases than the intrinsic [a,b] method.

Note
This is the real type version.
Parameters
[in]aparam[in] a first array
[in]bparam[in] b second array
Returns
return an array [a, b]

Definition at line 6175 of file m_common.f90.

◆ is_near_zero_srp()

elemental logical function, private commondata::is_near_zero_srp ( real(srp), intent(in)  test_number,
real(srp), intent(in), optional  epsilon 
)
private

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below.

if ( is_near_zero(a) ) then ...
Note
Note that commondata::float_equal() can be used for approximate real comparisons of two real type values.
Modified from Near0_dp() function from Clerman & Spector 2012, p. 250-251.
This is the standard precision function (commondata::srp).
Parameters
[in]test_numbertest_number the number to check for being near-zero.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the test_number is near-zero.

Definition at line 6202 of file m_common.f90.

◆ is_near_zero_hrp()

elemental logical function, private commondata::is_near_zero_hrp ( real(hrp), intent(in)  test_number,
real(hrp), intent(in), optional  epsilon 
)
private

Checks if a real number is near 0.0. Thus function can be used for comparing two real values like the below.

if ( is_near_zero(a) ) then ...
Note
Note that commondata::float_equal() can be used for approximate real comparisons of two real type values.
Modified from Near0_dp() function from Clerman & Spector 2012, p. 250-251.
This is the high precision function (commondata::hrp).
Parameters
[in]test_numbertest_number the number to check for being near-zero.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the test_number is near-zero.

Definition at line 6232 of file m_common.f90.

◆ float_equal_srp()

elemental logical function, private commondata::float_equal_srp ( real(srp), intent(in)  value1,
real(srp), intent(in)  value2,
real(srp), intent(in), optional  epsilon 
)
private

Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( float_equal(a, b, 0.00001) ) ...

There is also a user defined operator .feq. for approximate float point equality. It differs from this function in that the later allows to set an arbitrary epsilon tolerance value whereas the operator does not (it uses the default epsilon based on the intrinsic tiny() function.

Note
This is the standard precision function (commondata::srp).
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the values value1 and value2 are nearly equal.

Definition at line 6268 of file m_common.f90.

◆ float_equal_hrp()

elemental logical function, private commondata::float_equal_hrp ( real(hrp), intent(in)  value1,
real(hrp), intent(in)  value2,
real(hrp), intent(in), optional  epsilon 
)
private

Check if two real values are nearly equal using the commondata::is_near_zero(). Thus function can be used for comparing two real values like the below. The exact comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( float_equal(a, b, 0.00001) ) ...

There is also a user defined operator .feq. for approximate float point equality. It differs from this function in that the later allows to set an arbitrary epsilon tolerance value whereas the operator does not (it uses the default epsilon based on the intrinsic tiny() function.

Note
This is the high precision function (commondata::hrp).
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
[in]epsilonepsilon optional (very small) tolerance value.
Returns
TRUE if the values value1 and value2 are nearly equal.

Definition at line 6306 of file m_common.f90.

◆ float_equal_srp_operator()

elemental logical function, private commondata::float_equal_srp_operator ( real(srp), intent(in)  value1,
real(srp), intent(in)  value2 
)
private

This is a wrapper for the commondata::float_equal_srp() for building the user defined operator .feq. with default tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( a .feq. b) ...
Warning
This function is not intended for direct use.
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
Returns
TRUE if the values value1 and value2 are nearly equal.

Definition at line 6340 of file m_common.f90.

◆ float_equal_hrp_operator()

elemental logical function, private commondata::float_equal_hrp_operator ( real(hrp), intent(in)  value1,
real(hrp), intent(in)  value2 
)
private

This is a wrapper for the commondata::float_equal_hrp() for building the user defined operator .feq. with default tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( a .feq. b) ...
Warning
This function is not intended for direct use.
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
Returns
TRUE if the values value1 and value2 are nearly equal.

Definition at line 6365 of file m_common.f90.

◆ float_approx_srp_operator()

elemental logical function, private commondata::float_approx_srp_operator ( real(srp), intent(in)  value1,
real(srp), intent(in)  value2 
)
private

This is a wrapper for the commondata::float_equal_srp() for building the user defined operator .approx. with very high tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( a .approx. b) ...
Warning
This function is not intended for direct use.
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
Returns
TRUE if the values value1 and value2 are approximately equal.

Definition at line 6390 of file m_common.f90.

◆ float_approx_hrp_operator()

elemental logical function, private commondata::float_approx_hrp_operator ( real(hrp), intent(in)  value1,
real(hrp), intent(in)  value2 
)
private

This is a wrapper for the commondata::float_equal_hrp() for building the user defined operator .approx. with very high tolerance (epsilon parameter). The exact real comparison (incorrect due to possible rounding):

if ( a == b ) ...

should be substituted by such comparison:

if ( a .approx. b) ...
Warning
This function is not intended for direct use.
Parameters
[in]value1value1 The first value for comparison.
[in]value2value2 The second value for comparison.
Returns
TRUE if the values value1 and value2 are approximately equal.

Definition at line 6416 of file m_common.f90.

◆ do_sanitise()

subroutine commondata::do_sanitise ( real(srp), dimension(:), intent(inout)  array,
real(srp), intent(in), optional  lvalid,
real(srp), intent(in), optional  hvalid,
real(srp), intent(in), optional  substval,
logical, intent(in), optional  only_wrong,
character(len=*), intent(in), optional  tnote 
)

Sanitize a real commondata::srp array, so that any value that is smaller than the minimum sensible value lvalid or greater then the maximum sensible value hvalid is substituted with substval. The procedure also checks the input value for IEEE validity: overflow, underflow, invalid and inexact.

Note
Note that commondata::do_sanitise() makes use the IEEE math procedures to handle halting on invalid values.
Parameters
[in,out]array[inout] array the array to be sanitised
[in]lvalidOptional lower valid boundary, default is set to commondata::lo_valid_sanitised
[in]hvalidOptional higher valid boundary, default is set to commondata::hi_valid_sanitised
[in]substvalOptional substitution value, default is commondata::missing
[in]only_wrongOptional flag to correct only invalid values (Nan, Inf) without range correction (lvalid, hvalid), default value is FALSE, i.e. to correct for range (lvalid to hvalid)
[in]tnoteOptional text note that is printed in case of IEEE error signalling to assist in the identification of the specific place in the code.

The input array is checked for wrong values: NaN, Inf+ and Inf-. Any invalid values are substituted by the substval or missing if that is not defined.

Definition at line 6437 of file m_common.f90.

Here is the call graph for this function:

◆ ieee_error_reporting()

integer function commondata::ieee_error_reporting ( logical, intent(in), optional  reset,
character(len=*), intent(in), optional  tnote 
)

Check if an IEEE error condition has occurred.

Parameters
[in]resetLogical flag requesting to reset any exceptions that are found (if set to TRUE), default value is TRUE. IEEE exception condition will not be reset if reset is FALSE.
Returns
integer IEEE Error code or null if there is no error condition.
  IS_OVERFLOW=101,
  IS_UNDERFLOW=102,
  IS_INVALID=103,
  IS_INEXACT=104,
  IS_DIVBYZERO=105,
  NO_SUPPORT_OVERFLOW=901,
  NO_SUPPORT_UNDERFLOW=902,
  NO_SUPPORT_INVALID=903,
  NO_SUPPORT_INEXACT=904,
  NO_SUPPORT_DIVBYZERO=905,
  NO_ERROR_FLAG=0
### Implementation notes ### The automatically generated IEEE wrapper include "IEEE_wrap.inc is used to invoke intrinsic or non-intrinsic IEEE math modules. If the compiler support intrinsic modules, this can be changed to
use, intrinsic :: ieee_arithmetic
use, intrinsic :: ieee_exceptions
Warning
Note that IEEE routines cannot be used in pure procedures.
Parameters
[in]tnoteOptional text note that is printed in case of IEEE error signalling to assist in the identification of the specific place in the code.

Definition at line 6583 of file m_common.f90.

Here is the caller graph for this function:

◆ zeroin()

real(srp) function commondata::zeroin ( real(srp), intent(in)  ax,
real(srp), intent(in)  bx,
real(srp f,
real(srp), intent(in)  tol 
)

This function calculates a zero of a function f(x) in the interval (ax,bx).

  • Brent, R.P., (1973). Algorithms for Minimization Without Derivatives, Prentice-Hall, Inc.
  • Brent, R.P. (1971). An algorithm with guaranteed convergence for finding a zero of a function, Computer J. 14, 422–425.

Author: Richard Brent, https://maths-people.anu.edu.au/~brent/ Source: http://www.netlib.org/go/ With some minor changes by Sergey Budaev.

Note
This function is used in the_environment::minimum_depth_visibility().
Parameters
[in]axleft endpoint of initial interval
[in]bxright endpoint of initial interval
[in]ffunction subprogram which evaluates f(x) for any x in the interval (ax,bx).
[in]toldesired length of the interval of uncertainty of the final result (.ge.0.)
Returns
Abscissa approximating a zero of f(x) in the interval (ax,bx). Note that this function returns commondata::missing if f(ax) and f(bx) do not have different signs (so there is no function zero within the range).

Definition at line 6744 of file m_common.f90.

Here is the caller graph for this function:

◆ allelescale()

elemental real(srp) function commondata::allelescale ( integer, intent(in)  raw_value)

Converts and rescales integer allele value to real value for neural response function.

Parameters
[in]raw_valueraw input value, integer within commondata::allelerange_min and commondata::allelerange_max
Return values
Returnsthe value of conversion function: integer alleles to real internal value zero to allelescale_max

Allele conversion function for the relationship between the genome integer allele value and its converted real value in the neuronal response function. The function rescales integer allele value $ I_{i} $ within the range $ [I_{min},I_{max}] $ to real values $ r $ within the range $ [0,M] $, where $ M $ is defined by the allelescale_max parameter. Conversion is performed by the ::rescale() backend function. See implementation notes on allele_value component of the GENE derived type.

Note
Note that it is an elemental function that can accept both scalar and vector arguments.

Definition at line 6882 of file m_common.f90.

Here is the caller graph for this function:

◆ alleleconv()

elemental real(srp) function commondata::alleleconv ( real(srp), intent(in)  raw_value)

Rescales the relationship between the numerical value of an allele in the genome and the numerical value to be used in the neuronal response function.

Parameters
raw_valueRaw input value from the genome.
Return values
Returnsthe rescaled value.
Note
This is the same component as in the original model ALLELECONV parameter. Thus, if the allele value is integer in gamma2gene, then commondata::allelescale() is called first (convert integer to real 0..1), then follows alleleconv() (rescale 0..1 to rescaled value).
Note that it is an elemental function that can accept both scalar and vector arguments.

Scale factor for the simple linear conversion (Type 3).

Implementation details

Type 1

Type 1: no conversion from 0:1 to output allele value

Note
identical to old alleleconv 1
converted = raw_value

Type 2

Type 2: exponential conversion from 0:1 to output allele value, to allow finer resolution at weak perception strengths.

Warning
This version can produce NaNs.
Note
identical to identical to old alleleconv 2
converted = (10 * raw_value) ** 2

Type 3

Type 3: linear conversion from 0:1 to output allele value, has been the most used value, although not perfect.

Note
identical to old alleleconv 3
converted = raw_value * SCALE_FACTOR

Definition at line 6906 of file m_common.f90.

Here is the caller graph for this function:

◆ cv2variance()

elemental real(srp) function commondata::cv2variance ( real(srp), intent(in)  cv,
real(srp), intent(in)  mean 
)

Calculate the variance from the coefficient of variation.

The coefficient of variation cv $ cv= \frac{\sigma}{\bar{P}} $. Therefore, the raw variance $ {\sigma}^{2} $ in the RNORM function is equal to

\[ {\sigma}^{2} = {(cv \cdot \bar{P})}^{2} . \]

Returns
Variance $ {\sigma}^{2} $
Parameters
cvCoefficient of variation.
meanAverage.
Note
We need this function because Gaussian parameters in commondata are set using the average and CV to be more intuitive, scale independent. But the function RNORM in HEDTOOLS gets variance as a parameter.
Note that this is an elemental function that gets both array and scalar parameters.

Definition at line 6955 of file m_common.f90.

Here is the caller graph for this function:

◆ gamma2gene_additive_i4()

real(srp) function, private commondata::gamma2gene_additive_i4 ( integer, dimension(:), intent(in)  gs,
integer, dimension(:), intent(in)  gh,
real(srp), intent(in)  signal,
real(srp), intent(in), optional  erpcv 
)
private

The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response.

The real function gamma2gene finds the sigmoid relationship for a multicomponent allele impact on the neuronal response:

\[ R= \frac{(P/y_{1})^{x_{1}}}{1+(P/y_{1})^{x_{1}}} + \frac{(P/y_{2})^{x_{2}}}{1+(P/y_{2})^{x_{2}}} + \frac{(P/y_{3})^{x_{3}}}{1+(P/y_{3})^{x_{3}}} ... \]

Here, R is the neuronal response, P the strength of the sensory input (scaled 0-1), and x and y are two genes. The indices refer to the additive components of the alleles. Note that their number is set by the parameter ADDITIVE_COMPS. Further, erpcv defines the coefficient of variation for the perception error (with respect to its true value).

Returns
returns the neuronal response.
Parameters
[in]gsshape: Gene/constant determining the shape of the gamma function. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]ghhalf-max effect: Gene/constant for the signal strength giving half max effect. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]signalperception: Input value of (external or internal) stimulus perception.
[in]erpcverror: Additive error of stimulus perception, Gaussian variance added to the true environmental variable. If this parameter is absent, no perception error is introduced.
Maxima function for quick calc:
g2gene(p,x,y,n) := n * ( (p/y)^x / (1+(p/y)^x) );
Warning
This version of gamma2gene accepts integer arrays. It does invoke commondata::allelescale() automatically inside.

Implementation details

Perception is calculated as

\[ P=\bar{P}+\varepsilon , \]

where $ \bar{P} $ is the true environmental variable and $ \varepsilon $ is a Gaussian error. The perception value with error is implemented as a normal Gaussian variate with the mean equal to the true signal value $ \bar{P} $ and the coefficient of variation equal to the erpcv input parameter: $ erpcv= \frac{\sigma}{\bar{P}} $. Therefore, the raw error variance in the RNORM function is equal to the square of erpcv*signal. We also impose strict limit on perception $ P>0 . $

Definition at line 7003 of file m_common.f90.

◆ gamma2gene_additive_r4()

real(srp) function, private commondata::gamma2gene_additive_r4 ( real(srp), dimension(:), intent(in)  gs,
real(srp), dimension(:), intent(in)  gh,
real(srp), intent(in)  signal,
real(srp), intent(in), optional  erpcv 
)
private

The function gamma2gene finds the sigmoid relationship for a complex multicomponent 2-allele impact on the neuronal response.

Returns
returns the neuronal response.
Parameters
[in]shapeGene/constant determining the shape of the gamma function. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]half-maxeffect: Gene/constant for the signal strength giving half max effect. Note that the raw integer gene values are accepted by this function as commondata::allelescale() is called automatically inside.
[in]perceptionInput value of (external or internal) stimulus perception.
[in]errorAdditive error of stimulus perception, Gaussian variance added to the true environmental variable. If this parameter is absent, no perception error is introduced.

The real function gamma2gene finds the sigmoid relationship for a multicomponent allele impact on the neuronal response:

\[ R= \frac{(P/y_{1})^{x_{1}}}{1+(P/y_{1})^{x_{1}}} + \frac{(P/y_{2})^{x_{2}}}{1+(P/y_{2})^{x_{2}}} + \frac{(P/y_{3})^{x_{3}}}{1+(P/y_{3})^{x_{3}}} ... \]

Here, R is the neuronal response, P the strength of the sensory input (scaled 0-1), and x and y are two genes. The indices refer to the additive components of the alleles. Note that their number is set by the parameter ADDITIVE_COMPS. Further, erpcv defines the coefficient of variation for the perception error (with respect to its true value).


Maxima function for quick calc:

g2gene(p,x,y,n) := n * ( (p/y)^x / (1+(p/y)^x) );
Warning
This version of gamma2gene accepts real arrays. It does not invoke commondata::allelescale() automatically inside.

Perception is calculated as

\[ P=\bar{P}+\varepsilon , \]

where $ \bar{P} $ is the true environmental variable and $ \varepsilon $ is a Gaussian error. The perception value with error is implemented as a normal Gaussian variate with the mean equal to the true signal value $ \bar{P} $ and the coefficient of variation equal to the erpcv input parameter: $ erpcv= \frac{\sigma}{\bar{P}} $. Therefore, the raw error variance in the RNORM function is equal to the square of erpcv*signal. We also impose strict limit on perception min=0.

Definition at line 7115 of file m_common.f90.

◆ gamma2gene_fake_vals()

elemental real(srp) function, private commondata::gamma2gene_fake_vals ( real(srp), intent(in)  signal,
real(srp), intent(in), optional  gs,
real(srp), intent(in), optional  gh,
integer, intent(in), optional  n_acomps 
)
private

This "fake" version of the gamma2gene is used to guess the response values in calculations.

Return values
predicted_vala predicted value (scalar or array) of the sigmoidal neuronal response function. See gamma2gene for details.

Definition at line 7193 of file m_common.f90.

◆ gamma2gene_reverse()

elemental real(srp) function, private commondata::gamma2gene_reverse ( real(srp), intent(in)  neuronal_response,
real(srp), intent(in)  gs,
real(srp), intent(in)  gh,
integer, intent(in), optional  nc 
)
private

Reverse-calculate perception value from the given neural response value.

Calculates the value of the raw perception from the neural response function. This is the reverse of the gamma2gene with many components. It is assumed that all x and y values are the same, so the equation solved for the most trivial case. Calculated according to the formula:

\[ P = y\left ( \frac{R}{n-R} \right )^{1/x} , \]

where $ P $ is the perception value, $ R $ is the neural response, $ x $ and $ y $ are two genes.

Returns
Signal level for specific neural response, back calculated.
Parameters
[in]neuronal_responseneuronal response.
[in]gsshape parameter of the sigmoid function.
[in]ghhalf-max parameter of the sigmoid function.
[in]ncNumber of additive components. Optional, if absent assumed 1 (single component).
Note
This function is useful for guessing the average start values of genetically determined traits with Gaussian distribution.
Note that it is quite difficult to get really small gamma2gene values as the signal value should be really small: e.g. to get neural response 1.5E-5 (Fulton condition), we need signal = 2E-12. So, the function very quickly loses precision as we approach really low values. Need kind 8 or 16 precision?
Warning
This is quite a crude guess at low values. At lower values underestimates R, real value is higher. This is due to the limitation that R should never be below zero, causing above-zero truncation.
Returns
Signal level for specific neural response, back calculated.

Maxima function for quick calc:

reverse_gamma(r,x,y,n) := y * (r/(n-r))^(1/x);

Definition at line 7256 of file m_common.f90.

◆ add_to_history_i4()

pure subroutine, private commondata::add_to_history_i4 ( integer, dimension(:), intent(inout)  history_array,
integer, intent(in)  add_this 
)
private

Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history (for a spatial moving object). The stack works as follows, assuming 100 and 200 are added:
[1 2 3 4 5 6 7 8 9 10];
[2 3 4 5 6 7 8 9 10 100];
[3 4 5 6 7 8 9 10 100 200].

Parameters
history_arrayInteger array that keeps the history.
add_thiswe add this element to the end of the history array.
Note
This is the integer type version.

Definition at line 7299 of file m_common.f90.

◆ add_to_history_r()

pure subroutine, private commondata::add_to_history_r ( real(srp), dimension(:), intent(inout)  history_array,
real(srp), intent(in)  add_this 
)
private

Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history (for a spatial moving object).

Parameters
history_arrayInteger array that keeps the history.
add_thiswe add this element to the end of the history array.
Note
This is the real type version.

Definition at line 7324 of file m_common.f90.

◆ add_to_history_char()

pure subroutine, private commondata::add_to_history_char ( character(*), dimension(:), intent(inout)  history_array,
character(*), intent(in)  add_this 
)
private

Simple history stack function, add to the end of the stack. We need only to add components on top of the stack and retain commondata::history_size_spatial elements of the prior history.

Parameters
history_arrayInteger array that keeps the history.
add_thiswe add this element to the end of the history array.
Note
This is the character string type version

Definition at line 7348 of file m_common.f90.

◆ conv_l2i()

elemental integer function commondata::conv_l2i ( logical, intent(in)  flag,
integer, intent(in), optional  code_false,
integer, intent(in), optional  code_true 
)

Converts logical to integer following a rule, default FALSE = 0, TRUE = 1.

Note
Note that this function is required to place logical data like the survival status (alive) into the reshape array that is saved as the CSV data file.

Definition at line 7370 of file m_common.f90.

◆ conv_l2r()

elemental real(srp) function commondata::conv_l2r ( logical, intent(in)  flag,
real(srp), intent(in), optional  code_false,
real(srp), intent(in), optional  code_true 
)

Converts logical to standard (kind SRP) real, .FALSE. => 0, .TRUE. => 1.

Note
Note that this function is required to place logical data like the survival status (alive) into the reshape array that is saved as the CSV data file. **Example: **
call CSV_MATRIX_WRITE ( reshape( &
[ habitat_safe%food%food%x, &
habitat_safe%food%food%y, &
habitat_safe%food%food%depth, &
conv_l2r(habitat_safe%food%food%eaten), &
habitat_safe%food%food%size], &
[habitat_safe%food%number_food_items, 5]), &
"zzz_food_s" // model_name // "_" // mmdd // &
"_gen_" // tostr(generat, generations) // csv, &
["X ","Y ", "D ", "EATN", "SIZE"] &
)

First, check optional parameters.

Definition at line 7420 of file m_common.f90.

◆ is_maxval_r()

pure logical function, private commondata::is_maxval_r ( real(srp), intent(in)  value,
real(srp), dimension(:), intent(in)  array,
real(srp), intent(in), optional  tolerance 
)
private

Function to check if the value is the maximum value of an array (returns TRUE), or not (return FALSE).

Returns
TRUE if value is indeed the maximum value of the array and FALSE otherwise.
Parameters
[in]valueThe value to check
[in]arrayThe array to check within.
[in]toleranceOptional tolerance threshold.
Note
Check if we are provided with the tolerance threshold, if not, use the default parameter commondata::tolerance_low_def_srp value.

Definition at line 7459 of file m_common.f90.

◆ is_maxval_i()

pure logical function, private commondata::is_maxval_i ( integer, intent(in)  value,
integer, dimension(:), intent(in)  array 
)
private

Function to check if the value is the maximum value of an array (returns TRUE), or not (return FALSE). Integer version.

Returns
TRUE if value is indeed the maximum value of the array and FALSE otherwise.
Parameters
[in]valueThe value to check
[in]arrayThe array to check within.

Definition at line 7497 of file m_common.f90.

◆ is_minval_r()

pure logical function, private commondata::is_minval_r ( real(srp), intent(in)  value,
real(srp), dimension(:), intent(in)  array,
real(srp), intent(in), optional  tolerance 
)
private

Function to check if the value is the minimum value of an array (returns TRUE), or not (return FALSE).

Returns
TRUE if value is indeed the minimum value of the array and FALSE otherwise.
Parameters
[in]valueThe value to check
[in]arrayThe array to check within.
[in]toleranceOptional tolerance threshold.
Note
Check if we are provided with the tolerance threshold, if not, use the default parameter commondata::tolerance_low_def_srp value.

Definition at line 7524 of file m_common.f90.

◆ is_minval_i()

pure logical function, private commondata::is_minval_i ( integer, intent(in)  value,
integer, dimension(:), intent(in)  array 
)
private

Function to check if the value is the minimum value of an array (returns TRUE), or not (return FALSE). Integer version.

Returns
TRUE if value is indeed the minimum value of the array and FALSE otherwise.
Parameters
[in]valueThe value to check
[in]arrayThe array to check within.

Definition at line 7562 of file m_common.f90.

◆ timer_cpu_start()

subroutine, private commondata::timer_cpu_start ( class(timer_cpu), intent(inout)  this,
character(len=*), intent(in), optional  timer_title 
)
private

Start the timer object, stopwatch is now ON.

Parameters
title,anoptional title for the stopwatch object

Definition at line 7589 of file m_common.f90.

Here is the caller graph for this function:

◆ timer_cpu_elapsed()

real(srp) function, private commondata::timer_cpu_elapsed ( class(timer_cpu), intent(in)  this)
private

Calculate the time elapsed since the stopwatch subroutine was called for this instance of the timer container object. Can be called several times showing elapsed time since the grand start.

Returns
the time elapsed since timer_cpu_start call (object-bound).

Definition at line 7611 of file m_common.f90.

Here is the caller graph for this function:

◆ timer_cpu_title()

character(len=:) function, allocatable, private commondata::timer_cpu_title ( class(timer_cpu), intent(in)  this)
private

Return the title of the current timer object.

Returns
title of the stopwatch timer, allocatable with automatic trimming.
Note
Useful for outputs.

Definition at line 7632 of file m_common.f90.

Here is the caller graph for this function:

◆ timer_cpu_show()

character(len=:) function, allocatable, private commondata::timer_cpu_show ( class(timer_cpu), intent(in)  this)
private

A ready to use in output function that returns a formatted string for a timer combining its title and the elapsed time. For example: Calculating decomposition took 20s.

Note
If the value in seconds is too big, hours passed are appended in parentheses.

Definition at line 7647 of file m_common.f90.

Here is the caller graph for this function:

◆ timer_cpu_log()

character(len=:) function, allocatable, private commondata::timer_cpu_log ( class(timer_cpu this)
private

A ready to use shortcut function to be used in logger, just adds the TIMER: tag in front of the normal showoutput.
Example use:

call stopwatch_1%start("Calculate matrix decomposition")
.....
call LOG_DBG( stopwatch_1%log() )

Definition at line 7679 of file m_common.f90.

Here is the caller graph for this function:

◆ call_external()

subroutine commondata::call_external ( character(len=*), intent(in)  command,
logical, intent(in), optional  suppress_output,
logical, intent(in), optional  suppress_error,
logical, intent(in), optional  is_background_task,
logical, intent(out), optional  cmd_is_success,
integer, intent(out), optional  exit_code 
)

Call an external program using a command line. Wrapper to two alternative system shell calling intrinsic procedures.

Parameters
[in]commandis the command line that should be run by the system.
[in]suppress_outputis an optional logical flag indicating whether to suppress any STDOUT output (silent mode). Default is FALSE, i.e. do show command output (verbose).
[in]suppress_erroris a similar optional flag to suppress STDERR reporting (silent mode). Default is FALSE.
[in]is_background_taskis a logical flag to set execution on the background, based on wait=.false. parameter of EXECUTE_COMMAND_LINE. The default value is TRUE, i.e. do process the command at the background. Warning: Setting command execution as a background task will make cmd_is_success unusable because the exit code of the child process is is deferred.
[out]cmd_is_successis a logical flag indicating the command result was success (zero exit code).
[out]exit_codeexit code of the child process.
Warning
All external calls should normally be performed using this wrapper.

Implementation details

Output is suppressed by redirection to the null device, which is platform-specific.

Output of the STDERR is also redirected to the platform-specific null device. For the Windows platform STDERR redirection see http://support.microsoft.com/en-us/kb/110930.

Check background task optional option is_background_task.

Note
If the older non-standard system (disabled) command is used for executing background task on Unix systems may add "&" at the end of the command, but cannot be easily implemented on Windows. This functionality is currently not implemented as system is disabled.

Background parallel execution is enabled by default.

The intrinsic procedure system is a GNU extension and may not be available on all platforms and compilers. It is currently disabled.

Note
If the older non-standard system command is used for executing background task on Unix systems may add "&" at the end of the command, but cannot be easily implemented on Windows. This functionality is currently not implemented as system is normally disabled. A further caveat with system is that the returned integer exit status parameter works only using the IFPORT portability library on Intel Fortran.
Warning
The system is normally disabled. Should be enabled if the standard-compliant execute_command_line is not supported by the local compiler or results in errors.
On some systems, notably 'ahaworkshop', execute_command_line issues runtime error: Could not execute command line when calling the debug plotting utilities

The reason of such crashes is unknown. Probably this caused by system specific limitations on child processes when numerous child processes of plotting are generated too quickly. A workaround is to disable debug plots by setting the parameter commondata::is_plotting FALSE using the environment variable AHA_DEBUG_PLOTS=NO. If plotting is absolutely essential, execute_command_line should be disabled and the inferior system call used. The latter does not seem to result in crashes, although this has not been well tested.

call system( cmd_execute, status_int ) ! GNU Fortran
call system( cmd_execute ) ! Intel Fortran requires IFPORT

The F2008 execute_command_line should be better used here because it allows to control asynchronous/synchronous command execution and returns the exit status.

call execute_command_line( command = cmd_execute, &
exitstat = status_int, wait = wait_exec, &
cmdmsg = cmd_error_msg )
Warning
The intrinsic procedure execute_command_line is part of F2008 standard and may not be implemented yet on all platforms and compilers.

It is possible to get the command execution status if the logical cmd_is_success flag is provided.

Finally, log the command and its reported exit status if in the DEBUG mode.

Definition at line 7710 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_external()

logical function commondata::check_external ( character(len=*), intent(in)  exec)

Check if an external procedure is executable and can be run.

Definition at line 7896 of file m_common.f90.

Here is the call graph for this function:

◆ log_check_external()

subroutine commondata::log_check_external ( character(len=*), intent(in)  exec,
logical, intent(in), optional  debug_only,
logical, intent(out), optional  is_valid 
)

Check if an external procedure can be called and log the result.

Parameters
[in]execexternal executable name to call.
[in]debug_onlyflag indicating that checking is only done in the debug mode.
[out]is_validreturns if the external procedure is executable (TRUE) or not (FALSE).

Definition at line 7912 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug_histogram_save()

subroutine commondata::debug_histogram_save ( real(srp), dimension(:), intent(in)  x_data,
logical, intent(in), optional  delete_csv,
character(len=*), intent(in), optional  csv_out_file,
logical, intent(in), optional  enable_non_debug 
)

Produce a debug plot of histogram using an external program hthist from HEDTOOLS tools.

Parameters
[in]x_dataThe data to be plotted.
[in]delete_csvLogical flag, if TRUE, csv file will be deleted after plot is done.
[in]csv_out_fileOptional plot file name, if absent will be auto-generated.
[in]enable_non_debugOptional flag to enable plot even in NON- DEBUG mode. Normally, all plot outputs are disabled in non- DEBUG mode (IS_DEBUG is FALSE, see commondata::is_debug) because this may significantly slow down execution and produce lots of big PostScript files.

Implementation notes

The histogram plot is actually produced using a separate program with the executable name set by the character parameter constant commondata::exec_histogram (that should be in the system path). The plotting program code is normally part of the HEDTOOLS modelling tools and is placed in HEDTOOLS%\tools folder.

Note
Building plotting tools is done with "make tools" in the main HEDTOOLS file hierarchy. Building requires PGPLOT library and can be easily done on Linux; on Windows building can be more tricky. See code and output of commondata::exec_histogram.
Debug plots are not essential, so are done by a separate program that can be absent on the runtime system. Plots are generated only if the protected parameter commondata::is_plotting is set to TRUE.

Normally, plots are generated only in the debug mode or if the enable_non_debug parameter is explicitly set to TRUE. This is because the code can easily generate huge number of plots. Also calling external commands has big calculation speed overhead and can exhaust OS-specific limits on child processes.

The plotting backend program obtains the input data for the scatterplot from a CSV file. Its name is normally provided on the command line. In this procedure, input data vector x_data is passed into the called plotting executable via a temporary CSV file. Its name can be automatically generated or provided explicitly as the csv_out_file dummy parameter. The CSV data file for plotting can also be saved. Therefore, the histogram could be easily regenerated from the data using an alternate program (e.g. high quality file prepared using a different program for publication).

First, the plot vector data are saved into the temporary CSV file.

Note
Note that the data vector is saved vertical (vertical=.TRUE.).

Second, the external command to plot the data histogram is called using the commondata::call_external() wrapper procedure. We use only a one-dimensional vector of data and histogram is from the first column. No exit status or even the availability of commondata::exec_scatterplot is checked. However, the dummy parameter is_background_task controls whether the plotting program should be executed as a parallel background task (if TRUE) or the model executable should wait for the plotting program to terminate. The non-parallel (default) mode is safer because calling numerous child processes can exhaust the system-specific limit on child processes resulting in an uncontrollable crash. However, non-parallel mode is obviously much slower.

Definition at line 7965 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug_scatterplot_save()

subroutine commondata::debug_scatterplot_save ( real(srp), dimension(:), intent(in)  x_data,
real(srp), dimension(:), intent(in)  y_data,
logical, intent(in), optional  delete_csv,
character(len=*), intent(in), optional  csv_out_file,
logical, intent(in), optional  enable_non_debug 
)

Produce a debug plot of 2-d scatterplot using an external program htscatter from HEDTOOLS tools.

Parameters
[in]x_dataThe data to be plotted.
[in]delete_csvLogical flag, if TRUE, csv file will be deleted after plot is done.
[in]csv_out_fileOptional plot data file name, if absent will be auto-generated.
[in]enable_non_debugOptional flag, if TRUE, the plot output is saved even when not in the DEBUG mode. Normally, all plot outputs are disabled in non-DEBUG mode (commondata::is_debug is FALSE, see commondata::is_debug) because this may significantly slow down execution and produce lots of big PostScript files.

Implementation notes

The scatterplot is actually produced with a a separate program with the executable name set by the character parameter constant commondata::exec_scatterplot (that should be in the system path). The scatterplot program code is normally part of the HEDTOOLS modelling tools and is placed in HEDTOOLS\tools folder.

Note
Building plotting tools is done with "make tools" in the main HEDTOOLS file hierarchy. Building requires PGPLOT library and can be easily done on Linux; on Windows building can be more tricky. See code and output of commondata::exec_scatterplot.
Debug plots are not essential, so are done by a separate program. They may be especially useful for controlling the quality of polynomial DDPINTERPOL interpolation, that has a tendency towards "wrapped" ends. Plots are generated only if the protected parameter commondata::is_plotting is set to TRUE.

Plots are normally produced only in the debug mode or if the enable_non_debug parameter is explicitly set to TRUE.

The plotting backend program obtains the input data for the scatterplot from a CSV file. Its name is normally provided on the command line. In this procedure, input data vectors x_data and y_data are passed into the called plotting executable via a temporary CSV file. Its name can be automatically generated or provided explicitly as the csv_out_file dummy parameter. The CSV data file for plotting can also be saved. Therefore, the scatterplot could be easily regenerated from the data using an alternate program (e.g. high quality file prepared using a different program for publication).

First, the vector data are saved into the temporary CSV file.

Note
Note that if X and Y vectors are different size, the bigger is used for the reshaped array and extra values are padded with MISSING (see commondata::missing).

Second, the external command to produce the plot is called using the commondata::call_external() wrapper procedure. No exit status or even the availability of commondata::exec_scatterplot is checked. However, the dummy parameter is_background_task controls whether the plotting program should be executed as a parallel background task (if TRUE) or the model executable should wait for the plotting program to terminate. The non-parallel (default) mode is safer because calling numerous child processes can exhaust the system-specific limit on child processes resulting in an uncontrollable crash. However, non-parallel mode is obviously much slower.

Definition at line 8095 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug_interpolate_plot_save()

subroutine commondata::debug_interpolate_plot_save ( real(srp), dimension(:), intent(in)  grid_xx,
real(srp), dimension(:), intent(in)  grid_yy,
real(srp), intent(in)  ipol_value,
character(*), intent(in)  algstr,
character(len=*), intent(in)  output_file,
logical, intent(in), optional  enable_non_debug 
)

Produce a debug plot of the interpolation data using an external program htinterp from the HEDTOOLS tools.

Parameters
grid_xxInterpolation grid arrays.
grid_yyInterpolation grid arrays.
ipol_valueInterpolation value.
algstrAlgorithm string.
output_fileThe file name for debug plot output (PostScript).
enable_non_debugOptional flag, if TRUE, interpolation plot is saved even when not in the DEBUG mode. Normally, all plot outputs are disabled in non-DEBUG mode (IS_DEBUG is FALSE, see commondata::is_debug) because this may significantly slow down execution and produce lots of big PostScript files.

Implementation notes

Plots are generated only if the protected parameter commondata::is_plotting is set to TRUE. So the first thing is to check if it is so.

By default, saving interpolation plots in non debug mode is disabled (.FALSE.)

Produce a debug plot of the interpolation data. The plot is done by a separate program with the executable name set by the character parameter commondata::exec_interpolate (that should be in the system path). This program is called is called using the commondata::call_external() wrapper procedure. The interpolation plot program code is normally part of the HEDTOOLS modelling tools and is placed in HEDTOOLS\tools folder.

Note
Building plotting tools is done with "make tools" in the main HEDTOOLS file hierarchy. Building requires PGPLOT library and can be easily built on Linux; on Windows building can be more tricky. See code and output of commondata::exec_interpolate.
Debug plots are not essential, so are done by a separate program. They may be especially useful for controlling the quality of polynomial DDPINTERPOL interpolation, that has a tendency towards "wrapped" ends.

All the data for plotting are transferred into the plotting program via command line parameters. Each of the array or parameter should be in square brackets. No exit status or even the availability of commondata::exec_interpolate is checked. However, the dummy parameter is_background_task controls whether the plotting program should be executed as a parallel background task (if TRUE) or the model executable should wait for the plotting program to terminate. The non-parallel (default) mode is safer because calling numerous child processes can exhaust the system-specific limit on child processes resulting in an uncontrollable crash. However, non-parallel mode is obviously much slower.

Definition at line 8229 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_delete()

subroutine commondata::file_delete ( character(len=*), intent(in)  file_name,
logical, intent(out), optional  success 
)

Delete a file from the local file system using Fortran open status=delete or fast POSIX C call.

Note
The easiest way is to use unlink but it is non-standard (GNU extension).
HEDTOOLS now implement a few POSIX procedures for manipulation of the file system. Among them, FS_UNLINK() is used to delete a file (not directory) and FS_REMOVE() deletes a file or a directory. Example call:
call FS_UNLINK("obsolete_file", iostat)
iostat is an optional integer error status of the operation.
Warning
POSIX-based FS_UNLINK() is now used in this procedure if the parameter commondata::use_posix_fs_utils is set to TRUE. See portability note on this parameter.

Definition at line 8322 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ random_add_subtract()

real(srp) function, private commondata::random_add_subtract ( real(srp), intent(in)  x,
real(srp), intent(in)  y 
)
private

Random operator, adds or subtracts two values with equal probability, used in the random walk functions.

Parameters
[in]xx is the first real number
[in]yy is the second real number
Returns
x + y or x - y with equal 0.5 probability.

Definition at line 8384 of file m_common.f90.

◆ system_init()

subroutine commondata::system_init

Initialises the system environment and sets basic parameters.

Note
This procedure also initialises the logger by a call of commondata::logger_init.

Check lock file

First, the program checks if the lock file exists. If it does, this can mean that a simulation is already running in the working directory. Thus, the current process is terminated before any files are written to avoid mess.

Note
If the commondata::lock_file has not been deleted automatically for any reason but one is sure that no simulation is actually running (e.g. there was a crash before or the program was closed by Ctrl+C), just delete the commondata::lock_file and restart the program.

Random seed

Then, the random seed is initialised by RANDOM_SEED_INIT() from HEDTOOLS. Note that it is platform-dependent and uses the system entropy pool on Unix systems and the date on Windows.

Execution control

The DEBUG mode

The protected global variable IS_DEBUG (commondata::is_debug) sets up the debug mode of execution. The debug mode results in huge amount of output and logs that significantly slows down execution. Debug mode can be set using the environment variable AHA_DEBUG=1, AHA_DEBUG=YES or AHA_DEBUG=TRUE.

Debug mode can also be set by setting the runtime command line parameter to DEBUG, DEBUG=1, DEBUG=YES or DEBUG=TRUE to the model executable, e.g.

./MODEL.exe DEBUG

See The DEBUG mode for more details.

Logging in the DEBUG mode

The procedure CALL_DBG() (see commondata::log_dbg()) is used to issue logger messages only in the DEBUG mode. Those messages, that should be issued in any mode, both DEBUG and non-DEBUG, LOG_MSG() from the HEDTOOLS should be used.

Examples: This code produces the logger message:

call LOG_MSG("Revision ID: " // SVN_Version // ".")

However, the below code produces logger output only in the debug mode:

call LOG_DBG(LTAG_INFO // "Agent is freezing.", PROCNAME, MODNAME)

Note the use of the logger tag commondata::ltag_info in the later example.

Compiler optimisation of the debug mode

Setting the IS_DEBUG as a protected variable commondata::is_debug enables one to switch between the DEBUG and non-DEBUG mode of the program execution. However, it can have a performance penalty because all the calls to the debugging code remains in the model. The program then has to test numerous if conditions if ( IS_DEBUG ) then... which are likely to slow down execution. Setting commondata::is_debug as a fixed parameter (i.e. with the parameter attribute) would allow a highly optimising compiler to determine at the compile time that the numerous debugging instructions are never executed and remove them from the machine instructions that are then generated. However, declaring parameter won't allow to change the value of the IS_DEBUG. All such cases should be disabled. Within the code, such places are marked with the DEBUG_COMPILER_OPTIMISE tag. If IS_DEBUG is declared as a parameter, all these places should be disabled, e.g.

trim(debug_string)=="true" ) then
! DEBUG_COMPILER_OPTIMISE: see 'Compiler optimisation of debug mode'
! IS_DEBUG =.TRUE.
is_screen_output = .true.

In effect, it would not be possible to switch between the debug modes on the fly.

Controlling the screen output

The logger outputs normally go to the log file. But can also be shown on the terminal screen (standard output). This is controlled by the protected global variable commondata::is_screen_output.

The Screen mode can be reset independently of DEBUG mode using the shell environment variable AHA_SCREEN=1, AHA_SCREEN=YES or AHA_SCREEN=TRUE. For example, on Linux it is done

export AHA_SCREEN=1

on Windows command line:

set AHA_SCREEN=1

It is possible to change the output channel of the logger during the run time using the LOG_CONFIGURE() procedure. For example certain log message can selectively appear on the terminal standard output, and then the default behaviour controlled by the commondata::is_screen_output parameter restored:

call LOG_CONFIGURE("writeonstdout" , .TRUE.) ! Enable screen temporarily
call LOG_MSG( "*** START DEBUG BLOCK ***" ) ! Send message
call LOG_CONFIGURE("writeonstdout" , IS_SCREEN_OUTPUT) ! Enable default

For more details see the LOGGER Module documentation of the HEDTOOLS.

Generation of debug plots

The debug plots can be generated. However, their number is normally just huge. Also, debug plots are produced by calling external programs which, if done too frequently, can exhaust the system-specific limit on the number of child processes. Production of debug plots is globally by the protected global variable commondata::is_plotting.

This can be reset independently of using the shell environment variable AHA_DEBUG_PLOTS=1, AHA_DEBUG_PLOTS=YES or AHA_DEBUG_PLOTS=TRUE. For example, on Linux it is done

export AHA_DEBUG_PLOTS=1

on Windows command line:

set AHA_DEBUG_PLOTS=1

Compression of big output data files

The model can generate big data files for the agent population and habitat objects. These files can be automatically compressed using the external command defined by the commondata::cmd_zip_output parameter. This compression option is determined by the protected global variable commondata::is_zip_outputs.

This can be reset using the shell environment variable AHA_ZIP_FILES=1, AHA_ZIP_FILES=YES or AHA_ZIP_FILES=TRUE. For example, on Linux it is done

export AHA_ZIP_FILES=1

on Windows command line:

set AHA_ZIP_FILES=1

Checking external executables

This procedure checks external procedures for existence and being executable. However, there seems to be a bug in Intel Fortran implementation of the intrinsic execute_command_line procedure: if the called program is not found in the PATH, the whole program crashes with "Segmentation fault".

forrtl: severe (174): SIGSEGV, segmentation fault occurred

A workaround is to avoid checking the externals in such a case. This can be done by setting the environment variable AHA_CHECK_EXTERNALS to 0, no or false.

Note
This is not normally required if GNU gfortran is used for building. For example, on Linux it is done
export AHA_CHECK_EXTERNALS=NO
on Windows command line:
set AHA_CHECK_EXTERNALS=NO

Implementation details

  • Get the time tag for the model in this format (YYYYMMDD) by call to the commondata::tag_mmdd() procedure. commondata::mmdd is a global public protected variable. It should be used for all date tagging.

Initialise the system logger by commondata::logger_init. Some system parameters, e.g. the platform type are determined in the commondata::logger_init.

Quick integrity checks

  • Check and make sure IEEE float point errors are supported and not present at the start
  • Check external executables that are called from the model code. These are basically not essential and mainly used only in the debug mode.
  • If the commondata::is_zip_outputs is enabled (TRUE), a check is done if the external compression program (commondata::cmd_zip_output) can be called. It involves compressing a small test file and getting the exit code.
Warning
commondata::log_check_external() procedure is called in the synchronous mode and might hang the system if the child process hangs for any reason, e.g. if the compression utility is wrongly configured and waits input from the standard input.

If compression fails, automatic background compression is disabled. commondata::is_zip_outputs is set to FALSE.

  • The results of these checks are reported in the logger.

If any of the external plotting utilities cannot be executed:

plotting is disabled by setting commondata::is_plotting to FALSE.

  • Check automatic allocation of arrays on intrinsic assignment. The code here and there depends on this recent feature of Fortran. If the test fails, manual allocation of such arrays with allocate should be recoded. The test is tagged as TEST_AUTOALLOC.
  • Check automatic determination of the size in parameter parameter arrays of the dimension statement style: dimension(*). All fairly modern Fortran compilers should support this feature.
Note
If the compiler does not support dimension(*) it would probably just fail to compile this code. So, it won't run up to this point.

Finally, a lock file is created. This file keeps opened during the whole simulation and is closed and deleted at the end. Thus, its primary use is to signal that the simulation is still going. See commondata::lock_file and commondata::lock_file_unit and The lock file for details.

Note
Lock file operation uses native Fortran intrinsic open statement rather than any higher level procedures like file_io. This is because the file is for signalling only (intended to be empty) and nothing is actually written into it.

Note that if the lock file cannot be written, the simulation is not halted automatically, but an error is issued to the logger because such error signals severe problems with disk access (e.g. read only mode, no space left etc.).

Definition at line 8404 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ system_halt()

subroutine commondata::system_halt ( logical, intent(in), optional  is_error,
character (len=*), intent(in), optional  message,
logical, intent(in), optional  ignore_lockfile 
)

Halt execution of the system with a specific message and exit code. The exit code is normally passed to the operating system. However, this behaviour is implementation dependent and can be unexpected on specific the platform(s) and the compiler(s).

  • Checking the exit code in bash can be done with "`$?`" variable.
  • Checking exit code on Windows is done using "`%ERRORLEVEL%`" variable e.g.
    if %ERRORLEVEL% EQU 0 echo normal termination
Note
Using specific exit code could allow to place the simulation model into an automated batch job more easily. For example, several simulations with different parameters could be processed. In such a case it would be good to know if the program failed or not. An example termination call due to an error:
call system_halt(is_error=.TRUE., message=ERROR_NO_AUTOALLOC )
Parameters
[in]is_erroris_error Optional flag that signals that the program is terminating due to error. The default is normal error-free termination with zero exit code.
[in]messagemessage Optional message that is passed the the logger immediately before the program is terminated.
[in]ignore_lockfileignore_lockfile is an optional flag to ignore closing and deleting the lock file. The default value is FALSE. If it is TRUE, the lock file is not touched. This is primarily necessary to halt the execution because the program discovers the lock file on startup which may indicate another simulation is currently running here. In such a case, deleting the lock file would interfere with this pre-running simulation.

Implementation notes

There are two possible exit code:

  • EXIT_CODE_DEF is the default exit code that is returned to the operating system. The default value for error-free termination is zero.

EXIT_CODE_ERROR is the fixed exit code that is returned to the operating system in case of error.

The lock file commondata::lock_file is closed and then deleted (commondata::file_delete()). See commondata::lock_file and commondata::lock_file_unit and The lock file for details.

Note
Note that setting ignore_lockfile parameter to TRUE disables checking and deleting the lock file.

The logger is now issues the final messages and shuts down.

The final message goes to the standard error device.

And the program terminates with specific exit code.

Definition at line 8867 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logger_init()

subroutine, private commondata::logger_init
private

logger_init Initialise the system and the system logger.

logger_init is called only once at commondata::system_init() to set up the basic parameters and the logging facility. For example, it sets the log file name, if timestamps should be produced, if we need screen output, log delimiter characters and any other similar parameters. They can be changed later if needed. logger_init also writes some short initial information to the log file like model name etc.

Implementation details

Notable variables

logfile character variable defines the file name for the main log output. Such a log file name is normally assembled from pieces, such as model name, date and time tag etc.

run_on_hostname is an character string variable that keeps the hostname of the system the model is running on.

Warning
Hostname is determined using the hostnm function that is non-standard and not portable. However, it is supported by GNU and Intel Fortran compilers. If not supported by the currently used compiler, call to this function should be disabled in this procedure.

The procedure

We first set parameters of the log, switch timestamps, screen output when DEBUG=TRUE, set delimiters and file optionally unit.

Delimiters here have the length 60 character.

We then initialise the log and set the log file name. The second dummy parameter set to FALSE defines log file overwrite (don't append to the old log file).

We also print some some initial info to the log, like the name of the model.

The Model Abstract is obtained from the abstract file commondata::model_abstract_file and logged.

Then detect the runtime platform and set integer platform ID that shows if we are running on Windows or Unix.

Determine the compiler version and the compiler parameters using the F2008 compiler_version() and compiler_options() inquiry functions. Because this functionality may not have been implemented in many current compilers (e.g. Intel Fortran 17), it is disabled here.

Determine the hostname (computer name) the program is running on. Then log hostname if determined successfully.

Warning
Hostname is determined using the hostnm function that is non-standard and not portable. However, it is supported by GNU and Intel Fortran compilers. If not supported by the currently used compiler, call to this function should be disabled in this procedure. With Intel Fortran compiler, using this functionality requires declaring. use IFPORT, only : hostnm Therefore, determining hostname is disabled so far.

Print the logger parameters in to the log itself.

Print some basic constants, e.g. commondata::srp, commondata::hrp etc.

Print the main parameters of the model, population size etc.

Print also some parameters of the Genetic Algorithm.

Finally, issue a horizontal line delimiter into the log. This finishes initialising the logger.

Definition at line 8977 of file m_common.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_dbg()

subroutine commondata::log_dbg ( character (len=*), intent(in)  message_string,
character (len=*), intent(in), optional  procname,
character (len=*), intent(in), optional  modname 
)

LOG_DBG: debug message to the log. The message goes to the logger only when running in the DEBUG mode.

Parameters
[in]message_stringString text for the log message
[in]procnameOptional procedre name for debug messages
[in]modnameOptional module name for debug messages

This subroutine is a wrapper to LOG_MSG() from HEDTOOLS for writing debug messages by the module LOGGER. The debug message message defined by the message_string parameter is issued only when the model runs in the debug mode, i.e. if IS_DEBUG=.TRUE.

Note
Standard LOG_MSG() procedure should be used for all logger messages that are produced in the normal non debug mode. How the DEBUG mode is controlled is described in the commondata::system_init() reference.

We first generate the message prefix = MODNAME PROCNAME if called with these parameters, so the location of the code in which the message has been issued is precisely known.

And then we issue the message to the log as usual.

Definition at line 9170 of file m_common.f90.

Here is the caller graph for this function:

◆ log_ieee()

subroutine commondata::log_ieee ( character(len=*), intent(in), optional  ttag,
logical, intent(in), optional  always_log,
logical, intent(in), optional  reset_flags 
)

LOG_IEEE: Check and log IEEE signalling flags. Logging normally occurs only if any nonzero output from ieee_error_reporting() is found.

Parameters
[in]ttagOptional text tag that is passed to logger to identify the specific algorithm place where the IEEE condition is checked/flagged.
[in]always_logOptional flag to request logger output even if IEEE signalling is NOT reported. Normally defaults to FALSE, but to TRUE if is_debug is TRUE.
[in]reset_flagsOptional flag to reset all IEEE conditions after checking and logging. The default value is TRUE, i.e. reset all flags to zero

Definition at line 9214 of file m_common.f90.

Here is the call graph for this function:

◆ parse_svn_version()

character(len=:) function, allocatable, private commondata::parse_svn_version
private

Parse and cut revision number in form of string from the whole SVN revision string. SVN revision number can therefore be included into the model outputs and output file names. This is convenient because the model version is identified by a single SVN revision number.

Returns
revision number from Subversion.
Warning
STRINGS module uses unsafe coding prone to bugs, e.g. does not clearly state dummy parameters intent and doesn't work correctly with parameters.

Implementation notes

Subversion has a useful feature: various keywords can be inserted and automatically updated in the source code under revision control, e.g. revision number, date, user etc. The character string parameter constant commondata::svn_version_string keeps the Subversion revision tag. This subroutine parses the tag striping all other characters out.

Definition at line 9273 of file m_common.f90.

Here is the caller graph for this function:

◆ parse_abstract()

character(len=long_label_length) function, dimension(:), allocatable commondata::parse_abstract ( character(len=*), intent(in), optional  file_name)

Get and parse the model abstract. Model abstract is a short descriptive text that can span several lines and is kept in a separate file that is defined by the commondata::model_abstract_file.

The separate Model Abstract file is useful because it can integrate dynamic information, such as the latest version control log(s) via Subversion or Mercurial hooks mechanism.

Parameters
[in]file_namefile_name optional name of the abstract file. If this parameter is absent, commondata::model_abstract_file is used.
Returns
An allocatable character string array that contains all the lines from the Model Abstract file.

Try to open the abstract file and count its lines with the function CSV_FILE_LINES_COUNT() from HEDTOOLS.

  • If the function return status is 'error' or the number of lines is less than 1, the abstract file is invalid and the abstract array is automatically allocated to one and assigned the model description string from commondata::model_descr.
  • Otherwise,
    • allocate the output abstract array to the number of lines in the abstract file and initialise it to empty strings
  • get the free file unit for reading...
  • open the abstract file for reading
  • And read all the contents of the file into the output abstract array.
  • Finally, close the file.

Definition at line 9304 of file m_common.f90.

Here is the caller graph for this function:

◆ tag_mmdd()

character(len=:) function, allocatable, private commondata::tag_mmdd
private

Date (YYYYMMDD) tag for file names and logs.

Warning
Note that this procedure should be called only once during the system initialisation. Then a fixed value is given to the global variable commondata::mmdd: this global variable should be used for all tags. This procedure has private accessibility status and is not available outside of commondata.
Returns
Return values
MMDDFunction returns an 8-character string for YYYYMMDD

Definition at line 9387 of file m_common.f90.

Here is the caller graph for this function:

Variable Documentation

◆ s_prec_32

integer, parameter, public commondata::s_prec_32 = selected_real_kind( 6, 37)

Standard precision for real data type. We first define 32, 64 and 128 bit real kinds.

Warning
HEDTOOLS cannot accept precision higher than kind 8 so far. So 128 bit reals are for example only here. Have to implement higher precision HEDTOOLS routines if they are really used.

Definition at line 1534 of file m_common.f90.

◆ d_prec_64

integer, parameter, public commondata::d_prec_64 = selected_real_kind(15, 307)

Definition at line 1535 of file m_common.f90.

◆ q_prec_128

integer, parameter, public commondata::q_prec_128 = selected_real_kind(33, 4931)

Definition at line 1536 of file m_common.f90.

◆ srp

integer, parameter, public commondata::srp = S_PREC_32

Definition of the standard real type precision (SRP).

SRP is defined as the standard precision that should normally be used for all real variables and constants. SRP stands for Standard Real Precision (Naming note: const name should be short to not produce too long real definitions, e.g. real(SRP) :: alpha).

Warning
All float (and other) constants should ideally be defined in the definition section of COMMONDATA or another module, not in the code. It is for easier maintainability and precision control.
All standard real variables should be defined as: real(SRP) :: real_var. Literal constants should normally add _SRP: 1.234_SRP (although it is less crucial).

Definition at line 1551 of file m_common.f90.

◆ hrp

integer, parameter, public commondata::hrp = Q_PREC_128

Definition of the high real precision (HRP). This real type kind is used in pieces where a higher level of FPU precision is required, e.g. to avoid overflow/underflow and similar errors.

Definition at line 1556 of file m_common.f90.

◆ long

integer, parameter, public commondata::long = selected_int_kind(16)

In some (perhaps quite rare) cases of exponentiation we may also need huge integers, those in 64 bit would probably be enough. So whenever we need such a big integer, declare it as:

   integer(LONG) :: bignum
Warning
HEDTOOLS do not currently work with these LONG kind integers. So they are only for "internal"-calculation use. Alternatively, use the intrinsic function int to convert to the default integer type inline before use, e.g.: TOSTR(int(max_permutations)).

Definition at line 1569 of file m_common.f90.

◆ modname

character(len=*), parameter, private commondata::modname = "(COMMONDATA)"
private

MODNAME always refers to the name of the current module for use by the LOGGER function LOG_DBG. Note that in the debug mode (if IS_DEBUG=TRUE) LOGGER should normally produce additional messages that are helpful for debugging and locating possible sources of errors. MODNAME is declared private and is not accessible outside of this module. Each procedure should also have a similar private constant commondata::procname.

Note
MODNAME must have the same case as the module name itself and must be enclosed in parentheses, e.g. "(THE_MODULE)".

Definition at line 1591 of file m_common.f90.

◆ procname

character(len=*), parameter, private commondata::procname = ""
private

PROCNAME is the procedure name for logging and debugging (with commondata::modname).

Note
PROCNAME must have the same case as the subroutine itself and must be enclosed in parentheses, e.g. "(function_or_subroutine_name)", so that it is easier to find in the code and easy to search by regex in the long output logs (use parentheses to search). Here is a template to insert into the code (procedure name is to be filled in the parentheses):
! PROCNAME is the procedure name for logging and debugging
character(len=*), parameter :: PROCNAME = "()"

Definition at line 1605 of file m_common.f90.

◆ svn_version_string

character(len=*), parameter, public commondata::svn_version_string = "$Revision: 9552 $"

Subversion or Mercurial revision number (or ID) of the model code.

Warning
The revision string is updated automatically at svn commmit (or hg commit). It is also not fully portable and may not auto update if a different version control system is used. Note that Mercurial has a keyword extension that works similar to Subversion and should auto-update the keywords.

Definition at line 1613 of file m_common.f90.

◆ svn_version

character(len=:), allocatable, public, protected commondata::svn_version

Subversion or Mercurial revision number that is parsed by commondata::parse_svn_version(). It is shorter than commondata::svn_version_string and does not contain blanks. Therefore, it can be used for building output file names.

Note
Note that the SVN parse function is called at initialising the log LOGGER_INIT, so SVN_Version is initialised.
Warning
SVN_Version is a string, version ID in Subversion is numeric, but in other version control systems (hg or git) it can be an arbitrary non-numeric hash string.
Note
Because it has allocatable attribute, its actual length is obtained automatically and no trim(SVN_Version) is necessary.

Definition at line 1627 of file m_common.f90.

◆ true

logical, parameter, public commondata::true =.TRUE.

Safety parameter avoid errors in logical values, so we can now refer to standard Fortran .TRUE. and .FALSE. as YES and NO or TRUE and FALSE

Definition at line 1632 of file m_common.f90.

◆ false

logical, parameter, public commondata::false =.FALSE.

Definition at line 1632 of file m_common.f90.

◆ yes

logical, parameter, public commondata::yes =.TRUE.

Definition at line 1633 of file m_common.f90.

◆ no

logical, parameter, public commondata::no =.FALSE.

Definition at line 1633 of file m_common.f90.

◆ zero

real(srp), parameter, public commondata::zero = epsilon(0.0_SRP)

Some parameters should never be zero or below. In such cases they could be set to some smallest distinguishable non-zero value. Here set as the Fortran intrinsic epsilon function, a value that is almost negligible compared to one, i.e. the smallest real number E such that $ 1 + E > 1 $. In some cases it is also reasonable to set the tolerance limit to this parameter (see Float point computations).

Note
The value of this parameter computed on a x86_64 Linux platform is 1.19209290E-07.

Definition at line 1644 of file m_common.f90.

◆ tiny_srp

real(srp), parameter, public commondata::tiny_srp =tiny(1.0_SRP)

The smallest positive number in the commondata::srp standard real model.

Note
This parameter is used for definition of numerical tolerance. See Float point computations.
The value of this parameter computed on a x86_64 Linux platform is 1.17549435E-38.

Definition at line 1651 of file m_common.f90.

◆ tiny_hrp

real(hrp), parameter, public commondata::tiny_hrp =tiny(1.0_HRP)

The smallest positive number in the commondata::hrp high precision real model. See Float point computations.

Note
This parameter is used for definition of numerical tolerance.

Definition at line 1656 of file m_common.f90.

◆ lo_valid_sanitised

real(srp), parameter, public commondata::lo_valid_sanitised = TINY_SRP * 10.0_SRP

Lower bound for do_sanitise() procedure. This is the lowest value that considered valid.

Definition at line 1660 of file m_common.f90.

◆ hi_valid_sanitised

real(srp), parameter, public commondata::hi_valid_sanitised = huge(1.0_SRP)/100.0_SRP

Higher bound for do_sanitise() procedure. This is the highest value that considered valid.

Definition at line 1664 of file m_common.f90.

◆ tolerance_low_def_srp

real(srp), parameter, public commondata::tolerance_low_def_srp = TINY_SRP * 5.0_SRP

Default value of low tolerance (high precision). This is the standard commondata::srp precision. See Float point computations.

Note
The value of this parameter computed on a x86_64 Linux platform is 5.87747175E-38.

Definition at line 1671 of file m_common.f90.

◆ tolerance_low_def_hrp

real(hrp), parameter, public commondata::tolerance_low_def_hrp = TINY_HRP * 5.0_HRP

Default value of low tolerance (high precision). This is the high commondata::hrp precision. See Float point computations.

Definition at line 1676 of file m_common.f90.

◆ tolerance_high_def_srp

real(srp), parameter, public commondata::tolerance_high_def_srp = ZERO * 1000.0_SRP

Default value of high tolerance (low precision). This is the standard commondata::srp precision real. See Float point computations.

Note
The value of this parameter computed on a x86_64 Linux platform is 1.19209290E-04.

Definition at line 1683 of file m_common.f90.

◆ tolerance_high_def_hrp

real(hrp), parameter, public commondata::tolerance_high_def_hrp = epsilon(0.0_HRP) * 1000.0_HRP

Default value of high tolerance (low precision). This is the high commondata::hrp precision real. See Float point computations.

Note
The value of this parameter computed on a x86_64 Linux platform is 1.92592994438723585305597794258492732E-0031.

Definition at line 1690 of file m_common.f90.

◆ missing

real(srp), parameter, public commondata::missing = -9999.0_SRP

Numerical code for missing and invalid real type values.

Note
We deliberately set an unisually big negative value for MISSING because it will reveal bugs by clearly strange/invalid negative results that will propagate in calculations.
Warning
It is safe to assign integer UNKNOWN constant to a real type variable, see the next definition.

Definition at line 1699 of file m_common.f90.

◆ invalid

real(srp), parameter, public commondata::invalid = -9999.0_SRP

Definition at line 1699 of file m_common.f90.

◆ unknown

integer, parameter, public commondata::unknown = -9999

Numerical code for invalid or missing integer counts.

Note
It is safe to assign integer UNKNOWN to a real type variable, e.g. real(SRP) :: value=UNKNOWN.

Definition at line 1704 of file m_common.f90.

◆ pi

real(srp), parameter, public commondata::pi =4.0_SRP*atan(1.0_SRP)

The PI number.

Pi number $ \pi = 4.0 \cdot tg(1.0) $ [4.*atan(1.0)], numerically equal to (64 bit real) PI=3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803_Q_PREC_64.

Definition at line 1710 of file m_common.f90.

◆ csv

character(len=*), parameter, public commondata::csv =".csv"

Standard data file extension for data output is now .csv.

Definition at line 1713 of file m_common.f90.

◆ ps

character(len=*), parameter, public commondata::ps =".ps"

Standard file extension for debug and other PostScript plots.

Definition at line 1716 of file m_common.f90.

◆ filename_length

integer, parameter, public commondata::filename_length = 255

Set the standard length of the file name, are 255 characters enough?

Warning
Do not forget to use trim() function to delete trailing spaces from the file name if it is declared as a fixed-length character string.

Definition at line 1722 of file m_common.f90.

◆ use_posix_fs_utils

logical, parameter, public commondata::use_posix_fs_utils = .TRUE.

Logical flag for setting if POSIX direct filesystem procedures are used. These utilities are implemented in HEDTOOLS for standard POSIX C call via the Fortran interface. They should work safer, better and faster than indirect procedure wrappers (e.g. calling system()) but are not fully portable and might not work as expected on all systems and compilers.

Definition at line 1730 of file m_common.f90.

◆ label_length

integer, parameter, public commondata::label_length = 14

The length of standard character string labels. We use labels for various objects, like alleles, perceptual and neural components / bundles etc. For simplicity, they all have the same length. It should be big enough to fit the longest whole label.

Definition at line 1736 of file m_common.f90.

◆ long_label_length

integer, parameter, public commondata::long_label_length = 128

The length of long labels.

Definition at line 1739 of file m_common.f90.

◆ label_cst

integer, parameter, public commondata::label_cst = 97

This parameter defines the range of characters that is used for generating random labels, 97:122 corresponds to lowercase Latin letters.

Definition at line 1743 of file m_common.f90.

◆ label_cen

integer, parameter, public commondata::label_cen = 122

Definition at line 1743 of file m_common.f90.

◆ lock_file

character(len=*), parameter commondata::lock_file = "lock_simulation_running.lock"

The name of the lock file. The lock file is created at the start of the simulation and is deleted at the end of the simulation. It can be used to signal that simulation is still ongoing to external utilities and scripts. See The lock file.

Note
Lock file operation uses native Fortran intrinsic open statement rather than any higher level procedures like file_io. This is because the file is for signalling only (intended to be empty) and nothing is actually written into it.

Definition at line 1754 of file m_common.f90.

◆ lock_file_unit

integer, public, protected commondata::lock_file_unit

This is the unit number that identifies the lock file. The lock file is created at the start of the simulation and is deleted at the end of the simulation. It can be used to signal that simulation is still ongoing to external utilities and scripts. See The lock file.

Note
Lock file operation uses native Fortran intrinsic open statement rather than any higher level procedures like file_io. This is because the file is for signalling only (intended to be empty) and nothing is actually written into it.

Definition at line 1766 of file m_common.f90.

◆ stop_file

character(len=*), parameter commondata::stop_file = "stop_simulation_running.lock"

The name of the stop file. The stop file is checked before each new generation of the Genetic Algorithm. If this file is found, simulation does not go to the next generation and just stops. See The stop file.

Note
Stop file operation uses native Fortran intrinsic open statement rather than any higher level procedures like file_io. This is because the file is for signalling only (intended to be empty) and nothing is actually read or written.

Definition at line 1777 of file m_common.f90.

◆ platform_windows

integer, parameter, public commondata::platform_windows = 100

Runtime platform ID constants. Use these constants for determining the current runtime platform, e.g. Platform_Running = PLATFORM_WINDOWS. See commondata::platform_running.

Definition at line 1782 of file m_common.f90.

◆ platform_unix

integer, parameter, public commondata::platform_unix = 111

Definition at line 1783 of file m_common.f90.

◆ platform_running

integer, public commondata::platform_running

Global variable that shows what is the current platform. Should use the above platform constants, e.g. Platform_Running = PLATFORM_WINDOWS. See commondata::platform_windows and commondata::platform_unix.

Definition at line 1788 of file m_common.f90.

◆ exec_interpolate

character(len=*), parameter, public commondata::exec_interpolate = "htintrpl.exe"

There are a few external programs which are called from the model code. The name of the interpolation program (htintrpl.f90 from HEDTOOLS) executable.

Definition at line 1793 of file m_common.f90.

◆ exec_scatterplot

character(len=*), parameter, public commondata::exec_scatterplot = "htscatter.exe"

The name of the scatterplot program (htscatter.f90 from HEDTOOLS) executable.

Definition at line 1797 of file m_common.f90.

◆ exec_histogram

character(len=*), parameter, public commondata::exec_histogram = "hthist.exe"

The name of the histogram program (hthist.f90 from HEDTOOLS) executable.

Definition at line 1801 of file m_common.f90.

◆ ltag_major

character(len=*), parameter, public commondata::ltag_major = "IMPORTANT: "

Tag prefixes for the logger system. The log may use tags for some common information pieces, so they are easily found within. The tags are normally set the prefix for the log: 017-01-31 13:33:22 INFO: Saving histogram, data: debug_hist.csv Some common tags are: STAGE STAGE: 2017-01-31 16:03:15 INFO: Generation 7 took 448.3279s. INFO INFO: some information TIMER TIMER: Calculating distances took 0.001 s Tag meaning:

  • MAJOR major stages of the simulation, e.g. next generation;
  • STAGE minor stages of the simulation, e.g. time step change;
  • INFO some information about model running;
  • WARNING warnings on possible issues and minor errors;
  • ERROR error reports that do not normally halt running;
  • CRITICAL critical errors that would stop execution;
  • TIMER reports from the timers and stopwatches.

Definition at line 1819 of file m_common.f90.

◆ ltag_stage

character(len=*), parameter, public commondata::ltag_stage = "STAGE: "

Definition at line 1820 of file m_common.f90.

◆ ltag_info

character(len=*), parameter, public commondata::ltag_info = "INFO: "

Definition at line 1821 of file m_common.f90.

◆ ltag_warn

character(len=*), parameter, public commondata::ltag_warn = "WARNING: "

Definition at line 1822 of file m_common.f90.

◆ ltag_error

character(len=*), parameter, public commondata::ltag_error = "ERROR: "

Definition at line 1823 of file m_common.f90.

◆ ltag_crit

character(len=*), parameter, public commondata::ltag_crit = "CRITICAL: "

Definition at line 1824 of file m_common.f90.

◆ ltag_timer

character(len=*), parameter, public commondata::ltag_timer = "TIMER: "

Definition at line 1825 of file m_common.f90.

◆ ltag_stats

character(len=*), parameter, public commondata::ltag_stats = "STATS: "

Definition at line 1826 of file m_common.f90.

◆ error_no_autoalloc

character(len=*), parameter, public commondata::error_no_autoalloc = "No automatic array allocation"

Error message for **"no automatic intrinsic array allocation"**. Fortran compilers support automatic allocation of arrays on intrinsic assignment. This feature should work by default in GNU gfortran v.4.6 and Intel ifort v.17.0.1. Automatic allocation allows to avoid a possible bug when the number of array elements in the allocate statement is not updated when the components of the array are updated in the array constructor.

Definition at line 1841 of file m_common.f90.

◆ error_auto_param_arrays

character(len=*), parameter, public commondata::error_auto_param_arrays = "No automatic size in parameter arrays"

Error message for **"no automatic determination of the size in parameter"** arrays in the style:

real(SRP), parameter, dimension(*) :: ARRAY=[ 1.0, 2.0, 3.0, 4.0 ]

Definition at line 1849 of file m_common.f90.

◆ error_allocation_fail

character(len=*), parameter, public commondata::error_allocation_fail = "Cannot allocate array or object"

Error message **"Cannot allocate array or object"** is issued if an array or an object is checked and turns out to be not allocated while it must be.

Definition at line 1855 of file m_common.f90.

◆ error_lock_preexists

character(len=*), parameter, public commondata::error_lock_preexists = "Lock file '" // LOCK_FILE // "' exists. Is another simulation running?"

Definition at line 1858 of file m_common.f90.

◆ model_name

character (len=*), parameter, public commondata::model_name = "HEDG2_04"

Model name for tags, file names etc. Must be very short. See Model descriptors.

Definition at line 1938 of file m_common.f90.

◆ model_descr

character (len=*), parameter, public commondata::model_descr = "AHA, single fear, body size non-genetic."

Model description - a fixed descriptive text, used in text outputs etc. See Model descriptors.

Definition at line 1942 of file m_common.f90.

◆ model_abstract_file

character (len=*), parameter, private commondata::model_abstract_file = "abstract.txt"
private

The name of the file that contains the Model abstract, a short description that can span several lines of text ans is kept in a separate file. The file is read, if it exists, and its contents is logged at the start the simulation. The separate Model Abstract file is useful because it can integrate dynamic information, such as the latest version control log(s) via Subversion or Mercurial hooks mechanism. See Model descriptors.

Definition at line 1953 of file m_common.f90.

◆ is_debug

logical, public, protected commondata::is_debug =.FALSE.

Sets the model in the debug mode if TRUE. The Debug mode generates huge additional outputs and logs. Also, the logs by default go to the screen (standard output). See commondata::system_init() for details.

Warning
This is a protected variable not fixed parameter. Can be set at start from the command line parameter or environment variable.
Note
Debug mode can be set in three ways (see system_init subroutine):
  1. by setting this variable at the initialisation here to TRUE (although this is not-normal as requires recompile);
  2. by setting the shell environment variable AHA_DEBUG=1, AHA_DEBUG=TRUE or AHA_DEBUG=YES;
  3. by setting the command line parameter DEBUG when calling this executable program.
Warning
IS_DEBUG can also be declared as a parameter, see Compiler optimisation of debug mode in commondata::system_init() for details.
Note
IS_DEBUG can also be declared as a normal global variable, not "protected" (by removing the protected attribute) In such case it could be changed everywhere in the program. A potential benefit is that only a section of the program, e.g. a single function, can then produce extended debugging output. However, this would also make compiler optimisation more difficult and reduce performance. See commondata::system_init() for more discussion.
Remarks
A short discussion on the protected attribute for module variable is at comp.lang.fortran.

Definition at line 1981 of file m_common.f90.

◆ is_plotting

logical, public, protected commondata::is_plotting =.TRUE.

This parameter controls if the debug plots are produced. They can be huge number that takes lots of space. Also, debug plots are called as separate processes that can run at the background and easily exceed the system-specific limit on child processes (if run in asynchronous mode). Generation of debug plots can be controlled by the environment variable AHA_DEBUG_PLOTS: if it is set to TRUE, 1, or YES, debug plots are enabled. See commondata::system_init() for details.

Definition at line 1992 of file m_common.f90.

◆ is_screen_output

logical, public, protected commondata::is_screen_output =.FALSE.

Sets the model in screen output mode. If TRUE, the logger output goes to the screen (standard output device). Can be manipulated using the environment variable AHA_SCREEN. If AHA_SCREEN is set to TRUE or 1 or yes, logger screen output is enabled. See commondata::system_init() for details.

Definition at line 1999 of file m_common.f90.

◆ is_zip_outputs

logical, public, protected commondata::is_zip_outputs =.FALSE.

This parameter enables or disables post-processing compression of the data: if TRUE, the data are compressed using the command defined by the commondata::cmd_zip_output string parameter. Note that not all data files are compressed, only potentially big ones are (e.g. agent population data and habitat data).

Note
Note that each data file is compressed individually. That is, no 'archive' containing multiple files is made.
Warning
This parameter is by default set to FALSE because calling wrong compression program might hang this program (e.g. if the child process is waiting for data on standard input). Enabling background data compression is normally done by setting the environment variable AHA_ZIP_FILES=TRUE. See commondata::system_init() for details.

Definition at line 2014 of file m_common.f90.

◆ zip_outputs_background

logical, parameter, public commondata::zip_outputs_background =.TRUE.

This parameter defines if the output files are compressed in the background in the parallel mode or the program should wait for termination of the child zipping process.

Definition at line 2019 of file m_common.f90.

◆ cmd_zip_output

character(len=*), parameter, public commondata::cmd_zip_output = "gzip"

This parameter defines the compression program that is executed to "zip" the data files if commondata::is_zip_outputs is enabled (TRUE). The normal compression utility is "gzip," that is found on almost any Linux/Unix system. gzip compresses each file individually and by default automatically deletes the original file. The compressed file extension is defined by commondata::zip_file_extenssion. See http://www.gzip.org/. Alternative compressors that are fairly widespread are bzip2, lzma and xz.

Definition at line 2029 of file m_common.f90.

◆ zip_file_extenssion

character(len=*), parameter, public commondata::zip_file_extenssion = ".gz"

This parameter defines the compressed file extension for the external compression utility defined by the commondata::cmd_zip_output.

Definition at line 2033 of file m_common.f90.

◆ enable_save_agents_each_timestep

logical, parameter, public commondata::enable_save_agents_each_timestep = .FALSE.

This parameter defines if all agents data is saved at each time step of the life cycle. See the_evolution::lifecycle_preevol().

Warning
Saving large amount of data at each time step of the lifecycle is time consuming and will make calculations slower.

Definition at line 2040 of file m_common.f90.

◆ mmdd

character(len=:), allocatable, public, protected commondata::mmdd

MMDD tag, year, month and day, used in file names and outputs. The value of the tag should be obtained only once at the start of the simulation, normally by calling the commondata::tag_mmdd() function at commondata::system_init(). It does not make much sense to generate these data tags on the fly as the simulations can be very long, several days, and so the file tags will be inconsistent.

Note
MMDD normally has a fixed length 8 as in 20161228, see commondata::tag_mmdd(). Because it has allocatable attribute, its actual length is obtained automatically and no trim(MMDD) is necessary.

Definition at line 2052 of file m_common.f90.

◆ popsize

integer, parameter, public commondata::popsize = 10000

Maximum population size.

Definition at line 2055 of file m_common.f90.

◆ generations

integer, parameter, public commondata::generations = 100

Maximum number of generations in GA.

Definition at line 2058 of file m_common.f90.

◆ global_generation_number_current

integer, public commondata::global_generation_number_current

The current global generation number. This is a global non fixed-parameter variable that is updated in subroutines.

Warning
There might be no guarantee that it is saved in all subroutines

Definition at line 2063 of file m_common.f90.

◆ lifespan

integer, parameter, public commondata::lifespan = 14000

Number of time steps in the agent's maximum life length.

Definition at line 2066 of file m_common.f90.

◆ preevol_tsteps

integer, parameter, public commondata::preevol_tsteps = 560

Number of time steps in the agent's life at the pre-evolution stage.

Definition at line 2069 of file m_common.f90.

◆ preevol_tsteps_force_debug

integer, parameter, public commondata::preevol_tsteps_force_debug = 280

Number of time steps in the agent's life at the fixed fitness pre-evolution stage. This parameter forces a smaller fixed value that is used for debugging only. Thus, adaptive time steps calculated by the_evolution::preevol_steps_adaptive() are disabled. To enable this fixed time steps, set this parameter commondata::preevol_tsteps_force_debug_enabled to TRUE.

Warning
This is used for debugging and testing purposes only and should normally be disabled.

Definition at line 2079 of file m_common.f90.

◆ preevol_tsteps_force_debug_enabled

logical, parameter, public commondata::preevol_tsteps_force_debug_enabled = .FALSE.

This parameter enables the forced smaller fixed number of time steps set by the commondata::preevol_tsteps_force_debug parameter.

Warning
This is used for debugging and testing purposes only and should normally be disabled, set to FALSE.

Definition at line 2085 of file m_common.f90.

◆ lifecycle_predation_disabled_debug

logical, parameter, public commondata::lifecycle_predation_disabled_debug = .FALSE.

This parameter completely disables predation in the GA life cycle procedure.

Warning
Can be enabled for debugging purposes only. Normally should be set to FALSE.

Definition at line 2091 of file m_common.f90.

◆ global_time_step_model_current

integer, public commondata::global_time_step_model_current

The current global time step of the model. This is a global non fixed-parameter variable that is updated in subroutines.

Definition at line 2095 of file m_common.f90.

◆ global_frame_number

integer, public commondata::global_frame_number

The current global time frame. Frames are time steps within the time step defined by the commondata::global_time_step_model_current.

Definition at line 2099 of file m_common.f90.

◆ percept_error_cv_def

real(srp), parameter, public commondata::percept_error_cv_def = 0.01_SRP

Default perception error in the commondata::gamma2gene() neuronal response functions. Note that this parameter defines stochastic error as the Coefficient of Variation (CV).

Definition at line 2104 of file m_common.f90.

◆ body_length_min

real(srp), parameter, public commondata::body_length_min = 0.2_SRP

Minimum body length possible.

Definition at line 2118 of file m_common.f90.

◆ body_length_max

real(srp), parameter, public commondata::body_length_max = 100.0_SRP

Maximum body length.

Definition at line 2121 of file m_common.f90.

◆ body_mass_min

real(srp), parameter, public commondata::body_mass_min = 0.1_SRP

Minimum possible body mass, hard limit.

Note
Note that body mass is calculated from condition factor and length. = k * l**3

Definition at line 2126 of file m_common.f90.

◆ init_agents_depth_is_fixed

logical, parameter, public commondata::init_agents_depth_is_fixed = .FALSE.

This parameter determines if the agents are initialised at a fixed depth at the initialisation. Agents are normally placed uniformly, the_environment::uniform(), at the initialisation. However, the depth can be fixed. In such a case they are scattered uniformly in the X and Y coordinates but with fixed depth that is set by the commondata::init_agents_depth parameter.

Warning
The agents can also be initialised with Gaussian depth. This is controlled by the parameter commondata::init_agents_depth_is_gauss. However, this parameter has precedence over Gaussian, so remember to set it FALSE if Gaussian depth initialisation is required. See the_population::member_population::place_uniform().

Definition at line 2139 of file m_common.f90.

◆ init_agents_depth_is_gauss

logical, parameter, public commondata::init_agents_depth_is_gauss = .TRUE.

This parameter determines if the agents are initialised at a fixed depth at the initialisation. Agents are placed uniformly, the_environment::uniform(), at the initialisation. However, the depth can be a Gaussian value with the.

Such a Gaussian depth patter is switched by this parameter. The other coordinates of the agents, X and Y are then uniform.

Warning
If Gaussian depth initialisation is required, the parameter commondata::init_agents_depth_is_fixed must be set to FALSE as it has a higher precedence. See the_population::member_population::place_uniform().

Definition at line 2154 of file m_common.f90.

◆ init_agents_depth

real(srp), parameter, public commondata::init_agents_depth = 1833.0_SRP

The fixed depth at which the agents are initialised at the start of the simulation. The other coordinates are normally set the_environment::uniform() within the initialisation environment container. See the_population::member_population::place_uniform().

Note
If the parameter commondata::init_agents_depth_is_fixed is FALSE, then the agents are scattered uniformly in the whole 3D space and this parameter is ignored.

Definition at line 2163 of file m_common.f90.

◆ init_agents_depth_cv

real(srp), parameter, public commondata::init_agents_depth_cv = 0.2_SRP

This parameter sets the Coefficient of Variation for the Gaussian depth initialisation of the agents that is controlled by commondata::init_agents_depth_is_gauss. See the_population::member_population::place_uniform().

Definition at line 2169 of file m_common.f90.

◆ reproduction_cost_body_mass_fix

real(srp), parameter, public commondata::reproduction_cost_body_mass_fix = 0.2_SRP

The energetic cost of reproduction in terms of the agent's body mass loss.

Warning
This parameter applies to the fixed cost version of the procedure the_body::reproduction_cost_energy_fix().

Definition at line 2175 of file m_common.f90.

◆ reproduction_cost_offspring_fract_male

real(srp), parameter, public commondata::reproduction_cost_offspring_fract_male = 0.3_SRP

The component of the energetic cost of reproduction in males that is proportional to the total offspring mass. For details see the procedure the_body::reproduction_cost_energy_dynamic().

Definition at line 2180 of file m_common.f90.

◆ reproduction_cost_offspring_fract_female

real(srp), parameter, public commondata::reproduction_cost_offspring_fract_female = 1.0_SRP

The component of the energetic cost of reproduction in females that is proportional to the total offspring mass. For details see the procedure the_body::reproduction_cost_energy_dynamic().

Definition at line 2186 of file m_common.f90.

◆ reproduction_cost_body_mass_factor_male

real(srp), parameter, public commondata::reproduction_cost_body_mass_factor_male = 0.4_SRP

The component of the energetic cost of reproduction in males that is proportional to the agent's body mass. For details see the procedure the_body::reproduction_cost_energy_dynamic().

Definition at line 2192 of file m_common.f90.

◆ reproduction_cost_body_mass_factor_female

real(srp), parameter, public commondata::reproduction_cost_body_mass_factor_female = 0.1

The component of the energetic cost of reproduction in females that is proportional to the agent's body mass. For details see the procedure the_body::reproduction_cost_energy_dynamic().

Definition at line 2198 of file m_common.f90.

◆ reproduction_cost_unsuccess

real(srp), parameter, public commondata::reproduction_cost_unsuccess = 0.1_SRP

The energetic cost of unsuccessful reproduction in terms of the agent's body mass lost. This is a fraction of the full cost of reproduction, that is described by the REPRODUCTION_COST_BODY_MASS parameter.

Definition at line 2204 of file m_common.f90.

◆ reproduct_body_mass_offspr_abscissa

real(srp), dimension(*), parameter, public commondata::reproduct_body_mass_offspr_abscissa = [ BODY_MASS_MIN, 3.0_SRP, 10.5_SRP, 12.0_SRP ]

The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the agent's body mass and the overall mass of all offspring as a fraction of the agent's body mass.

Warning
Must have the same dimensionality as commondata::reproduct_body_mass_offspr_ordinate.

Definition at line 2211 of file m_common.f90.

◆ reproduct_body_mass_offspr_ordinate

real(srp), dimension(*), parameter, public commondata::reproduct_body_mass_offspr_ordinate = [ 0.0_SRP, 0.1_SRP, 0.199_SRP, 0.20_SRP ]

The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the agent's body mass and the overall mass of all offspring as a fraction of the agent's body mass. Plotting command for the interpolator:

   htintrpl.exe [0.1 100 350 400] [0.0 0.1 0.199 0.20] [0] [nonlinear]
   htintrpl.exe [0.1 3 10.5 12.0] [0.0 0.1 0.199 0.20] [0] [nonlinear]
Warning
Must have the same dimensionality as commondata::reproduct_body_mass_offspr_abscissa.

Definition at line 2225 of file m_common.f90.

◆ universe_min_coord_notuse

real(srp), dimension(3), parameter, public commondata::universe_min_coord_notuse = [0.0_SRP, 0.0_SRP, 0.0_SRP]

Overall size of the global 3D universe of the model.

Physical sizes of the 3D "universe" environment for the agents' life. The minimum coordinates (UNIVERSE_MIN_COORD_NOTUSE) are all zeroes for simplicity. So here set the maximum coordinates vector [x,y,z] limiting the maximum environment size: UNIVERSE_WHOLE_SIZE_NOTUSE.

Warning
The dimensionality is only 3 for three-dimensional space.
Note
Universe has been deprecated in the_evolution module as it has not been used. However, the parameters are still defined as the arrays could be used in definitions of habitats, if found feasible.

Definition at line 2254 of file m_common.f90.

◆ universe_whole_size_notuse

real(srp), dimension(3), parameter, public commondata::universe_whole_size_notuse = [20000.0_SRP, 10000.0_SRP, 3000.0_SRP]

Definition at line 2256 of file m_common.f90.

◆ dielcycles

integer, parameter, public commondata::dielcycles = 100

Number of days and nights in a lifespan, DIELCYCLES=500.

Definition at line 2260 of file m_common.f90.

◆ history_size_spatial

integer, parameter, public commondata::history_size_spatial = 50

The size of the history for spatial moving objects, i.e. how many time steps positions to remember in stack arrays.

Definition at line 2264 of file m_common.f90.

◆ habitat_safe_min_coord

real(srp), dimension(3), parameter, public commondata::habitat_safe_min_coord = [0.0_SRP, 0.0_SRP, 0.0_SRP]

Definition of the habitat spatial limits.

We define two habitats within the global universe (UNIVERSE_WHOLE_SIZE) of the model. They are called "The safe" and "The dangerous" habitats and primarily differ in the level of predator risk. The habitats represent two adjacent squares that form a rectangular "universe" (the universe defined by UNIVERSE_WHOLE_SIZE).

0 10000000 20000000
+------------------+-------------------+
| | |
| | |
| safe habitat | dangerous |
y | | habitat |
| | |
| | |
| | |
| | |
| | |
0 +------------------+-------------------+ 20000000
x

Safe habitat: 0:1000000 x 0:1000000 x 0:3000 cm (NB: units cm!)

Warning
The dimensionality is only 3 for three-dimensional space.

Definition at line 2295 of file m_common.f90.

◆ habitat_safe_max_coord

real(srp), dimension(3), parameter, public commondata::habitat_safe_max_coord = [10000.0_SRP, 10000.0_SRP, 3000.0_SRP]

Definition at line 2297 of file m_common.f90.

◆ habitat_danger_min_coord

real(srp), dimension(3), parameter, public commondata::habitat_danger_min_coord = [10000.0_SRP, 0.0_SRP, 0.0_SRP]

Definition at line 2301 of file m_common.f90.

◆ habitat_danger_max_coord

real(srp), dimension(3), parameter, public commondata::habitat_danger_max_coord = [20000.0_SRP, 10000.0_SRP, 3000.0_SRP]

Definition at line 2303 of file m_common.f90.

◆ predators_num_habitat_safe

integer, parameter, public commondata::predators_num_habitat_safe = 100

The number of predators in the safe habitat.

Definition at line 2309 of file m_common.f90.

◆ predators_num_habitat_danger

integer, parameter, public commondata::predators_num_habitat_danger = 500

The number of predators in the dangerous habitat.

Definition at line 2312 of file m_common.f90.

◆ food_abundance_habitat_safe

integer, parameter, public commondata::food_abundance_habitat_safe = 20000

The food abundance in the safe habitat.

Definition at line 2315 of file m_common.f90.

◆ food_abundance_habitat_danger

integer, parameter, public commondata::food_abundance_habitat_danger = 40000

The food abundance in the dangerous habitat.

Definition at line 2318 of file m_common.f90.

◆ other_risks_def

real(srp), parameter, public commondata::other_risks_def = 0.01_SRP

Default level of other mortality risks in the habitat.

Definition at line 2324 of file m_common.f90.

◆ other_risks_habitat_safe

real(srp), parameter, public commondata::other_risks_habitat_safe = 0.01_SRP

Habitat-specific mortality risk (not linked with predation) in the safe habitat.

Definition at line 2328 of file m_common.f90.

◆ other_risks_habitat_danger

real(srp), parameter, public commondata::other_risks_habitat_danger = 0.05_SRP

Habitat-specific mortality risk (not linked with predation) in the dangerous habitat.

Definition at line 2332 of file m_common.f90.

◆ eggmortality_def

real(srp), parameter, public commondata::eggmortality_def = 0.01_SRP

Default level of egg mortality in the habitat.

Definition at line 2335 of file m_common.f90.

◆ individual_mortality_risk_def

real(srp), parameter, public commondata::individual_mortality_risk_def = 0.01_SRP

Default individually-specific mortality risk. It can increase or decrease depending on various factors. The individually-specific mortality risk is normally a Gaussian variable with the variability set by the commondata::individual_mortality_risk_cv.

Definition at line 2341 of file m_common.f90.

◆ individual_mortality_risk_cv

real(srp), parameter, public commondata::individual_mortality_risk_cv = 0.05_SRP

The coefficient of variation for Gaussian stochastic individually-specific mortality risk of the agent.

Definition at line 2345 of file m_common.f90.

◆ predator_body_size

real(srp), parameter, public commondata::predator_body_size = 100.0_SRP

The body size of the predator. In this version all predators have the same body size set by this parameter, but can be Gaussian stochastic. Moreover, in such a case predator attack efficiency can depend on the body size, e.g. larger predators are more dangerous. compare to the agents maximum body size BODY_LENGTH_MAX=100.0

Definition at line 2357 of file m_common.f90.

◆ predator_attack_rate_default

real(srp), parameter, public commondata::predator_attack_rate_default = 0.9_SRP

Mean rate of a single predator attack.

Definition at line 2360 of file m_common.f90.

◆ predator_attack_rate_cv

real(srp), parameter, public commondata::predator_attack_rate_cv = 0.1_SRP

Coefficient of variation for a single predator attack among the whole population of stochastic predators.

Definition at line 2364 of file m_common.f90.

◆ predator_attack_capture_probability_half

real(srp), parameter, public commondata::predator_attack_capture_probability_half = 0.8_SRP

The probability of capture of a fish agent by a predator at the distance equal to 1/2 of the visual range. For more details see the_environment::predator_capture_risk_calculate_fish().

Definition at line 2369 of file m_common.f90.

◆ predator_attack_capture_probability_min

real(srp), parameter, public commondata::predator_attack_capture_probability_min = 0.1_SRP

Minimum probability of capture, e.g. at a distance exceeding the visual range. The latter assumes that the predator could detect the agent beyond the visual range and pursue it. For more details see the_environment::predator_capture_risk_calculate_fish().

Definition at line 2376 of file m_common.f90.

◆ predator_attack_capture_prob_frz_50

real(srp), parameter, public commondata::predator_attack_capture_prob_frz_50 = 0.10_SRP

A parameter factor defining the probability of capture of an immobile (freezing) agent by a predator: interpolation ordinate for the distance equal to 0.25 of the visual range. See the_environment::predator_capture_risk_calculate_fish() for details.

Definition at line 2383 of file m_common.f90.

◆ predator_attack_capture_prob_frz_75

real(srp), parameter, public commondata::predator_attack_capture_prob_frz_75 = 0.01_SRP

A parameter factor defining the probability of capture of an immobile (freezing) agent by a predator: interpolation ordinate for the distance equal to 0.40 of the visual range. See the_environment::predator_capture_risk_calculate_fish() for details.

Definition at line 2388 of file m_common.f90.

◆ agent_can_assess_predator_attack_rate

logical, parameter, public commondata::agent_can_assess_predator_attack_rate = .TRUE.

A logical flag of whether the agents can assess the individual inherent attack rates of the predators. If yes, these inherent individual attack rates are collated into the perception object. If no, the default attack rate set by the commondata::predator_attack_rate_default parameter is used.

Definition at line 2395 of file m_common.f90.

◆ predator_risk_group_select_index_partial

integer, parameter, public commondata::predator_risk_group_select_index_partial = 20

Sets the limit for partial indexing and ranking of prey agents in the visual range of the predator. The risk of predation, i.e. the probability of attack and capture of each agent in a group of agents, will be calculated individually for distance-ranked agents only up to this parameter value.

Definition at line 2402 of file m_common.f90.

◆ predator_risk_group_dilution_ordinate

real(srp), dimension(*), parameter, public commondata::predator_risk_group_dilution_ordinate = [1.0_SRP, 0.3_SRP, 0.1_SRP]

The array defining the ordinate grid values for the weighting nonparametric function linking the distance rank of the agent within the visual field of the predator and the weighting factor adjusting for predator confusion and predator dilution effects. The grid abscissa is calculated dynamically in the the_environment::predator_capture_risk_calculate_fish_group() procedure.

Note
Note that the middle value equal to 0.5 results in a linear function.

This command produces the function plot:

   htintrpl.exe [1 30 60] [1 0.3 0.0] [1]

Definition at line 2417 of file m_common.f90.

◆ food_item_size_default

real(srp), parameter, public commondata::food_item_size_default = 2.1_SRP

Default size of a single food item.

Note
Note that the maximum stomach capacity of the agent (the_condition::condition::maxstomcap) is 0.15 of the agent body mass ( $ M_a $). So if the average agent mass is 41.0, the maximum capacity is about 6.15. Thus, to get the food item size corresponding to such a mass (food item mass 6.15), the size of the food item should be:

\[ s=\sqrt[3]{\frac{3\cdot 0.15 \cdot M_a}{4\pi\rho}} \Rightarrow s=\sqrt[3]{\frac{0.45M_a}{4\pi\rho}} . \]

Calculate: ( 0.45 * 41 / (4 * 3.1415926 * 0.1 ))^(1/3) = 2.45 In reality, it makes sense to make the mean food item size smaller than exactly 0.15 of the maxstomcap to accomodate its Gaussian variability, so more than 50% of items would fit into the stomach. An average food item mass of 0.09 of the agent mass might be better. Calculate: ( 3 * 0,09 * 41 / (4 * 3.1415926 * 0.1 ))^(1/3) = 2.065

Definition at line 2438 of file m_common.f90.

◆ food_item_mean_size

real(srp), parameter, public commondata::food_item_mean_size = FOOD_ITEM_SIZE_DEFAULT

The above is also the average size of a stochastic Gaussian food items.

Definition at line 2442 of file m_common.f90.

◆ food_item_size_default_cv

real(srp), parameter, public commondata::food_item_size_default_cv = 0.1_SRP

Coefficient of variation for Gaussian food items.

Definition at line 2445 of file m_common.f90.

◆ food_item_minimum_size

real(srp), parameter, public commondata::food_item_minimum_size = 1.0_SRP

The minimum size of a food item. This is the "floor" in case the stochastically generated (e.g. Gaussian) value gets zero or below.

Definition at line 2449 of file m_common.f90.

◆ food_item_density

real(srp), parameter, public commondata::food_item_density = 0.1_SRP

The (physical) density of a single food item. TODO: need to parametrise!

Definition at line 2452 of file m_common.f90.

◆ food_item_capture_prop_cost

real(srp), parameter, public commondata::food_item_capture_prop_cost = 0.05_SRP

The cost of the food item catching, in terms of the food item mass (proportional cost). So, if the agent does an unsuccessful attempt to catch a food item, the cost still applies.

Definition at line 2457 of file m_common.f90.

◆ food_item_capture_probability

real(srp), parameter, public commondata::food_item_capture_probability = 0.99_SRP

The baseline probability that the food item is captured. See the_neurobio::food_item_capture_probability_calc().

Note
Interpolation plot command: htintrpl.exe [0.0 0.5 1.0] [0.85, 0.68, 0.1] (0.68=0.85*0.8).

Definition at line 2463 of file m_common.f90.

◆ food_item_capture_probability_min

real(srp), parameter, public commondata::food_item_capture_probability_min = 0.1_SRP

The minimum probability of capture a food item, when the item is at a distance equal to the visual range from the predator agent.

Definition at line 2467 of file m_common.f90.

◆ food_item_capture_probability_subjective_errorr_cv

real(srp), parameter, public commondata::food_item_capture_probability_subjective_errorr_cv = 0.1

Subjective error assessing the food item capture probability when assessing the subjective GOS expectancies of food items. The subjective assessment value of the capture probability is equal to the objective value plus random error with the CV equal to this parameter.

Definition at line 2473 of file m_common.f90.

◆ food_item_migrate_xy_mean

real(srp), parameter, public commondata::food_item_migrate_xy_mean = FOOD_ITEM_SIZE_DEFAULT * 10.0_SRP

Mean shift parameter for the local random walk movement of food items in the horizontal plane.

Definition at line 2483 of file m_common.f90.

◆ food_item_migrate_depth_mean

real(srp), parameter, public commondata::food_item_migrate_depth_mean = FOOD_ITEM_SIZE_DEFAULT * 100.0_SRP

Mean shift parameter for the local random walk movement of food items in the vertical (depth) plane.

Definition at line 2488 of file m_common.f90.

◆ food_item_migrate_xy_cv

real(srp), parameter, public commondata::food_item_migrate_xy_cv = FOOD_ITEM_SIZE_DEFAULT_CV

Coefficient of variation parameter for the local random walk movement of food items in the horizontal plane.

Definition at line 2493 of file m_common.f90.

◆ food_item_migrate_depth_cv

real(srp), parameter, public commondata::food_item_migrate_depth_cv = 0.8_SRP

Coefficient of variation parameter for the local random walk movement of food items in the vertical (depth) plane.

Definition at line 2498 of file m_common.f90.

◆ daylight

real(srp), parameter, public commondata::daylight =500.0_SRP

Maximum above-surface light intensity at midday, DAYLIGHT=500.0.

Note
Can be deterministic or stochastic.

Definition at line 2509 of file m_common.f90.

◆ daylight_stochastic

logical, parameter, public commondata::daylight_stochastic = .TRUE.

Flag for stochastic daylight pattern (if TRUE) or deterministic sinusoidal (when FALSE). Check out the next parameter DAYLIGHT_CV for variability.

Definition at line 2513 of file m_common.f90.

◆ daylight_cv

real(srp), parameter, public commondata::daylight_cv =0.2_SRP

Coefficient of variation for stochastic DAYLIGHT,.

Note
if = 0.0 then deterministic sinusoidal daylight pattern is used.

Definition at line 2517 of file m_common.f90.

◆ beamatt

real(srp), parameter, public commondata::beamatt =1.0_SRP

Beam attenuation coefficient of water (m-1),BEAMATT = 1.0.

Note
See the_environment::visual_range() and the_environment::srgetr() for more details.

Definition at line 2522 of file m_common.f90.

◆ preycontrast_default

real(srp), parameter, public commondata::preycontrast_default = 1.0_SRP

Inherent contrast of prey, CONTRAST =1.0.

Note
See the_environment::visual_range() and the_environment::srgetr() for more details.

Definition at line 2527 of file m_common.f90.

◆ preyarea_default

real(srp), parameter, public commondata::preyarea_default =3.E-6_SRP

Area of prey (m2), PREYAREA = 3.E-6.

Note
See the_environment::visual_range() and the_environment::srgetr() for more details.

Definition at line 2532 of file m_common.f90.

◆ viscap

real(srp), parameter, public commondata::viscap =1.6E6_SRP

Dimensionless descriptor of fish eye quality, VISCAP=1.6E6.

Note
See the_environment::visual_range() and the_environment::srgetr() for more details.

Definition at line 2537 of file m_common.f90.

◆ eyesat

real(srp), parameter, public commondata::eyesat =500.0_SRP

Saturation parameter of eye (Ke) (uE m-2 s-1), EYESAT=500.0.

Note
See the_environment::visual_range() and the_environment::srgetr() for more details.

Definition at line 2542 of file m_common.f90.

◆ lightdecay

real(srp), parameter, public commondata::lightdecay = 0.002_SRP

Vertical conservation of light, per depth (old code lightdecay=0.2).

Note
set = 0 if light constant with depth
Because body size of the agent is set in cm, and the environment size is also in cm, we need to scale depth appropriately, in the old code it was within the range 0:30 m or unitless?, now the range is 0:3000 cm. So the appropriate scaling factor is 0.002.
wxMaxima quick code for plotting (assuming surface light 500.0):
wxplot2d( 500.0*exp(-0.002 * d), [d, 0., 3000.] );

Definition at line 2554 of file m_common.f90.

◆ allelerange_min

integer, parameter, public commondata::allelerange_min = 1

The minimum possible value of alleles (allele range minimum) See implementation notes on the_genome::gene::allele_value component of the the_genome::gene derived type and commondata::alleleconv() and commondata::allelescale() functions.

Warning
The minimum value should not be zero, as it will result in division by zero condition in gamma2gene, (P/y)**x.

Definition at line 2576 of file m_common.f90.

◆ allelerange_max

integer, parameter, public commondata::allelerange_max = 10000

The maximum possible value of alleles (allele range maximum) See implementation notes on the_genome::gene::allele_value component of the the_genome::gene derived type and commondata::alleleconv() and commondata::allelescale() functions.

Definition at line 2582 of file m_common.f90.

◆ allelescale_max

real(srp), parameter, public commondata::allelescale_max = 20.0_SRP

Conversion parameter that defines the scaling of the integer allele values ::ALLELERANGE_MIN to ALLELERANGE_MAX are converted to zero to this parameter value as the maximum. See allelescale() for details.

Definition at line 2587 of file m_common.f90.

◆ additive_comps

integer, parameter, public commondata::additive_comps = 3

Number of additive allele components.

Definition at line 2590 of file m_common.f90.

◆ mutationrate_point

real(srp), parameter, public commondata::mutationrate_point = 0.1_SRP

Mutation rate for point allele mutations.

Definition at line 2595 of file m_common.f90.

◆ ga_mutationrate_point_max

real(srp), parameter, public commondata::ga_mutationrate_point_max = 0.25_SRP

Maximum point mutation rate in the adaptive Fixed Fitness Genetic Algorithm.

Definition at line 2599 of file m_common.f90.

◆ mutationrate_batch

real(srp), parameter, public commondata::mutationrate_batch = 0.05_SRP

Mutation rate for point allele mutations, a whole batch of allele components.

Definition at line 2603 of file m_common.f90.

◆ ga_mutationrate_batch_max

real(srp), parameter, public commondata::ga_mutationrate_batch_max = 0.1_SRP

Maximum batch mutation rate in the adaptive Fixed Fitness Genetic Algorithm.

Definition at line 2607 of file m_common.f90.

◆ relocation_swap_rate

real(srp), parameter, public commondata::relocation_swap_rate = 0.05_SRP

Mutation rate for chromosome relocation, i.e. probability of a gene moving to a different position on the same chromosome: There are two kinds of relocations, swapping genes between two positions and moving a gene with subsequent shift. So we have two constants for the respective rates.

Definition at line 2614 of file m_common.f90.

◆ relocation_shift_rate

real(srp), parameter, public commondata::relocation_shift_rate = 0.01_SRP

Definition at line 2615 of file m_common.f90.

◆ n_chromosomes

integer, parameter, public commondata::n_chromosomes = 6

The number of chromosomes for the agents.

Warning
This is the base for setting dimensionality of several other parameter arrays below!

Definition at line 2622 of file m_common.f90.

◆ len_chromosomes

integer, dimension(n_chromosomes), parameter, public commondata::len_chromosomes = [ 6, 5, 12, 12, 12, 12 ]

The number of alleles in each of the chromosomes. NOTE: This must be an array (vector) of the size commondata::n_chromosomes. We use new Fortran array constructor here to set the array values.

Warning
The dimensionality of this array must always coincide with commondata::n_chromosomes!

Definition at line 2629 of file m_common.f90.

◆ max_nalleles

integer, parameter, public commondata::max_nalleles = 12

This parameter defines the maximum number of alleles within the chromosome It IS NOT intended to vary freely/independently. Used in definitions of _GENOTYPE_PHENOTYPE matrices, equal to the maxval(LEN_CHROMOSOMES).

Note
This parameter is only used for setting the genotype x phenotype parameter matrices.
Warning
maxval(LEN_CHROMOSOMES) cannot be used for array declaration in many compilers, so should be set manually from values of LEN_CHROMOSOMES above. Or may be a scalar exceeding maxval(LEN_CHROMOSOMES), in such case the extra values are padded with .FALSE. in reshape (see reshape in the parameter matricess below).

Definition at line 2643 of file m_common.f90.

◆ lab_chromosomes

character(len=*), dimension(n_chromosomes), parameter, public commondata::lab_chromosomes = [ "C_1_SEX ", "C_2_BODY", "C_3_HORM", "C_4_HUNG", "C_5_FEAR", "C_6_REPR" ]

Set the labels of the chromosomes. NOTE, must be an array(vector) ) of the size commondata::n_chromosomes. We use new Fortran array constructor here to set the array values.

Note
Note that the length of the string values in the array declaration below are all the same. Many compilers will issue an error otherwise. Hence, the assignment is arranged vertically.
Warning
The dimensionality of this array must always coincide with commondata::n_chromosomes!

Definition at line 2653 of file m_common.f90.

◆ chromosome_ploidy

integer, parameter, public commondata::chromosome_ploidy = 2

The ploidy of the chromosome set. Can theoretically be haploid (=1), diploid (=2) or, polyploid (>2).

Warning
The gamma2gene code does not work with haploid genotype commondata::chromosome_ploidy=1, in such a case there is no need to select random homologous chromosome and it is impossible to set the two parameters of the gamma2gene function.

Definition at line 2667 of file m_common.f90.

◆ genome_recombination_ratio_mother

real(srp), parameter, public commondata::genome_recombination_ratio_mother = 0.8_SRP

The ratio of the genome that inherited from the mother. The other part is inherited from the father. See implementation details of the random independent genetic recombination procedure procedures the_genome::individual_genome::recombine().

Definition at line 2673 of file m_common.f90.

◆ genome_crossover_fixed_mother

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::genome_crossover_fixed_mother = reshape ( [ YES,YES,YES,YES,YES,YES, YES,YES,YES,YES,YES,YES, YES,YES,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO,YES,YES,YES,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Boolean 2D matrix that determines the pattern of fixed chromosome crossover. For each chromosome, the alleles that are marked with the TRUE (YES) values are inherited from the mother whereas those marked FALSE (NO) are inherited from the father. See implementation details of the fixed genetic crossover procedure procedures the_genome::individual_genome::crossover().

Note
Note that the parameter order is reversed: alleles are presented by rows, chromosomes by columns,just as in the genotype x phenotype boolean matrices.

Definition at line 2684 of file m_common.f90.

◆ sex_ratio

real(srp), parameter, public commondata::sex_ratio = 0.5_SRP

Sex ratio for initialising genomes.

\[ \frac{N_{males}}{N_{females}} \]

should evolve and change during the evolution

Definition at line 2711 of file m_common.f90.

◆ sexlocus_label

character(len=label_length), parameter commondata::sexlocus_label ="SEX_LOCUS"

Labels for the sex locus alleles (gene) - vector as we don't need to label individual alleles. LABEL_LENGTH is here to avoid a GF warning.

Definition at line 2715 of file m_common.f90.

◆ male

character(len=*), parameter, public commondata::male ="male"

Set names of the sexes – the allele labels.

Definition at line 2718 of file m_common.f90.

◆ female

character(len=*), parameter, public commondata::female ="female"

Definition at line 2718 of file m_common.f90.

◆ sex_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::sex_genotype_phenotype = reshape ( [ YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Sex definition can be implemented differently from all other traits. Here is an example of the phenotype x genotype matrix code for sex determination:

!> Sex definition can be implemented differently from all other traits.
!! @note Note that the parameter order is **reversed**: alleles are
!! presented by rows, chromosomes by columns.
logical, dimension(MAX_NALLELES,N_CHROMOSOMES), parameter,public &
:: SEX_GENOTYPE_PHENOTYPE = reshape ( &
! .........................................................................
[ & ! 1 2 3 4 5 6
!-------------------------
yes, no, no, no, no, no, & ! 1
no, no, no, no, no, no, & ! 2
no, no, no, no, no, no, & ! 3
no, no, no, no, no, no, & ! 4
no, no, no, no, no, no, & ! 5
no, no, no, no, no, no, & ! 6
no, no, no, no, no, no, & ! 7
no, no, no, no, no, no, & ! 8
no, no, no, no, no, no, & ! 9
no, no, no, no, no, no, & ! 10
no, no, no, no, no, no, & ! 11
no, no, no, no, no, no ], & ! 12
! -------------------------
! max. n alleles: 6, 5, 12, 12, 12, 12, 12
[max_nalleles,n_chromosomes],[no],[2,1] )
! Note: additional reshape params: array shape |pad | order
! |with| by rows
! ............................................................................
Note
Note that the parameter order is reversed: alleles are presented by rows, chromosomes by columns.

Definition at line 2753 of file m_common.f90.

◆ growhorm_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::growhorm_genotype_phenotype = reshape ( [ NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for growth hormone.

This two-dimensional array defines the phenotypic structure of the hormone objects, i.e. the correspondence between the gene objects and the trait values (produced by the sigmoid function). That is, which genes on which chromosomes contribute to the pheontypic values of the trait objects. This is a two dimensional array of the logical type that defines the allele and chromosome contributes to this specific trait.

Note
Note that the dimensions of the genetic structure array must fit within the N_CHROMOSOMES x maxval(LEN_CHROMOSOMES(chrom_nr)).
Note that the parameter order is reversed: alleles are presented by rows, chromosomes by columns.

Definition at line 2800 of file m_common.f90.

◆ growhorm_init

real(srp), parameter, public commondata::growhorm_init = 0.5_SRP

Genotype to phenotype gamma2gene initialisation value for growth hormone

Definition at line 2826 of file m_common.f90.

◆ growhorm_gerror_cv

real(srp), parameter, public commondata::growhorm_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 2831 of file m_common.f90.

◆ thyroid_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::thyroid_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for thyroid.

This two-dimensional array defines the phenotypic structure of the hormone objects, i.e. the correspondence between the gene objects and the trait values (produced by the sigmoid function). That is, which genes on which chromosomes contribute to the pheontypic values of the trait objects. This is a two dimensional array of the logical type that defines the allele and chromosome contributes to this specific trait.

Note
Note that the dimensions of the genetic structure array must fit within the N_CHROMOSOMES x maxval(LEN_CHROMOSOMES(chrom_nr)).
Note that the parameter order is reversed: alleles are presented by rows, chromosomes by columns.

Definition at line 2847 of file m_common.f90.

◆ thyroid_init

real(srp), parameter, public commondata::thyroid_init = 0.5_SRP

Genotype to phenotype gamma2gene initialisation value for thyroid

Definition at line 2872 of file m_common.f90.

◆ thyroid_gerror_cv

real(srp), parameter, public commondata::thyroid_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 2877 of file m_common.f90.

◆ adrenaline_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::adrenaline_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for adrenaline

Definition at line 2882 of file m_common.f90.

◆ adrenaline_init

real(srp), parameter, public commondata::adrenaline_init = 0.5_SRP

Genotype to phenotype gamma2gene initialisation value for adrenaline

Definition at line 2907 of file m_common.f90.

◆ adrenaline_gerror_cv

real(srp), parameter, public commondata::adrenaline_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 2912 of file m_common.f90.

◆ cortisol_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::cortisol_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for cortisol.

Definition at line 2917 of file m_common.f90.

◆ cortisol_init

real(srp), parameter, public commondata::cortisol_init = 0.5_SRP

Genotype to phenotype gamma2gene initialisation value for cortisol

Definition at line 2942 of file m_common.f90.

◆ cortisol_gerror_cv

real(srp), parameter, public commondata::cortisol_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 2947 of file m_common.f90.

◆ testosterone_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::testosterone_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for testosterone.

Definition at line 2952 of file m_common.f90.

◆ testosterone_init

real(srp), parameter, public commondata::testosterone_init = 0.01_SRP

Genotype to phenotype gamma2gene initialisation value for testosterone

Definition at line 2977 of file m_common.f90.

◆ testosterone_gerror_cv

real(srp), parameter, public commondata::testosterone_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 2982 of file m_common.f90.

◆ estrogen_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::estrogen_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

Genotype x Phenotype matrix for ESTROGEN.

Definition at line 2987 of file m_common.f90.

◆ estrogen_init

real(srp), parameter, public commondata::estrogen_init = 0.01_SRP

Genotype to phenotype gamma2gene initialisation value for estrogen

Definition at line 3012 of file m_common.f90.

◆ estrogen_gerror_cv

real(srp), parameter, public commondata::estrogen_gerror_cv = 0.5_SRP

Genotype to phenotype gamma2gene Gaussian error parameter. This is really the coefficient of variation of the output hormone level with respect to an ideal value (initially 0).

Definition at line 3017 of file m_common.f90.

◆ sex_steroids_check_history

integer, parameter, public commondata::sex_steroids_check_history = 3

The number of the latest historical values that are checked for change when setting an increment of the sex steroid hormones.

Definition at line 3024 of file m_common.f90.

◆ sex_steroids_increment_factor_age_curve_abscissa

real(srp), dimension(*), parameter, public commondata::sex_steroids_increment_factor_age_curve_abscissa = [ 0.0_SRP, real(LIFESPAN, SRP)*0.25_SRP, real(LIFESPAN, SRP) ]

The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the age of the agent and the steroid increment factor for this specific age.

Note
Note that these parameters link sex steroid increment with the agent's age.
Warning
The LIFESPAN parameter has to be converted to the real type.
All these arrays must have the same dimensionality:

Definition at line 3040 of file m_common.f90.

◆ sex_steroids_increment_factor_age_curve_ordinate

real(srp), dimension(*), parameter, public commondata::sex_steroids_increment_factor_age_curve_ordinate = [ 0.0_SRP, 0.01_SRP, 0.1_SRP ]

The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the age of the agent and the steroid increment factor for this specific age.

Warning
All these arrays must have the same dimensionality:

Definition at line 3053 of file m_common.f90.

◆ sex_steroids_increment_factor_len_curve_abscissa

real(srp), dimension(*), parameter, public commondata::sex_steroids_increment_factor_len_curve_abscissa = [ 0.0_SRP, BODY_LENGTH_MAX*0.2_SRP, BODY_LENGTH_MAX ]

The array defining the abscissa (X) of the nonparametric function curve that defines the relationship between the body length of the agent and the steroid increment factor for this specific length.

Note
Note that these parameters link sex steroid increment with the agent's body length.
Warning
All these arrays must have the same dimensionality:

Definition at line 3070 of file m_common.f90.

◆ sex_steroids_increment_factor_len_curve_ordinate

real(srp), dimension(*), parameter, public commondata::sex_steroids_increment_factor_len_curve_ordinate = [ 0.0_SRP, 0.01_SRP, 0.1_SRP ]

The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship between the body length of the agent and the steroid increment factor for this specific length.

Warning
All these arrays must have the same dimensionality:

Definition at line 3083 of file m_common.f90.

◆ history_size_agent_prop

integer, parameter, public commondata::history_size_agent_prop = 100

History stack size for the agent's basic properties, such as body length and body mass. Normally they are saved only for the analysis and currently not used in the perception.

Definition at line 3101 of file m_common.f90.

◆ living_cost

real(srp), parameter, public commondata::living_cost = 4.0_SRP

Living cost in terms of food consumed. metabolic costs, p roportional to body size.

Definition at line 3105 of file m_common.f90.

◆ mass_growth_threshold

real(srp), parameter, public commondata::mass_growth_threshold = 0.0001_SRP

A minimum body mass increment when any linear growth is possible, in units of the body mass (e.g. 0.05 = 5%)

Definition at line 3109 of file m_common.f90.

◆ linear_growth_exponent

real(srp), parameter, public commondata::linear_growth_exponent = 3.0_SRP

Growth exponent linking linear growth and body mass growth. Based on Fulton's condition factor "cube law.".

Note
It is real and can get noninteger values due to nonisometric growth.

Definition at line 3114 of file m_common.f90.

◆ linear_growth_hormone_increment_factor_curve_abscissa

real(srp), dimension(*), parameter, public commondata::linear_growth_hormone_increment_factor_curve_abscissa = [ 0.0_SRP, GROWHORM_INIT, GROWHORM_INIT*3.0_SRP, GROWHORM_INIT*5.0_SRP, GROWHORM_INIT*20.0_SRP ]

The array defining the abscissa (X) of the nonparametric function curve that defines the function linking the relationship between the growth hormone and the relative linear growth increment.

Warning
Note that these are raw values that should go via the gamma2gene fake "guess" calculation version.
Must have the same dimensionality as commondata::linear_growth_hormone_increment_factor_curve_ordinate.

Definition at line 3123 of file m_common.f90.

◆ linear_growth_hormone_increment_factor_curve_ordinate

real(srp), dimension(*), parameter, public commondata::linear_growth_hormone_increment_factor_curve_ordinate = [0.0_SRP, 0.6_SRP, 0.9_SRP, 0.98, 1.00_SRP]

The array defining the ordinate (Y) of the nonparametric function curve that defines the function linking the relationship between the growth hormone and the relative linear growth increment.

Warning
Must have the same dimensionality as commondata::linear_growth_hormone_increment_factor_curve_abscissa.

Definition at line 3134 of file m_common.f90.

◆ max_stomach_capacity_def

real(srp), parameter, public commondata::max_stomach_capacity_def = 0.15_SRP

Set the maximum stomach capacity default value – fraction of the body mass available for food. Can be overriden in different agent types. Normally 15%.

Definition at line 3142 of file m_common.f90.

◆ stomach_content_emptify_factor

real(srp), parameter, public commondata::stomach_content_emptify_factor = 100.0_SRP

Stomach content emptify factor at each step.

Stomach contents S(t) is emptied by a constant fraction each time step

\[ S_{t} =S_{t+1} \frac{ K }{\Omega } \]

, where $ K $ is the stomach content emptify factor.

Definition at line 3148 of file m_common.f90.

◆ stomach_content_init

real(srp), parameter, public commondata::stomach_content_init = 0.01_SRP

Set average stomach capacity at birth/init in units of body weight,.

Note
it is a random Gaussian variable, this just sets the mean value, the next parameter sets coefficient of variation

Definition at line 3153 of file m_common.f90.

◆ stomach_content_init_cv

real(srp), parameter, public commondata::stomach_content_init_cv = 0.05_SRP

Set the coefficient of variation for the stomach capacity at init.

Definition at line 3156 of file m_common.f90.

◆ swimming_speed_cost_burst

real(srp), parameter, public commondata::swimming_speed_cost_burst = 0.1E-4_SRP

Set the weighting factor parameter of burst swimming cost in terms of the agent body size and the distance expressed in terms of the agent body lengths. In the_body::condition_cost_swimming_burst(), this parameter sets the $ \beta $ coefficient.

Definition at line 3162 of file m_common.f90.

◆ cost_factor_foraging_smr

real(srp), parameter, public commondata::cost_factor_foraging_smr = 0.1E-5_SRP

Set the cost of foraging in terms of SMR.

Definition at line 3165 of file m_common.f90.

◆ energy_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::energy_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The initial value of the energy reserves at birth is genetically determined. This is the Genotype x Phenotype matrix for energy reserves.

Definition at line 3172 of file m_common.f90.

◆ energy_init

real(srp), parameter, public commondata::energy_init = 0.18

This is the initial value of the energy reserves, non-genetic mean.

Definition at line 3197 of file m_common.f90.

◆ energy_gerror_cv

real(srp), parameter, public commondata::energy_gerror_cv = 0.01

Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the ENERGY_INIT value.

Definition at line 3201 of file m_common.f90.

◆ body_length_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::body_length_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The initial value of the body length at birth is genetically determined. This is the Genotype x Phenotype matrix for body length.

Definition at line 3207 of file m_common.f90.

◆ body_length_init

real(srp), parameter, public commondata::body_length_init = 2.3_SRP

The initial value of body length, the average (gon-genetic).

Definition at line 3232 of file m_common.f90.

◆ body_length_gerror_cv

real(srp), parameter, public commondata::body_length_gerror_cv = 0.1_SRP

Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the BODY_LENGTH_INIT value.

Definition at line 3236 of file m_common.f90.

◆ control_unselected_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::control_unselected_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The initial value of the control unselected trait. This trait is is genetically determined but is not selected or used. So it can be used to control for random genetic drift. This is the Genotype x Phenotype matrix.

Definition at line 3244 of file m_common.f90.

◆ control_unselected_init

real(srp), parameter, public commondata::control_unselected_init = 0.5_SRP

The initial value of the control unselected trait that goes through the gamma2gene.

Definition at line 3270 of file m_common.f90.

◆ control_unselected_gerror_cv

real(srp), parameter, public commondata::control_unselected_gerror_cv = 0.5_SRP

Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the control unselected trait.

Definition at line 3274 of file m_common.f90.

◆ smr_genotype_phenotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::smr_genotype_phenotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The initial value of the standard metabolic rate (SMR) at birth is genetically determined. This is the Genotype x Phenotype matrix for SMR.

Definition at line 3281 of file m_common.f90.

◆ smr_init

real(srp), parameter, public commondata::smr_init = 0.5_SRP

This is the initial value of SMR that goes through the gamma2gene.

Definition at line 3306 of file m_common.f90.

◆ smr_gerror_cv

real(srp), parameter, public commondata::smr_gerror_cv = 0.5_SRP

Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the SMR_LENGTH_INIT value.

Definition at line 3310 of file m_common.f90.

◆ smr_min

real(srp), parameter, public commondata::smr_min = 0.01_SRP

Minimum SMR value, anything lower is not allowed.

Definition at line 3313 of file m_common.f90.

◆ swimming_cost_exponent_laminar

real(srp), parameter commondata::swimming_cost_exponent_laminar = 0.5_SRP

Default swimming cost body mass exponent parameter for laminar flow. See doi:10.1242/jeb.01484 (https://dx.doi.org/10.1242/jeb.01484) and the_body::condition_cost_swimming_burst() for details.

Definition at line 3318 of file m_common.f90.

◆ swimming_cost_exponent_turbulent

real(srp), parameter commondata::swimming_cost_exponent_turbulent = 0.6_SRP

Default swimming cost body mass exponent parameter for turbulent flow. See doi:10.1242/jeb.01484 (https://dx.doi.org/10.1242/jeb.01484) and the_body::condition_cost_swimming_burst() for details.

Definition at line 3323 of file m_common.f90.

◆ swimming_cost_factor_buoyancy_down

real(srp), parameter, public commondata::swimming_cost_factor_buoyancy_down = 0.01_SRP

This parameter defines the cost of the buoyancy-based locomotion as a fraction of normal laminar flow propulsion for lowering downwards.

Definition at line 3327 of file m_common.f90.

◆ swimming_cost_factor_buoyancy_up

real(srp), parameter, public commondata::swimming_cost_factor_buoyancy_up = 0.1_SRP

This parameter defines the cost of the buoyancy-based locomotion as a fraction of normal laminar flow propulsion for lowering downwards.

Note
Note that the relative cost of buoyancy-based swimming up is higher than down because gas secretion is more slow and demanding than absorption.

Definition at line 3334 of file m_common.f90.

◆ food_select_items_index_partial

integer, parameter, public commondata::food_select_items_index_partial = 20

Sets the limit for partial indexing and ranking of food items in the visual range of the agents.

Note
Calculating the distances between the agent and food items may be very slow if the number of food items is large (and every agent should do this repeatedly!!!). So we use partial indexing, we need only small number of neighbouring food items anyway.

Definition at line 3360 of file m_common.f90.

◆ consp_select_items_index_partial

integer, parameter, public commondata::consp_select_items_index_partial = 20

Sets the limit for partial indexing and ranking of conspecifics in the visual range of the agent.

Definition at line 3364 of file m_common.f90.

◆ pred_select_items_index_partial

integer, parameter, public commondata::pred_select_items_index_partial = 20

Sets the limit for partial indexing and ranking of predators in the visual range of the agent.

Definition at line 3368 of file m_common.f90.

◆ individual_visual_contrast_default

real(srp), parameter, public commondata::individual_visual_contrast_default = 1.0_SRP

Inherent contrast of the agent, It is used in determining the visual range of an agent in perception of conspecifics, and also for assessing the agent's detectability by predator. Default Contrast of food items is set separately.

Definition at line 3374 of file m_common.f90.

◆ history_size_perception

integer, parameter, public commondata::history_size_perception = HISTORY_SIZE_SPATIAL

Sets the size of the perception memory stack.

Definition at line 3377 of file m_common.f90.

◆ history_size_motivation

integer, parameter, public commondata::history_size_motivation = HISTORY_SIZE_SPATIAL

Sets the size of the emotional state memory stack.

Definition at line 3386 of file m_common.f90.

◆ light_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::light_hunger_genotype_neuronal = reshape ( [ NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for light perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3394 of file m_common.f90.

◆ light_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::light_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for light perception effects on hunger.

Definition at line 3420 of file m_common.f90.

◆ depth_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::depth_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for depth perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3426 of file m_common.f90.

◆ depth_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::depth_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for depth perception effects on hunger.

Definition at line 3452 of file m_common.f90.

◆ foodcount_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::foodcount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3458 of file m_common.f90.

◆ foodcount_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::foodcount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on hunger.

Definition at line 3484 of file m_common.f90.

◆ food_mem_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::food_mem_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3490 of file m_common.f90.

◆ food_mem_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::food_mem_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on hunger.

Definition at line 3516 of file m_common.f90.

◆ conspcount_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::conspcount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for conspecifics number perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3522 of file m_common.f90.

◆ conspcount_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::conspcount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for conspecifics number count perception effects on hunger.

Definition at line 3548 of file m_common.f90.

◆ pred_direct_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_direct_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for direct predation perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3554 of file m_common.f90.

◆ pred_direct_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_direct_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for direct predation perception effects on hunger.

Definition at line 3580 of file m_common.f90.

◆ pred_meancount_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_meancount_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for mean predator number perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3586 of file m_common.f90.

◆ pred_meancount_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_meancount_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for mean predator number perception effects on hunger.

Definition at line 3612 of file m_common.f90.

◆ predation_risk_weight_immediate

real(srp), parameter, public commondata::predation_risk_weight_immediate = 0.7

The weight of the immediately seen predators over those in the perceptual memory stack. Those in the memory then have this weight in the predation risk estimate: 1-PREDATION_RISK_WEIGHT_IMMEDIATE. See the_neurobio::predation_risk_backend().

Note
Note that this parameter also works in appraisal functions for the fear state neuronal respones components.

Definition at line 3621 of file m_common.f90.

◆ predation_risk_weight_memory_window

integer, parameter, public commondata::predation_risk_weight_memory_window = nint(HISTORY_SIZE_PERCEPTION / 2.0)

The length of the perceptual memory window that is taken into account and weighted against the currently seen number of predators when calculating the motivation value.

Note
Note that the total memory window is HISTORY_SIZE_PERCEPTION.

Definition at line 3627 of file m_common.f90.

◆ stom_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::stom_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for stomach perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3633 of file m_common.f90.

◆ stom_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::stom_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for stomach perception effects on hunger.

Definition at line 3659 of file m_common.f90.

◆ bodymass_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::bodymass_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for body mass perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3665 of file m_common.f90.

◆ bodymass_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::bodymass_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for body mass perception effects on hunger.

Definition at line 3691 of file m_common.f90.

◆ energy_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::energy_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for energy reserves perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3697 of file m_common.f90.

◆ energy_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::energy_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for energy reserves perception effects on hunger.

Definition at line 3723 of file m_common.f90.

◆ age_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::age_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for age perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3729 of file m_common.f90.

◆ age_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::age_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for age perception effects on hunger.

Definition at line 3755 of file m_common.f90.

◆ reprfac_hunger_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::reprfac_hunger_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for reproductive factor perception effects on hunger that goes via gamma2gene perception to neuronal response.

Definition at line 3761 of file m_common.f90.

◆ reprfac_hunger_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::reprfac_hunger_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for reproductive factor perception effects on hunger.

Definition at line 3787 of file m_common.f90.

◆ light_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::light_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for light perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3797 of file m_common.f90.

◆ light_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::light_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for light perception effects on fear state.

Definition at line 3823 of file m_common.f90.

◆ depth_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::depth_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for depth perception effects on active avoidance that goes via gamma2gene perception to neuronal response.

Definition at line 3829 of file m_common.f90.

◆ depth_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::depth_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for depth perception effects on fear state.

Definition at line 3855 of file m_common.f90.

◆ foodcount_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::foodcount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3862 of file m_common.f90.

◆ foodcount_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::foodcount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on fear state.

Definition at line 3888 of file m_common.f90.

◆ food_mem_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::food_mem_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3895 of file m_common.f90.

◆ food_mem_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::food_mem_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on fear state.

Definition at line 3921 of file m_common.f90.

◆ conspcount_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::conspcount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for conspecifics number perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3928 of file m_common.f90.

◆ conspcount_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::conspcount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for conspecifics number count perception effects on fear state.

Definition at line 3954 of file m_common.f90.

◆ pred_direct_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_direct_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for direct predation perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3961 of file m_common.f90.

◆ pred_direct_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_direct_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for direct predation perception effects on fear state.

Definition at line 3987 of file m_common.f90.

◆ pred_meancount_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_meancount_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for mean predator number perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 3994 of file m_common.f90.

◆ pred_meancount_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_meancount_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for mean predator number perception effects on fear state.

Definition at line 4020 of file m_common.f90.

◆ stom_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::stom_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for stomach perception effects on active avoidance that goes via gamma2gene perception to neuronal response.

Definition at line 4026 of file m_common.f90.

◆ stom_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::stom_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for stomach perception effects on fear state.

Definition at line 4052 of file m_common.f90.

◆ bodymass_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::bodymass_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for body mass perception effects on active avoidance that goes via gamma2gene perception to neuronal response.

Definition at line 4058 of file m_common.f90.

◆ bodymass_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::bodymass_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for body mass perception effects on fear state.

Definition at line 4084 of file m_common.f90.

◆ energy_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::energy_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for energy reserves perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 4091 of file m_common.f90.

◆ energy_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::energy_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for energy reserves perception effects on fear state.

Definition at line 4117 of file m_common.f90.

◆ age_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::age_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for age perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 4124 of file m_common.f90.

◆ age_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::age_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for age perception effects on fear state.

Definition at line 4150 of file m_common.f90.

◆ reprfac_actv_avoid_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::reprfac_actv_avoid_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for reproductive factor perception effects on fear state that goes via gamma2gene perception to neuronal response.

Definition at line 4157 of file m_common.f90.

◆ reprfac_actv_avoid_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::reprfac_actv_avoid_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for reproductive factor perception effects on fear state.

Definition at line 4183 of file m_common.f90.

◆ light_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::light_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for light perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4193 of file m_common.f90.

◆ light_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::light_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for light perception effects on reproduction.

Definition at line 4219 of file m_common.f90.

◆ depth_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::depth_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for depth perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4225 of file m_common.f90.

◆ depth_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::depth_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for depth perception effects on reproduction.

Definition at line 4251 of file m_common.f90.

◆ foodcount_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::foodcount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4258 of file m_common.f90.

◆ foodcount_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::foodcount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on reproduction.

Definition at line 4284 of file m_common.f90.

◆ food_mem_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::food_mem_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for food items count perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4291 of file m_common.f90.

◆ food_mem_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::food_mem_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for food items count perception effects on reproduction.

Definition at line 4317 of file m_common.f90.

◆ conspcount_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::conspcount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for conspecifics number perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4324 of file m_common.f90.

◆ conspcount_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::conspcount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for conspecifics number count perception effects on reproduction.

Definition at line 4350 of file m_common.f90.

◆ pred_direct_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_direct_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for direct predation perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4357 of file m_common.f90.

◆ pred_direct_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_direct_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for direct predation perception effects on reproduction.

Definition at line 4383 of file m_common.f90.

◆ pred_meancount_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::pred_meancount_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for mean predator number perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4390 of file m_common.f90.

◆ pred_meancount_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::pred_meancount_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for mean predator number perception effects on reproduction.

Definition at line 4416 of file m_common.f90.

◆ stom_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::stom_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for stomach perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4422 of file m_common.f90.

◆ stom_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::stom_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for stomach perception effects on reproduction.

Definition at line 4448 of file m_common.f90.

◆ bodymass_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::bodymass_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for body mass perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4454 of file m_common.f90.

◆ bodymass_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::bodymass_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for body mass perception effects on reproduction.

Definition at line 4480 of file m_common.f90.

◆ energy_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::energy_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for energy reserves perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4487 of file m_common.f90.

◆ energy_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::energy_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for energy reserves perception effects on reproduction.

Definition at line 4513 of file m_common.f90.

◆ age_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::age_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for age perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4520 of file m_common.f90.

◆ age_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::age_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for age perception effects on reproduction.

Definition at line 4546 of file m_common.f90.

◆ reprfac_reproduce_genotype_neuronal

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::reprfac_reproduce_genotype_neuronal = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,YES ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for age perception effects on reproduction that goes via gamma2gene perception to neuronal response.

Definition at line 4553 of file m_common.f90.

◆ reprfac_reproduce_genotype_neuronal_gerror_cv

real(srp), parameter, public commondata::reprfac_reproduce_genotype_neuronal_gerror_cv = PERCEPT_ERROR_CV_DEF

Gaussian perception error parameter (cv) for age perception effects on reproduction.

Definition at line 4579 of file m_common.f90.

◆ modulation_appraisal_disable_all

logical, parameter, public commondata::modulation_appraisal_disable_all = .FALSE.

Disable developmental or genetic modulation of the APPRAISAL completely. If set to TRUE, no modulation is performed and the final motivation values are just equal to the primary modulation values in APPRAISAL.

Definition at line 4592 of file m_common.f90.

◆ reprod_modulation_devel_agestart

real(srp), parameter, public commondata::reprod_modulation_devel_agestart = LIFESPAN / 2.0_SRP

Developmental modulation of reproductive motivation. This parameter defines the starting age (time steps) at which reproductive motivation can rise above zero (at all previous ages weight=0.0). See the_neurobio::appraisal_motivation_modulation_non_genetic().

Definition at line 4599 of file m_common.f90.

◆ reprod_modulation_devel_agefull

real(srp), parameter, public commondata::reprod_modulation_devel_agefull = REPROD_MODULATION_DEVEL_AGESTART + REPROD_MODULATION_DEVEL_AGESTART * 2.0_SRP / 3.0_SRP

Developmental modulation of reproductive motivation. This parameter defines the age (time steps) at which reproductive motivation is weighted fully (weight = 1.0). See the_neurobio::appraisal_motivation_modulation_non_genetic().

Definition at line 4606 of file m_common.f90.

◆ reprod_modulation_devel_abscissa

real(srp), dimension(*), parameter commondata::reprod_modulation_devel_abscissa = [ REPROD_MODULATION_DEVEL_AGESTART, REPROD_MODULATION_DEVEL_AGESTART + ( REPROD_MODULATION_DEVEL_AGEFULL - REPROD_MODULATION_DEVEL_AGESTART ) / 3.0_SRP, REPROD_MODULATION_DEVEL_AGEFULL ]

Developmental modulation of reproductive motivation. This is the interpolation grid abscissa defining at which age reproduction motivation can have non-zero values (reproduction is possible). It defines the weighting factor applied to reproductive motivation.

It is calculated as follows. First, the first grid value A is set from the parameter commondata::reprod_modulation_devel_agestart (it takes the weight 0.0). Second, the last value of the abscissa grid array B is set from the parameter commondata::reprod_modulation_devel_agefull (it has the weight 1.0, full reproductive factor). Third, the interval between A and B is further split into three intervals and the first point is taken as the second value of the interpolation abscissa array (assigned the weight given by commondata::reprod_modulation_devel_w2). Thus, the interval reproductive factor weighting abscissa looks like this:

 +-------------------------------#----------+------------#----------+
 1                               ^                       ^       LIFESPAN
                                 A                       B

                                 #-------#-------|-------#
                                         ^
                                     A+(B-A)*1/3

 Resulting array abscissa: [ A,   A + (B - A) / 3,            B   ]
                 ordinate: [ 0.0, REPROD_MODULATION_DEVEL_W2, 1.0 ]

See the_neurobio::appraisal_motivation_modulation_non_genetic().

Definition at line 4636 of file m_common.f90.

◆ reprod_modulation_devel_w2

real(srp), parameter, public commondata::reprod_modulation_devel_w2 = 0.1_SRP

Developmental modulation of reproductive motivation. This parameter sets the interpolation array weight that defines how fast the reproduction motivation the_neurobio::state_reproduce is allowed to raise when the age of the agent exceeds the reproductive age. For details see the_neurobio::appraisal_motivation_modulation_non_genetic().

Definition at line 4648 of file m_common.f90.

◆ sex_male_modulation_reproduce_genotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::sex_male_modulation_reproduce_genotype = reshape ( [ NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for sex modulation coefficient affecting reproduction motivation state in males.

Definition at line 4653 of file m_common.f90.

◆ sex_male_modulation_reproduce_gerror_cv

real(srp), parameter, public commondata::sex_male_modulation_reproduce_gerror_cv = 0.1_SRP

Gaussian error parameter (cv) for the sex modulation coefficient affecting reproduction motivation state in males.

Definition at line 4679 of file m_common.f90.

◆ sex_female_modulation_reproduce_genotype

logical, dimension(max_nalleles,n_chromosomes), parameter, public commondata::sex_female_modulation_reproduce_genotype = reshape ( [ NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO ], [MAX_NALLELES,N_CHROMOSOMES], [NO], [2,1] )

The genotype structure for sex modulation coefficient affecting reproduction motivation state in females.

Definition at line 4685 of file m_common.f90.

◆ sex_female_modulation_reproduce_gerror_cv

real(srp), parameter, public commondata::sex_female_modulation_reproduce_gerror_cv = 0.1_SRP

Gaussian error parameter (cv) for the sex modulation coefficient affecting reproduction motivation state in females.

Definition at line 4711 of file m_common.f90.

◆ attention_switch_hunger_light

real(srp), parameter, public commondata::attention_switch_hunger_light = 0.0_SRP

Baseline attention switches $ \Psi _{i,j} $ control which perception components (i) can affect each of the motivational state (j). They should be defined for all combinations between the perception components (light, depth... food... predators... etc) and the motivational states. See Cognitive architecture.

These values serve as weight factors are baseline before attention is suppressed (the_neurobio::gos_global::attention_modulate()). They can be used for switching specific perceptual components the_neurobio::percept_components_motiv of motivation ON (1.0) or OFF (0.0) . Therefore, they should provide all possible combinations of the motivational states %state_ (as in the_neurobio::motivation) and perception components the_neurobio::percept_components_motiv.

The ATTENTION_SWITCH_ pattern matrix for all perception components and motivation states is presented in the table below:

HUNGER FEAR_DEFENCE REPRODUCE
LIGHT 0.0 1.0 0.0
DEPTH 0.0 1.0 0.0
FOOD_DIR 1.0 0.0 0.0
FOOD_MEM 1.0 0.0 0.0
CONSPEC 1.0 1.0 1.0
PRED_DIR 0.0 1.0 0.0
PREDATOR 0.0 1.0 0.0
STOMACH 1.0 0.0 0.0
BODYMASS 1.0 0.0 1.0
ENERGY 1.0 0.0 1.0
AGE 0.0 0.0 1.0
REPRFAC 0.0 0.0 1.0

Definition at line 4748 of file m_common.f90.

◆ attention_switch_hunger_depth

real(srp), parameter, public commondata::attention_switch_hunger_depth = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4750 of file m_common.f90.

◆ attention_switch_hunger_food_dir

real(srp), parameter, public commondata::attention_switch_hunger_food_dir = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4752 of file m_common.f90.

◆ attention_switch_hunger_food_mem

real(srp), parameter, public commondata::attention_switch_hunger_food_mem = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4754 of file m_common.f90.

◆ attention_switch_hunger_conspec

real(srp), parameter, public commondata::attention_switch_hunger_conspec = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4756 of file m_common.f90.

◆ attention_switch_hunger_pred_dir

real(srp), parameter, public commondata::attention_switch_hunger_pred_dir = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4758 of file m_common.f90.

◆ attention_switch_hunger_predator

real(srp), parameter, public commondata::attention_switch_hunger_predator = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4760 of file m_common.f90.

◆ attention_switch_hunger_stomach

real(srp), parameter, public commondata::attention_switch_hunger_stomach = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4762 of file m_common.f90.

◆ attention_switch_hunger_bodymass

real(srp), parameter, public commondata::attention_switch_hunger_bodymass = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4764 of file m_common.f90.

◆ attention_switch_hunger_energy

real(srp), parameter, public commondata::attention_switch_hunger_energy = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4766 of file m_common.f90.

◆ attention_switch_hunger_age

real(srp), parameter, public commondata::attention_switch_hunger_age = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4768 of file m_common.f90.

◆ attention_switch_hunger_reprfac

real(srp), parameter, public commondata::attention_switch_hunger_reprfac = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4770 of file m_common.f90.

◆ attention_switch_avoid_act_light

real(srp), parameter, public commondata::attention_switch_avoid_act_light = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4773 of file m_common.f90.

◆ attention_switch_avoid_act_depth

real(srp), parameter, public commondata::attention_switch_avoid_act_depth = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4775 of file m_common.f90.

◆ attention_switch_avoid_act_food_dir

real(srp), parameter, public commondata::attention_switch_avoid_act_food_dir = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4777 of file m_common.f90.

◆ attention_switch_avoid_act_food_mem

real(srp), parameter, public commondata::attention_switch_avoid_act_food_mem = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4779 of file m_common.f90.

◆ attention_switch_avoid_act_conspec

real(srp), parameter, public commondata::attention_switch_avoid_act_conspec = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4781 of file m_common.f90.

◆ attention_switch_avoid_act_pred_dir

real(srp), parameter, public commondata::attention_switch_avoid_act_pred_dir = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4783 of file m_common.f90.

◆ attention_switch_avoid_act_predator

real(srp), parameter, public commondata::attention_switch_avoid_act_predator = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4785 of file m_common.f90.

◆ attention_switch_avoid_act_stomach

real(srp), parameter, public commondata::attention_switch_avoid_act_stomach = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4787 of file m_common.f90.

◆ attention_switch_avoid_act_bodymass

real(srp), parameter, public commondata::attention_switch_avoid_act_bodymass = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4789 of file m_common.f90.

◆ attention_switch_avoid_act_energy

real(srp), parameter, public commondata::attention_switch_avoid_act_energy = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4791 of file m_common.f90.

◆ attention_switch_avoid_act_age

real(srp), parameter, public commondata::attention_switch_avoid_act_age = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4793 of file m_common.f90.

◆ attention_switch_avoid_act_reprfac

real(srp), parameter, public commondata::attention_switch_avoid_act_reprfac = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4795 of file m_common.f90.

◆ attention_switch_reproduce_light

real(srp), parameter, public commondata::attention_switch_reproduce_light = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4798 of file m_common.f90.

◆ attention_switch_reproduce_depth

real(srp), parameter, public commondata::attention_switch_reproduce_depth = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4800 of file m_common.f90.

◆ attention_switch_reproduce_food_dir

real(srp), parameter, public commondata::attention_switch_reproduce_food_dir = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4802 of file m_common.f90.

◆ attention_switch_reproduce_food_mem

real(srp), parameter, public commondata::attention_switch_reproduce_food_mem = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4804 of file m_common.f90.

◆ attention_switch_reproduce_conspec

real(srp), parameter, public commondata::attention_switch_reproduce_conspec = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4806 of file m_common.f90.

◆ attention_switch_reproduce_pred_dir

real(srp), parameter, public commondata::attention_switch_reproduce_pred_dir = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4808 of file m_common.f90.

◆ attention_switch_reproduce_predator

real(srp), parameter, public commondata::attention_switch_reproduce_predator = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4810 of file m_common.f90.

◆ attention_switch_reproduce_stomach

real(srp), parameter, public commondata::attention_switch_reproduce_stomach = 0.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4812 of file m_common.f90.

◆ attention_switch_reproduce_bodymass

real(srp), parameter, public commondata::attention_switch_reproduce_bodymass = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4814 of file m_common.f90.

◆ attention_switch_reproduce_energy

real(srp), parameter, public commondata::attention_switch_reproduce_energy = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4816 of file m_common.f90.

◆ attention_switch_reproduce_age

real(srp), parameter, public commondata::attention_switch_reproduce_age = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4818 of file m_common.f90.

◆ attention_switch_reproduce_reprfac

real(srp), parameter, public commondata::attention_switch_reproduce_reprfac = 1.0_SRP

Baseline attention switch, see commondata::attention_switch_hunger_light.

Definition at line 4820 of file m_common.f90.

◆ attention_modulation_curve_abscissa

real(srp), dimension(*), parameter, public commondata::attention_modulation_curve_abscissa =[0.0_SRP, 0.3_SRP, 0.5_SRP, 1.0_SRP]

The array defining the abscissa (X) of the nonparametric function that defines the attention modulation curve by the current Global Organismic State (GOS).

Warning
Must have the same dimensionality as commondata::attention_modulation_curve_ordinate.

Definition at line 4831 of file m_common.f90.

◆ attention_modulation_curve_ordinate

real(srp), dimension(*), parameter, public commondata::attention_modulation_curve_ordinate =[1.0_SRP, 0.98_SRP, 0.9_SRP, 0.0_SRP]

The array defining the ordinate (Y) of the nonparametric function that defines the attention modulation curve by the current Global Organismic State (GOS).

Warning
Must have the same dimensionality as commondata::attention_modulation_curve_abscissa.

Definition at line 4839 of file m_common.f90.

◆ motivation_compet_threshold_curve_abscissa

real(srp), dimension(*), parameter, public commondata::motivation_compet_threshold_curve_abscissa = [0.0_SRP, 0.2_SRP, 0.60_SRP, 0.80_SRP, 0.90_SRP, 1.0_SRP, 1.1_SRP]

The array defining the abscissa (X) of the nonparametric function curve that defines the threshold for motivation competition in GOS.

Warning
Must have the same dimensionality as commondata::motivation_compet_threshold_curve_ordinate.

Definition at line 4849 of file m_common.f90.

◆ motivation_compet_threshold_curve_ordinate

real(srp), dimension(*), parameter, public commondata::motivation_compet_threshold_curve_ordinate = [1.0_SRP, 0.3_SRP, 0.04_SRP, 0.01_SRP, 0.001_SRP, 0.0_SRP, 0.0_SRP]

The array defining the ordinate (Y) of the nonparametric function curve that defines the threshold for motivation competition in GOS.

Warning
Must have the same dimensionality as commondata::motivation_compet_threshold_curve_abscissa.

Definition at line 4857 of file m_common.f90.

◆ arousal_gos_dissipation_factor

real(srp), parameter, public commondata::arousal_gos_dissipation_factor = 0.5_SRP

Spontaneous arousal dissipation level when a simple fixed dissipation factor pattern is used. At each step, gos_arousal is reduced by a constant factor, AROUSAL_GOS_DISSIPATION_FACTOR` (e.g. reduced by 0.5) independently on the current GOS time step.

Definition at line 4865 of file m_common.f90.

◆ arousal_gos_dissipation_nonpar_abscissa

real(srp), dimension(*), parameter, public commondata::arousal_gos_dissipation_nonpar_abscissa = [ 1.0, 2.00, 5.00, 10.0, 15.0, 18.0, 20.0 ]

This is the array defining the abscissa (X) of the nonparametric spontaneous arousal dissipation factor function involving polynomial (or linear) interpolation is used.

Warning
Must have the same dimensionality as commondata::arousal_gos_dissipation_nonpar_ordinate.

Definition at line 4872 of file m_common.f90.

◆ arousal_gos_dissipation_nonpar_ordinate

real(srp), dimension(*), parameter, public commondata::arousal_gos_dissipation_nonpar_ordinate = [ 1.0, 0.98, 0.80, 0.40, 0.22, 0.18, 0.17 ]

This is the array defining the ordinate (Y) of the nonparametric spontaneous arousal dissipation factor function involving polynomial (or linear) interpolation is used.

Warning
Must have the same dimensionality as commondata::arousal_gos_dissipation_nonpar_abscissa.

Definition at line 4881 of file m_common.f90.

◆ global_rescale_maximum_motivation

real(srp), public commondata::global_rescale_maximum_motivation

Global maximum sensory information that is updated for the whole population of agents.

Note
This roughly corresponds to the MaxPercept array in the G1 model.

Definition at line 4888 of file m_common.f90.

◆ history_size_behaviours

integer, parameter, public commondata::history_size_behaviours = HISTORY_SIZE_SPATIAL

The size of the behaviour labels history stack, i.e. for how many time steps should the stack remember record the behaviour labels.

Definition at line 4897 of file m_common.f90.

◆ probability_reproduction_base_factor

real(srp), parameter, public commondata::probability_reproduction_base_factor = 0.90

Default weighting factor for the baseline probability of successful reproduction $ \varphi $. See implementation details for the function the_neurobio::reproduce_do_probability_reproduction_calc().

Definition at line 4902 of file m_common.f90.

◆ probability_reproduction_delta_mass_abscissa

real(srp), dimension(*), parameter, public commondata::probability_reproduction_delta_mass_abscissa = [0.5_SRP, 1.0_SRP, 2.0_SRP]

Interpolation grid abscissa for the body mass ratio factor that scales the probability of reproduction. For details see the_neurobio::reproduce_do_probability_reproduction_calc() procedure. Commands (template) to produce interpolation plots:

   htintrpl.exe [0.5 1  2] [0 1 1.8] 0.2
Warning
Must have the same dimensionality as commondata::probability_reproduction_delta_mass_ordinate.

Definition at line 4913 of file m_common.f90.

◆ probability_reproduction_delta_mass_ordinate

real(srp), dimension(*), parameter, public commondata::probability_reproduction_delta_mass_ordinate = [0.0_SRP, 1.0_SRP, 1.8_SRP]

Interpolation grid ordinate for the body mass ratio factor that scales the probability of reproduction. For details see the_neurobio::reproduce_do_probability_reproduction_calc() procedure. Commands (template) to produce interpolation plots:

   htintrpl.exe [0.5 1  2] [0 1 1.8] 0.2
Warning
Must have the same dimensionality as commondata::probability_reproduction_delta_mass_abscissa.

Definition at line 4926 of file m_common.f90.

◆ sex_steroids_reproduction_threshold

real(srp), parameter, public commondata::sex_steroids_reproduction_threshold = 1.3_SRP

This parameter defines the threshold of the current gonadal steroids level that should exceed the baseline value determined by the genome, for reproduction to be possible.

Note
Note that this parameter should normally exceed 1.0

Definition at line 4934 of file m_common.f90.

◆ walk_random_distance_default_factor

real(srp), parameter, public commondata::walk_random_distance_default_factor = 10.0_SRP

The weighting factor used in calculation of the default random walk distance, in terms of the agent's body length.

Definition at line 4938 of file m_common.f90.

◆ walk_random_distance_stochastic_cv

real(srp), parameter, public commondata::walk_random_distance_stochastic_cv = 0.5_SRP

The coefficient of variation of the distance for stochastic Gaussian random walk (distance is in terms of the agent's body length). Note that for deterministic walk, cv is zero.

Definition at line 4944 of file m_common.f90.

◆ walk_random_food_gain_hope

real(srp), parameter, public commondata::walk_random_food_gain_hope = 4.0_SRP

The maximum walk distance, in units of the average distance to food items in the current perception object, when the expected food gain is calculated on the bases of the current food availability, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the expectancy is based on the the_behaviour::hope() function.

Definition at line 4952 of file m_common.f90.

◆ walk_random_food_gain_hope_agentl

real(srp), parameter, public commondata::walk_random_food_gain_hope_agentl = 100.0_SRP

The maximum walk distance, in units of the agent body length, when the expected food gain is calculated on the bases of the current food availability, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the expectancy is based on the the_behaviour::hope() function.

Note
This parameter is used for switching between the food gain calculation methods based on current perception or hope function if the agent has no food items in perception object. Normally, if there are food items, the commondata::walk_random_food_gain_hope is used.

Definition at line 4964 of file m_common.f90.

◆ walk_random_pred_risk_hope_agentl

real(srp), parameter, public commondata::walk_random_pred_risk_hope_agentl = 150.0_SRP

The maximum walk distance, in units of the agent body length, when the expected predation risk is calculated on the basis of the current perception value, not using the the_behaviour::hope() function mechanism. If the average walk distance exceeds this value, the risk expectancy is based on the the_behaviour::hope() function.

Definition at line 4971 of file m_common.f90.

◆ walk_random_vertical_shift_ratio

real(srp), parameter, public commondata::walk_random_vertical_shift_ratio = 0.5_SRP

The ratio of the vertical to main horizontal shift parameters of the agent's Gaussian random walk. Random walk is done in the "2.5D" mode (the_environment::spatial_moving::rwalk25d()), i.e. with separate parameters for the main horizontal shift and the vertical depth shift. This is done to avoid a potentially too large vertical displacement of the agent during the movement. Thus, the vertical shift distance should normally be smaller than the horizontal shift. The difference between the main horizontal and (the smaller) vertical shifts is defined by this parameter. For example, if it is equal to 0.5, then the vertical depth shift is 0.5 of the main horizontal shift. See the_behaviour::walk_random_do_execute() for more details.

Definition at line 4984 of file m_common.f90.

◆ walk_random_vertical_shift_cv_ratio

real(srp), parameter, public commondata::walk_random_vertical_shift_cv_ratio = 1.0_SRP

The ratio of the vertical to the main horizontal coefficients of variation for the vertical depth distance in the stochastic Gaussian random walk of the agent. Should normally be equal to the main default value set by commondata::walk_random_distance_stochastic_cv. That is 1.0.

Definition at line 4990 of file m_common.f90.

◆ walk_random_food_hope_abscissa

real(srp), dimension(*), parameter, public commondata::walk_random_food_hope_abscissa = [ 0.0_SRP, 1.0_SRP, 3.5_SRP ]

This parameter defines the hope function for calculating the food perception expectancy in the the_behaviour::walk_random behaviour. This is the abscissa for the hope function grid array. Plotting: htintrpl.exe [0 1 3.5 ] [2, 1, 0]. See the_behaviour::walk_random_do_this().

Note
Note that the "maximum hope" value for normal random walk is smaller than in the hope function grid for the migration behaviour commondata::migrate_food_gain_maximum_hope. Thus, the maximum incentive for movement is lower here.
Warning
Must have the same dimensionality as commondata::walk_random_food_hope_ordinate.

Definition at line 5003 of file m_common.f90.

◆ walk_random_food_hope_ordinate

real(srp), dimension(*), parameter, public commondata::walk_random_food_hope_ordinate = [ 2.0_SRP, 1.0_SRP, 0.0_SRP ]

This parameter defines the hope function for calculating the food perception expectancy in the the_behaviour::walk_random behaviour. This is the ordinate for the hope function grid array. Plotting: htintrpl.exe [0 1 3.5 ] [2, 1, 0]. See the_behaviour::walk_random_do_this().

Note
Note that the "zero hope" value for normal random walk is higher (non-zero) than in the hope function grid for the migration behaviour. Thus, the maximum incentive for movement is lower here.
Warning
Must have the same dimensionality as commondata::walk_random_food_hope_abscissa.

Definition at line 5017 of file m_common.f90.

◆ approach_offset_default

real(srp), parameter, public commondata::approach_offset_default = TOLERANCE_HIGH_DEF_SRP

Default offset for approach, offset is the difference between the approaching agent and the target object.

Definition at line 5022 of file m_common.f90.

◆ approach_conspecfic_dilute_general_risk

real(srp), parameter, public commondata::approach_conspecfic_dilute_general_risk = 0.5_SRP

Multiplication factor for the general risk of predation used when the agent evaluates the approach to a target conspecific.

Definition at line 5027 of file m_common.f90.

◆ approach_conspecfic_dilute_adjust_pair_behind

real(srp), parameter, public commondata::approach_conspecfic_dilute_adjust_pair_behind = 0.5_SRP

Multiplication factor for subjective assessment of the direct risk of predation when the actor agent moves behind the target conspecific, i.e. when the distance between the agent and predator is going to become longer than the distance between the target conspecific and the agent. See the_behaviour::approach_conspecifics_do_this() for details.

Definition at line 5035 of file m_common.f90.

◆ approach_food_gain_compet_factor_abscissa

real(srp), dimension(*), parameter, public commondata::approach_food_gain_compet_factor_abscissa = [ 0.00_SRP, 0.10_SRP, 1.00_SRP, 1.50_SRP ]

The grid abscissa defining the nonparametric relationship that determines the expected food gain for the "approach conspecifics" behaviour (the_behaviour::approach_conspec class). The function is a weighting factor depending on the ratio of the agent body mass to the target conspecific body mass, for the baseline expected food gain.

   htintrpl.exe [ 0 0.1 1 1.5 ] [ 0 0.01 0.5 1 ]
Note
The (last) maximum value of the grid defines the body mass ratio that guarantees 100% expectancy of winning of competition for food against the target conspecific. For example, the value of 1.5 means that an agent is guaranteed to get the whole baseline expected food gain if its body weight is 1.5 of the target conspecific. See the_behaviour::approach_conspecifics_do_this() for details.
Warning
Must have the same dimensionality as commondata::approach_food_gain_compet_factor_ordinate.

Definition at line 5055 of file m_common.f90.

◆ approach_food_gain_compet_factor_ordinate

real(srp), dimension(*), parameter, public commondata::approach_food_gain_compet_factor_ordinate = [ 0.00_SRP, 0.01_SRP, 0.50_SRP, 1.00_SRP ]

The grid ordinate defining the nonparametric relationship that determines the expected food gain for the "approach conspecifics" behaviour (the_behaviour::approach_conspec class). The function is a weighting factor depending on the ratio of the agent body mass to the target conspecific body mass, for the baseline expected food gain.

   htintrpl.exe [ 0 0.1 1 1.5 ] [ 0 0.01 0.5 1 ]

See the_behaviour::approach_conspecifics_do_this() for details.

Warning
Must have the same dimensionality as commondata::approach_food_gain_compet_factor_abscissa.

Definition at line 5070 of file m_common.f90.

◆ dist_expect_food_uncertain_fact

real(srp), parameter, public commondata::dist_expect_food_uncertain_fact = 0.7_SRP

The weighting factor for the distance to the expected food item if the actual distance is uncertain (e.g. no food items currently in perception). See the_behaviour::walk_random_motivations_expect().

Definition at line 5077 of file m_common.f90.

◆ history_perception_window_pred

real(srp), parameter, public commondata::history_perception_window_pred = 0.3_SRP

The size of the memory window that is used in the assessment of predation risk, as a portion of the commondata::history_size_perception. See the_behaviour::walk_random_do_this() and the_behaviour::walk_random_motivations_expect().

Definition at line 5083 of file m_common.f90.

◆ history_perception_window_food

real(srp), parameter, public commondata::history_perception_window_food = 0.3_SRP

The size of the memory window that is used in the assessment of food gain, as a portion of the commondata::history_size_perception. See the_behaviour::walk_random_do_this() and the_behaviour::walk_random_motivations_expect().

Definition at line 5089 of file m_common.f90.

◆ escape_dart_distance_default_factor

real(srp), parameter, public commondata::escape_dart_distance_default_factor = 1.5_SRP

The weighting factor used in calculation of the default escape distance. The escape distance is equal to the visibility range of the predator multiplied by this factor. Therefore, it should normally exceed 1.0. Otherwise, the escaping object is still within the visibility range of the predator after the escape. See the_behaviour::escape_dart_do_this() for more details.

Definition at line 5097 of file m_common.f90.

◆ escape_dart_distance_default_stoch_cv

real(srp), parameter, public commondata::escape_dart_distance_default_stoch_cv = 0.5_SRP

For stochastic escape, this parameter determines the coefficient of variation of the escape walk. See the_behaviour::escape_dart_do_this() for more details.

Definition at line 5102 of file m_common.f90.

◆ up_down_walk_step_stdlength_factor

real(srp), parameter, public commondata::up_down_walk_step_stdlength_factor = 4.0_SRP

The default size of the up and down walks performed by the GO_DOWN_DEPTH and GO_UP_DEPTH, see the_behaviour::go_down_depth and the_behaviour::go_up_depth classes as well as the_behaviour::go_down_do_this() and the_behaviour::go_up_do_this() methods.

Definition at line 5109 of file m_common.f90.

◆ migrate_dist_max_step

real(srp), parameter, public commondata::migrate_dist_max_step = 800.0_SRP

The maximum distance (in units of the agent body length) a migrating agent can pass for a single time step of the model. This is basically limited by (an implicit) maximum speed of the agent, in terms of its body length. This parameter sets the limit on the length of a single migration bout.

Definition at line 5116 of file m_common.f90.

◆ migrate_random_max_dist_target

real(srp), parameter, public commondata::migrate_random_max_dist_target = 10.0_SRP

Default maximum distance towards the target environment (in units of the agent's body size) when the agent could emigrate into this target environment. See the_behaviour::behaviour_do_migrate_random() for details.

Definition at line 5121 of file m_common.f90.

◆ migrate_dist_penetrate_offset

real(srp), parameter, public commondata::migrate_dist_penetrate_offset = 1.0_SRP

The offset, in terms of the body length of the actor agent, for initial penetrating into the target environment when the agent is migrating into this environment. See the_environment::migrate_do_this().

Definition at line 5126 of file m_common.f90.

◆ migrate_food_gain_maximum_hope

real(srp), parameter, public commondata::migrate_food_gain_maximum_hope = 2.0_SRP

This parameter defines the hope function for calculating the food gain expectancy in the migration behaviour. This is the maximum value of the hope function that is achieved at zero ratio of the old to new food gain memory values. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this().

Definition at line 5133 of file m_common.f90.

◆ migrate_food_gain_ratio_zero_hope

real(srp), parameter, public commondata::migrate_food_gain_ratio_zero_hope = 3.5_SRP

This parameter defines the hope function for calculating the food gain expectancy in the migration behaviour. This is the maximum ratio of the old to new food gain memory values that leads to virtually zero value of the hope function. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this().

Definition at line 5140 of file m_common.f90.

◆ migrate_predator_maximum_hope

real(srp), parameter, public commondata::migrate_predator_maximum_hope = 2.0_SRP

This parameter defines the hope function for calculating the general predation risk expectancy in the migration behaviour. This is the maximum value of the hope function that is achieved at zero ratio of the old to new predation values in the memory stack. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this().

Definition at line 5148 of file m_common.f90.

◆ migrate_predator_zero_hope

real(srp), parameter, public commondata::migrate_predator_zero_hope = 3.5_SRP

This parameter defines the hope function for calculating the general predation risk expectancy in the migration behaviour. This is the maximum ratio of the old to new predation values in the memory stack that leads to virtually zero value of the hope function. Plotting: htintrpl.exe [0 1 3.5] [2 1 0]. See the_behaviour::migrate_do_this().

Definition at line 5156 of file m_common.f90.

◆ behav_walk_step_stdlen_static

real(srp), dimension(*), parameter, public commondata::behav_walk_step_stdlen_static = [ 1.0_SRP, 10.0_SRP, 25.0_SRP, 50.0_SRP, 100.0_SRP ]

This parameter array defines the repertoire of predetermined static walk step sizes, in units of the agent's body length, for the the_behaviour::walk_random behavioural unit as executed in the the_behaviour::behaviour::walk_random class level. See the_behaviour::behaviour::select() method for details.

Definition at line 5163 of file m_common.f90.

◆ behav_go_up_down_step_stdlen_static

real(srp), dimension(*), parameter, public commondata::behav_go_up_down_step_stdlen_static = [ 10.0_SRP, 20.0_SRP, 50.0_SRP, 75.0_SRP, 100.0_SRP ]

This parameter array defines the step sizes, in units of the agent's body length, for the the_behaviour::go_down_depth and the_behaviour::go_up_depth behavioural unit as executed in the the_behaviour::behaviour::depth_down and the_behaviour::behaviour::depth_up class level(s). See the_behaviour::behaviour::select() method for details.

Definition at line 5171 of file m_common.f90.

◆ ga_reproduce_pr

real(srp), parameter, public commondata::ga_reproduce_pr = 0.05_SRP

Percentage of the best reproducing agents in the pre-evolution phase.

Definition at line 5185 of file m_common.f90.

◆ ga_reproduce_n

integer, parameter, public commondata::ga_reproduce_n = int(POPSIZE * GA_REPRODUCE_PR)

Upper limit on the number of reproducing individuals in the fixed-fitness pre-evolution phase.

Definition at line 5189 of file m_common.f90.

◆ ga_fitness_dead

integer, parameter, public commondata::ga_fitness_dead = 400000000

Fitness value ascribed to dead agent in pre-evol. See the_individual::individual_agent::fitness_calc(). Also note that huge(integer)) = 2147483647.

Definition at line 5194 of file m_common.f90.

◆ ga_fitness_select

integer, parameter, public commondata::ga_fitness_select = 900

Fitness threshold for the inclusion of the agent into the reproducing elite group.

Definition at line 5198 of file m_common.f90.

◆ ga_reproduce_min_prop

real(srp), parameter, public commondata::ga_reproduce_min_prop = 0.05_SRP

Minimum proportion of reproducing agents, but note that the number of number reproducers cannot be smaller than the absolute minimum commondata::ga_reproduce_n_min. See the_population::population::ga_reproduce_max().

Definition at line 5204 of file m_common.f90.

◆ ga_reproduce_n_min

integer, parameter, public commondata::ga_reproduce_n_min = 20

Absolute minimum number of reproducing agents in the adaptive GA procedure. See the_population::population::ga_reproduce_max().

Definition at line 5208 of file m_common.f90.