The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
Definition the hormonal architecture of the agent. More...
Data Types | |
type | hormones |
This type adds hormonal architecture extending the genome object. More... | |
Functions/Subroutines | |
subroutine | hormones_init_genotype (this) |
Initialise hormone levels based on the genome value. Two alleles are selected at random and input into the gamma2gene function to get the initial hormone values rescaled to 0:1. Note that the gamma2gene alleles defining the shape of the gamma function and the half-max effect are selected randomly in this version. Also, polyploid organisms are possible, in such case, two parameters are also randomly defined from a larger set (e.g. from four chromosomes in case of tetraploids). See implementation details and comments for each of the hormones. More... | |
elemental subroutine | hormones_clean_history_stack (this) |
Clean the history stack of hormones: testosterone and estrogen histories are set to MISSING . More... | |
elemental subroutine | hormones_update_history (this) |
Update the sex steroid hormones history stack from the current level. More... | |
elemental real(srp) function | hormones_reproductive_factor_calc (this) |
Calculate the reproductive factor. Reproductive factor is defined as the current level of the_hormones::testosterone_level in males and the_hormones::estrogen_level in females. More... | |
elemental real(srp) function | testosteron_baseline_get_level (this) |
Get the value of testosterone baseline. More... | |
elemental real(srp) function | estrogen_baseline_get_level (this) |
Get the value of estrogen baseline. More... | |
Accessor functions for all the hormones. | |
Get and set functions for each hormone follow. We left them as individual hormone-specific functions duplicating code. Not ideal, but easy to use provided hormones do not change too often. Tiny atomic hormone get/set functions are easy to code. | |
elemental real(srp) function | growhorm_get_level (this) |
Get the value of growth hormone. More... | |
elemental subroutine | growhorm_set_level (this, value_set) |
Set the value of growth hormone. More... | |
elemental real(srp) function | thyroid_get_level (this) |
Get the value of thyroid. More... | |
elemental subroutine | thyroid_set_level (this, value_set) |
Set the value of thyroid. More... | |
elemental real(srp) function | adrenaline_get_level (this) |
Get the value of adrenaline. More... | |
elemental subroutine | adrenaline_set_level (this, value_set) |
Set the value of adrenaline. More... | |
elemental real(srp) function | cortisol_get_level (this) |
Get the value of cortisol. More... | |
elemental subroutine | cortisol_set_level (this, value_set) |
Set the value of cortisol. More... | |
elemental real(srp) function | testosterone_get_level (this) |
Get the value of testosterone. More... | |
elemental subroutine | testosterone_set_level (this, value_set, update_history) |
Set the value of testosterone. More... | |
elemental real(srp) function | estrogen_get_level (this) |
Get the value of estrogen. More... | |
elemental subroutine | estrogen_set_level (this, value_set, update_history) |
Set the value of estrogen. More... | |
Variables | |
character(len= *), parameter, private | modname = "(THE_HORMONES)" |
Definition the hormonal architecture of the agent.
Define the hormonal architecture objects. Hormones affect implemented in such a way as to affect decision making and behaviour, but change relatively slowly across the lifespan of the agent. Their initial state is also genetically determined.
subroutine the_hormones::hormones_init_genotype | ( | class(hormones), intent(inout) | this | ) |
Initialise hormone levels based on the genome value. Two alleles are selected at random and input into the gamma2gene
function to get the initial hormone values rescaled to 0:1. Note that the gamma2gene
alleles defining the shape of the gamma function and the half-max effect are selected randomly in this version. Also, polyploid organisms are possible, in such case, two parameters are also randomly defined from a larger set (e.g. from four chromosomes in case of tetraploids). See implementation details and comments for each of the hormones.
First, get all the initial hormone level values from the genotype.
Then, initialise the baseline levels of sex steroids from the starting genetically determined hormone levels.
Clean history stack of all the hormones upon init.
Finally, update the hormone history stack with the first init values.
Definition at line 148 of file m_hormon.f90.
elemental subroutine the_hormones::hormones_clean_history_stack | ( | class(hormones), intent(inout) | this | ) |
Clean the history stack of hormones: testosterone and estrogen histories are set to MISSING
.
Definition at line 195 of file m_hormon.f90.
elemental subroutine the_hormones::hormones_update_history | ( | class(hormones), intent(inout) | this | ) |
Update the sex steroid hormones history stack from the current level.
Update the hormone history stack with the first init values.
Definition at line 205 of file m_hormon.f90.
elemental real(srp) function the_hormones::hormones_reproductive_factor_calc | ( | class(hormones), intent(in) | this | ) |
Calculate the reproductive factor. Reproductive factor is defined as the current level of the_hormones::testosterone_level in males and the_hormones::estrogen_level in females.
Definition at line 221 of file m_hormon.f90.
elemental real(srp) function the_hormones::growhorm_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of growth hormone.
Definition at line 245 of file m_hormon.f90.
elemental subroutine the_hormones::growhorm_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set | ||
) |
Set the value of growth hormone.
[in] | value_set | value, Set the value of the growth hormone. |
Definition at line 257 of file m_hormon.f90.
elemental real(srp) function the_hormones::thyroid_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of thyroid.
Definition at line 269 of file m_hormon.f90.
elemental subroutine the_hormones::thyroid_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set | ||
) |
Set the value of thyroid.
[in] | value_set | value, Set the value of the thyroid hormone. |
Definition at line 281 of file m_hormon.f90.
elemental real(srp) function the_hormones::adrenaline_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of adrenaline.
Definition at line 293 of file m_hormon.f90.
elemental subroutine the_hormones::adrenaline_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set | ||
) |
Set the value of adrenaline.
[in] | value_set | value, Set the value of the adrenaline. |
Definition at line 305 of file m_hormon.f90.
elemental real(srp) function the_hormones::cortisol_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of cortisol.
Definition at line 317 of file m_hormon.f90.
elemental subroutine the_hormones::cortisol_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set | ||
) |
Set the value of cortisol.
[in] | value_set | value, Set the value of the cortisol. |
Definition at line 329 of file m_hormon.f90.
elemental real(srp) function the_hormones::testosterone_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of testosterone.
Definition at line 341 of file m_hormon.f90.
elemental subroutine the_hormones::testosterone_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set, | ||
logical, intent(in), optional | update_history | ||
) |
Set the value of testosterone.
[in] | value_set | value_set, Set the value of the testosterone. |
[in] | update_history | update_history is an optional logical flag to update the hormone history stack, the default is to do update, no update only if explicitly set to FALSE. |
Definition at line 353 of file m_hormon.f90.
elemental real(srp) function the_hormones::estrogen_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of estrogen.
Definition at line 375 of file m_hormon.f90.
elemental subroutine the_hormones::estrogen_set_level | ( | class(hormones), intent(inout) | this, |
real(srp), intent(in) | value_set, | ||
logical, intent(in), optional | update_history | ||
) |
Set the value of estrogen.
[in] | value_set | value, Set the value of the estrogen. |
[in] | update_history | update_history is an optional logical flag to update the hormone history stack, the default is to do update, no update only if explicitly set to FALSE. |
Definition at line 387 of file m_hormon.f90.
elemental real(srp) function the_hormones::testosteron_baseline_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of testosterone baseline.
Definition at line 410 of file m_hormon.f90.
elemental real(srp) function the_hormones::estrogen_baseline_get_level | ( | class(hormones), intent(in) | this | ) |
Get the value of estrogen baseline.
Definition at line 422 of file m_hormon.f90.
|
private |
Definition at line 25 of file m_hormon.f90.