The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
the_neurobio::percept_food Type Reference

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. More...

Collaboration diagram for the_neurobio::percept_food:

Public Member Functions

procedure, public init => percept_food_create_init
 Initiate an empty food perception object with known number of components. See the_neurobio::percept_food_create_init(). More...
 
procedure, public number => percept_food_number_seen
 
procedure, public make => percept_food_make_fill_arrays
 Set the total number of food items perceived (seen) in the food perception object. Do not reallocate the perception object components with respect to this new number yet. See the_neurobio::percept_food_make_fill_arrays(). More...
 
procedure, public get_count => percept_food_get_count_found
 Get the number (count) of food items seen. See the_neurobio::percept_food_get_count_found(). More...
 
procedure, public get_meansize => percept_food_get_meansize_found
 Get the average size of food items seen. See the_neurobio::percept_food_get_meansize_found(). More...
 
procedure, public get_meanmass => percept_food_get_meanmass_found
 Get the average mass of food items seen. See the_neurobio::percept_food_get_meanmass_found(). More...
 
procedure, public get_meandist => percept_food_get_meandist_found
 Get the average distance tot the food items seen. See the_neurobio::percept_food_get_meandist_found(). More...
 
procedure, public destroy => percept_food_destroy_deallocate
 Deallocate and delete a food perception object. See the_neurobio::percept_food_destroy_deallocate(). More...
 

Public Attributes

type(food_item), dimension(:), allocatable foods_seen
 An array of food items found within the visual range, limited by the maximum order of partial indexing commondata::food_select_items_index_partial. More...
 
real(srp), dimension(:), allocatable foods_distances
 An array of distances towards each of the food items. More...
 
integer food_seen_count
 Total number of food items within the visual range of the agent. must not exceed the commondata::food_select_items_index_partial parameter. More...
 

Detailed Description

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.

Definition at line 46 of file m_neuro.f90.

Member Function/Subroutine Documentation

◆ init()

procedure, public the_neurobio::percept_food::init

Initiate an empty food perception object with known number of components. See the_neurobio::percept_food_create_init().

Definition at line 87 of file m_neuro.f90.

◆ number()

procedure, public the_neurobio::percept_food::number

Definition at line 89 of file m_neuro.f90.

◆ make()

procedure, public the_neurobio::percept_food::make

Set the total number of food items perceived (seen) in the food perception object. Do not reallocate the perception object components with respect to this new number yet. See the_neurobio::percept_food_make_fill_arrays().

Definition at line 94 of file m_neuro.f90.

◆ get_count()

procedure, public the_neurobio::percept_food::get_count

Get the number (count) of food items seen. See the_neurobio::percept_food_get_count_found().

Definition at line 97 of file m_neuro.f90.

◆ get_meansize()

procedure, public the_neurobio::percept_food::get_meansize

Get the average size of food items seen. See the_neurobio::percept_food_get_meansize_found().

Definition at line 100 of file m_neuro.f90.

◆ get_meanmass()

procedure, public the_neurobio::percept_food::get_meanmass

Get the average mass of food items seen. See the_neurobio::percept_food_get_meanmass_found().

Definition at line 103 of file m_neuro.f90.

◆ get_meandist()

procedure, public the_neurobio::percept_food::get_meandist

Get the average distance tot the food items seen. See the_neurobio::percept_food_get_meandist_found().

Definition at line 106 of file m_neuro.f90.

◆ destroy()

procedure, public the_neurobio::percept_food::destroy

Deallocate and delete a food perception object. See the_neurobio::percept_food_destroy_deallocate().

Definition at line 109 of file m_neuro.f90.

Member Data Documentation

◆ foods_seen

type(food_item), dimension(:), allocatable the_neurobio::percept_food::foods_seen

An array of food items found within the visual range, limited by the maximum order of partial indexing commondata::food_select_items_index_partial.

Note
Food perception is quite complex to implement as it requires determining individual food items within the current visual range of the agent. There are, however, potentially thousands (or millions) of food items in the food resource, each of the food items is stochastic (e.g. they have different sizes), so visual range differ for each item and each agent should determine food items in its proximity at numerous time steps of the model. This means repeating huge loops many times for each agent at each time step. This is approached by array segmentation: the perception object is obtained by partial indexing of a very limited number (=commondata::food_select_items_index_partial) of only the nearest food items, the agent's visual range is then determined for each of this nearest neighbouring food items, and finally those food items that individually fall within the visual range are included into the perception object.

Definition at line 77 of file m_neuro.f90.

◆ foods_distances

real(srp), dimension(:), allocatable the_neurobio::percept_food::foods_distances

An array of distances towards each of the food items.

Definition at line 79 of file m_neuro.f90.

◆ food_seen_count

integer the_neurobio::percept_food::food_seen_count

Total number of food items within the visual range of the agent. must not exceed the commondata::food_select_items_index_partial parameter.

Definition at line 83 of file m_neuro.f90.


The documentation for this type was generated from the following file: