![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
The Weasel class is one of two current implementations of TPredator. More...
#include <Predators.h>
Public Member Functions | |
virtual void | BeginStep (void) |
BeingStep behaviour - must be implemented in descendent classes. More... | |
virtual void | Step (void) |
Step behaviour - must be implemented in descendent classes. More... | |
virtual void | EndStep (void) |
EndStep behaviour - must be implemented in descendent classes. More... | |
Weasel (Vole_Population_Manager *ThePrey, int p_x, int p_y, Landscape *p_L, TPredator_Population_Manager *p_PPM) | |
virtual | ~Weasel () |
![]() | |
TPredator (Vole_Population_Manager *ThePrey, int p_x, int p_y, Landscape *p_L, TPredator_Population_Manager *p_PPM) | |
~TPredator () | |
bool | OverlapMyTerritory (unsigned x, unsigned y) |
virtual void | st_Dispersal () |
virtual void | st_Movement () |
virtual int | st_Hunting () |
unsigned | SupplySpeciesID () |
int | SupplyKill () |
bool | SupplyTerr () |
int | SupplyKillEff () |
int | SupplyHomeRange () |
![]() | |
TAnimal (int x, int y, Landscape *L) | |
The TAnimal constructor saving the x,y, location and the landscape pointer. More... | |
TAnimal (int x, int y) | |
The TAnimal constructor saving the x,y used if landscape is already set. More... | |
void | SetGuardMapIndex (int a_index_x, int a_index_y) |
Set the guard map index, this is used to avoid two animals operating in the same location when using multithread. More... | |
unsigned | SupplyFarmOwnerRef () const |
Get the current location farm ref if any. More... | |
AnimalPosition | SupplyPosition () const |
Returns the objects location and habitat type and veg type. More... | |
APoint | SupplyPoint () const |
Returns the objects location in ALMaSS coordinates. More... | |
int | SupplyPolygonRef () const |
Returns the polygon reference where the object is located. More... | |
TTypesOfLandscapeElement | SupplyPolygonType () const |
Returns the polygon type where the object is located. More... | |
int | Supply_m_Location_x () const |
Returns the ALMaSS x-coordinate. More... | |
int | Supply_m_Location_y () const |
Returns the ALMaSS y-coordinate. More... | |
int | SupplyGuardCellX () const |
Returns the x-index to the guard cell. More... | |
int | SupplyGuardCellY () const |
Returns the y-index to the guard cell. More... | |
int | SupplyAge () const |
Returns the animals age in days. More... | |
void | SetAge (int a_age) |
Sets the animals age in days. More... | |
virtual void | KillThis () |
Sets all parameters ready for object destruction. More... | |
virtual void | CopyMyself () |
Used to copy the object details to another in descendent classes. More... | |
void | SetX (const int a_x) |
Sets the x-coordinate. More... | |
void | SetY (const int a_y) |
Sets the y-coordinate. More... | |
virtual void | ReinitialiseObject (int a_x, int a_y, Landscape *a_l_ptr) |
virtual void | ReinitialiseObject (int a_x, int a_y) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual int | WhatState () |
Returns the objects current state number. More... | |
virtual void | Dying () |
A wrapped for KillThis - ideally should not be used. More... | |
void | CheckManagement () |
Used to start a check for any management related effects at the objects current location. More... | |
void | CheckManagementXY (int a_x, int a_y) |
Used to start a check for any management related effects at x,y. More... | |
virtual bool | OnFarmEvent (FarmToDo) |
Must be reimplemented if used in descendent classes. Sets the action on a management event. More... | |
![]() | |
int | GetCurrentStateNo () const |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () const |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
void | ReinitialiseObjectBase () |
Used to initialise an object. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject ()=default |
The destructor for TALMaSSObject. More... | |
Additional Inherited Members | |
![]() | |
static void | SetSimulationWidth (int a_value) |
Sets the simulation width. More... | |
static void | SetSimulationHeight (int a_value) |
Sets the simulation height. More... | |
static void | SetDayInYear (int a_value) |
Sets the day in year attribute. More... | |
static void | SetOurLandscape (Landscape *a_value) |
Sets the landscape pointer. More... | |
static void | SetTempToday (double a_value) |
Sets the temperature today attribute. More... | |
![]() | |
static void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
![]() | |
TTypeOfPredatorState | CurrentPState |
unsigned | SpeciesID |
unsigned | m_DispersalMax |
unsigned | m_SearchArea |
int | m_kills_this_season |
int | PreyResponse1 |
int | PreyResponse2 |
int | m_Search_x |
int | m_Search_y |
int | SimW |
int | SimH |
unsigned | m_FailureCount |
unsigned | m_NoFailuresBeforeDispersal |
unsigned | m_HomeRange |
bool | m_HaveTerritory |
int | m_KillEfficiency |
Vole_Population_Manager * | m_Prey |
TPredator_Population_Manager * | m_OurPopulationManager |
vector< Vole_Base * > * | CurrentPrey |
![]() | |
int | m_Location_x |
The objects ALMaSS x coordinate. More... | |
int | m_Location_y |
The objects ALMaSS y coordinate. More... | |
int | m_guard_cell_x |
The index x to the guard cell. More... | |
int | m_guard_cell_y |
The index y to the guard cell. More... | |
int | m_AgeDays {0} |
To hold the age in days. More... | |
PesticideToxicity | m_my_pesticide |
![]() | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
![]() | |
static Landscape * | m_OurLandscape = nullptr |
A pointer to the landscape object shared with all TAnimal objects. More... | |
static int | m_SimulationWidth = 0 |
A static member for the simulation width because it is often used by descendent classes. More... | |
static int | m_SimulationHeight = 0 |
A static member for the simulation height because it is often used by descendent classes. More... | |
static double | m_TemperatureToday = 0.0 |
A holder for the temperature today shared with all TAnimal objects. More... | |
static int | m_DayInYear = 0 |
A holder for the day in year shared with all TAnimal objects. More... | |
The Weasel class is one of two current implementations of TPredator.
It is configurable via config parameters and in other than name and default configuration it is identical to the Owl class
Weasel::Weasel | ( | Vole_Population_Manager * | ThePrey, |
int | p_x, | ||
int | p_y, | ||
Landscape * | p_L, | ||
TPredator_Population_Manager * | p_PPM | ||
) |
References cfg_weasel_DispersalMax, cfg_weasel_home_range, cfg_weasel_kill_efficiency, cfg_weasel_NoFailuresBeforeDispersal, cfg_weasel_search_area, TPredator::m_DispersalMax, TPredator::m_HomeRange, TPredator::m_KillEfficiency, TPredator::m_NoFailuresBeforeDispersal, TPredator::m_SearchArea, TPredator::PreyResponse1, TPredator::PreyResponse2, TPredator::SpeciesID, and CfgInt::value().
|
virtual |
BeingStep behaviour - must be implemented in descendent classes.
Reimplemented from TPredator.
References TPredator_Population_Manager::CreateObjects(), TPredator_Population_Manager::dec_inds(), TAnimal::KillThis(), struct_Predator::L, TPredator::m_kills_this_season, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, TPredator::m_OurPopulationManager, struct_Predator::PM, TPredator_Population_Manager::supply_no_inds(), Landscape::SupplyDayInYear(), WEASEL, weasel_breed_day, weasel_breed_threshold, weasel_death_threshold, struct_Predator::x, and struct_Predator::y.
|
inlinevirtual |
|
virtual |
Step behaviour - must be implemented in descendent classes.
Reimplemented from TPredator.
References TPredator::CurrentPState, TALMaSSObject::m_CurrentStateNo, TPredator::m_FailureCount, TPredator::m_HaveTerritory, TPredator::m_NoFailuresBeforeDispersal, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, TPredator::PreyResponse1, TPredator::PreyResponse2, TPredator::st_Dispersal(), TPredator::st_Hunting(), TPredator::st_Movement(), tops_Dispersal, tops_Hunting, tops_InitialState, tops_Movement, and Landscape::Warn().