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

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

Inheritance diagram for the_environment::food_item:
Collaboration diagram for the_environment::food_item:

Public Member Functions

procedure, public create => food_item_create
 Create a single food item at an undefined position with default size. See the_environment::food_item_create() More...
 
procedure, public make => food_item_make
 Make a single food item, i.e. place it into a specific position in the model environment space and set the size. See the_environment::food_item_make() More...
 
procedure, public capture_success => food_item_capture_success_stochast
 Stochastic outcome of this food item capture by an agent. Returns TRUE if the food item is captured. See the_environment::food_item_capture_success_stochast() More...
 
procedure, public capture_probability => food_item_capture_probability_calc
 Calculate the probability of capture of this food item by a predator agent depending on the distance between the agent and this food item. See the_environment::food_item_capture_probability_calc() More...
 
procedure, public visibility => food_item_visibility_visual_range
 Calculate the visibility range of this food item. Wrapper to the visual_range function. This function calculates the distance from which this food item can be seen by a predator (i.e. the default predator's visual range). See the_environment::food_item_visibility_visual_range() More...
 
procedure, public disappear => food_item_disappear
 Make the food item "disappear" and take the "eaten" state, i.e. impossible for consumption by the agents. See the_environment::food_item_disappear() More...
 
procedure, public is_unavailable => food_item_is_eaten_unavailable
 Logical check-indicator function for the food item being eaten and not available. See the_environment::food_item_is_eaten_unavailable() More...
 
procedure, public is_available => food_item_is_available
 Logical check-indicator function for the food item being available. More...
 
procedure, public get_size => food_item_get_size
 Get the size component of the food item object. See the_environment::food_item_get_size() More...
 
procedure, public get_mass => food_item_get_mass
 Calculate and get the mass of the food item. See the_environment::food_item_get_mass() More...
 
procedure, public get_iid => food_item_get_iid
 Get the unique id of the food item object. See the_environment::food_item_get_iid() More...
 
procedure, public set_iid => food_item_set_iid
 Set unique id for the food item object. See the_environment::food_item_set_iid() More...
 
procedure, public clone => food_item_clone_assign
 Clone the properties of this food item to another food item. See the_environment::food_item_clone_assign() More...
 
- Public Member Functions inherited from the_environment::spatial_moving
procedure, public create => spatial_moving_create_3d
 Create a new spatial moving object. Initially it has no position, all coordinate values are commondata::missing or commondata::invalid for real type coordinates. See the_environment::spatial_moving_create_3d() More...
 
procedure, public position => spatial_moving_fix_position_3d_o
 Place spatial movable object into a 3D space, define the object's current coordinates, but first save previous coordinates. Object-based. See the_environment::spatial_moving_fix_position_3d_o() More...
 
procedure, public repeat_position => spatial_moving_repeat_position_history_3d
 Repeat/re-save the current position into the positional history stack. See the_environment::spatial_moving_repeat_position_history_3d(). More...
 
procedure, public position_v => spatial_moving_fix_position_3d_v
 Place spatial movable object into a 3D space, define the object's current coordinates, but first save previous coordinates. Vector-based. See the_environment::spatial_moving_fix_position_3d_v() More...
 
procedure, public spatial_history_clean => spatial_moving_clean_hstory_3d
 Create a new empty history of positions for spatial moving object. Assign all values to the commondata::missing value code. See the_environment::spatial_moving_clean_hstory_3d() More...
 
procedure, public way => spatial_moving_self_distance_3d
 Calculate the Euclidean distance between the current and previous position of a single spatial movable object. Optionally, it also calculates the total distance traversed during the from_history points from the history stack along with the distance from the current position and the last historical value. See the_environment::spatial_moving_self_distance_3d(). More...
 
procedure, public go_up => spatial_moving_go_up
 The spatial moving object ascends, goes up the depth with specific fixed step size. See the_environment::spatial_moving_go_up(). More...
 
procedure, public go_down => spatial_moving_go_down
 The spatial moving object decends, goes down the depth with specific fixed step size. See the_environment::spatial_moving_go_down(). More...
 
procedure, public rwalk3d => spatial_moving_randomwalk_gaussian_step_3d
 Implements an optionally environment-restricted Gaussian random walk in 3D. See the_environment::spatial_moving_randomwalk_gaussian_step_3d(). More...
 
procedure, public rwalk25d =>spatial_moving_randomwalk_gaussian_step_25d
 Implements an optionally environment-restricted Gaussian random walk in a "2.5 dimensions", i.e. 2D x y with separate walk parameters for the third depth dimension. See the_environment::spatial_moving_randomwalk_gaussian_step_25d(). More...
 
generic, public rwalk => rwalk3d, rwalk25d
 Implements an optionally environment-restricted Gaussian random walk. Generic interface for 3D and 3.5D moves. See the_environment::spatial_moving_randomwalk_gaussian_step_3d() and the_environment::spatial_moving_randomwalk_gaussian_step_25d(). More...
 
procedure, public corwalk3d => spatial_moving_corwalk_gaussian_step_3d
 Implements an optionally environment-restricted correlated directional Gaussian random walk in 3D towards (or away of) an the_environment::spatial class target object. See the_environment::spatial_moving_corwalk_gaussian_step_3d(). More...
 
procedure, public corwalk25d =>spatial_moving_corwalk_gaussian_step_25d
 Implements an optionally environment-restricted correlated directional Gaussian random walk in 3D towards (or away of) an the_environment::spatial class target object. See the_environment::spatial_moving_corwalk_gaussian_step_25d(). More...
 
generic, public corwalk => corwalk3d, corwalk25d
 Implements an optionally environment-restricted correlated directional Gaussian random walk. corwalk is a generic interface for 3D and "2.5"D moves. For details see the 3d version and a version with separate X,Y and depth random parameters. More...
 
procedure, public dirwalk3d => spatial_moving_dirwalk_gaussian_step_3d
 Implements an optionally environment-restricted directional Gaussian random walk in 3D towards a target the_environment::spatial object. See the_environment::spatial_moving_dirwalk_gaussian_step_3d() More...
 
procedure, public dirwalk25d =>spatial_moving_dirwalk_gaussian_step_25d
 Implements an optionally environment-restricted directional Gaussian random walk in "2.5"D towards a target object. i.e. 2D x y with separate walk parameters for the third depth dimension. See the_environment::spatial_moving_dirwalk_gaussian_step_25d() More...
 
generic, public dirwalk => dirwalk3d, dirwalk25d
 Implements an optionally environment-restricted directional Gaussian random walk. Generic interface for 3D and "2.5"D moves. More...
 
- Public Member Functions inherited from the_environment::spatial
procedure, public create => spatial_create_empty
 Create an empty spatial object. More...
 
procedure, public position => spatial_fix_position_3d_o
 Place spatial object into a 3D space, define the object's current coordinates. Object-based procedure. See the_environment::spatial_fix_position_3d_o() More...
 
procedure, public position_v => spatial_fix_position_3d_s
 Place spatial object into a 3D space, define the object's current coordinates. Vector-based procedure. See the_environment::spatial_fix_position_3d_s() More...
 
procedure, public missing => spatial_make_missing
 Assign all MISSING coordinates to the SPATIAL object. See the_environment::spatial_make_missing() More...
 
procedure, public distance => spatial_distance_3d
 Calculate the Euclidean distance between two spatial objects. See the_environment::spatial_distance_3d() More...
 
procedure, public distance_segment2d => geo_poly2d_dist_point_to_section
 Calculates the minimum distance from a the_environment::spatial class object to a line segment delimited by two the_environment::spatial endpoints in the 2D XY plane (the depth coordinate is ignored). See the_environment::geo_poly2d_dist_point_to_section(). More...
 
procedure, public distance_segment => geo_poly3d_dist_point_to_section
 Calculates the minimum distance from a the_environment::spatial class object to a line segment delimited by two the_environment::spatial class endpoints in the 3D XY space. See the_environment::geo_poly3d_dist_point_to_section(). More...
 
procedure, public way => spatial_self_distance_3d
 Calculate the Euclidean distance between the current and previous position of a single spatial object. See the_environment::spatial_self_distance_3d() More...
 
procedure, public is_within => spatial_check_located_within_3d
 Function to check if this spatial object is located within an area set by an environmental object See the_environment::spatial_check_located_within_3d() More...
 
procedure, public find_environment => spatial_get_environment_in_pos
 Identify in which environment from the input list this spatial agent is currently in. See the_environment::spatial_get_environment_in_pos(). More...
 
procedure, public is_below => spatial_check_located_below
 Logical function to check if the argument spatial object(s) is(are) located below this spatial object. See the_environment::spatial_check_located_below() More...
 
procedure, public is_above => spatial_check_located_above
 Logical function to check if the argument spatial object(s) is(are) located above this spatial object. See the_environment::spatial_check_located_above() More...
 
procedure, public nearest => spatial_get_nearest_object
 Determine the nearest spatial object to this spatial object among an array of other spatial objects. See the_environment::spatial_get_nearest_object() More...
 
procedure, public nearest_num => spatial_get_nearest_id
 Determine the nearest spatial object to this spatial object among an array of other spatial objects. See the_environment::spatial_get_nearest_id() More...
 
procedure, public neighbours => spatial_neighbours_distances
 Calculate the distances between this spatial object and an array of its neighbours. Optionally output the distances, sorting index vector and rankings vector for each of these neighbours. Optionally do only partial indexing, up to the order rank_max for computational speed. See the_environment::spatial_neighbours_distances() More...
 
procedure, public now_o => spatial_get_current_pos_3d_o
 Get the current spatial position of a SPATIAL object. Object-based. See the_environment::spatial_get_current_pos_3d_o() More...
 
procedure, public now_v => spatial_get_current_pos_3d_v
 Get the current spatial position of a SPATIAL object. Vector-based. See the_environment::spatial_get_current_pos_3d_v() More...
 
generic, public location => now_o, now_v
 Get the current spatial position of a SPATIAL object. Generic interface/alias. More...
 
generic, public now => now_o, now_v
 Get the current spatial position of a SPATIAL object. Generic interface/alias. More...
 
procedure, public xpos => spatial_get_current_pos_x_3d
 Get the current X position of a SPATIAL object. See the_environment::spatial_get_current_pos_x_3d() More...
 
procedure, public ypos => spatial_get_current_pos_y_3d
 Get the current Y position of a SPATIAL object. See the_environment::spatial_get_current_pos_y_3d() More...
 
procedure, public dpos => spatial_get_current_pos_d_3d
 Get the current Z (depth) position of a SPATIAL object. See the_environment::spatial_get_current_pos_d_3d() More...
 
procedure, public illumination => spatial_calc_irradiance_at_depth
 Calculate the illumination (background irradiance) at the depth of the spatial object at an arbitrary time step of the model. See the_environment::spatial_calc_irradiance_at_depth() More...
 
procedure, public visibility => spatial_visibility_visual_range_cm
 Calculate the visibility range of a spatial object. Wrapper to the visual_range function. This function calculates the distance from which this object can be seen by a visual object (e.g. predator or prey). See the_environment::spatial_visibility_visual_range_cm(). More...
 

Public Attributes

real(srp) size
 Food item has a size (radius) that determines its visibility and nutritional value for the predatory agent. More...
 
logical eaten
 Food item can be present or absent (eaten by the agent, =.TRUE.). More...
 
integer food_iid
 Unique ID of this food item. Needed in the resource array. More...
 
- Public Attributes inherited from the_environment::spatial_moving
type(spatial), dimension(history_size_spatial) history
 We define prior historical values of the SPATIAL positions. More...
 
- Public Attributes inherited from the_environment::spatial
real(srp) x
 We define three-dimensional environment: x, y and depth. More...
 
real(srp) y
 
real(srp) depth
 

Detailed Description

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.

Definition at line 371 of file m_env.f90.

Member Function/Subroutine Documentation

◆ create()

procedure, public the_environment::food_item::create

Create a single food item at an undefined position with default size. See the_environment::food_item_create()

Definition at line 382 of file m_env.f90.

◆ make()

procedure, public the_environment::food_item::make

Make a single food item, i.e. place it into a specific position in the model environment space and set the size. See the_environment::food_item_make()

Definition at line 386 of file m_env.f90.

◆ capture_success()

procedure, public the_environment::food_item::capture_success

Stochastic outcome of this food item capture by an agent. Returns TRUE if the food item is captured. See the_environment::food_item_capture_success_stochast()

Definition at line 390 of file m_env.f90.

◆ capture_probability()

procedure, public the_environment::food_item::capture_probability

Calculate the probability of capture of this food item by a predator agent depending on the distance between the agent and this food item. See the_environment::food_item_capture_probability_calc()

Definition at line 394 of file m_env.f90.

◆ visibility()

procedure, public the_environment::food_item::visibility

Calculate the visibility range of this food item. Wrapper to the visual_range function. This function calculates the distance from which this food item can be seen by a predator (i.e. the default predator's visual range). See the_environment::food_item_visibility_visual_range()

Definition at line 400 of file m_env.f90.

◆ disappear()

procedure, public the_environment::food_item::disappear

Make the food item "disappear" and take the "eaten" state, i.e. impossible for consumption by the agents. See the_environment::food_item_disappear()

Definition at line 404 of file m_env.f90.

◆ is_unavailable()

procedure, public the_environment::food_item::is_unavailable

Logical check-indicator function for the food item being eaten and not available. See the_environment::food_item_is_eaten_unavailable()

Definition at line 408 of file m_env.f90.

◆ is_available()

procedure, public the_environment::food_item::is_available

Logical check-indicator function for the food item being available.

Returns
Logical indicator TRUE if the food item is present in the environment and therefore available. See the_environment::food_item_is_available()

Definition at line 413 of file m_env.f90.

◆ get_size()

procedure, public the_environment::food_item::get_size

Get the size component of the food item object. See the_environment::food_item_get_size()

Definition at line 416 of file m_env.f90.

◆ get_mass()

procedure, public the_environment::food_item::get_mass

Calculate and get the mass of the food item. See the_environment::food_item_get_mass()

Definition at line 419 of file m_env.f90.

◆ get_iid()

procedure, public the_environment::food_item::get_iid

Get the unique id of the food item object. See the_environment::food_item_get_iid()

Definition at line 422 of file m_env.f90.

◆ set_iid()

procedure, public the_environment::food_item::set_iid

Set unique id for the food item object. See the_environment::food_item_set_iid()

Definition at line 425 of file m_env.f90.

◆ clone()

procedure, public the_environment::food_item::clone

Clone the properties of this food item to another food item. See the_environment::food_item_clone_assign()

Definition at line 428 of file m_env.f90.

Member Data Documentation

◆ size

real(srp) the_environment::food_item::size

Food item has a size (radius) that determines its visibility and nutritional value for the predatory agent.

Definition at line 374 of file m_env.f90.

◆ eaten

logical the_environment::food_item::eaten

Food item can be present or absent (eaten by the agent, =.TRUE.).

Definition at line 376 of file m_env.f90.

◆ food_iid

integer the_environment::food_item::food_iid

Unique ID of this food item. Needed in the resource array.

Definition at line 378 of file m_env.f90.


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