ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
The covey manager class. More...
#include <Partridge_Covey.h>
Public Member Functions | |
void | SanityCheck1 () |
A debug function. More... | |
void | AddCovey (Partridge_Covey *a_covey) |
Add a new covey. More... | |
bool | DelCovey (Partridge_Covey *a_covey) |
Remove a covey. More... | |
int | CoveyDensity (int x, int y, int radius) |
Unused. More... | |
double | BroodGeoMean () |
Calculate the geometric mean of no of chicks. More... | |
void | Setpar_force_ignore_below (double ff) |
Set the minimum interesting force. More... | |
double | Getpar_force_ignore_below () |
Get the minimum interesting force. More... | |
void | Tick (void) |
Do the covey management for the time-step. More... | |
CoveyManager (unsigned int a_world_width, unsigned int a_world_height, Landscape *a_map) | |
Constructor. More... | |
~CoveyManager (void) | |
Destructor. More... | |
Private Attributes | |
int | m_id_counter |
Counter to keep track of covey ids. More... | |
int | m_world_width |
Landscape width. More... | |
int | m_world_height |
Landscape height. More... | |
int | m_world_width_div2 |
Half landscape width. More... | |
int | m_world_height_div2 |
Half landscape height. More... | |
Landscape * | m_map |
Pointer to the landscape. More... | |
double | m_par_force_ignore_below |
Minimum interesting force. More... | |
The covey manager class.
The covey manaer takes over the role of the Population_Manager for animal models. This is a design fault of historical origin and should be rectified one day with the Partridge_Population_Manager taking over this role.
Definition at line 792 of file Partridge_Covey.h.
CoveyManager::CoveyManager | ( | unsigned int | a_world_width, |
unsigned int | a_world_height, | ||
Landscape * | a_map | ||
) |
Constructor.
Definition at line 2072 of file Partridge_Covey.cpp.
References cfg_par_force_ignore_below, g_msg, g_trig_cos, g_trig_sin, m_map, m_world_height, m_world_height_div2, m_world_width, m_world_width_div2, Setpar_force_ignore_below(), TRIG_TABLE_LENGTH, CfgFloat::value(), MapErrorMsg::Warn(), and WARN_MSG.
CoveyManager::~CoveyManager | ( | void | ) |
Destructor.
Definition at line 2099 of file Partridge_Covey.cpp.
References g_trig_cos, and g_trig_sin.
void CoveyManager::AddCovey | ( | Partridge_Covey * | a_covey | ) |
Add a new covey.
Definition at line 2222 of file Partridge_Covey.cpp.
References g_covey_list.
Referenced by Partridge_Covey::Partridge_Covey().
double CoveyManager::BroodGeoMean | ( | void | ) |
Calculate the geometric mean of no of chicks.
Definition at line 2117 of file Partridge_Covey.cpp.
References g_covey_list.
Referenced by Partridge_Population_Manager::DoFirst().
int CoveyManager::CoveyDensity | ( | int | x, |
int | y, | ||
int | radius | ||
) |
Unused.
Search through the list of coveys and find out how many are within radius of x,y.
Definition at line 2178 of file Partridge_Covey.cpp.
References g_covey_list, m_world_height, m_world_height_div2, m_world_width, and m_world_width_div2.
bool CoveyManager::DelCovey | ( | Partridge_Covey * | a_covey | ) |
Remove a covey.
Definition at line 2230 of file Partridge_Covey.cpp.
References g_covey_list, Partridge_Covey::ID(), and Partridge_Covey::ManagerIsPermanant().
Referenced by Partridge_Covey::RemoveMember(), and Partridge_Covey::~Partridge_Covey().
|
inline |
Get the minimum interesting force.
Definition at line 822 of file Partridge_Covey.h.
References m_par_force_ignore_below.
Referenced by Partridge_Covey::ManagerRethinkPos().
void CoveyManager::SanityCheck1 | ( | void | ) |
A debug function.
Definition at line 2104 of file Partridge_Covey.cpp.
References g_covey_list, g_msg, MapErrorMsg::Warn(), and WARN_MSG.
void CoveyManager::Setpar_force_ignore_below | ( | double | ff | ) |
Set the minimum interesting force.
Definition at line 2113 of file Partridge_Covey.cpp.
References m_par_force_ignore_below.
Referenced by CoveyManager().
void CoveyManager::Tick | ( | void | ) |
Do the covey management for the time-step.
Moves all covey pegs as necessary and checks for merging
Definition at line 2144 of file Partridge_Covey.cpp.
References cfg_par_firstmerge, cfg_par_lastmerge, g_covey_list, m_map, Landscape::SupplyDayInYear(), and CfgInt::value().
Referenced by Partridge_Population_Manager::DoFirst().
|
private |
Counter to keep track of covey ids.
Definition at line 794 of file Partridge_Covey.h.
|
private |
Pointer to the landscape.
Definition at line 804 of file Partridge_Covey.h.
Referenced by CoveyManager(), and Tick().
|
private |
Minimum interesting force.
Definition at line 806 of file Partridge_Covey.h.
Referenced by Getpar_force_ignore_below(), and Setpar_force_ignore_below().
|
private |
Landscape height.
Definition at line 798 of file Partridge_Covey.h.
Referenced by CoveyDensity(), and CoveyManager().
|
private |
Half landscape height.
Definition at line 802 of file Partridge_Covey.h.
Referenced by CoveyDensity(), and CoveyManager().
|
private |
Landscape width.
Definition at line 796 of file Partridge_Covey.h.
Referenced by CoveyDensity(), and CoveyManager().
|
private |
Half landscape width.
Definition at line 800 of file Partridge_Covey.h.
Referenced by CoveyDensity(), and CoveyManager().