The AHA Model  Revision: 12809
Reference implementation 04 (HEDG02_04)
the_environment::food_resource Type Reference

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

Collaboration diagram for the_environment::food_resource:

Public Member Functions

procedure, public make => food_resource_make
 Make food resource object. This class standard constructor. See the_environment::food_resource_make() More...
 
procedure, public replenish => food_resource_replenish_food_items_all
 Replenish and restore food resource: the food resource is restored to its initial state as set by the_environment::food_resource::make() or to a smaller abundance. See the_environment::food_resource_replenish_food_items_all() More...
 
procedure, public destroy => food_resource_destroy_deallocate
 Delete and deallocate food resource object. This class destructor. See the_environment::food_resource_destroy_deallocate() More...
 
procedure, public sort => food_resource_sort_by_size
 Sort the food resource objects within the array by their sizes. The two subroutines below are a variant of the recursive quick-sort algorithm adapted for sorting real components of the the FOOD_RESOURCE object. See the_environment::food_resource_sort_by_size() More...
 
procedure, public reindex => food_resource_reset_iid_all
 Reset individual iid for the food resource. Individual iids must normally coincide with the array order index. If it is changed after sorting, iids no longer reflect the correct index. So this subroutine resets iids to be coinciding with each food item index. See the_environment::food_resource_reset_iid_all() More...
 
procedure, public get_label => food_resource_get_label
 Get the label of the this food resource. See the_environment::food_resource_get_label(). More...
 
procedure, public abundance => food_resource_get_abundance
 Get the number of food items in the food resource. See the_environment::food_resource_get_abundance(). More...
 
procedure, public location => food_resource_locate_3d
 Get the location object array (array of the_environment::spatial objects) of a food resource object. See the_environment::food_resource_locate_3d() More...
 
procedure, public distance_average => food_resource_calc_average_distance_items
 Calculate the average distance between food items within a resource. See the_environment::food_resource_calc_average_distance_items() More...
 
procedure, public join => food_resources_collapse
 Collapse several food resources into one. The collapsed resource can then go into the perception system. The properties of the component resources are retained in the collapsed resource. See the_environment::food_resources_collapse() More...
 
procedure, public unjoin => food_resources_update_back
 Transfer back the resulting food resources into their original objects out from a collapsed object from food_resources_collapse. See the_environment::food_resources_update_back() More...
 
procedure, public migrate_vertical => food_resource_migrate_move_items
 Implement vertical migration of all the food items in the resource in a sinusoidal pattern. See the_environment::food_resource_migrate_move_items(). More...
 
procedure, public rwalk => food_resource_rwalk_items_default
 Perform a random walk step for all food items within the food resource with default parameters. See the_environment::food_resource_rwalk_items_default(). More...
 
procedure, public save_csv => food_resource_save_foods_csv
 Save characteristics of food items in the resource into a CSV file. See the_environment::food_resource_save_foods_csv(). More...
 

Public Attributes

character(len=label_length) food_label
 Food resource type label. More...
 
integer number_food_items
 Availability of this kind of food, number of food objects that are provided into the environment. More...
 
type(food_item), dimension(:), allocatable food
 Food resource consists of an array of FOOD_ITEM's. More...
 

Detailed Description

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.

Definition at line 434 of file m_env.f90.

Member Function/Subroutine Documentation

◆ make()

procedure, public the_environment::food_resource::make

Make food resource object. This class standard constructor. See the_environment::food_resource_make()

Definition at line 445 of file m_env.f90.

◆ replenish()

procedure, public the_environment::food_resource::replenish

Replenish and restore food resource: the food resource is restored to its initial state as set by the_environment::food_resource::make() or to a smaller abundance. See the_environment::food_resource_replenish_food_items_all()

Definition at line 450 of file m_env.f90.

◆ destroy()

procedure, public the_environment::food_resource::destroy

Delete and deallocate food resource object. This class destructor. See the_environment::food_resource_destroy_deallocate()

Definition at line 453 of file m_env.f90.

◆ sort()

procedure, public the_environment::food_resource::sort

Sort the food resource objects within the array by their sizes. The two subroutines below are a variant of the recursive quick-sort algorithm adapted for sorting real components of the the FOOD_RESOURCE object. See the_environment::food_resource_sort_by_size()

Definition at line 459 of file m_env.f90.

◆ reindex()

procedure, public the_environment::food_resource::reindex

Reset individual iid for the food resource. Individual iids must normally coincide with the array order index. If it is changed after sorting, iids no longer reflect the correct index. So this subroutine resets iids to be coinciding with each food item index. See the_environment::food_resource_reset_iid_all()

Definition at line 465 of file m_env.f90.

◆ get_label()

procedure, public the_environment::food_resource::get_label

Get the label of the this food resource. See the_environment::food_resource_get_label().

Definition at line 468 of file m_env.f90.

◆ abundance()

procedure, public the_environment::food_resource::abundance

Get the number of food items in the food resource. See the_environment::food_resource_get_abundance().

Definition at line 471 of file m_env.f90.

◆ location()

procedure, public the_environment::food_resource::location

Get the location object array (array of the_environment::spatial objects) of a food resource object. See the_environment::food_resource_locate_3d()

Definition at line 475 of file m_env.f90.

◆ distance_average()

procedure, public the_environment::food_resource::distance_average

Calculate the average distance between food items within a resource. See the_environment::food_resource_calc_average_distance_items()

Definition at line 478 of file m_env.f90.

◆ join()

procedure, public the_environment::food_resource::join

Collapse several food resources into one. The collapsed resource can then go into the perception system. The properties of the component resources are retained in the collapsed resource. See the_environment::food_resources_collapse()

Definition at line 484 of file m_env.f90.

◆ unjoin()

procedure, public the_environment::food_resource::unjoin

Transfer back the resulting food resources into their original objects out from a collapsed object from food_resources_collapse. See the_environment::food_resources_update_back()

Definition at line 488 of file m_env.f90.

◆ migrate_vertical()

procedure, public the_environment::food_resource::migrate_vertical

Implement vertical migration of all the food items in the resource in a sinusoidal pattern. See the_environment::food_resource_migrate_move_items().

Definition at line 492 of file m_env.f90.

◆ rwalk()

procedure, public the_environment::food_resource::rwalk

Perform a random walk step for all food items within the food resource with default parameters. See the_environment::food_resource_rwalk_items_default().

Definition at line 496 of file m_env.f90.

◆ save_csv()

procedure, public the_environment::food_resource::save_csv

Save characteristics of food items in the resource into a CSV file. See the_environment::food_resource_save_foods_csv().

Definition at line 499 of file m_env.f90.

Member Data Documentation

◆ food_label

character (len=label_length) the_environment::food_resource::food_label

Food resource type label.

Definition at line 436 of file m_env.f90.

◆ number_food_items

integer the_environment::food_resource::number_food_items

Availability of this kind of food, number of food objects that are provided into the environment.

Definition at line 439 of file m_env.f90.

◆ food

type(food_item), dimension(:), allocatable the_environment::food_resource::food

Food resource consists of an array of FOOD_ITEM's.

Definition at line 441 of file m_env.f90.


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