The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
The Population objects for the AHA Model. More...
Go to the source code of this file.
Data Types | |
type | the_population::member_population |
Definition of individual member of a population. More... | |
type | the_population::population |
Definition of the population object. More... | |
Modules | |
module | the_population |
Define the population of agents object, its properties and functions. | |
Functions/Subroutines | |
subroutine | the_population::set_individual_id (this, idnumber) |
Set integer ID number to individual member of the population object. More... | |
integer function | the_population::get_individual_id (this) |
Get integer ID number to individual member of the population object. More... | |
subroutine | the_population::individ_posit_in_environ_uniform (this, environ) |
Places the individual agent, a member of the population, within a specific environment at random with a uniform distribution. The agents can be positioned with respect to their initial depth. More... | |
subroutine | the_population::genome_individual_set_dead_non_pure (this, non_debug_log) |
Set the individual to be dead. Note that this function does not deallocate the individual agent object, this may be a separate destructor function. More... | |
subroutine | the_population::init_population_random (this, pop_size, pop_number_here, pop_name_here) |
Initialise the population object. More... | |
subroutine | the_population::population_destroy_deallocate_objects (this) |
Destroys this population and deallocates the array of individual member objects. More... | |
subroutine | the_population::population_birth_mortality_init (this, energy_mean, energy_sd) |
Impose selective mortality at birth on the agents. Selective mortality sets a fixed limit on uncontrolled evolution of the energy reserves in newborn agents. If some newborn has too high energy at birth (genetically fixed), such a deviating agent is killed at once. More... | |
integer function | the_population::population_get_popsize (this) |
Accessor get-function for the size of this population. More... | |
integer function | the_population::population_get_pop_number (this) |
Accessor get-function for the population number ID. More... | |
character(len=label_length) function | the_population::population_get_pop_name (this) |
Accessor get-function for the population character label ID. More... | |
subroutine | the_population::reset_population_id_random (this, pop_number_here, pop_name_here) |
Reset individual IDs of the population members. More... | |
subroutine | the_population::sex_initialise_from_genome (this) |
Determine the sex for each member of the population. More... | |
subroutine | the_population::position_individuals_uniform (this, environ) |
Position each member of the population randomly within a bounding environment. More... | |
elemental subroutine | the_population::sort_population_by_fitness (this) |
This subroutine sorts the population individual object by their %fitness components. More... | |
recursive pure subroutine | qsort (A, is_reverse) |
qsort is a recursive frontend for MEMBER_POPULATION objects More... | |
pure subroutine | qs_partition_fitness (A, marker) |
partition is a pivot backend for fitness More... | |
subroutine | the_population::population_rwalk3d_all_agents_step (this, dist_array, cv_array, dist_all, cv_all, environment_limits, n_walks) |
Perform one or several steps of random walk by all agents. More... | |
subroutine | the_population::population_rwalk25d_all_agents_step (this, dist_array_xy, cv_array_xy, dist_array_depth, cv_array_depth, dist_all_xy, cv_all_xy, dist_all_depth, cv_all_depth, environment_limits, n_walks) |
Perform one or several steps of random walk by all agents. More... | |
subroutine | the_population::population_subject_predator_attack (this, this_predator, time_step_model) |
Subject the population to an attack by a specific predator. The predator acts on agents in its proximity and takes account of the predation confusion and dilution effects (see the_environment::predator::risk_fish_group()). More... | |
subroutine | the_population::population_subject_other_risks (this) |
Subject the population to mortality caused by habitat-specific mortality risk. Each agent is affected by the risk associated with the habitat it is currently in. More... | |
subroutine | the_population::population_subject_individual_risk_mortality (this) |
Subject all members of this population to their individual mortality risks. More... | |
subroutine | the_population::population_lifecycle_step_preevol (this) |
This procedure performs a single step of the life cycle of the whole population, the agents for the step are selected in a random order. More... | |
subroutine | the_population::population_lifecycle_step_eatonly_preevol (this) |
This procedure performs a single step of the life cycle of the whole population, the agents for the step are selected in a random order. More... | |
subroutine | the_population::population_save_data_all_agents_csv (this, csv_file_name, save_header, is_logging, is_success) |
Save data for all agents within the population into a CSV file. More... | |
subroutine | the_population::population_save_data_all_genomes (this, csv_file_name, is_success) |
Save the genome data of all agents in this population to a CSV file. More... | |
subroutine | the_population::population_load_data_all_genomes (this, pop_size, pop_number_here, pop_name_here, csv_file_name, missing_random, is_success) |
Load the genome data of all agents in this population from a CSV file. Note that the procedure implements several error correcting measures, e.g. checks for minimum number of rows in the file and minimum row length. The input CSV file therefore can include short text notes that are then ignored when reading data. More... | |
subroutine | log_write_error (message) |
This subroutine writes error message to the main log file. More... | |
subroutine | the_population::population_save_data_memory (this, csv_file_name, is_success) |
Save the perceptual and emotional memory stack data of all agents in this population to a CSV file. More... | |
subroutine | the_population::population_save_data_movements (this, csv_file_name, is_success) |
Save the latest movement history of all agents. This method makes use of the the_environment::spatial_moving::history structure that saves latest movements of each agent. More... | |
subroutine | the_population::population_save_data_behaviours (this, csv_file_name, is_success) |
Save the behaviours history stack the_neurobio::behaviour::history_behave for all agents. More... | |
pure subroutine | the_population::population_preevol_fitness_calc (this) |
Calculate fitness for the pre-evolution phase of the genetic algorithm. Pre-evolution is based on selection for a simple criterion without explicit reproduction etc. The criterion for selection at this phase is set by the integer the_individual::individual_agent::fitness component. This procedure provides a whole-population wrapper for the the_individual::individual_agent::fitness_calc() function. More... | |
pure integer function | the_population::population_ga_reproduce_max (this) |
Determine the number of parents that have fitness higher than the minimum acceptable value. Also, only alive agents are included into the reproducing number. More... | |
real(srp) function | the_population::population_ga_mutation_rate_adaptive (this, baseline, maxvalue) |
This function implements adaptive mutation rate that increases as the population size reduces. More... | |
Variables | |
character(len= *), parameter, private | the_population::modname = "(THE_POPULATION)" |
integer, public | the_population::global_ind_n_eaten_by_predators |
Global indicator variable that keeps the number of agents that have died as a consequence of predatory attacks. All other dies are therefore caused by starvation. More... | |
recursive pure subroutine sort_population_by_fitness::qsort | ( | type(member_population), dimension(:), intent(inout) | A, |
logical, intent(in), optional | is_reverse | ||
) |
qsort
is a recursive frontend for MEMBER_POPULATION
objects
[in,out] | a | A has the same type as the individual component objects of the array-object that we are going to sort. |
[in] | is_reverse | Logical flag for reverse (descending) sorting. |
Definition at line 652 of file m_popul.f90.
pure subroutine sort_population_by_fitness::qs_partition_fitness | ( | type(member_population), dimension(:), intent(inout) | A, |
integer, intent(out) | marker | ||
) |
partition is a pivot backend for fitness
x
, has the same type as the sorted object component.Fitness is hardwired in this partition subroutine, but it can be used as a model for similar othert sorting functions. Note that here integer array is sorted.
Definition at line 676 of file m_popul.f90.
subroutine population_load_data_all_genomes::log_write_error | ( | character(len=*), intent(in) | message | ) |
This subroutine writes error message to the main log file.
Definition at line 2405 of file m_popul.f90.