26 character (len=*),
parameter,
private ::
modname =
"(THE_CONDITION)"
33 real(
srp) :: energy_current
35 real(
srp) :: energy_maximum
37 real(
srp) :: energy_birth
39 real(
srp) :: body_length
41 real(
srp),
dimension(HISTORY_SIZE_AGENT_PROP) :: body_length_history
44 real(
srp) :: body_length_birth
48 real(
srp) :: control_unselected
51 real(
srp) :: body_mass
53 real(
srp),
dimension(HISTORY_SIZE_AGENT_PROP) :: body_mass_history
55 real(
srp) :: body_mass_birth
57 real(
srp) :: body_mass_maximum
71 real(
srp) :: stomach_content_mass
82 procedure,
public :: mortality_birth => &
104 generic,
public :: length => get_length
112 generic,
public :: mass => get_mass
160 generic,
public :: food_process_cost => food_proc_cost_v, &
176 generic,
public :: food_fitting => food_fitt_v, food_fitt_o
188 generic,
public :: food_surplus => food_surpl_v, food_surpl_o
202 procedure,
public :: cost_factor_food_smr => &
254 integer :: n_reproductions
256 integer :: n_offspring
264 procedure,
public :: is_ready_reproduce => &
309 real(
srp),
intent(in) :: k, l
310 real(
srp) :: body_mass
333 real(
srp),
intent(in) :: m, l
358 character(len=*),
parameter :: PROCNAME =
"(condition_init_genotype)"
372 this%energy_birth = this%energy_current
375 this%energy_maximum = this%energy_current
387 "WARNING: Initialised body length " // tostr(this%body_length) // &
388 " is smaller than the BODY_LENGTH_MIN in " // procname )
397 "WARNING: Initialised body length " // tostr(this%body_length) // &
398 " exceeds 1/10 BODY_LENGTH_MAX in " // procname )
405 this%body_length_birth = this%body_length
410 call this%trait_init(this%control_unselected, &
418 this%body_mass =
length2mass(this%energy_current, this%body_length)
421 this%body_mass_birth = this%body_mass
422 this%body_mass_maximum = this%body_mass
425 call this%trait_init(this%smr, &
437 this%stomach_content_mass &
442 this%body_mass*this%maxstomcap )
446 call this%body_history_clean()
468 real(SRP),
dimension(*),
parameter :: BIRTH_MORTALITY_ENERGY_ABSCISSA = &
469 [ 0.2_srp, 0.3_srp, 0.5_srp, 0.8_srp ]
471 real(SRP),
dimension(*),
parameter :: BIRTH_MORTALITY_ENERGY_ORDINATE = &
472 [ 0.0_srp, 0.006_srp, 0.1_srp, 1.0_srp ]
474 real(SRP) :: mortality
476 mortality =
within( ddpinterpol( birth_mortality_energy_abscissa, &
477 birth_mortality_energy_ordinate, &
478 this%energy_birth ), &
481 if ( rand_r4() < mortality )
then
492 this%body_length_history =
missing
493 this%body_mass_history =
missing
526 integer,
optional,
intent(in) :: increment
528 if (
present(increment))
then
529 this%age = this%age + increment
531 this%age = this%age + 1
543 energy = this%energy_current
554 energy = this%energy_maximum
565 length = this%body_length
574 real(
srp) :: value_out
576 value_out = this%control_unselected
587 mass = this%body_mass
604 contrast, time_step_model)
result (visrange)
609 real(
srp),
optional,
intent(in) :: object_area
613 real(
srp),
optional,
intent(in) :: contrast
617 integer,
optional,
intent(in) :: time_step_model
619 real(
srp) :: visrange
622 real(
srp) :: object_area_here, contrast_here
623 integer :: time_step_model_here
626 real(
srp) :: irradiance_agent_depth
635 if (
present(object_area))
then
636 object_area_here = object_area
643 if (
present(contrast))
then
644 contrast_here = contrast
651 if (
present(time_step_model))
then
652 time_step_model_here = time_step_model
660 irradiance_agent_depth = this%illumination(time_step_model_here)
665 prey_area = object_area_here, &
666 prey_contrast = contrast_here ) )
676 real(SRP),
intent(in) :: value_set
679 logical,
optional,
intent(in) :: update_history
694 this%body_mass = value_set
702 if (
present(update_history))
then
703 if (update_history) &
715 real(SRP),
intent(in) :: value_set
718 logical,
optional,
intent(in) :: update_history
733 if (
present(update_history))
then
734 if (update_history) &
747 energy = this%energy_birth
758 length = this%body_length_birth
769 mass = this%body_mass_birth
780 mass = this%body_mass_maximum
802 stom = this%stomach_content_mass
820 food_gain, distance_food) &
823 real(
srp),
optional,
intent(in) :: food_gain
825 real(
srp),
optional,
intent(in) :: distance_food
829 real(
srp) :: food_gain_here, distance_food_here
832 if(
present(food_gain))
then
833 food_gain_here = food_gain
841 if (
present(distance_food))
then
842 distance_food_here = distance_food
846 distance_food_here = this%body_length
859 food_gain_here * this%cost_factor_food_smr(food_gain_here) ) &
860 + this%cost_swim(distance=distance_food_here)
880 distance, exponent)
result (cost_swimming)
882 real(
srp),
optional,
intent(in) :: distance
883 real(
srp),
optional,
intent(in) :: exponent
884 real(
srp) :: cost_swimming
887 real(
srp) :: dist_loc, exponent_here
898 if (
present(distance))
then
901 dist_loc = this%way()
905 if (
present(exponent))
then
906 exponent_here = exponent
908 exponent_here = swim_cost_exp
923 * dist_loc / this%body_length
935 food_obj, distance_food) &
940 real(
srp),
optional,
intent(in) :: distance_food
944 real(
srp) :: distance_food_here
955 if (
present(distance_food))
then
956 distance_food_here = distance_food
960 distance_food_here = this%body_length
975 cost = this%food_proc_cost_v(food_obj%get_mass(), distance_food_here)
989 food_gain, food_dist) &
990 result(food_adjusted)
992 real(
srp),
optional,
intent(in) :: food_gain
993 real(
srp),
optional,
intent(in) :: food_dist
994 reaL(
srp) :: food_adjusted
996 real(
srp) :: food_gain_here
1002 if(
present(food_gain))
then
1003 food_gain_here = food_gain
1008 if (
present(food_dist))
then
1009 food_adjusted = food_gain_here - this%food_surplus(food_gain_here) - &
1010 this%food_process_cost(food_gain_here, food_dist)
1012 food_adjusted = food_gain_here - this%food_surplus(food_gain_here) - &
1013 this%food_process_cost(food_gain_here)
1025 food_obj, food_dist) &
1026 result(food_adjusted)
1028 class(
food_item),
intent(in) :: food_obj
1029 real(
srp),
optional,
intent(in) :: food_dist
1030 real(
srp) :: food_adjusted
1044 if (
present(food_dist))
then
1045 food_adjusted = this%food_fitt_v(food_obj%get_mass(), food_dist)
1047 food_adjusted = this%food_fitt_v(food_obj%get_mass())
1059 real(
srp),
optional,
intent(in) :: food_gain
1060 reaL(
srp) :: extra_food
1065 real(
srp) :: stomach_content_ceiling
1067 real(
srp) :: food_gain_here
1070 if(
present(food_gain))
then
1071 food_gain_here = food_gain
1076 stomach_content_ceiling = this%body_mass * this%maxstomcap
1080 extra_food = max(0.0_srp, this%stomach_content_mass + food_gain_here - &
1081 stomach_content_ceiling)
1092 class(
food_item),
intent(in) :: food_obj
1093 reaL(
srp) :: extra_food
1098 real(
srp) :: stomach_content_ceiling
1100 stomach_content_ceiling = this%body_mass * this%maxstomcap
1104 extra_food = max(0.0_srp, this%stomach_content_mass + &
1105 food_obj%get_mass() - stomach_content_ceiling)
1128 real(
srp) :: stepcost
1132 if (this%body_mass <
zero)
then
1152 this%body_mass = this%body_mass - this%living_cost()
1163 real(
srp),
intent(in) :: food_gain
1169 logical,
optional,
intent(in) :: update_history
1172 this%body_mass = max( this%body_mass + food_gain ,
body_mass_min )
1175 if (this%body_mass > this%body_mass_maximum) &
1176 this%body_mass_maximum = this%body_mass
1179 if (
present(update_history))
then
1180 if (update_history) &
1193 real(
srp),
intent(in) :: food_gain
1194 real(
srp) :: cost_factor
1197 * this%smr, 0.0_srp )
1207 real(
srp),
intent(in) :: stomach_increment
1213 if (stomach_increment > 0.0_srp) this%stomach_content_mass = &
1214 this%stomach_content_mass + stomach_increment
1230 result(length_increment)
1232 real(
srp),
intent(in) :: mass_increment
1234 real(
srp) :: length_increment
1240 real(
srp) :: increment_factor_ipoint
1249 mass_threshold:
if (mass_increment > &
1267 increment_factor_ipoint = linterpol( &
1270 this%growhorm_get() )
1279 ipol_value=this%growhorm_get(), algstr=
"LINTERPOL", &
1280 output_file=
"plot_debug_growth_linear_factor_" // &
1282 mmdd //
"_a_"// trim(this%individ_label()) //
"_" // &
1302 length_increment = this%body_length * increment_factor_ipoint * &
1303 mass_increment / this%body_mass
1310 length_increment = 0.0_srp
1312 end if mass_threshold
1322 real(SRP),
intent(in) :: mass_increment
1328 logical,
optional,
intent(in) :: update_history
1333 this%body_length = this%body_length + this%len_incr(mass_increment)
1336 if (
present(update_history))
then
1337 if (update_history) &
1358 real(SRP) :: length_increment, steroid_increment_factor
1383 length_increment = &
1384 maxval( [this%body_length_history( &
1387 [this%body_length_history( &
1391 minval( [this%body_length_history( &
1394 [this%body_length_history( &
1421 if (this%is_male())
then
1423 call this%testosterone_set( min( 10.0_srp, &
1424 this%testosterone_get() + &
1425 this%testosterone_get() * steroid_increment_factor ) )
1429 call this%estrogen_set( min( 10.0_srp, &
1430 this%estrogen_get() + &
1431 this%estrogen_get() * steroid_increment_factor ) )
1437 call this%hormones_to_history()
1451 real(srp) :: value_out
1461 real(this%get_age(), srp))
1471 ipol_value=real(this%get_age(), srp), &
1472 algstr=
"DDPINTERPOL", &
1473 output_file=
"plot_debug_sex_steroid_incr_factor_" // &
1475 mmdd //
"_a_"// trim(this%individ_label()) // &
1491 real(srp) :: value_out
1503 real(this%get_length(), srp))
1513 ipol_value=real(this%get_length(), srp), &
1514 algstr=
"DDPINTERPOL", &
1515 output_file=
"plot_debug_sex_steroid_incr_factor_" // &
1517 mmdd //
"_a_"// trim(this%individ_label()) // &
1539 result(is_starved_to_death)
1542 logical :: is_starved_to_death
1546 if (
is_starved( this%body_mass, this%stomach_content_mass, &
1547 this%body_mass_birth, this%body_mass_maximum, &
1548 this%energy_current, this%energy_maximum) )
then
1549 is_starved_to_death = .
true.
1551 is_starved_to_death = .
false.
1561 elemental function is_starved ( body_mass, stomach_content_mass, &
1562 body_mass_birth, body_mass_maximum, &
1563 energy_current, energy_maximum) &
1566 real(
srp),
intent(in) :: body_mass
1569 real(
srp),
intent(in) :: stomach_content_mass
1571 real(
srp),
intent(in) :: body_mass_birth
1574 real(
srp),
intent(in) :: body_mass_maximum
1576 real(
srp),
intent(in) :: energy_current
1578 real(
srp),
intent(in) :: energy_maximum
1591 if ( body_mass - stomach_content_mass < body_mass_birth/2.0_srp .or. &
1592 body_mass - stomach_content_mass < body_mass_maximum/2.0_srp .or. &
1593 energy_current < energy_maximum/4.0_srp .or. &
1618 this%stomach_content_mass = &
1620 this%stomach_content_mass - &
1634 result(stomach_decrement_digestion)
1636 real(
srp),
intent(in) :: stomach_content_mass
1638 real(
srp) :: stomach_decrement_digestion
1640 stomach_decrement_digestion = &
1654 this%energy_current =
energy_reserve( this%body_mass, this%body_length )
1658 if (this%energy_current > this%energy_maximum) &
1659 this%energy_maximum = this%energy_current
1672 integer,
optional,
intent(in) :: steps
1674 real(
srp) :: cost_out
1677 integer :: steps_loc
1681 if (this%body_mass <
zero )
then
1686 if (
present(steps))
then
1692 cost_out = this%cost_swim( distance=this%get_length(), &
1694 real(steps_loc,
srp) / this%get_mass()
1706 real(
srp) :: repr_cost_mass
1719 real(
srp) :: repr_cost_mass
1722 real(
srp) :: offspring_mass
1731 offspring_mass = this%offspring_mass()
1771 if ( this%is_male() )
then
1801 pure function cost_full (offspring_mass_fact, agent_mass_fact)
result (cost)
1807 real(
srp),
intent(in) :: offspring_mass_fact
1813 real(
srp),
intent(in) :: agent_mass_fact
1818 cost = offspring_mass * offspring_mass_fact + &
1819 this%get_mass() * agent_mass_fact
1845 pure function cost_residual (offspring_mass_fact, agent_mass_fact)
result (cost)
1851 real(
srp),
intent(in) :: offspring_mass_fact
1857 real(
srp),
intent(in) :: agent_mass_fact
1863 cost = offspring_mass * offspring_mass_fact + &
1864 (this%get_mass() - offspring_mass * offspring_mass_fact) &
1878 result(repr_cost_mass)
1884 real(
srp),
optional,
intent(in) :: cost_factor
1887 real(
srp) :: repr_cost_mass
1896 if(
present(cost_factor))
then
1897 repr_cost_mass = this%reproduction_cost() * cost_factor
1911 this%n_reproductions = 0
1912 this%n_offspring = 0
1923 n_repr = this%n_reproductions
1932 integer,
intent(in) :: n_repr
1934 this%n_reproductions = n_repr
1945 n_offspr = this%n_offspring
1954 integer,
intent(in) :: n_offspr
1956 this%n_offspring = n_offspr
1972 integer,
optional,
intent(in) :: add_repr
1977 real(SRP),
optional,
intent(in) :: average_mass_offspring
1980 integer :: add_repr_here
1985 if (
present(add_repr))
then
1986 add_repr_here = add_repr
1993 this%n_reproductions = this%n_reproductions + add_repr_here
2003 if (
present(average_mass_offspring))
then
2004 this%n_offspring = this%n_offspring + &
2005 this%offspring_number(average_mass_offspring) &
2008 this%n_offspring = this%n_offspring + &
2009 this%offspring_number() * add_repr_here
2022 real(
srp),
optional,
intent(in) :: average_mass_offspr
2028 real(
srp) :: total_mass_offspring
2031 real(
srp) :: average_mass_offspr_here
2039 if (
present(average_mass_offspr))
then
2040 average_mass_offspr_here = average_mass_offspr
2057 total_mass_offspring = this%offspring_mass()
2067 n_offspr = floor(total_mass_offspring / average_mass_offspr_here)
2090 if ( this%is_male() .and. &
2091 this%testosterone_get() > this%testosterone_base_get() &
2095 this%is_female() .and. &
2096 this%estrogen_get() > this%estrogen_base_get() &
2110 real(
srp) :: offspr_mass
2126 offspr_mass = this%body_mass * &
2139 ipol_value=this%body_mass, algstr=
"DDPINTERPOL", &
2140 output_file=
"plot_debug_reprod_mass_fract_" // &
2142 mmdd //
"_a_"// trim(this%individ_label()) // &
Simple history stack function, add to the end of the stack. We need only to add components on top (en...
Sigmoidal relationship between environmental factor and the organism response, as affected by the gen...
Force a value within the range set by the vmin and vmax dummy parameter values.
Calculate visual range of predator using Dag Aksnes's procedures srgetr(), easyr() and deriv().
pure real(srp) function cost_residual(offspring_mass_fact, agent_mass_fact)
Backend function that is called in the_body::reproduction_cost_energy_dynamic(). Calculate the cost o...
real(srp) function steroid_factor_len()
Function calculating the value of the sex steroid increment factor that depends on the agent's body l...
real(srp) function steroid_factor_age()
Function calculating the value of the sex steroid increment factor that depends on the agent's age....
pure real(srp) function cost_full(offspring_mass_fact, agent_mass_fact)
Backend function that is called in the_body::reproduction_cost_energy_dynamic(). Calculate the cost o...
COMMONDATA – definitions of global constants and procedures.
real(srp), parameter, public stomach_content_init_cv
Set the coefficient of variation for the stomach capacity at init.
real(srp), parameter, public cost_factor_foraging_smr
Set the cost of foraging in terms of SMR.
real(srp), parameter, public body_length_max
Maximum body length.
real(srp), parameter, public control_unselected_gerror_cv
Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the cont...
real(srp), parameter, public smr_init
This is the initial value of SMR that goes through the gamma2gene.
real(srp), parameter, public tolerance_low_def_srp
Default value of low tolerance (high precision). This is the standard commondata::srp precision....
character(len= *), parameter, public ps
Standard file extension for debug and other PostScript plots.
real(srp), parameter, public sex_steroids_reproduction_threshold
This parameter defines the threshold of the current gonadal steroids level that should exceed the bas...
real(srp), dimension(*), parameter, public reproduct_body_mass_offspr_ordinate
The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship...
integer, parameter, public srp
Definition of the standard real type precision (SRP).
logical, dimension(max_nalleles, n_chromosomes), parameter, public control_unselected_genotype_phenotype
The initial value of the control unselected trait. This trait is is genetically determined but is not...
real(srp), parameter, public smr_min
Minimum SMR value, anything lower is not allowed.
elemental real(srp) function cv2variance(cv, mean)
Calculate the variance from the coefficient of variation.
real(srp), parameter swimming_cost_exponent_laminar
Default swimming cost body mass exponent parameter for laminar flow. See doi:10.1242/jeb....
real(srp), parameter, public linear_growth_exponent
Growth exponent linking linear growth and body mass growth. Based on Fulton's condition factor "cube ...
integer, parameter, public sex_steroids_check_history
The number of the latest historical values that are checked for change when setting an increment of t...
real(srp), parameter, public body_length_init
The initial value of body length, the average (gon-genetic).
real(srp), parameter, public smr_gerror_cv
Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the SMR_...
real(srp), parameter, public reproduction_cost_unsuccess
The energetic cost of unsuccessful reproduction in terms of the agent's body mass lost....
logical, dimension(max_nalleles, n_chromosomes), parameter, public smr_genotype_phenotype
The initial value of the standard metabolic rate (SMR) at birth is genetically determined....
real(srp), parameter, public reproduction_cost_body_mass_fix
The energetic cost of reproduction in terms of the agent's body mass loss.
integer, parameter, public label_length
The length of standard character string labels. We use labels for various objects,...
real(srp), parameter, public reproduction_cost_body_mass_factor_female
The component of the energetic cost of reproduction in females that is proportional to the agent's bo...
real(srp), parameter swimming_cost_exponent_turbulent
Default swimming cost body mass exponent parameter for turbulent flow. See doi:10....
real(srp), parameter, public max_stomach_capacity_def
Set the maximum stomach capacity default value – fraction of the body mass available for food....
real(srp), parameter, public missing
Numerical code for missing and invalid real type values.
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...
real(srp), parameter, public body_mass_min
Minimum possible body mass, hard limit.
real(srp), parameter, public stomach_content_emptify_factor
Stomach content emptify factor at each step.
real(srp), parameter, public living_cost
Living cost in terms of food consumed. metabolic costs, p roportional to body size.
integer, parameter, public history_size_agent_prop
History stack size for the agent's basic properties, such as body length and body mass....
logical, parameter, public true
Safety parameter avoid errors in logical values, so we can now refer to standard Fortran ....
real(srp), parameter, public energy_init
This is the initial value of the energy reserves, non-genetic mean.
integer, parameter, public label_cen
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 obtaine...
real(srp), parameter, public zero
Some parameters should never be zero or below. In such cases they could be set to some smallest disti...
integer, parameter, public lifespan
Number of time steps in the agent's maximum life length.
real(srp), parameter, public preycontrast_default
Inherent contrast of prey, CONTRAST =1.0.
real(srp), parameter, public food_item_capture_prop_cost
The cost of the food item catching, in terms of the food item mass (proportional cost)....
real(srp), dimension(*), parameter, public reproduct_body_mass_offspr_abscissa
The array defining the abscissa (X) of the nonparametric function curve that defines the relationship...
real(srp), dimension(*), parameter, public linear_growth_hormone_increment_factor_curve_ordinate
The array defining the ordinate (Y) of the nonparametric function curve that defines the function lin...
real(srp), dimension(*), parameter, public linear_growth_hormone_increment_factor_curve_abscissa
The array defining the abscissa (X) of the nonparametric function curve that defines the function lin...
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 t...
real(srp), parameter, public energy_gerror_cv
Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the ENER...
real(srp), parameter, public food_item_size_default
Default size of a single food item.
real(srp), parameter, public body_length_gerror_cv
Genotype to phenotype initialisation, Gaussian error parameter. Coefficient of variation for the BODY...
real(srp), parameter, public body_length_min
Minimum body length possible.
real(srp), parameter, public control_unselected_init
The initial value of the control unselected trait that goes through the gamma2gene.
real(srp), parameter, public reproduction_cost_offspring_fract_female
The component of the energetic cost of reproduction in females that is proportional to the total offs...
integer, parameter, public label_cst
This parameter defines the range of characters that is used for generating random labels,...
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 upda...
real(srp), parameter, public reproduction_cost_body_mass_factor_male
The component of the energetic cost of reproduction in males that is proportional to the agent's body...
elemental real(srp) function length2sidearea_fish(body_length)
A function linking body length with the body area in fish.
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_age_curve_abscissa
The array defining the abscissa (X) of the nonparametric function curve that defines the relationship...
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_len_curve_ordinate
The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship...
real(srp), parameter, public reproduction_cost_offspring_fract_male
The component of the energetic cost of reproduction in males that is proportional to the total offspr...
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_age_curve_ordinate
The array defining the ordinate (Y) of the nonparametric function curve that defines the relationship...
real(srp), dimension(*), parameter, public sex_steroids_increment_factor_len_curve_abscissa
The array defining the abscissa (X) of the nonparametric function curve that defines the relationship...
real(srp), parameter, public swimming_speed_cost_burst
Set the weighting factor parameter of burst swimming cost in terms of the agent body size and the dis...
real(srp), parameter, public stomach_content_init
Set average stomach capacity at birth/init in units of body weight,.
logical, parameter, public false
real(srp), parameter, public mass_growth_threshold
A minimum body mass increment when any linear growth is possible, in units of the body mass (e....
Definition the physical properties and condition of the agent.
elemental real(srp) function stomach_content_food_gain_non_fit_v(this, food_gain)
Calculate extra food surplus mass non fitting into the stomach of the agent.
elemental subroutine reproduction_n_offspring_set(this, n_offspr)
Set the number of offspring for the agent.
elemental logical function reproduction_ready_steroid_hormones_exceed(this)
Determine if the agent's hormonal system is ready for reproduction.
subroutine sex_steroids_update_increment(this)
Update the level of the sex steroids.
subroutine condition_init_genotype(this)
Initialise the individual body condition object based on the genome values. Two alleles are selected ...
elemental integer function reproduction_n_offspring_get(this)
Get the number of offspring.
character(len= *), parameter, private modname
elemental real(srp) function body_mass_food_processing_cost_factor_smr(this, food_gain)
The fraction of the cost of the processing of the food item(s) depending on the agent SMR....
elemental subroutine reproduction_init_zero(this)
Initialise the reproduction object for the agent. Everything is set to zero.
elemental real(srp) function condition_body_mass_max_get(this)
Get historcal maximum for body mass. Standard GET-function.
elemental subroutine condition_energy_update_after_growth(this)
Update the energy reserves of the agent based on its current mass and length. This subroutine should ...
elemental real(srp) function stomach_emptify_backend(stomach_content_mass)
The backend engine for calculating the stomach content mass decrement as a consequence of digestion....
real(srp) function reproduction_cost_energy_dynamic(this)
Calculate the energetic cost of reproduction in terms of the body mass of the this agent....
real(srp) function body_len_grow_calculate_increment_step(this, mass_increment)
Calculate body length increment for a time step of the model.
elemental logical function body_mass_is_starvation_check(this)
Check if the body mass is smaller than the birth body mass or structural body mass....
integer function reproduction_n_offspring_calc(this, average_mass_offspr)
Calculate the number of offspring per a single reproduction as a function of the agent's body mass.
elemental real(srp) function stomach_content_food_gain_non_fit_o(this, food_obj)
Calculate extra food surplus mass non fitting into the stomach of the agent.
elemental real(srp) function body_mass_calculate_cost_living_step(this)
Calculate the cost of living for a single model step. So the agent mass increment per a single model ...
real(srp) function condition_agent_visibility_visual_range(this, object_area, contrast, time_step_model)
Calculate the visibility range of this agent. Visibility depends on the size of the agent,...
elemental real(srp) function condition_body_length_get(this)
Get current body length. Standard GET-function.
subroutine birth_mortality_enforce_init_fixed_debug(this)
This procedure enforces selective mortality of agents at birth to avoid strong selection for energy a...
elemental real(srp) function body_mass_processing_cost_calc_o(this, food_obj, distance_food)
Calculate the basic processing cost of catching a food item with the mass food_gain.
elemental real(srp) function energy_reserve(m, l)
Calculate the current energy reserves (Fulton condition factor) from body mass and length.
real(srp) function reproduction_cost_unsuccessful_calc(this, cost_factor)
Calculate the costs of unsuccessful reproduction. This is calculated as a fraction of the normal cost...
elemental real(srp) function condition_control_unsel_get(this)
Get current value of the control unselected trait. Standard GET-function.
elemental real(srp) function condition_energy_current_get(this)
Get current energy reserves. Standard GET-function.
elemental real(srp) function condition_cost_swimming_burst(this, distance, exponent)
The cost of swimming of a specific distance in terms of the actor's body mass.
elemental integer function reproduction_n_reproductions_get(this)
Get the number of reproductions for this agent.
subroutine body_len_grow_do_calculate_step(this, mass_increment, update_history)
Do linear growth for one model step based on the increment function the_body::condition::len_incr().
subroutine condition_body_length_set_update_hist(this, value_set, update_history)
Set body length optionally updating the history stack.
elemental subroutine condition_age_reset_zero(this)
Reset the age of the agent to zero.
elemental real(srp) function condition_body_mass_birth_get(this)
Get historical record of body mass at birth. Standard GET-function.
elemental subroutine condition_clean_history(this)
Cleanup the history stack of the body length and mass.
elemental subroutine body_mass_grow_do_calculate(this, food_gain, update_history)
Do grow body mass based on food gain from a single food item adjusted for cost etc.
elemental subroutine stomach_content_mass_emptify_step(this)
Digestion. Stomach contents S(t) is emptied by a constant fraction each time step.
elemental real(srp) function reproduction_cost_energy_fix(this)
Calculate the energetic cost of reproduction in terms of the body mass of the this agent....
elemental real(srp) function condition_body_mass_get(this)
Get current body mass. Standard GET-function.
subroutine reproduction_n_increment(this, add_repr, average_mass_offspring)
Increment the number of reproductions and offspring for this agent.
elemental integer function condition_age_get(this)
Get current age. Standard GET-function.
elemental real(srp) function condition_energy_birth_get(this)
Get historical record of energy reserves at birth. Standard GET-function.
elemental real(srp) function condition_body_length_birth_get(this)
Get historical record of body length at birth. Standard GET-function.
elemental subroutine reproduction_n_reproductions_set(this, n_repr)
Set the number of reproductions for the agent.
elemental real(srp) function stomach_content_food_gain_fitting_o(this, food_obj, food_dist)
Calculate the value of possible food gain as fitting into the agent's stomach (or full gain if the fo...
elemental subroutine body_mass_adjust_living_cost_step(this)
Adjust the body mass at the end of the model step against the cost of living. We do not adjust the co...
elemental real(srp) function stomach_content_food_gain_fitting_v(this, food_gain, food_dist)
Calculate the value of possible food gain as fitting into the agent's stomach, or the full gain if th...
elemental logical function is_starved(body_mass, stomach_content_mass, body_mass_birth, body_mass_maximum, energy_current, energy_maximum)
This is the backend logical function that checks if the agent is starved. It is called by the conditi...
elemental real(srp) real(srp) function body_mass_processing_cost_calc_v(this, food_gain, distance_food)
Calculate the basic processing cost of catching a food item with the mass food_gain.
elemental real(srp) function cost_swimming_standard(this, steps)
The standard cost of swimming is a diagnostic function that shows the cost, in units of the body mass...
subroutine condition_body_mass_set_update_hist(this, value_set, update_history)
Set body mass optionally updating the history stack.
elemental real(srp) function condition_smr_get(this)
Get current smr. Standard GET-function.
elemental subroutine condition_age_increment(this, increment)
Increment the age of the agent by one.
elemental real(srp) function condition_stomach_content_get(this)
Get current stomach content. Standard GET-function.
elemental subroutine stomach_content_get_increment(this, stomach_increment)
Do increment stomach contents with adjusted (fitted) value.
real(srp) function reproduction_mass_offspring_calc(this)
Calculate the total mass of all offspring produced by this agent during a single reproduction event.
elemental real(srp) function length2mass(k, l)
This is the function to calculate the body weight from the length and the Fulton condition factor (en...
elemental real(srp) function condition_energy_maximum_get(this)
Get historical maximum of energy reserves. Standard GET-function.
Definition of environmental objects.
Definition the hormonal architecture of the agent.
CONDITION defines the physical condition of the agent
REPRODUCTION type defines parameters of the reproduction system.
Definition of a single food item. Food item is a spatial object that has specific location in space....
This type adds hormonal architecture extending the genome object.