The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
Class Hierarchy

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12345678910111213]
 Ccommondata::add_to_historySimple 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]
 Cthe_environment::assembleInterface 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
 Ccommondata::averageCalculate an average of an array excluding missing code values
 Cthe_behaviour::behaviour_baseRoot 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
 Cthe_behaviour::debug_baseThis 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)
 Cthe_behaviour::eat_foodEat food is consuming food item(s) perceived
 Cthe_behaviour::moveMovement is an umbrella abstract type linked with spatial movement
 Cthe_behaviour::approachApproach an arbitrary spatial object is a directed movement to an arbitrary the_environment::spatial class target object
 Cthe_behaviour::approach_conspecApproach conspecifics is directed movement towards a conspecific
 Cthe_behaviour::escape_dartEscape dart is a very fast long distance movement, normally in response to a direct predation threat
 Cthe_behaviour::freezeFreeze is stop any locomotion completely
 Cthe_behaviour::go_down_depthGo down dive deeper
 Cthe_behaviour::go_up_depthGo up raise to a smaller depth. TODO: abstract type linking both Up and Down
 Cthe_behaviour::migrateMigrate is move quickly directing to the other habitat
 Cthe_behaviour::walk_randomWalk_random is a single step of a Gaussian random walk
 Cthe_behaviour::reproduceReproduce is do a single reproduction
 Cthe_behaviour::behaviour_init_rootAbstract interface for the deferred init function that has to be overriden by each object that extends the basic behavioural component class
 Cthe_genome::chromosomeThis 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
 Ccommondata::cm2mConvert cm to m
 Cthe_environment::disassembleInterface 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
 Cthe_environment::distInternal distance calculation backend engine
 Cthe_environment::environmentDefinition 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
 Cthe_environment::habitatDefinition 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
 Cfile_io::file_handleFILE_HANDLE is the basic file handle object. It provides an unitary object oriented interface for operations with any supported file types
 Ccommondata::float_equalCheck 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:
 Cthe_environment::food_resourceDefinition 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
 Ccommondata::gamma2geneSigmoidal 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
 Cthe_genome::geneThis describes an individual gene object. See the genome structure for as general description and gene for details
 Ccommondata::gene2gamma
 Ccommondata::is_maxvalCheck if a value is the maximum value of an array
 Ccommondata::is_minvalCheck if a value is the minimum value of an array
 Ccommondata::is_near_zeroChecks if a real number is near 0.0. Thus function can be used for comparing two real values like this:
 Ccommondata::is_withinLogical function to check if a value is within a specific range, lower <= X <= upper
 Cthe_environment::joinAn 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
 Cthe_environment::light_depthCalculate underwater background irradiance at specific depth
 Cthe_environment::light_surfaceCalculate 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
 Ccommondata::m2cmConvert m to cm
 Cthe_neurobio::memory_emotionalIndividual 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
 Cthe_neurobio::memory_perceptualIndividual 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
 Ccommondata::mm2mConvert mm to m
 Cthe_neurobio::motivationMotivation is a collection of all internal motivational states of the agent. This type is also used in defining Expectancies of motivations
 Cthe_neurobio::motivation_init_rootAbstract interface for the deferred init function clean_init that has to be overridden by each object that extends the basic motivational state type
 Cthe_behaviour::move_init_rootAbstract interface for the deferred init function that has to be overriden by each object that extends the basic behavioural component class
 Cthe_environment::operator(-)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:
 Cthe_environment::operator(.above.)Interface operators .above. for spatial objects. Usage:
 Ccommondata::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
 Cthe_environment::operator(.below.)Interface operators .below. for spatial objects. Usage:
 Ccommondata::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
 Cthe_environment::operator(.cat.)Interface operator to concatenate two arrays of the spatial the_environment::spatial or spatial moving the_environment::spatial_moving objects
 Cthe_environment::operator(.catloc.)Interface operator to concatenate the location components of two arrays ofthe_environment::spatial class objects
 Cthe_environment::operator(.contains.)Interface operators .contains. for testing whether an environment object (first argument) contains a SPATIAL object (second argument). Usage:
 Ccommondata::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
 Ccommondata::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:
 Ccommondata::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:
 Cthe_environment::operator(.within.)Interface operators .within. for testing whether a spatial object (first argument lies within an environment (second argument). Usage:
 Cthe_neurobio::percept_ageThis type defines how the agent perceives its own age in terms of the model discrete time step
 Cthe_neurobio::percept_body_massThis type defines how the agent perceives its own body mass it can be important for state-dependency
 Cthe_neurobio::percept_components_motivPerceptual 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
 Cthe_neurobio::percept_conspecificsThis type defines how the agent perceives conspecifics
 Cthe_neurobio::percept_depthPerception of the current depth horizon
 Cthe_neurobio::percept_energyThis type defines how the agent perceives its own energy reserves it can be important for state-dependency
 Cthe_neurobio::percept_foodThis 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
 Cthe_neurobio::percept_lightPerception of the ambient illumination. This is a very simple perception component, singular and static
 Cthe_neurobio::percept_predatorThis type defines how the agent perceives a predator
 Cthe_neurobio::percept_reprfactPerception of the reproductive factor, reproductive factor depends on the sex hormones differently in males and females
 Cthe_neurobio::percept_stomachThis type defines how the agent perceives its own stomach capacity
 Cthe_population::populationDefinition of the population object
 Ccommondata::rescaleArbitrary rescales value(s) from one range (A:B) to another (A1:B1)
 Cthe_environment::spatialDefinition 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)
 Cthe_environment::spatial_movingDefinition 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
 Cthe_environment::food_itemDefinition 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
 Cthe_environment::predatorDefinition 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...)
 Cthe_genome::individual_genomeThis 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
 Cthe_hormones::hormonesThis type adds hormonal architecture extending the genome object
 Cthe_body::conditionCONDITION defines the physical condition of the agent
 Cthe_body::reproductionREPRODUCTION type defines parameters of the reproduction system
 Cthe_neurobio::perceptionThe 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
 Cthe_neurobio::appraisalThe 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
 Cthe_neurobio::gos_globalGlobal 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
 Cthe_behaviour::behaviourThe 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
 Cthe_behaviour::architecture_neuroThis type is an "umbrella" for all the lower-level classes
 Cthe_individual::individual_agentThis type describes parameters of the individual agent
 Cthe_population::member_populationDefinition of individual member of a population
 Cthe_neurobio::spatial_percept_componentThis 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
 Cthe_neurobio::conspec_percept_compThis 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)
 Cthe_neurobio::spatialobj_percept_compThis 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
 Cthe_neurobio::state_motivation_baseThese 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
 Cthe_neurobio::state_fear_defenceThe state of fear state. Evokes active escape, fleeing, emigration and habitat switch
 Cthe_neurobio::state_hungerThe motivational state of hunger. Evokes food seeking, eating, higher activity, emigrating and habitat switching
 Cthe_neurobio::state_reproduceThe state of reproduction. Evokes seeking conspecifics and mating during the reproductive phase
 Ccommondata::timer_cpuCPU 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:
 Cthe_environment::unjoinAn 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
 Cthe_environment::visual_rangeCalculate visual range of predator using Dag Aksnes's procedures srgetr(), easyr() and deriv()
 Cthe_environment::visual_range_newCalculate visual range of predator using Dag Aksnes's procedures srgetr(), easyr() and deriv()
 Ccommondata::withinForce a value within the range set by the vmin and vmax dummy parameter values