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

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

Inheritance diagram for the_environment::habitat:
Collaboration diagram for the_environment::habitat:

Public Member Functions

procedure, public make => habitat_make_init
 Make an instance of the habitat object. See the_environment::habitat_make_init() More...
 
procedure, public get_label => habitat_name_get
 Return the name (label) of the habitat. See the_environment::habitat_name_get(). More...
 
procedure, public get_mortality => habitat_get_risk_mortality
 Get the mortality risk associated with this habitat. See the_environment::habitat_get_risk_mortality(). More...
 
procedure, public get_egg_mort => habitat_get_risk_mortality_egg
 Get the egg mortality risk associated with this habitat. See the_environment::habitat_get_risk_mortality_egg(). More...
 
procedure, public save_predators_csv => habitat_save_predators_csv
 Save the predators with their characteristics into a CSV file. See the_environment::habitat_save_predators_csv(). More...
 
- Public Member Functions inherited from the_environment::environment
procedure, public build_vector => environment_whole_build_vector
 Create the highest level container environment. Vector-based. See the_environment::environment_whole_build_vector() More...
 
procedure, public build_object => environment_whole_build_object
 Create the highest level container environment. Object-based. See the_environment::environment_whole_build_object() More...
 
procedure, public build_unlimited => environment_build_unlimited
 Build an unlimited environment, with the spatial coordinates limited by the maximum machine supported values based on the intrinsic huge function. See the_environment::environment_build_unlimited() More...
 
generic, public build => build_vector, build_object, build_unlimited
 Create the highest level container environment. Generic interface. See the_environment::environment_whole_build_vector(), the_environment::environment_whole_build_object() and the_environment::environment_build_unlimited() More...
 
procedure, public shrink2d => environment_shrink_xy_fixed
 Return an environment object that is shrunk by a fixed value in the 2D XxY plane. See the_environment::environment_shrink_xy_fixed(). More...
 
procedure, public lim_min => environment_get_minimum_obj
 Function to get the minimum spatial limits (coordinates) of the environment. See the_environment::environment_get_minimum_obj() More...
 
procedure, public lim_max => environment_get_maximum_obj
 Function to get the maximum spatial limits (coordinates) of the environment. See the_environment::environment_get_maximum_obj() More...
 
procedure, public depth_min => environment_get_minimum_depth
 Get the minimum depth in this environment. See the_environment::environment_get_minimum_depth(). More...
 
procedure, public depth_max => environment_get_maximum_depth
 Get the maximum depth in this environment. See the_environment::environment_get_maximum_depth(). More...
 
procedure, public is_within => environment_check_located_within_3d
 Check if a spatial object is actually within this environment. See the_environment::environment_check_located_within_3d() More...
 
procedure, public corners2d => environment_get_corners_2dxy
 Get the corners of the environment in the 2D X Y plane. See the_environment::environment_get_corners_2dxy(). More...
 
procedure, public nearest_target => environment_get_nearest_point_in_outside_obj
 Get the spatial point position within this environment that is nearest to an arbitrary spatial object located outside of the this environment. If the spatial object is actually located in this environment,return its own spatial position. See the_environment::environment_get_nearest_point_in_outside_obj(). More...
 
procedure, public centre => environment_centre_coordinates_3d
 Determine the centroid of the environment. See the_environment::environment_centre_coordinates_3d() More...
 
procedure, public uniform_s => environment_random_uniform_spatial_3d
 Generate a random spatial object with the uniform distribution within (i.e. bound to) this environment. See the_environment::environment_random_uniform_spatial_3d() More...
 
procedure, public uniform2_s => environment_random_uniform_spatial_2d
 Generate a random spatial object with the uniform distribution within (i.e. bound to) this environment, the third depth coordinate is fixed. See the_environment::environment_random_uniform_spatial_2d() More...
 
procedure, public uniform_v =>environment_random_uniform_spatial_vec_3d
 Generate a vector of random spatial objects with the uniform distribution within (i.e. bound to) this environment. Full 3D procedure. See the_environment::environment_random_uniform_spatial_vec_3d() More...
 
procedure, public uniform2_v =>environment_random_uniform_spatial_vec_2d
 Generate a vector of random spatial objects with the uniform distribution within (i.e. bound to) this environment. The third, depth coordinate is non-stochastic, and provided as an array parameter. See the_environment::environment_random_uniform_spatial_vec_2d() More...
 
generic, public uniform => uniform_s, uniform2_s, uniform_v, uniform2_v
 Generate a vector of random spatial objects with the uniform distribution within (i.e. bound to) this environment. Generic interface. More...
 
procedure, public gaussian3d => environment_random_gaussian_spatial_3d
 Generates a vector of random spatial object with Gaussian coordinates within (i.e. bound to) this environment. Full 3D procedure. See the_environment::environment_random_gaussian_spatial_3d() More...
 
procedure, public gaussian2d => environment_random_gaussian_spatial_2d
 Generates a vector of random spatial object with Gaussian coordinates within (i.e. bound to) this environment. The depth coordinate is set separately and can be non-random (fixed for the whole output array) or Gaussian with separate variance. See the_environment::environment_random_gaussian_spatial_2d() More...
 

Public Attributes

character(len=label_length) habitat_name
 The name of the habitat. More...
 
real(srp) risk_mortality
 Other agent mortality risks. More...
 
real(srp) risk_egg_mortality
 Egg mortality risk. More...
 
integer predators_number
 Number of predators that dwell in the habitat. More...
 
type(predator), dimension(:), allocatable predators
 Habitat has an array of predators (i.e. PREDATOR objects). More...
 
type(food_resourcefood
 Habitat has a food resource (i.e. FOOD_RESOURCEobject) which is an array ofFOOD_ITEMs. @note A container objectFOOD_RESOURCE`is used for the food resource rather than just raw number of food items and array of food items (as done with predation) to allow implementation of several different food resources more easily. More...
 
- Public Attributes inherited from the_environment::environment
type(spatialcoord_min
 Set shape and limits of the whole environment, by default a rectangle with Cartesian coordinates based on ENVIRONMENT_WHOLE_SIZE. The minimum and maximum coordinates are set through the SPATIAL object. More...
 
type(spatialcoord_max
 

Detailed Description

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.

Definition at line 555 of file m_env.f90.

Member Function/Subroutine Documentation

◆ make()

procedure, public the_environment::habitat::make

Make an instance of the habitat object. See the_environment::habitat_make_init()

Definition at line 587 of file m_env.f90.

◆ get_label()

procedure, public the_environment::habitat::get_label

Return the name (label) of the habitat. See the_environment::habitat_name_get().

Definition at line 590 of file m_env.f90.

◆ get_mortality()

procedure, public the_environment::habitat::get_mortality

Get the mortality risk associated with this habitat. See the_environment::habitat_get_risk_mortality().

Definition at line 593 of file m_env.f90.

◆ get_egg_mort()

procedure, public the_environment::habitat::get_egg_mort

Get the egg mortality risk associated with this habitat. See the_environment::habitat_get_risk_mortality_egg().

Definition at line 596 of file m_env.f90.

◆ save_predators_csv()

procedure, public the_environment::habitat::save_predators_csv

Save the predators with their characteristics into a CSV file. See the_environment::habitat_save_predators_csv().

Definition at line 599 of file m_env.f90.

Member Data Documentation

◆ habitat_name

character (len=label_length) the_environment::habitat::habitat_name

The name of the habitat.

Definition at line 557 of file m_env.f90.

◆ risk_mortality

real(srp) the_environment::habitat::risk_mortality

Other agent mortality risks.

Definition at line 559 of file m_env.f90.

◆ risk_egg_mortality

real(srp) the_environment::habitat::risk_egg_mortality

Egg mortality risk.

Definition at line 561 of file m_env.f90.

◆ predators_number

integer the_environment::habitat::predators_number

Number of predators that dwell in the habitat.

Definition at line 564 of file m_env.f90.

◆ predators

type(predator), dimension(:), allocatable the_environment::habitat::predators

Habitat has an array of predators (i.e. PREDATOR objects).

Note
The implementation of predators is very simplistic here, just a single type of predators integrated into the HABITAT object, without a separate predator container. This is, for example, different from the food resources made as a FOOD_RESOURCE container (below) that allows several types of food. A more advanced version should implement a specific container like FOOD_RESOURCE and, ultimately, a full implementation of an AHA predator (with the genome, neurobiology etc.). Do we need several types of predators or predation bound functions?

Definition at line 575 of file m_env.f90.

◆ food

type(food_resource) the_environment::habitat::food

Habitat has a food resource (i.e. FOOD_RESOURCEobject) which is an array ofFOOD_ITEMs. @note A container objectFOOD_RESOURCE`is used for the food resource rather than just raw number of food items and array of food items (as done with predation) to allow implementation of several different food resources more easily.

Definition at line 583 of file m_env.f90.


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