Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Vole_Base Class Reference

Base class for voles - all vole objects are descended from this class. More...

#include <vole_all.h>

Inheritance diagram for Vole_Base:
TAnimal TALMaSSObject Vole_JuvenileFemale Vole_JuvenileMale Vole_Female Vole_Male

Public Member Functions

 Vole_Base (struct_Vole_Adult *a_AVoleStruct_ptr)
 Constructor for Vole_Base. More...
 
 ~Vole_Base () override
 
virtual void Init (struct_Vole_Adult *a_AVoleStruct_ptr)
 
virtual void ReInit (struct_Vole_Adult *a_AVoleStruct_ptr)
 
void BeginStep () override
 BeingStep behaviour - must be implemented in descendent classes. More...
 
void Step () override
 Step behaviour - must be implemented in descendent classes. More...
 
void EndStep () override
 All voles age at the end of the day. More...
 
void st_Dying ()
 All voles end here on death. More...
 
void SetBreedingSeason (bool a_flag)
 Set Breeding Season flag. More...
 
void SetWeight (double W)
 
void Setm_Mature ()
 
void Set_BirthYear (int BirthYear)
 
void Set_MotherId (unsigned MotherIdNo)
 
void Set_FatherId (unsigned FatherIdNo)
 
void Set_NoYoungTot (int a_NoOfYoung)
 
void Set_XBorn (int a_Location_x)
 
void Set_YBorn (int a_Location_y)
 
void Set_ElemBorn (int a_Location_x, int a_Location_y)
 
void Set_VegBorn (int a_Location_x, int a_Location_y)
 
void Set_PolyRefBorn (int a_Location_x, int a_Location_y)
 
void Set_Age (int Age)
 
int WhatState () override
 
bool SupplyBornLastYear ()
 Were we born this year? More...
 
bool SupplyTerritorial ()
 
int SupplyFatherId ()
 
int SupplyMotherId ()
 
bool SupplySex ()
 
int SupplyBirthYear ()
 
int SupplyTotNoYoung ()
 
int SupplyXBorn ()
 
int SupplyYBorn ()
 
int SupplyPolyRefBorn ()
 
int SupplyElemBorn ()
 
TTypesOfLandscapeElement SupplyElemType ()
 
int SupplyVegBorn ()
 
int SupplyTerrRange ()
 
double SupplyWeight ()
 
int SupplyIDNo ()
 
bool SupplyMature ()
 
int SupplyDeathCause ()
 
unsigned SupplyAge ()
 
unsigned SupplyX ()
 
unsigned SupplyY ()
 
bool SupplyInTrap ()
 
InTrapPosition SupplyTrapPosition ()
 
void SetFree ()
 
int SupplyHomoZyg ()
 
int SupplyHeteroZyg ()
 
int SupplyAllele (int locus, int allele)
 
uint32 SupplyMyAllele (int i, int j)
 
int GetGeneticFlag ()
 
int GetDirectFlag ()
 
void SetGeneticFlag ()
 
void SetDirectFlag ()
 
void UnsetGeneticFlag ()
 
void UnsetDirectFlag ()
 
GeneticMaterial SupplyGenes ()
 
virtual void OnKilled ()
 
virtual bool MortalityTest ()
 Do a mortality test. More...
 
void CopyMyself (VoleObject a_vole)
 Duplicates a vole. More...
 
void SetFertile (bool f)
 Set the male vole fertility. More...
 
bool GetFertile ()
 Get the male vole fertility. More...
 
- Public Member Functions inherited from TAnimal
 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 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...
 
- Public Member Functions inherited from TALMaSSObject
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...
 

Public Attributes

TTypeOfVoleState CurrentVState
 
Vole_Population_Managerm_OurPopulation
 

Protected Member Functions

virtual void RodenticideIngestion (void)
 
double CalculateCarryingCapacity (int x, int y, int a_ddep) const
 
int MoveQuality (int p_x, int p_y) const
 Test a location for quality while moving. More...
 
void MoveTo (int p_Vector, int p_Distance, int iterations)
 Movement. More...
 
void DoWalking (int p_Distance, int &p_Vector, int &vx, int &vy) const
 Walking. More...
 
void DoWalkingCorrect (int p_Distance, int &p_Vector, int &vx, int &vy) const
 Walking where there is a danger of stepping off the world. More...
 
void Escape (int p_Vector, int p_Distance)
 Dispersal - directed movement. More...
 
void CheckTraps ()
 
virtual void SetLocation ()
 
virtual void FreeLocation ()
 
virtual bool GetLocation (int, int)
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Protected Attributes

int m_BirthYear
 
bool m_BornLastYear
 A flag set if the female was born the year before. More...
 
unsigned int m_MinTerrRange
 
unsigned m_MotherId
 
unsigned m_FatherId
 
int m_Death
 
int m_TerrRange
 
bool m_Sex
 
bool m_Mature
 
int m_Age
 
int m_XBorn
 
int m_YBorn
 
int m_PolyRefBorn
 
int m_ElemBorn
 
int m_VegBorn
 
int m_LifeSpan
 
double m_Weight
 
bool m_fertile
 Flag indicating the fertility state (true means fertile)
More...
 
int m_NoOfYoungTotal
 
int m_DispVector
 
bool m_Have_Territory
 
int m_Reserves
 
unsigned IDNo
 
int m_SimH
 
int m_SimW
 
GeneticMaterial m_MyGenes
 
InTrapPosition m_intrappos
 
- Protected Attributes inherited from TAnimal
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
 
- Protected Attributes inherited from TALMaSSObject
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 Protected Attributes

static unsigned int m_MaxMaleTerritorySize = 0
 
static unsigned int m_MaxFemaleTerritorySize = 0
 
static unsigned int m_MinMaleTerritorySize = 0
 
static unsigned int m_MinFemaleTerritorySize = 0
 
static double m_MinFVoleHabQual = 0
 
static double m_MinJMVoleHabQual = 0
 
static double m_MinMVoleHabQual = 0
 
static double m_MaleTerritoryRangeSlope = 0
 
static double m_FemaleTerritoryRangeSlope = 0
 
static double m_FHabQualThreshold3
 
static double m_FHabQualThreshold2
 
static double m_FHabQualThreshold1
 
static double m_MHabQualThreshold3
 
static double m_MHabQualThreshold2
 
static double m_MHabQualThreshold1
 
static bool m_BreedingSeason = false
 
- Static Protected Attributes inherited from TAnimal
static Landscapem_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...
 

Additional Inherited Members

- Static Public Member Functions inherited from TAnimal
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 Public Member Functions inherited from TALMaSSObject
static void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Detailed Description

Base class for voles - all vole objects are descended from this class.

Constructor & Destructor Documentation

◆ Vole_Base()

Vole_Base::Vole_Base ( struct_Vole_Adult a_AVoleStruct_ptr)

Constructor for Vole_Base.

222 : TAnimal(a_AVoleStruct_ptr->x, a_AVoleStruct_ptr->y) { Init(a_AVoleStruct_ptr); }

References Init().

◆ ~Vole_Base()

Vole_Base::~Vole_Base ( )
override
291  {
292 }

Member Function Documentation

◆ BeginStep()

void Vole_Base::BeginStep ( void  )
inlineoverridevirtual

BeingStep behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

Reimplemented in Vole_JuvenileFemale, and Vole_JuvenileMale.

284  {
285  };

◆ CalculateCarryingCapacity()

double Vole_Base::CalculateCarryingCapacity ( int  p_x,
int  p_y,
int  a_ddep 
) const
protected

Returns the sum of the qualities in the area covered by the territory (even if the vole does not have one)

Uses the algorithm for fast searching of square arrays with wrap around co-ordinates.
parameters = x,y starting coordinates top left
range = extent of the space to search
bottom left coordinate is therefore x+range, y+range
22/09/2000

For each polygon it gets the quality and multiplies by area of that polygon in the territory. This is summed for all polygons in the territoryto get overall quality. The value is then divided by the number of voles present less a threshold value.

369  {
370  int NoPolygons = 0;
371  int PolyRefData[500][2];
372  // First convert centre co-rdinates to square co-ordinates
373  double quality = 0;
374  int x = p_x - m_MinTerrRange;
375  if (x < 0) x += m_SimW;
376  int y = p_y - m_MinTerrRange;
377  if (y < 0) y += m_SimH;
378  const int range_x = m_MinTerrRange + m_MinTerrRange;
379  const int range_y = m_MinTerrRange + m_MinTerrRange;
380  // Stage 1 make a list of polygons
381  // create the extent variables
382  const int xextent0 = x + range_x;
383  const int yextent0 = y + range_y;
384  const int xextent1 = x + range_x - m_SimW;
385  const int yextent1 = y + range_y - m_SimH;
386  // Create the looping variables needed
387  int Dfinx = xextent0;
388  int Dfiny = yextent0;
389  int Afinx = 0; // unless the finx values for A-C are changed
390  int Bfinx = 0; // the value of zero will stop the A-C loops from executing
391  int Cfinx = 0;
392  int Afiny = 0; // this one assigned 0 to stop compiler complaints
393  // Now create the loop values;
394  if (x + range_x <= m_SimW)
395  {
396  // Type B & D (overlap bottom, no overlap)
397  if (yextent0 > m_SimH)
398  {
399  // Type B (overlap bottom only)
400  Dfiny = m_SimH;
401  Bfinx = x + range_x;
402  }
403  }
404  else
405  {
406  // Type A & C overlap left edge or bottom & left
407  if (yextent0 > m_SimH)
408  {
409  // Type C overlap bottom and left
410  Afinx = xextent1;
411  Afiny = m_SimH;
412  Bfinx = m_SimW;
413  Cfinx = xextent1;
414  Dfinx = m_SimW;
415  Dfiny = m_SimH;
416  }
417  else
418  {
419  // Type A overlap left edge
420  Afinx = xextent1;
421  Afiny = yextent0;
422  Dfinx = m_SimW;
423  }
424  }
425  // the default is:
426  // Type D no overlap
427 
428  // A Loop
429  for (int i = 0; i < Afinx; i++)
430  {
431  for (int j = y; j < Afiny; j++)
432  {
433  // Get the polyref
434  const int PRef = m_OurLandscape->SupplyPolyRefIndex(i, j);
435  // check if we have had this one already
437  bool found = false;
438  for (int k = 0; k < NoPolygons; k++)
439  {
440  if (PolyRefData[k][0] == PRef)
441  {
442  PolyRefData[k][1]++;
443  found = true;
444  break;
445  }
446  }
447  if (!found)
448  //*/
449  {
450  // don't have this one so get the height & type to the PolyDatas arrays
451  PolyRefData[NoPolygons][0] = PRef;
452  PolyRefData[NoPolygons][1] = 1;
453  NoPolygons++;
454  }
455  }
456  }
457  // B Loop
458  for (int i = x; i < Bfinx; i++)
459  {
460  for (int j = 0; j < yextent1; j++)
461  {
462  // Get the polyref
463  const int PRef = m_OurLandscape->SupplyPolyRefIndex(i, j);
464  // check if we have had this one already
465  /*
466  int index=-1;
467  for (int k=0; k<NoPolygons; k++)
468  {
469  if (PolyRefData[k][0]==PRef)
470  {
471  index=k;
472  break;
473  }
474  }
475  if (index!=-1)
476  {
477  PolyRefData[index][1]++;
478  }
479  else
480  */
482  bool found = false;
483  for (int k = 0; k < NoPolygons; k++)
484  {
485  if (PolyRefData[k][0] == PRef)
486  {
487  PolyRefData[k][1]++;
488  found = true;
489  break;
490  }
491  }
492  if (!found)
493  //*/
494  {
495  // don't have this one so get the height & type to the PolyDatas arrays
496  PolyRefData[NoPolygons][0] = PRef;
497  PolyRefData[NoPolygons][1] = 1;
498  NoPolygons++;
499  }
500  }
501  }
502  // C Loop
503  for (int i = 0; i < Cfinx; i++)
504  {
505  for (int j = 0; j < yextent1; j++)
506  {
507  // Get the polyref
508  const int PRef = m_OurLandscape->SupplyPolyRefIndex(i, j);
509  // check if we have had this one already
510  /*
511  int index=-1;
512  for (int k=0; k<NoPolygons; k++)
513  {
514  if (PolyRefData[k][0]==PRef)
515  {
516  index=k;
517  break;
518  }
519  }
520  if (index!=-1)
521  {
522  PolyRefData[index][1]++;
523  }
524  else
525  */
527  bool found = false;
528  for (int k = 0; k < NoPolygons; k++)
529  {
530  if (PolyRefData[k][0] == PRef)
531  {
532  PolyRefData[k][1]++;
533  found = true;
534  break;
535  }
536  }
537  if (!found)
538  //*/
539  {
540  // Don't have this one so get the height & type to the PolyDatas arrays
541  PolyRefData[NoPolygons][0] = PRef;
542  PolyRefData[NoPolygons][1] = 1;
543  NoPolygons++;
544  }
545  }
546  }
547  // D Loop
548  int last = -99999;
549  int k_index = -1;
550  for (int i = x; i < Dfinx; i++)
551  {
552  for (int j = y; j < Dfiny; j++)
553  {
554  // Get the polyref
555  const int PRef = m_OurLandscape->SupplyPolyRefIndex(i, j);
556  // check if we have had this one already
557  if (last == PRef) { PolyRefData[k_index][1]++; }
558  else
559  {
560  bool found = false;
561  for (int k = 0; k < NoPolygons; k++)
562  {
563  if (PolyRefData[k][0] == PRef)
564  {
565  PolyRefData[k][1]++;
566  found = true;
567  last = PRef;
568  k_index = k;
569  break;
570  }
571  }
572  if (!found)
573  {
574  // don't have this one so get the height & type to the PolyDatas arrays
575  PolyRefData[NoPolygons][0] = PRef;
576  PolyRefData[NoPolygons][1] = 1;
577  NoPolygons++;
578  }
579  }
580  }
581  }
582  // End of search algorithm
583  /* for each polygon get the quality and multiply by amount of that polygon in the territory sum this to get overall quality */
584  for (int i = 0; i < NoPolygons; i++) { quality += PolyRefData[i][1] * m_OurPopulation->GetHabitatQuality(PolyRefData[i][0]); }
585  // return quality;
586 
588  if (Voles > a_ddep) quality /= Voles - a_ddep;
589  // return the total quality
590  return quality;
591 }

References Vole_Population_Manager::GetHabitatQuality(), TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinTerrRange, TAnimal::m_OurLandscape, m_OurPopulation, m_SimH, m_SimW, m_TerrRange, Vole_Population_Manager::SupplyHowManyVoles(), and Landscape::SupplyPolyRefIndex().

Referenced by Vole_Male::CanFeed(), Vole_JuvenileMale::Dispersal(), Vole_Male::Dispersal(), Vole_JuvenileFemale::Dispersal(), Vole_JuvenileMale::st_Eval_n_Explore(), Vole_Male::st_Eval_n_Explore(), Vole_JuvenileFemale::st_Evaluate_n_Explore(), Vole_Female::st_Evaluate_n_Explore(), and Vole_Female::st_Special_Explore().

◆ CheckTraps()

void Vole_Base::CheckTraps ( )
protected
2590  {
2591  if (m_OurLandscape->SupplyYearNumber() < 10) return; // Don't sample until the population has stabilised
2592  const int r = m_TerrRange;
2593  const int vx = m_Location_x;
2594  const int vy = m_Location_y;
2595  for (int rad = 0; rad < r; rad++)
2596  {
2597  // Two Loops
2598  for (int x = vx - rad; x <= vx + rad; x++)
2599  {
2600  int y = vy + rad;
2601  if (m_OurPopulation->IsTrap(x, y))
2602  {
2603  if (g_random_fnc(1) == 0)
2604  {
2605  m_intrappos.m_x = x;
2606  m_intrappos.m_y = y;
2609  m_intrappos.m_inAtrap = true;
2610  return;
2611  }
2612  }
2613  y = vy - rad;
2614  if (m_OurPopulation->IsTrap(x, y))
2615  {
2616  if (g_random_fnc(1) == 0)
2617  {
2618  m_intrappos.m_x = x;
2619  m_intrappos.m_y = y;
2622  m_intrappos.m_inAtrap = true;
2623  return;
2624  }
2625  }
2626  }
2627  for (int y = vy - (rad - 1); y <= vy + (rad - 1); y++)
2628  {
2629  int x = vx + rad;
2630  if (m_OurPopulation->IsTrap(x, y))
2631  {
2632  if (g_random_fnc(1) == 0)
2633  {
2634  m_intrappos.m_x = x;
2635  m_intrappos.m_y = y;
2638  m_intrappos.m_inAtrap = true;
2639  return;
2640  }
2641  }
2642  x = vx - rad;
2643  if (m_OurPopulation->IsTrap(x, y))
2644  {
2645  if (g_random_fnc(1) == 0)
2646  {
2647  m_intrappos.m_x = x;
2648  m_intrappos.m_y = y;
2651  m_intrappos.m_inAtrap = true;
2652  return;
2653  }
2654  }
2655  }
2656  }
2657 }

References g_random_fnc(), Vole_Population_Manager::IsTrap(), AnimalPosition::m_EleType, InTrapPosition::m_inAtrap, m_intrappos, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, m_OurPopulation, m_TerrRange, AnimalPosition::m_VegType, AnimalPosition::m_x, AnimalPosition::m_y, Landscape::SupplyElementType(), Landscape::SupplyVegType(), and Landscape::SupplyYearNumber().

Referenced by Vole_JuvenileMale::st_Eval_n_Explore(), Vole_Male::st_Eval_n_Explore(), Vole_JuvenileFemale::st_Evaluate_n_Explore(), and Vole_Female::st_Evaluate_n_Explore().

◆ CopyMyself()

void Vole_Base::CopyMyself ( VoleObject  a_vtype)

Duplicates a vole.

Method used to duplicate a vole - most commonly used for experimental manipulation of populations e.g. return rate experiments

300  {
301  const auto av = new struct_Vole_Adult;
302  av->VPM = m_OurPopulation;
303  av->L = m_OurLandscape;
304  av->m_flag = true; // Used to signal pesticide effect to CreateObjects
306  av->ElemBorn = m_OurLandscape->SupplyElementType(av->PolyRefBorn);
308  av->x = (m_Location_x + 1) % m_OurPopulation->SupplySimW();
310  // Do the genetics
311  av->Genes.Recombine(&m_MyGenes, &m_MyGenes);
312  m_OurPopulation->CreateObjects(a_vtype, this, av, 1);
313  // object will be destroyed by death state
314  // but must let Dad know anyway
315  delete av;
316 }

References Vole_Population_Manager::CreateObjects(), TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyGenes, TAnimal::m_OurLandscape, m_OurPopulation, Landscape::SupplyElementType(), Landscape::SupplyPolyRef(), Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), Landscape::SupplyVegType(), and struct_Vole_Adult::VPM.

Referenced by Vole_Population_Manager::Catastrophe().

◆ DoWalking()

void Vole_Base::DoWalking ( int  p_Distance,
int &  p_Vector,
int &  vx,
int &  vy 
) const
protected

Walking.

This method does the actual stepping - there is no look ahead here, so steps are taken one at a time based on the habitat type and vector given.

933  {
934  int t[5], q[5];
936  t[0] = p_Vector;
937  t[1] = p_Vector + 1 & 0x07;
938  t[2] = p_Vector + 7 & 0x07;
939  t[3] = p_Vector + 2 & 0x07;
940  t[4] = p_Vector + 6 & 0x07;
941  //*/
942  for (int i = 0; i < p_Distance; i++)
943  {
944  // test the squares at Vector, Vector+1+2, Vector-1-2
945  // They have either a quality or are inaccessible (water,buildings)
946  // if can go to one of these squares then pick the best one
947  // if all or some are equal then take a random pick.
948  // if all are 'bad' then add or subtract one from vector and try again
949 
950  /* t[0] = p_Vector;
951  t[1] = (p_Vector+1) & 0x07;
952  t[2] = (p_Vector+7) & 0x07;
953  t[3] = (p_Vector+2) & 0x07;
954  t[4] = (p_Vector+6) & 0x07; */
955 
956  q[0] = MoveQuality(vx + g_vector_x[t[0]], vy + g_vector_y[t[0]]);
957  q[1] = MoveQuality(vx + g_vector_x[t[1]], vy + g_vector_y[t[1]]);
958  q[2] = MoveQuality(vx + g_vector_x[t[2]], vy + g_vector_y[t[2]]);
959  q[3] = MoveQuality(vx + g_vector_x[t[3]], vy + g_vector_y[t[3]]);
960  q[4] = MoveQuality(vx + g_vector_x[t[4]], vy + g_vector_y[t[4]]);
962  {
963  // allow a mistake once in a while
964  for (int j = 1; j < 5; j++) q[j] = -1;
965  }
966  // Now pick the best of these
967  int best = q[0];
968  int score = 1;
969  for (int ii = 1; ii < 5; ii++)
970  {
971  if (q[ii] > best)
972  {
973  best = q[ii];
974  score = 1;
975  }
976  else if (q[ii] == best) score++;
977  }
978  if (best == -1)
979  {
980  // can't go anywhere so change the vector
981  if (g_random_fnc(2)) ++p_Vector;
982  else --p_Vector;
983  p_Vector &= 0x07;
985  t[0] = p_Vector;
986  t[1] = p_Vector + 1 & 0x07;
987  t[2] = p_Vector + 7 & 0x07;
988  t[3] = p_Vector + 2 & 0x07;
989  t[4] = p_Vector + 6 & 0x07;
990  //*/
991  }
992  else
993  {
994  // Can go to one of score squares
995  const int scored = g_random_fnc(score); // pick one
996  int loop = 0;
997  for (int ii = 0; ii < 5; ii++)
998  {
999  if (best == q[ii]) loop++; // count the squares with 'best' quality
1000  if (loop > scored)
1001  {
1002  loop = ii; // go to i-square
1003  break;
1004  }
1005  }
1006  // change co-ordinates
1007  vx += g_vector_x[t[loop]];
1008  vy += g_vector_y[t[loop]];
1009  }
1010  }
1011 }

References g_rand_uni_fnc(), g_random_fnc(), MoveQuality(), and MoveToLessFavourable.

Referenced by MoveTo().

◆ DoWalkingCorrect()

void Vole_Base::DoWalkingCorrect ( int  p_Distance,
int &  p_Vector,
int &  vx,
int &  vy 
) const
protected

Walking where there is a danger of stepping off the world.

This method does the actual stepping - there is no look ahead here, so steps are taken one at a time based on the habitat type and vector given.
This version corrects coords for wrap around. This is slower so is only called when necessary.

1022  {
1023  int t[5], q[5];
1025  t[0] = p_Vector;
1026  t[1] = p_Vector + 1 & 0x07;
1027  t[2] = p_Vector + 7 & 0x07;
1028  t[3] = p_Vector + 2 & 0x07;
1029  t[4] = p_Vector + 6 & 0x07;
1030  //*/
1031  for (int i = 0; i < p_Distance; i++)
1032  {
1033  // test the squares at Vector, Vector+1+2, Vector-1-2
1034  // They have either a quality or are inaccessible (water,buildings)
1035  // if can go to one of these squares then pick the best one
1036  // if all or some are equal then take a random pick.
1037  // if all are 'bad' then add or subtract one from vector and try again
1038  /* t[0] = p_Vector;
1039  t[1] = (p_Vector+1) & 0x07;
1040  t[2] = (p_Vector+7) & 0x07;
1041  t[3] = (p_Vector+2) & 0x07;
1042  t[4] = (p_Vector+6) & 0x07; */
1043  q[0] = MoveQuality((vx + g_vector_x[t[0]]) % m_SimW, (vy + g_vector_y[t[0]]) % m_SimH);
1044  q[1] = MoveQuality((vx + g_vector_x[t[1]]) % m_SimW, (vy + g_vector_y[t[1]]) % m_SimH);
1045  q[2] = MoveQuality((vx + g_vector_x[t[2]]) % m_SimW, (vy + g_vector_y[t[2]]) % m_SimH);
1046  q[3] = MoveQuality((vx + g_vector_x[t[3]]) % m_SimW, (vy + g_vector_y[t[3]]) % m_SimH);
1047  q[4] = MoveQuality((vx + g_vector_x[t[4]]) % m_SimW, (vy + g_vector_y[t[4]]) % m_SimH);
1049  {
1050  // allow a mistake once in a while
1051  for (int j = 1; j < 5; j++) q[j] = -1;
1052  }
1053  // Now pick the best of these
1054  int best = q[0];
1055  int score = 1;
1056  for (int ii = 1; ii < 5; ii++)
1057  {
1058  if (q[ii] > best)
1059  {
1060  best = q[ii];
1061  score = 1;
1062  }
1063  else
1064  if (q[ii] == best) score++;
1065  }
1066  if (best == -1)
1067  {
1068  // can't go anywhere so change the vector
1069  if (g_random_fnc(2)) ++p_Vector;
1070  else --p_Vector;
1071  p_Vector &= 0x07;
1072  // /*
1073  t[0] = p_Vector;
1074  t[1] = p_Vector + 1 & 0x07;
1075  t[2] = p_Vector + 7 & 0x07;
1076  t[3] = p_Vector + 2 & 0x07;
1077  t[4] = p_Vector + 6 & 0x07; //*/
1078  }
1079  else
1080  {
1081  // Can go to one of score squares
1082  const int scored = g_random_fnc(score); // pick one
1083  int loop = 0;
1084  for (int ii = 0; ii < 5; ii++)
1085  {
1086  if (best == q[ii]) loop++; // count the squares with 'best' quality
1087  if (loop > scored)
1088  {
1089  loop = ii; // go to i-square
1090  break;
1091  }
1092  }
1093  // change co-ordinates
1094  vx += g_vector_x[t[loop]];
1095  vy += g_vector_y[t[loop]];
1096  }
1097  }
1098 }

References g_rand_uni_fnc(), g_random_fnc(), m_SimH, m_SimW, MoveQuality(), and MoveToLessFavourable.

Referenced by MoveTo().

◆ EndStep()

void Vole_Base::EndStep ( void  )
overridevirtual

All voles age at the end of the day.

Reimplemented from TALMaSSObject.

Reimplemented in Vole_JuvenileFemale, Vole_Male, and Vole_JuvenileMale.

323  {
324  m_Age++; // Once a day increment m_Age
325 }

References m_Age.

◆ Escape()

void Vole_Base::Escape ( int  p_Vector,
int  p_Distance 
)
protected

Dispersal - directed movement.

This works like MoveTo above, but with a rather more directed movement aimed at moving further from the start point.

1109  {
1110  // This will alter m_Location_x & m_Location_y
1111  // it will give a very directed movement towards p_Vector
1112 
1113  // p_Vector gives the preferred direction (0-7)
1114  // p_Distance is the number of steps
1115  int vx = m_Location_x + m_SimW;
1116  int vy = m_Location_y + m_SimH;
1117  // int counter = 0;
1118  for (int i = 0; i < p_Distance; i++)
1119  {
1120  // test the squares at Vector, Vector+1+2, Vector-1-2
1121  // They have either a quality or are inaccessible (water,buildings)
1122  // if can go to one of these squares then pick the best one
1123  // if all or some are equal then take a random pick.
1124  // if all are 'bad' then add or subtract one from p_Vector and try again
1125  // counter ++;
1126  int t[3], q[3];
1127  t[0] = p_Vector;
1128  t[1] = p_Vector + 1 & 0x07;
1129  t[2] = p_Vector + 7 & 0x07;
1130  q[0] = MoveQuality((vx + g_vector_x[t[0]]) % m_SimW, (vy + g_vector_y[t[0]]) % m_SimH);
1131  q[1] = MoveQuality((vx + g_vector_x[t[1]]) % m_SimW, (vy + g_vector_y[t[1]]) % m_SimH);
1132  q[2] = MoveQuality((vx + g_vector_x[t[2]]) % m_SimW, (vy + g_vector_y[t[2]]) % m_SimH);
1133  // Now pick the best of these
1134  int noscore = 0;
1135  for (int ii = 0; ii < 3; ii++) { if (q[ii] == -1) { noscore++; } }
1136  if (noscore == 3)
1137  {
1138  // can't go anywhere so change the vector
1139  if (g_random_fnc(2)) p_Vector++;
1140  else p_Vector--;
1141  }
1142  else
1143  {
1144  // Can go to at least one of score squares
1145  // try the middle first
1146  int loop = 0;
1147  if (q[0] == -1)
1148  {
1149  // otherwise randomly try one side or other
1150  // it must be possible to go to one of these
1151  const int which = g_random_fnc(2);
1152  if (which == 1)
1153  {
1154  if (q[1] != -1) loop = 1;
1155  else loop = 2;
1156  }
1157  else
1158  {
1159  if (q[2] != -1) loop = 2;
1160  else loop = 1;
1161  }
1162  }
1163  // change co-ordinates
1164  vx += g_vector_x[t[loop]];
1165  vy += g_vector_y[t[loop]];
1166  }
1167  }
1168  // alter the voles location
1169  FreeLocation();
1170  m_Location_x = vx % m_SimW;
1171  m_Location_y = vy % m_SimH;
1173  SetLocation();
1174 }

References FreeLocation(), g_random_fnc(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulation, m_SimH, m_SimW, MoveQuality(), SetLocation(), and Population_Manager::UpdateGuardMap().

◆ FreeLocation()

virtual void Vole_Base::FreeLocation ( )
inlineprotectedvirtual

Reimplemented in Vole_JuvenileFemale, and Vole_JuvenileMale.

444  {
445  };

Referenced by Escape(), MoveTo(), and st_Dying().

◆ GetDirectFlag()

int Vole_Base::GetDirectFlag ( )
inline

Genetic functionality

390 { return m_MyGenes.GetDirectFlag(); }

References GeneticMaterial::GetDirectFlag(), and m_MyGenes.

◆ GetFertile()

bool Vole_Base::GetFertile ( )
inline

Get the male vole fertility.

Primarily used in ecotoxicological simulations where toxic effects may render the vole sterile.

424  {
428  return m_fertile;
429  }

References m_fertile.

Referenced by Vole_Female::st_Mating().

◆ GetGeneticFlag()

int Vole_Base::GetGeneticFlag ( )
inline

Genetic functionality

388 { return m_MyGenes.GetGeneticFlag(); }

References GeneticMaterial::GetGeneticFlag(), and m_MyGenes.

◆ GetLocation()

virtual bool Vole_Base::GetLocation ( int  ,
int   
)
inlineprotectedvirtual

Reimplemented in Vole_JuvenileFemale, and Vole_JuvenileMale.

446 { return false; };

Referenced by MoveTo().

◆ Init()

void Vole_Base::Init ( struct_Vole_Adult a_AVoleStruct_ptr)
virtual
228  {
229  m_Location_x = a_AVoleStruct_ptr->x;
230  m_Location_y = a_AVoleStruct_ptr->y;
231  m_OurLandscape = a_AVoleStruct_ptr->L;
232  m_CurrentStateNo = 0;
233  m_OurPopulation = a_AVoleStruct_ptr->VPM;
234  m_Mature = false;
235  m_Age = 0;
236  m_Weight = 0.5;
237  m_NoOfYoungTotal = 0;
238  m_DispVector = -1;
239  m_Have_Territory = false;
240  m_TerrRange = 0; // The size of the territory
241  m_MinTerrRange = 0;
242  m_Reserves = 3;
243  m_LifeSpan = 365 + 60 + static_cast<int>(g_rand_uni_fnc() * (30 * cfg_vole_LifeMonths.value())); //
245  m_intrappos.m_inAtrap = false;
246  m_BornLastYear = false;
247 
248  m_MyGenes = a_AVoleStruct_ptr->Genes;
252 
253  const unsigned FatherIdNo = a_AVoleStruct_ptr->FatherId;
254  Set_FatherId(FatherIdNo);
255  const unsigned MotherIdNo = a_AVoleStruct_ptr->MotherId;
256  Set_MotherId(MotherIdNo);
262  Set_BirthYear(a_AVoleStruct_ptr->BirthYear);
263 
266  if (m_MaxMaleTerritorySize < m_MinMaleTerritorySize) m_MaxMaleTerritorySize = m_MinMaleTerritorySize; // Corrects a bug caused by incorrect input settings
269  if (m_MaxFemaleTerritorySize < m_MinFemaleTerritorySize) m_MaxFemaleTerritorySize = m_MinFemaleTerritorySize; // Corrects a bug caused by incorrect input settings
275 #ifdef __VoleStarvationDays
276  m_StarvationDays = 0;
277  m_MaxStarvationDays = cfg_MaxStarvationDays.value();
278 #endif
279 #ifdef __VOLEPESTICIDEON
280  ClearPesticidLoad();
281  m_pesticideBioDegradeRate = cfg_volepcidebiodegredrate.value();
282  SetPesticideInfluenced1(false);
283  SetPesticideInfluenced2(false);
284  m_pesticideInfluenced3 = 0.0;
285 #endif
286  m_fertile = true;
287 }

References struct_Vole_Adult::BirthYear, cfg_MaxFemaleTerrSize, cfg_MaxMaleTerrSize, cfg_MaxStarvationDays, cfg_MinFemaleTerritorySize, cfg_MinMaleTerritorySize, cfg_vole_habqualscaler, cfg_vole_LifeMonths, cfg_volepcidebiodegredrate, CurrentVState, struct_Vole_Adult::FatherId, g_rand_uni_fnc(), struct_Vole_Adult::Genes, IDNo, Vole_Population_Manager::IDNumber, struct_Vole_Adult::L, m_Age, m_BornLastYear, TALMaSSObject::m_CurrentStateNo, m_DispVector, m_FemaleTerritoryRangeSlope, m_fertile, m_Have_Territory, InTrapPosition::m_inAtrap, m_intrappos, m_LifeSpan, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MaleTerritoryRangeSlope, m_Mature, m_MaxFemaleTerritorySize, m_MaxMaleTerritorySize, m_MinFemaleTerritorySize, m_MinFVoleHabQual, m_MinJMVoleHabQual, m_MinMaleTerritorySize, m_MinMVoleHabQual, m_MinTerrRange, m_MyGenes, m_NoOfYoungTotal, TAnimal::m_OurLandscape, m_OurPopulation, m_Reserves, m_SimH, m_SimW, m_TerrRange, m_Weight, MaxWeightF, MaxWeightM, MinReproWeightF, MinReproWeightM, struct_Vole_Adult::MotherId, Set_BirthYear(), Set_ElemBorn(), Set_FatherId(), Set_MotherId(), Set_PolyRefBorn(), Set_VegBorn(), Set_XBorn(), Set_YBorn(), Population_Manager_Base::SupplySimH(), Population_Manager_Base::SupplySimW(), tovs_InitialState, CfgInt::value(), CfgFloat::value(), struct_Vole_Adult::VPM, struct_Vole_Adult::x, and struct_Vole_Adult::y.

Referenced by ReInit(), Vole_JuvenileMale::ReInit(), Vole_Male::ReInit(), Vole_JuvenileFemale::ReInit(), Vole_Female::ReInit(), and Vole_Base().

◆ MortalityTest()

bool Vole_Base::MortalityTest ( )
virtual

Do a mortality test.

Takes both physiological lifespan and background mortality into account to determine whether the vole should die - repeated calls increase the risk of dying

Reimplemented in Vole_Male.

349  {
350  // returns true if the vole should die
351  if (g_rand_uni_fnc() < g_DailyMortChance) { return true; }
352  // returns true if the vole should die
353  return false;
354 }

References g_DailyMortChance, and g_rand_uni_fnc().

Referenced by Vole_JuvenileMale::BeginStep(), and Vole_JuvenileFemale::BeginStep().

◆ MoveQuality()

int Vole_Base::MoveQuality ( int  p_x,
int  p_y 
) const
protected

Test a location for quality while moving.

Returns the quality of a patch of habitat at p_x,p_y.
Can't walk through another vole though - so test location first.

1186  {
1187  if (m_OurPopulation->m_VoleMap->GetMapValue(p_x, p_y) != nullptr)
1188  return -1;
1189  // Nobody there so carry on
1190 
1191  return vole_tole_move_quality(m_OurLandscape, p_x, p_y);
1192 }

References IDMap< a_type >::GetMapValue(), TAnimal::m_OurLandscape, m_OurPopulation, Vole_Population_Manager::m_VoleMap, and vole_tole_move_quality().

Referenced by DoWalking(), DoWalkingCorrect(), Escape(), and Vole_Male::st_Eval_n_Explore().

◆ MoveTo()

void Vole_Base::MoveTo ( int  p_Vector,
int  p_Distance,
int  p_iterations 
)
protected

Movement.

Do an assessment of the quality of the voles territory, and move. This function does the same as the other CalcuateCarryingCapacity except that it alters the two values stand_x, stand_y to set them to be in the best polygon in the territory

Returns the mean of the qualities in the area covered by the territory (even if the vole does not have one)

Uses the algorithm for fast searching of square arrays with wrap around co-ordinates.
parameters = x,y starting coordinates top left
range = extent of the space to search
bottom left coordinate is therefore x+range, y+range
22/09/2000

For each polygon it gets the quality and multiplies by area of that polygon in the territory. This is summed for all polygons in the territory to get overall quality. This will alter m_Location_x & m_Location_y.
It will give a rather directed movement towards p_Vector.
Generally the vole will stay in the best habitat, but occasional mis-steps occur.
p_Vector gives the preferred direction (0-7), p_Distance is the number of steps.

883  {
884  const int offset = p_Distance * p_iterations;
885  if (m_Location_x - offset < 0 || m_Location_x + offset >= m_SimW || m_Location_y - offset < 0 || m_Location_y + offset >= m_SimH)
886  {
887  // Need correct coords
888  // Make sure that the coords can't become -ve
889  int vx = m_Location_x + m_SimW;
890  int vy = m_Location_y + m_SimH;
891  do
892  {
893  DoWalkingCorrect(p_Distance, p_Vector, vx, vy);
894  p_Distance = 1;
895  }
896  while (GetLocation(vx % m_SimW, vy % m_SimH) && p_iterations-- > 0);
897  // alter the voles location (& correct coords)
898  FreeLocation();
899  m_Location_x = vx % m_SimW;
900  m_Location_y = vy % m_SimH;
902  SetLocation();
903  }
904  else
905  {
906  // Don't need correct coords
907  int vx = m_Location_x;
908  int vy = m_Location_y;
909  do
910  {
911  DoWalking(p_Distance, p_Vector, vx, vy);
912  p_Distance = 1;
913  }
914  while (GetLocation(vx, vy) && p_iterations-- > 0);
915  // alter the voles location (& correct coords)
916  FreeLocation();
917  m_Location_x = vx;
918  m_Location_y = vy;
920  SetLocation();
921  }
922 }

References DoWalking(), DoWalkingCorrect(), FreeLocation(), GetLocation(), TAnimal::m_guard_cell_x, TAnimal::m_guard_cell_y, TAnimal::m_Location_x, TAnimal::m_Location_y, m_OurPopulation, m_SimH, m_SimW, SetLocation(), and Population_Manager::UpdateGuardMap().

Referenced by Vole_JuvenileMale::Dispersal(), Vole_Male::Dispersal(), Vole_JuvenileFemale::Dispersal(), Vole_JuvenileMale::st_JuvenileExplore(), and Vole_Female::st_Special_Explore().

◆ OnKilled()

virtual void Vole_Base::OnKilled ( )
inlinevirtual

Reimplemented in Vole_JuvenileFemale, and Vole_JuvenileMale.

402  {
403  };

◆ ReInit()

void Vole_Base::ReInit ( struct_Vole_Adult a_AVoleStruct_ptr)
virtual

Reimplemented in Vole_Female, Vole_JuvenileFemale, Vole_Male, and Vole_JuvenileMale.

225 { Init(a_AVoleStruct_ptr); }

References Init().

◆ RodenticideIngestion()

void Vole_Base::RodenticideIngestion ( void  )
protectedvirtual
3115  {
3116  const double rodenticide = m_OurLandscape->SupplyRodenticide(m_Location_x, m_Location_y);
3117  if (rodenticide > 0)
3118  {
3119  // Todo effects
3120  }
3121  else return;
3122 }

References TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, and Landscape::SupplyRodenticide().

◆ Set_Age()

void Vole_Base::Set_Age ( int  Age)
inline

Set our age

328 { m_Age = Age; }

References m_Age.

◆ Set_BirthYear()

void Vole_Base::Set_BirthYear ( int  BirthYear)
inline

Set year of birth

299 { m_BirthYear = BirthYear; }

References m_BirthYear.

Referenced by Init().

◆ Set_ElemBorn()

void Vole_Base::Set_ElemBorn ( int  a_Location_x,
int  a_Location_y 
)
inline

Set element type of birth location

313  {
314  TTypesOfLandscapeElement const m_EBorn = m_OurLandscape->SupplyElementType(a_Location_x, a_Location_y);
316  }

References Landscape::BackTranslateEleTypes(), m_ElemBorn, TAnimal::m_OurLandscape, and Landscape::SupplyElementType().

Referenced by Init().

◆ Set_FatherId()

void Vole_Base::Set_FatherId ( unsigned  FatherIdNo)
inline

Set father ID

304 { m_FatherId = FatherIdNo; }; // ***TD***

References m_FatherId.

Referenced by Init().

◆ Set_MotherId()

void Vole_Base::Set_MotherId ( unsigned  MotherIdNo)
inline

Set mother ID

302 { m_MotherId = MotherIdNo; }; // ***TD***

References m_MotherId.

Referenced by Init().

◆ Set_NoYoungTot()

void Vole_Base::Set_NoYoungTot ( int  a_NoOfYoung)
inline

Sets the number of young produced by the female

306 { m_NoOfYoungTotal += a_NoOfYoung; }; // ***TD***

References m_NoOfYoungTotal.

◆ Set_PolyRefBorn()

void Vole_Base::Set_PolyRefBorn ( int  a_Location_x,
int  a_Location_y 
)
inline

Set polygonref of birth location

326 { m_PolyRefBorn = (m_OurLandscape->SupplyPolyRef(a_Location_x, a_Location_y)); }; // ***TD***

References TAnimal::m_OurLandscape, m_PolyRefBorn, and Landscape::SupplyPolyRef().

Referenced by Init().

◆ Set_VegBorn()

void Vole_Base::Set_VegBorn ( int  a_Location_x,
int  a_Location_y 
)
inline

Set vegetation type of birth location

320  {
321  TTypesOfVegetation const m_VBorn = (m_OurLandscape->SupplyVegType(a_Location_x, a_Location_y));
323  }

References Landscape::BackTranslateVegTypes(), TAnimal::m_OurLandscape, m_VegBorn, and Landscape::SupplyVegType().

Referenced by Init().

◆ Set_XBorn()

void Vole_Base::Set_XBorn ( int  a_Location_x)
inline

Set x-coordinate of birth location

308 { m_XBorn = a_Location_x; }; // ***TD***

References m_XBorn.

Referenced by Init().

◆ Set_YBorn()

void Vole_Base::Set_YBorn ( int  a_Location_y)
inline

Set y-coordinate of birth location

310 { m_YBorn = a_Location_y; }; // ***TD***

References m_YBorn.

Referenced by Init().

◆ SetBreedingSeason()

void Vole_Base::SetBreedingSeason ( bool  a_flag)
inline

Set Breeding Season flag.

293 { m_BreedingSeason = a_flag; }

References m_BreedingSeason.

◆ SetDirectFlag()

void Vole_Base::SetDirectFlag ( )
inline

Genetic functionality

References m_MyGenes, and GeneticMaterial::SetDirectFlag().

◆ SetFertile()

void Vole_Base::SetFertile ( bool  f)
inline

Set the male vole fertility.

Primarily used in ecotoxicological simulations where toxic effects may render the vole sterile.

413  {
417  m_fertile = f;
418  }

References m_fertile.

◆ SetFree()

void Vole_Base::SetFree ( )
inline

Release vole from trap

379 { m_intrappos.m_inAtrap = false; }

References InTrapPosition::m_inAtrap, and m_intrappos.

◆ SetGeneticFlag()

void Vole_Base::SetGeneticFlag ( )
inline

Genetic functionality

References m_MyGenes, and GeneticMaterial::SetGeneticFlag().

◆ SetLocation()

virtual void Vole_Base::SetLocation ( )
inlineprotectedvirtual

Reimplemented in Vole_JuvenileFemale, and Vole_JuvenileMale.

441  {
442  };

Referenced by Escape(), and MoveTo().

◆ Setm_Mature()

void Vole_Base::Setm_Mature ( )
inline

Become adult

297 { m_Mature = true; }

References m_Mature.

Referenced by Vole_Female::st_BecomeReproductive(), Vole_Male::st_Eval_n_Explore(), and Vole_Male::Step().

◆ SetWeight()

void Vole_Base::SetWeight ( double  W)
inline

Set our weight

295 { m_Weight = W; }

References m_Weight.

◆ st_Dying()

void Vole_Base::st_Dying ( void  )

All voles end here on death.

Called when a vole dies. Just removes itself from the map and sets a flag to destroy the object in the endStep

335  {
336  FreeLocation();
337  m_CurrentStateNo = -1;
338 }

References FreeLocation(), and TALMaSSObject::m_CurrentStateNo.

Referenced by Vole_JuvenileMale::EndStep(), Vole_Male::EndStep(), and Vole_JuvenileFemale::EndStep().

◆ Step()

void Vole_Base::Step ( void  )
inlineoverridevirtual

Step behaviour - must be implemented in descendent classes.

Reimplemented from TALMaSSObject.

Reimplemented in Vole_Female, Vole_JuvenileFemale, Vole_Male, and Vole_JuvenileMale.

287  {
288  };

◆ SupplyAge()

unsigned Vole_Base::SupplyAge ( )
inline

◆ SupplyAllele()

int Vole_Base::SupplyAllele ( int  locus,
int  allele 
)
inline

Genetic functionality

385 { return m_MyGenes.GetAllele(locus, allele); }

References GeneticMaterial::GetAllele(), and m_MyGenes.

◆ SupplyBirthYear()

int Vole_Base::SupplyBirthYear ( )
inline

Tell our birth year

343 { return m_BirthYear; }; // ***TD***

References m_BirthYear.

◆ SupplyBornLastYear()

bool Vole_Base::SupplyBornLastYear ( )
inline

Were we born this year?

333 { return m_BornLastYear; }

References m_BornLastYear.

◆ SupplyDeathCause()

int Vole_Base::SupplyDeathCause ( )
inline

Tell the cause of death

367 { return m_Death; }; // ***TD***

References m_Death.

◆ SupplyElemBorn()

int Vole_Base::SupplyElemBorn ( )
inline

Tell our elementype at birth location

353 { return m_ElemBorn; }; // ***TD***

References m_ElemBorn.

◆ SupplyElemType()

TTypesOfLandscapeElement Vole_Base::SupplyElemType ( )
inline

◆ SupplyFatherId()

int Vole_Base::SupplyFatherId ( )
inline

Tell father ID

337 { return m_FatherId; }; // ***TD***

References m_FatherId.

◆ SupplyGenes()

GeneticMaterial Vole_Base::SupplyGenes ( )
inline

Genetic functionality

400 { return m_MyGenes; }

References m_MyGenes.

Referenced by Vole_Female::st_Mating().

◆ SupplyHeteroZyg()

int Vole_Base::SupplyHeteroZyg ( )
inline

Genetic functionality

383 { return m_MyGenes.HeterozygosityCount(); }

References GeneticMaterial::HeterozygosityCount(), and m_MyGenes.

◆ SupplyHomoZyg()

int Vole_Base::SupplyHomoZyg ( )
inline

Genetic functionality

381 { return m_MyGenes.HomozygosityCount(); }

References GeneticMaterial::HomozygosityCount(), and m_MyGenes.

◆ SupplyIDNo()

int Vole_Base::SupplyIDNo ( )
inline

Tell our ID number

363 { return IDNo; }; // ***TD***

References IDNo.

Referenced by Vole_Female::st_Lactating(), and Vole_Female::st_Mating().

◆ SupplyInTrap()

bool Vole_Base::SupplyInTrap ( )
inline

Are we in a trap?

375 { return m_intrappos.m_inAtrap; }

References InTrapPosition::m_inAtrap, and m_intrappos.

◆ SupplyMature()

bool Vole_Base::SupplyMature ( )
inline

Tell if mature

365 { return m_Mature; };

References m_Mature.

◆ SupplyMotherId()

int Vole_Base::SupplyMotherId ( )
inline

Tell mother ID

339 { return m_MotherId; }; // ***TD***

References m_MotherId.

◆ SupplyMyAllele()

uint32 Vole_Base::SupplyMyAllele ( int  i,
int  j 
)
inline
386 { return m_MyGenes.GetAllele(i, j); } //*TD

References GeneticMaterial::GetAllele(), and m_MyGenes.

◆ SupplyPolyRefBorn()

int Vole_Base::SupplyPolyRefBorn ( )
inline

Tell our polygon ref at birth location

351 { return m_PolyRefBorn; }; // ***TD***

References m_PolyRefBorn.

◆ SupplySex()

◆ SupplyTerritorial()

◆ SupplyTerrRange()

int Vole_Base::SupplyTerrRange ( )
inline

Tell our territory range

359 { return m_TerrRange; }; // ***TD***

References m_TerrRange.

◆ SupplyTotNoYoung()

int Vole_Base::SupplyTotNoYoung ( )
inline

Tell our number of young produced

345 { return m_NoOfYoungTotal; }; // ***TD***

References m_NoOfYoungTotal.

◆ SupplyTrapPosition()

InTrapPosition Vole_Base::SupplyTrapPosition ( )
inline

Get the trap location

377 { return m_intrappos; }

References m_intrappos.

◆ SupplyVegBorn()

int Vole_Base::SupplyVegBorn ( )
inline

Tell our vegetation type at birth location

357 { return m_VegBorn; }; // ***TD***

References m_VegBorn.

◆ SupplyWeight()

double Vole_Base::SupplyWeight ( )
inline

Tell our weight

361 { return m_Weight; };

References m_Weight.

◆ SupplyX()

unsigned Vole_Base::SupplyX ( )
inline

Tell our x coordinate

371 { return m_Location_x; };

References TAnimal::m_Location_x.

◆ SupplyXBorn()

int Vole_Base::SupplyXBorn ( )
inline

Tell our x-coordinate at birth

347 { return m_XBorn; }; // ***TD***

References m_XBorn.

◆ SupplyY()

unsigned Vole_Base::SupplyY ( )
inline

Tell our y coordinate

373 { return m_Location_y; };

References TAnimal::m_Location_y.

◆ SupplyYBorn()

int Vole_Base::SupplyYBorn ( )
inline

Tell our x-coordinate at birth

349 { return m_YBorn; }; // ***TD***

References m_YBorn.

◆ UnsetDirectFlag()

void Vole_Base::UnsetDirectFlag ( )
inline

Genetic functionality

References m_MyGenes, and GeneticMaterial::UnsetDirectFlag().

◆ UnsetGeneticFlag()

void Vole_Base::UnsetGeneticFlag ( )
inline

Genetic functionality

References m_MyGenes, and GeneticMaterial::UnsetGeneticFlag().

◆ WhatState()

int Vole_Base::WhatState ( )
inlineoverridevirtual

Get our current vole state

Reimplemented from TAnimal.

331 { return CurrentVState; }

References CurrentVState.

Member Data Documentation

◆ CurrentVState

◆ IDNo

unsigned Vole_Base::IDNo
protected

Their individual ID number

Referenced by Init(), and SupplyIDNo().

◆ m_Age

◆ m_BirthYear

int Vole_Base::m_BirthYear
protected

◆ m_BornLastYear

◆ m_BreedingSeason

bool Vole_Base::m_BreedingSeason = false
staticprotected

◆ m_Death

int Vole_Base::m_Death
protected

Death course

Referenced by SupplyDeathCause().

◆ m_DispVector

◆ m_ElemBorn

int Vole_Base::m_ElemBorn
protected

The element type at at birth location

Referenced by Set_ElemBorn(), and SupplyElemBorn().

◆ m_FatherId

unsigned Vole_Base::m_FatherId
protected

◆ m_FemaleTerritoryRangeSlope

double Vole_Base::m_FemaleTerritoryRangeSlope = 0
staticprotected

only used to create an increasing territory size with age

Referenced by Vole_JuvenileFemale::EndStep(), and Init().

◆ m_fertile

bool Vole_Base::m_fertile
protected

Flag indicating the fertility state (true means fertile)

Referenced by GetFertile(), Init(), and SetFertile().

◆ m_FHabQualThreshold1

double Vole_Base::m_FHabQualThreshold1
staticprotected

Habitat is v.bad below this

◆ m_FHabQualThreshold2

double Vole_Base::m_FHabQualThreshold2
staticprotected

Habitat is OK above this

◆ m_FHabQualThreshold3

double Vole_Base::m_FHabQualThreshold3
staticprotected

Habitat is v.good above this

◆ m_Have_Territory

◆ m_intrappos

InTrapPosition Vole_Base::m_intrappos
protected

◆ m_LifeSpan

int Vole_Base::m_LifeSpan
protected

Their lifespan remaining (unless killed by external events)

Referenced by Vole_JuvenileMale::BeginStep(), Vole_JuvenileFemale::BeginStep(), and Init().

◆ m_MaleTerritoryRangeSlope

double Vole_Base::m_MaleTerritoryRangeSlope = 0
staticprotected

only used to create an increasing territory size with age

Referenced by Vole_Male::DetermineTerritorySize(), and Init().

◆ m_Mature

◆ m_MaxFemaleTerritorySize

unsigned int Vole_Base::m_MaxFemaleTerritorySize = 0
staticprotected

Maximum territory size female

Referenced by Init().

◆ m_MaxMaleTerritorySize

unsigned int Vole_Base::m_MaxMaleTerritorySize = 0
staticprotected

Maximum territory size male

Referenced by Init(), and Vole_Female::st_Mating().

◆ m_MHabQualThreshold1

double Vole_Base::m_MHabQualThreshold1
staticprotected

Habitat is v.bad below this

◆ m_MHabQualThreshold2

double Vole_Base::m_MHabQualThreshold2
staticprotected

Habitat is OK above this

◆ m_MHabQualThreshold3

double Vole_Base::m_MHabQualThreshold3
staticprotected

Habitat is v.good above this

◆ m_MinFemaleTerritorySize

unsigned int Vole_Base::m_MinFemaleTerritorySize = 0
staticprotected

◆ m_MinFVoleHabQual

double Vole_Base::m_MinFVoleHabQual = 0
staticprotected

Minimum acceptable habitat quality - assumes that minimum hab qual for survival is 2 * min female terr size

Referenced by Init(), Vole_Male::st_Eval_n_Explore(), Vole_JuvenileFemale::st_Evaluate_n_Explore(), and Vole_Female::st_Evaluate_n_Explore().

◆ m_MinJMVoleHabQual

double Vole_Base::m_MinJMVoleHabQual = 0
staticprotected

Minimum acceptable habitat juvenile male quality - assumes that minimum hab qual for survival is 2 * min male terr size

Referenced by Init(), and Vole_JuvenileMale::st_Eval_n_Explore().

◆ m_MinMaleTerritorySize

unsigned int Vole_Base::m_MinMaleTerritorySize = 0
staticprotected

◆ m_MinMVoleHabQual

double Vole_Base::m_MinMVoleHabQual = 0
staticprotected

Minimum acceptable habitat quality - assumes that minimum hab qual for survival is 2 * min female terr size

Referenced by Vole_Male::CanFeed(), Vole_Male::Dispersal(), and Init().

◆ m_MinTerrRange

◆ m_MotherId

unsigned Vole_Base::m_MotherId
protected

◆ m_MyGenes

◆ m_NoOfYoungTotal

int Vole_Base::m_NoOfYoungTotal
protected

◆ m_OurPopulation

◆ m_PolyRefBorn

int Vole_Base::m_PolyRefBorn
protected

Their polygon ref at birth location

Referenced by Set_PolyRefBorn(), and SupplyPolyRefBorn().

◆ m_Reserves

int Vole_Base::m_Reserves
protected

Their reserves - in days that they can survive without food

Referenced by Init(), and Vole_Female::st_Lactating().

◆ m_Sex

◆ m_SimH

int Vole_Base::m_SimH
protected

◆ m_SimW

◆ m_TerrRange

◆ m_VegBorn

int Vole_Base::m_VegBorn
protected

The vegetation type at birth location

Referenced by Set_VegBorn(), and SupplyVegBorn().

◆ m_Weight

◆ m_XBorn

int Vole_Base::m_XBorn
protected

Their x location at birth

Referenced by Set_XBorn(), and SupplyXBorn().

◆ m_YBorn

int Vole_Base::m_YBorn
protected

Their y location at birth

Referenced by Set_YBorn(), and SupplyYBorn().


The documentation for this class was generated from the following files:
Vole_Base::m_LifeSpan
int m_LifeSpan
Definition: vole_all.h:182
Vole_Base::Set_ElemBorn
void Set_ElemBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:312
Vole_Base::m_MotherId
unsigned m_MotherId
Definition: vole_all.h:158
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
GeneticMaterial::UnsetGeneticFlag
void UnsetGeneticFlag()
Definition: GeneticMaterial.cpp:175
Vole_Base::m_ElemBorn
int m_ElemBorn
Definition: vole_all.h:178
Vole_Population_Manager::IsTrap
bool IsTrap(int p_x, int p_y) const
Definition: VolePopulationManager.h:201
cfg_vole_LifeMonths
static CfgInt cfg_vole_LifeMonths("VOLE_LIFEMONTHS", CFG_CUSTOM, 3)
Vole_Base::CurrentVState
TTypeOfVoleState CurrentVState
Definition: vole_all.h:406
Vole_Base::Init
virtual void Init(struct_Vole_Adult *a_AVoleStruct_ptr)
Definition: Vole_all.cpp:228
Landscape::SupplyVegType
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Returns the vegetation type of the polygon using the polygon reference number a_polyref or coordinate...
Definition: Landscape.h:1925
Landscape::SupplyElementType
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Returns the landscape type of the polygon using the polygon reference number a_polyref or coordinates...
Definition: Landscape.h:1732
Vole_Base::m_MinTerrRange
unsigned int m_MinTerrRange
Definition: vole_all.h:156
MinReproWeightF
const int MinReproWeightF
Definition: Vole_all.cpp:145
Population_Manager_Base::SupplySimH
int SupplySimH() const
Returns landscape height in m.
Definition: PopulationManager.h:569
Vole_Base::m_BirthYear
int m_BirthYear
Definition: vole_all.h:149
Vole_Population_Manager::SupplyHowManyVoles
int SupplyHowManyVoles(unsigned a_x, unsigned a_y, unsigned a_range) const
Definition: VolePopulationManager.cpp:890
Vole_Base::MoveQuality
int MoveQuality(int p_x, int p_y) const
Test a location for quality while moving.
Definition: Vole_all.cpp:1186
cfg_MaxMaleTerrSize
static CfgInt cfg_MaxMaleTerrSize("VOLE_MAXMALETERRITORYSIZE", CFG_CUSTOM, 23)
Vole_Base::m_VegBorn
int m_VegBorn
Definition: vole_all.h:180
Vole_Base::m_Mature
bool m_Mature
Definition: vole_all.h:168
TAnimal::m_guard_cell_y
int m_guard_cell_y
The index y to the guard cell.
Definition: PopulationManager.h:374
MinReproWeightM
const unsigned MinReproWeightM
Definition: Vole_all.cpp:143
Landscape::BackTranslateVegTypes
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Returns the ALMaSS reference number translated from the TTypesOfVegetation type.
Definition: Landscape.h:2338
GeneticMaterial::HeterozygosityCount
int HeterozygosityCount()
Definition: GeneticMaterial.cpp:325
Vole_Base::m_MinJMVoleHabQual
static double m_MinJMVoleHabQual
Definition: vole_all.h:218
CfgFloat::value
double value() const
Definition: Configurator.h:142
cfg_MaxFemaleTerrSize
static CfgInt cfg_MaxFemaleTerrSize("VOLE_MAXFEMALETERRITORYSIZE", CFG_CUSTOM, 8)
struct_Vole_Adult
A struct for passing data to create a new vole.
Definition: vole_all.h:115
AnimalPosition::m_x
unsigned m_x
Definition: PopulationManager.h:173
Vole_Base::m_MyGenes
GeneticMaterial m_MyGenes
Definition: vole_all.h:205
GeneticMaterial::UnsetDirectFlag
void UnsetDirectFlag()
Definition: GeneticMaterial.cpp:179
Vole_Base::Set_MotherId
void Set_MotherId(unsigned MotherIdNo)
Definition: vole_all.h:302
tovs_InitialState
Definition: vole_all.h:55
GeneticMaterial::GetDirectFlag
uint32 GetDirectFlag()
Definition: GeneticMaterial.cpp:188
Vole_Base::Set_XBorn
void Set_XBorn(int a_Location_x)
Definition: vole_all.h:308
Vole_Base::m_PolyRefBorn
int m_PolyRefBorn
Definition: vole_all.h:176
Vole_Base::GetLocation
virtual bool GetLocation(int, int)
Definition: vole_all.h:446
Vole_Base::m_Have_Territory
bool m_Have_Territory
Definition: vole_all.h:196
Vole_Base::m_Weight
double m_Weight
Definition: vole_all.h:184
GeneticMaterial::SetDirectFlag
void SetDirectFlag()
Definition: GeneticMaterial.cpp:170
Vole_Base::Set_YBorn
void Set_YBorn(int a_Location_y)
Definition: vole_all.h:310
Vole_Base::m_MaxFemaleTerritorySize
static unsigned int m_MaxFemaleTerritorySize
Definition: vole_all.h:210
Vole_Base::Set_VegBorn
void Set_VegBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:319
MaxWeightM
const double MaxWeightM
Definition: Vole_all.cpp:127
TAnimal::TAnimal
TAnimal(int x, int y, Landscape *L)
The TAnimal constructor saving the x,y, location and the landscape pointer.
Definition: PopulationManager.cpp:1553
TTypesOfLandscapeElement
TTypesOfLandscapeElement
Values that represent the types of landscape polygon that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:57
Vole_Base::FreeLocation
virtual void FreeLocation()
Definition: vole_all.h:444
Vole_Base::m_SimH
int m_SimH
Definition: vole_all.h:202
MaxWeightF
const double MaxWeightF
Definition: Vole_all.cpp:129
Vole_Base::m_MaleTerritoryRangeSlope
static double m_MaleTerritoryRangeSlope
Definition: vole_all.h:222
Vole_Base::m_XBorn
int m_XBorn
Definition: vole_all.h:172
IDMap::GetMapValue
a_type GetMapValue(unsigned x, unsigned y)
Definition: MovementMap.h:140
struct_Vole_Adult::Genes
GeneticMaterial Genes
Definition: vole_all.h:133
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
g_DailyMortChance
double g_DailyMortChance
Definition: Vole_all.cpp:183
Vole_Base::DoWalking
void DoWalking(int p_Distance, int &p_Vector, int &vx, int &vy) const
Walking.
Definition: Vole_all.cpp:933
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
cfg_vole_habqualscaler
static CfgFloat cfg_vole_habqualscaler("VOLE_HABQUALSCALER", CFG_CUSTOM, 2.1)
Vole_Base::m_MinMaleTerritorySize
static unsigned int m_MinMaleTerritorySize
Definition: vole_all.h:212
struct_Vole_Adult::FatherId
int FatherId
Definition: vole_all.h:127
Vole_Base::DoWalkingCorrect
void DoWalkingCorrect(int p_Distance, int &p_Vector, int &vx, int &vy) const
Walking where there is a danger of stepping off the world.
Definition: Vole_all.cpp:1022
struct_Vole_Adult::VPM
Vole_Population_Manager * VPM
Definition: vole_all.h:131
Vole_Base::m_DispVector
int m_DispVector
Definition: vole_all.h:194
GeneticMaterial::GetGeneticFlag
uint32 GetGeneticFlag()
Definition: GeneticMaterial.cpp:184
struct_Vole_Adult::BirthYear
int BirthYear
Definition: vole_all.h:126
Landscape::SupplyRodenticide
double SupplyRodenticide(int a_x, int a_y)
Gets total rodenticide for a location.
Definition: Landscape.cpp:586
Vole_Base::m_MinFVoleHabQual
static double m_MinFVoleHabQual
Definition: vole_all.h:216
GeneticMaterial::GetAllele
uint32 GetAllele(int pos, int Chromosome)
Definition: GeneticMaterial.cpp:230
Vole_Base::m_SimW
int m_SimW
Definition: vole_all.h:202
Vole_Population_Manager::IDNumber
unsigned IDNumber
Definition: VolePopulationManager.h:219
Vole_Base::m_Sex
bool m_Sex
Definition: vole_all.h:166
Landscape::SupplyYearNumber
int SupplyYearNumber(void)
Passes a request on to the associated Calendar class function, returns m_simulationyear
Definition: Landscape.h:2287
Vole_Base::m_MaxMaleTerritorySize
static unsigned int m_MaxMaleTerritorySize
Definition: vole_all.h:208
CfgInt::value
int value() const
Definition: Configurator.h:116
AnimalPosition::m_EleType
TTypesOfLandscapeElement m_EleType
Definition: PopulationManager.h:175
Vole_Base::IDNo
unsigned IDNo
Definition: vole_all.h:200
struct_Vole_Adult::y
int y
Definition: vole_all.h:118
AnimalPosition::m_y
unsigned m_y
Definition: PopulationManager.h:174
cfg_MaxStarvationDays
static CfgInt cfg_MaxStarvationDays("VOLE_MAXSTARVATIONDAYS", CFG_CUSTOM, 29)
struct_Vole_Adult::L
Landscape * L
Definition: vole_all.h:130
Population_Manager::UpdateGuardMap
void UpdateGuardMap(int a_x, int a_y, int &a_index_x, int &a_index_y)
Get the index of the guard map for the given location.
Definition: PopulationManager.h:768
Vole_Population_Manager::CreateObjects
void CreateObjects(VoleObject a_obType, TAnimal *a_pvo, struct_Vole_Adult *a_as, int a_number)
Definition: VolePopulationManager.cpp:2756
Vole_Base::Set_PolyRefBorn
void Set_PolyRefBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:326
Vole_Base::m_intrappos
InTrapPosition m_intrappos
Definition: vole_all.h:206
Vole_Base::Set_BirthYear
void Set_BirthYear(int BirthYear)
Definition: vole_all.h:299
cfg_volepcidebiodegredrate
static CfgFloat cfg_volepcidebiodegredrate("VOLE_PCIDE_BIODEGREDATIONRATE", CFG_CUSTOM, 0.0)
TTypesOfVegetation
TTypesOfVegetation
Values that represent the types of vegetation that are represented in ALMaSS.
Definition: LandscapeFarmingEnums.h:192
Vole_Base::m_OurPopulation
Vole_Population_Manager * m_OurPopulation
Definition: vole_all.h:407
struct_Vole_Adult::MotherId
int MotherId
Definition: vole_all.h:128
TAnimal::m_guard_cell_x
int m_guard_cell_x
The index x to the guard cell.
Definition: PopulationManager.h:370
Vole_Base::m_Age
int m_Age
Definition: vole_all.h:170
Vole_Population_Manager::GetHabitatQuality
double GetHabitatQuality(const int a_index) const
Definition: VolePopulationManager.h:230
Vole_Base::m_MinMVoleHabQual
static double m_MinMVoleHabQual
Definition: vole_all.h:220
Vole_Base::Set_FatherId
void Set_FatherId(unsigned FatherIdNo)
Definition: vole_all.h:304
Population_Manager_Base::SupplySimW
int SupplySimW() const
Returns landscape width in m.
Definition: PopulationManager.h:567
Vole_Base::m_YBorn
int m_YBorn
Definition: vole_all.h:174
GeneticMaterial::SetGeneticFlag
void SetGeneticFlag()
Definition: GeneticMaterial.cpp:166
Vole_Base::m_BornLastYear
bool m_BornLastYear
A flag set if the female was born the year before.
Definition: vole_all.h:154
MoveToLessFavourable
double MoveToLessFavourable
Definition: VolePopulationManager.cpp:155
InTrapPosition::m_inAtrap
bool m_inAtrap
Definition: vole_all.h:108
Vole_Base::m_FemaleTerritoryRangeSlope
static double m_FemaleTerritoryRangeSlope
Definition: vole_all.h:224
Vole_Base::m_Death
int m_Death
Definition: vole_all.h:162
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
GeneticMaterial::HomozygosityCount
int HomozygosityCount()
Definition: GeneticMaterial.cpp:314
Vole_Base::m_FatherId
unsigned m_FatherId
Definition: vole_all.h:160
struct_Vole_Adult::x
int x
Definition: vole_all.h:117
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
vole_tole_move_quality
int vole_tole_move_quality(Landscape *m_TheLandscape, int x, int y)
Definition: Vole_toletoc.cpp:5
Landscape::SupplyPolyRefIndex
int SupplyPolyRefIndex(int a_x, int a_y)
Get the index to the m_elems array for a polygon at location x,y.
Definition: Landscape.h:2172
cfg_MinMaleTerritorySize
CfgInt cfg_MinMaleTerritorySize("VOLE_MINMALETERRITORYSIZE", CFG_CUSTOM, 9)
Vole_Base::m_MinFemaleTerritorySize
static unsigned int m_MinFemaleTerritorySize
Definition: vole_all.h:214
Vole_Base::m_fertile
bool m_fertile
Flag indicating the fertility state (true means fertile)
Definition: vole_all.h:186
Vole_Base::m_TerrRange
int m_TerrRange
Definition: vole_all.h:164
Vole_Base::m_Reserves
int m_Reserves
Definition: vole_all.h:198
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
cfg_MinFemaleTerritorySize
CfgInt cfg_MinFemaleTerritorySize("VOLE_MINFEMALETERRITORYSIZE", CFG_CUSTOM, 8)
Landscape::SupplyPolyRef
int SupplyPolyRef(int a_x, int a_y)
Get the in map polygon reference number from the x, y location.
Definition: Landscape.h:2157
Vole_Base::m_BreedingSeason
static bool m_BreedingSeason
Definition: vole_all.h:239
Vole_Base::SetLocation
virtual void SetLocation()
Definition: vole_all.h:441
Vole_Population_Manager::m_VoleMap
IDMap< TAnimal * > * m_VoleMap
Definition: VolePopulationManager.h:276
Landscape::BackTranslateEleTypes
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
Returns the ALMaSS reference number translated from the TTypesOfLandscapeElement type.
Definition: Landscape.h:2332
Vole_Base::m_NoOfYoungTotal
int m_NoOfYoungTotal
Definition: vole_all.h:192
AnimalPosition::m_VegType
TTypesOfVegetation m_VegType
Definition: PopulationManager.h:176