The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
►Ncommondata | COMMONDATA – definitions of global constants and procedures |
Ctimer_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: |
Cgamma2gene | 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 |
Cgene2gamma | |
Cadd_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] |
Ccm2m | Convert cm to m |
Cm2cm | Convert m to cm |
Cmm2m | Convert mm to m |
Crescale | Arbitrary rescales value(s) from one range (A:B) to another (A1:B1) |
Cwithin | Force a value within the range set by the vmin and vmax dummy parameter values |
Cis_within | Logical function to check if a value is within a specific range, lower <= X <= upper |
Cis_near_zero | Checks if a real number is near 0.0. Thus function can be used for comparing two real values like this: |
Cfloat_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: |
Coperator(.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 |
Coperator(.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 |
Coperator(.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: |
Coperator(.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 |
Caverage | Calculate an average of an array excluding missing code values |
Cis_maxval | Check if a value is the maximum value of an array |
Cis_minval | Check if a value is the minimum value of an array |
Coperator(.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: |
►Nfile_io | Definition of high level file objects |
Cfile_handle | FILE_HANDLE is the basic file handle object. It provides an unitary object oriented interface for operations with any supported file types |
►Nthe_behaviour | Definition of high level behavioural architecture |
Cbehaviour_base | Root behaviour abstract type. Several different discrete behaviours encompass the behavioural repertoire of the agent. This is the base root type from which all other behaviours are obtained by inheritance/extension |
Cbehaviour_init_root | Abstract interface for the deferred init function that has to be overriden by each object that extends the basic behavioural component class |
Cmove | Movement is an umbrella abstract type linked with spatial movement |
Cmove_init_root | Abstract interface for the deferred init function that has to be overriden by each object that extends the basic behavioural component class |
Ceat_food | Eat food is consuming food item(s) perceived |
Creproduce | Reproduce is do a single reproduction |
Cwalk_random | Walk_random is a single step of a Gaussian random walk |
Cfreeze | Freeze is stop any locomotion completely |
Cescape_dart | Escape dart is a very fast long distance movement, normally in response to a direct predation threat |
Capproach | Approach an arbitrary spatial object is a directed movement to an arbitrary the_environment::spatial class target object |
Capproach_conspec | Approach conspecifics is directed movement towards a conspecific |
Cmigrate | Migrate is move quickly directing to the other habitat |
Cgo_down_depth | Go down dive deeper |
Cgo_up_depth | Go up raise to a smaller depth. TODO: abstract type linking both Up and Down |
Cdebug_base | This is a test fake behaviour unit that is used only for debugging. It cannot be "execute"'d, but the expectancy can be calculated (normally in the debug mode) |
Cbehaviour | The behaviour of the agent is defined by the the_behaviour::behaviour class. This class defines the behavioural repertoire of the agent. Each of the components of the behavioural repertoire (behaviour object) is defined as a separate independent class with its own self parameter. However, the agent which performs the behaviour (the actor agent) is included as the first non-self parameter into the behaviour component methods |
Carchitecture_neuro | This type is an "umbrella" for all the lower-level classes |
►Nthe_body | Definition the physical properties and condition of the agent |
Ccondition | CONDITION defines the physical condition of the agent |
Creproduction | REPRODUCTION type defines parameters of the reproduction system |
►Nthe_environment | Definition of environmental objects |
Cspatial | Definition of a spatial object. Spatial object determines the position of the agent, food items and other things in the simulated space. Here we use continuous 3D environment (real type coordinates) |
Cspatial_moving | Definition of a movable spatial object. It extends the the_environment::spatial object, but also adds its previous position history in stack-like arrays. The history is maintained with the commondata::add_to_history() subroutine, adding a single element on the top (end) of the history stack |
Cenvironment | Definition of the overall environment. Environment is a general container for all habitats, patches and other similar objects where the whole life of the agents takes place. Environment just provides the limits for all these objects |
Cfood_item | Definition of a single food item. Food item is a spatial object that has specific location in space. It can be "created" and eaten ("disappear"). Food item is an immobile SPATIAL object that has a position in 3D space |
Cfood_resource | Definition of the super-type FOOD resource type. This is a superclass, several sub-classes can be defined for different kinds of food and prey objects |
Cpredator | Definition of the PREDATOR objects. Predator is a moving agent that hunts on the evolving AHA agents but its internal structure is very simplistic (although we can in principle doit as a full AHA complexity with genome, GOS etc...) |
Chabitat | Definition of the environment habitat HABITAT object. There can potentially be of several types of habitats (patches etc.), so the superclass HABITAT defines the most general properties and procedures. More specific procedures are defined in sub-objects. Such procedures can be overriden from super-object to sub-objects providing for procedure polymorphism |
Clight_surface | Calculate surface light intensity (that is subject to diel variation) for specific time step of the model. Irradiance can be stochastic if an optionallogical stochastic flag is set to TRUE |
Clight_depth | Calculate underwater background irradiance at specific depth |
Cvisual_range | Calculate visual range of predator using Dag Aksnes's procedures srgetr() , easyr() and deriv() |
Cvisual_range_new | Calculate visual range of predator using Dag Aksnes's procedures srgetr() , easyr() and deriv() |
Cdist | Internal distance calculation backend engine |
Cjoin | An alias for the the_environment::food_resources_collapse_global_object() method for joining food resources into a single global food resource out of the global array the_environment::global_habitats_available. See the_environment::unjoin() for how to unjoin an array of food resources back into an array |
Cunjoin | An alias to the_environment::food_resources_update_back_global_object() method to transfer (having been modified) food resource objects out from the single united object back to the global array the_environment::global_habitats_available. See the_environment::join() for how to join an array of food resources into a single global object |
Cassemble | Interface to the procedure to assemble the global array of habitat objects the_environment::global_habitats_available from a list of separate habitat object components. This call |
Cdisassemble | Interface to the procedure to disassemble the global habitats objects array the_environment::global_habitats_available back into separate habitat object components. See the_environment::global_habitats_disassemble() for the backend implementation |
Coperator(.cat.) | Interface operator to concatenate two arrays of the spatial the_environment::spatial or spatial moving the_environment::spatial_moving objects |
Coperator(.catloc.) | Interface operator to concatenate the location components of two arrays ofthe_environment::spatial class objects |
Coperator(.within.) | Interface operators .within. for testing whether a spatial object (first argument lies within an environment (second argument). Usage: |
Coperator(.contains.) | Interface operators .contains. for testing whether an environment object (first argument) contains a SPATIAL object (second argument). Usage: |
Coperator(.above.) | Interface operators .above. for spatial objects. Usage: |
Coperator(.below.) | Interface operators .below. for spatial objects. Usage: |
Coperator(-) | Interface operator "-" for the the_environment::environment spatial container objects. Return an environment object that is shrunk by a fixed value in the 2D XxY plane. See the_environment::environment_shrink_xy_fixed() . The operator can be used as follows: |
►Nthe_genome | Definition the genetic architecture of the agent |
Cgene | This describes an individual gene object. See the genome structure for as general description and gene for details |
Cchromosome | This type describes the chromosome object. Chromosome consists of an array of alleles and a descriptive string label. See "the genome structure" for as general description and "chromosome" for details |
Cindividual_genome | This type describes parameters of the individual agent's genome The genome is an array of allocatable the_genome::chromosome objects, different kinds of agents may have different genomes with different number of chromosomes. See "the genome structure" for as general description and "genome" for details |
►Nthe_hormones | Definition the hormonal architecture of the agent |
Chormones | This type adds hormonal architecture extending the genome object |
►Nthe_individual | An umbrella module that collects all the components of the individual agent |
Cindividual_agent | This type describes parameters of the individual agent |
►Nthe_neurobio | Definition of the decision making and behavioural the architecture |
Cpercept_food | This type defines how the agent perceives food items. The food perception object the_neurobio::percept_food is basically an array of food objects within the visual range of the agent plus distances to the agent. This is the "objective" perception container, reflecting the "real world". We introduce a perception error when perception object is analysed by the agent's neurobiological system |
Cspatial_percept_component | This type defines a single spatial perception component, i.e. some single elementary spatial object that can be perceived by the agent from a big array of objects of the same type which are available in the agent's environment. Different kinds of perception objects (e.g. conspecifics, predators etc.) can be produced by extending this basic type |
Cconspec_percept_comp | This type defines a single conspecific perception component. It is required for the the_neurobio::percept_conspecifics type that defines the whole conspecifics perception object (array of conspecifics) |
Cpercept_conspecifics | This type defines how the agent perceives conspecifics |
Cspatialobj_percept_comp | This type defines a single arbitrary spatial object perception component. For example, a predator perception object is then an array of such spatial object perception components |
Cpercept_predator | This type defines how the agent perceives a predator |
Cpercept_stomach | This type defines how the agent perceives its own stomach capacity |
Cpercept_body_mass | This type defines how the agent perceives its own body mass it can be important for state-dependency |
Cpercept_energy | This type defines how the agent perceives its own energy reserves it can be important for state-dependency |
Cpercept_age | This type defines how the agent perceives its own age in terms of the model discrete time step |
Cpercept_reprfact | Perception of the reproductive factor, reproductive factor depends on the sex hormones differently in males and females |
Cpercept_light | Perception of the ambient illumination. This is a very simple perception component, singular and static |
Cpercept_depth | Perception of the current depth horizon |
Cmemory_perceptual | Individual perception memory(history) stack, a memory component that saves perception values at previous time steps of the model. Not whole perception objects are saved for simplicity, only the most important parameters, integer and real types so commondata::add_to_history() can be used in unmodified form. Decision making can make use of this memory stack |
Cperception | The perception architecture of the agent. See "The perception mechanism" for a general overview. At this level, lower order perception objects are combined into the the_neurobio::perception class hierarchy level of the agent. The object bound functions see_ and feel_ obtain (set) the specific perception objects from the external or internal environments of the agent and put them into the the_neurobio::perception data structure. Also, memory component is updated with the perception data. Perception objects can then be used as input into the individual decision-making procedures |
Cpercept_components_motiv | Perceptual components of motivational states. Plugged into all STATE_ , attention etc. These components are linked to specific inner or outer perception objects (stimuli). Their sum result(s) in the overall value of the motivation component |
Cstate_motivation_base | These types describe the neurobiological states of the agent. (1) Each state may have several components that are related to specific inner or outer perception objects (stimuli). (2) There is also a motivation component that describes the global motivation value for this state |
Cmotivation_init_root | Abstract interface for the deferred init function clean_init that has to be overridden by each object that extends the basic motivational state type |
Cstate_hunger | The motivational state of hunger. Evokes food seeking, eating, higher activity, emigrating and habitat switching |
Cstate_fear_defence | The state of fear state. Evokes active escape, fleeing, emigration and habitat switch |
Cstate_reproduce | The state of reproduction. Evokes seeking conspecifics and mating during the reproductive phase |
Cmotivation | Motivation is a collection of all internal motivational states of the agent. This type is also used in defining Expectancies of motivations |
Cmemory_emotional | Individual motivation/emotion memory stack, a memory component that saves the values of the final motivations at previous time steps of the model. Not whole state (STATE_ ) objects are saved for simplicity. add_to_history is used in unmodified form. Decision making can make use of this emotional memory stack |
Cappraisal | The appraisal level. At this level, perception objects are feed into the commondata::gamma2gene() sigmoid function and the neuronal responses are obtained at the output. Neuronal responses for different perception objects are then summed up and the promary motivation values are obtained. Following this, modulation alters some of the primary motivation values resulting in the final motivation values. See "From perception to GOS" for an overview |
Cgos_global | Global organismic state (GOS) level. GOS is defined by the dominant motivational state component (STATE_ ), namely, by the logical flag %dominant_state. If this logical flag is TRUE for a particular motivational state component, this state is the GOS. Thus, there should be is no separate data component(s) e.g. "value" for GOS. The values the_neurobio::gos_global::gos_main and the_neurobio::gos_global::gos_arousal can be inferred from the motivations, here are doubled mainly for convenience. See "From perception to GOS" for an overview |
►Nthe_population | Define the population of agents object, its properties and functions |
Cmember_population | Definition of individual member of a population |
Cpopulation | Definition of the population object |