ALMaSS Vole ODDox  1.1
The vole model description following ODdox protocol
Vole_JuvenileFemale Class Reference

The class for female voles. More...

#include <vole_all.h>

Public Member Functions

 Vole_JuvenileFemale (struct_Vole_Adult *p_aVoleStruct)
 Vole_JuvenileFemale constructor. More...
 
virtual void ReInit (struct_Vole_Adult *p_aVoleStruct)
 
virtual ~Vole_JuvenileFemale ()
 
virtual bool OnFarmEvent (FarmToDo event)
 External event handler. More...
 
virtual void BeginStep ()
 Female vole BeginStep. More...
 
virtual void Step ()
 JuvenileFemale vole Step. More...
 
virtual void EndStep ()
 Female vole EndStep. More...
 
virtual void OnKilled ()
 Death from external entity. More...
 
- Public Member Functions inherited from Vole_Base
 Vole_Base (struct_Vole_Adult *p_aVoleStruct)
 Constructor for Vole_Base. More...
 
virtual ~Vole_Base ()
 
virtual void Init (struct_Vole_Adult *p_aVoleStruct)
 
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)
 
virtual int WhatState ()
 
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 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
unsigned SupplyFarmOwnerRef ()
 
AnimalPosition SupplyPosition ()
 
APoint SupplyPoint ()
 
int SupplyPolygonRef ()
 
int Supply_m_Location_x ()
 
int Supply_m_Location_y ()
 
virtual void KillThis ()
 
virtual void CopyMyself ()
 
void SetX (int a_x)
 
void SetY (int a_y)
 
 TAnimal (int x, int y, Landscape *L)
 
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual void Dying ()
 
void CheckManagement (void)
 
void CheckManagementXY (int x, int y)
 
- Public Member Functions inherited from TALMaSSObject
int GetCurrentStateNo ()
 Returns the current state number. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
bool GetStepDone ()
 Returns the step done indicator flag. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. More...
 
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Protected Member Functions

int Dispersal (double p_OldQual, int p_Distance)
 Female dispersal. More...
 
int st_Evaluate_n_Explore ()
 Main territory evaluation behaviour. More...
 
void st_BecomeSubAdult (void)
 
virtual void SetLocation ()
 Location map function. More...
 
virtual void FreeLocation ()
 Location map function. More...
 
virtual bool GetLocation (int px, int py)
 Location map function. More...
 
- Protected Member Functions inherited from Vole_Base
virtual void RodenticideIngestion (void)
 
double CalculateCarryingCapacity (int x, int y, int a_ddep)
 
int MoveQuality (int p_x, int p_y)
 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)
 Walking. More...
 
void DoWalkingCorrect (int p_Distance, int &p_Vector, int &vx, int &vy)
 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 ()
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

Additional Inherited Members

- Public Attributes inherited from Vole_Base
TTypeOfVoleState CurrentVState
 
Vole_Population_Managerm_OurPopulation
 
- Protected Attributes inherited from Vole_Base
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 SimH
 
int SimW
 
GeneticMaterial m_MyGenes
 
InTrapPosition m_intrappos
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 
int m_Location_y
 
Landscapem_OurLandscape
 
- 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 inherited from Vole_Base
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
 

Detailed Description

The class for female voles.

Contains all the behaviour specific to the female vole. The differences between the male and female are primarily in female reproductive behaviour, but there are small differences in other behaviours requiring re-implementation of many of the behaviours (e.g. dispersal).

Definition at line 528 of file vole_all.h.

Constructor & Destructor Documentation

◆ Vole_JuvenileFemale()

Vole_JuvenileFemale::Vole_JuvenileFemale ( struct_Vole_Adult p_aVoleStruct)

Vole_JuvenileFemale constructor.

Definition at line 1349 of file Vole_all.cpp.

1349  :Vole_Base(p_aVoleStruct)
1350 {
1351  m_Sex=false;
1354  m_BornLastYear= false;
1356  m_Age=14;
1357 #ifdef __VOLEPESTICIDEON
1358  m_maturitydelay = 0.0;
1359 #endif
1360 }

References Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.

◆ ~Vole_JuvenileFemale()

Vole_JuvenileFemale::~Vole_JuvenileFemale ( )
virtual

Definition at line 1378 of file Vole_all.cpp.

1379 {
1380  // Nothing to do
1381 }

Member Function Documentation

◆ BeginStep()

void Vole_JuvenileFemale::BeginStep ( void  )
virtual

Female vole BeginStep.

The BeginStep is one of the three timestep divisions. This is called once for each vole before Step and EndStep.
The main function here is to remove voles that die before they take up CPU resources in the Step code.
Can also be used to check for pesticide accumulation levels in pesticide simulation

Reimplemented from Vole_Base.

Definition at line 1393 of file Vole_all.cpp.

1394 {
1395  if (MortalityTest())
1396  {
1398  m_StepDone=true;
1400  }
1401  else
1402  {
1403  if (--m_LifeSpan<1)
1404  {
1407  m_StepDone=true;
1408  }
1409  }
1410 #ifdef __VOLEPESTICIDEON
1411  PesticideIngestion();
1412  ActOnPesticideDose();
1413 #endif
1414  }

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_LifeSpan, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MortalityTest(), tovmort_FBck, tovmort_FLife, and tovs_FDying.

◆ Dispersal()

int Vole_JuvenileFemale::Dispersal ( double  p_OldQual,
int  p_Distance 
)
protected

Female dispersal.

Checks p_Distance away to see if it can find a territory in the next FHabQualThreshold category or with an improved quality of 1.1* p_OldQual if already in optimal habitat
This entails some risk though, so there is a fixed 2.5% increase in the mortality chance when it does this.

Definition at line 1817 of file Vole_all.cpp.

1818 {
1819  // Returns 1 for die, 0 for carry on
1820  if (m_DispVector == -1) m_DispVector = random(8); // Choose direction 0-7
1821  // Go that far in that direction (assuming it is possible to do that)
1822  int oldx = m_Location_x;
1823  int oldy = m_Location_y;
1824  MoveTo(m_DispVector, p_Distance,10);
1825  // Now we are there so what is the new quality
1826  // 1. Get the carrying capacity
1828  if ( CC <= p_OldQual )
1829  {
1830  // Don't want to move
1831  FreeLocation();
1832  m_Location_x=oldx;
1833  m_Location_y=oldy;
1834  SetLocation();
1835  }
1836  else
1837  {
1838  if (g_rand_uni() < g_extradispmort )
1839  {
1841  return 1;
1842  }
1843  }
1844  return 0;
1845 }

References Vole_Base::CalculateCarryingCapacity(), cfg_RecordVoleMort, cfg_VoleDDepConst(), VoleSummaryOutput::ChangeData(), FreeLocation(), g_extradispmort, g_rand_uni, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::MoveTo(), SetLocation(), and tovmort_FDisp.

Referenced by st_Evaluate_n_Explore(), and Vole_Female::st_Evaluate_n_Explore().

◆ EndStep()

void Vole_JuvenileFemale::EndStep ( void  )
virtual

Female vole EndStep.

The EndStep one of the three timestep divisions. This is called once for each vole after BeginStep and Step.
The main function here is to remove voles that have died during step and otherwise to grow if not at max weight. It also checks if the vole was killed due to human management and determines the potential territory size.

Reimplemented from Vole_Base.

Definition at line 1474 of file Vole_all.cpp.

1475 {
1476 #ifdef __VoleStarvationDays
1477  if ( m_StarvationDays > m_MaxStarvationDays)
1478  {
1479  st_Dying();
1481  }
1482 #endif
1483  CheckManagement();
1484  if (CurrentVState==tovs_FDying) {
1485  st_Dying();
1486  }
1487 
1488  else
1489  {
1490  m_Age++;
1491  /* FEMALE GROWTH NOTES
1492 
1493  Female vole grows until 20g.
1494  After that she will only grow if he has matured
1495  Growth continues up to 55g.
1496 
1497  Reproduction cannot occur below 20g or 20 days
1498 
1499  Growth only occurs between 1 March and 1st August
1500 
1501  taken from Hanson L, 1977, Oikos 29.
1502  */
1503  int today=m_OurLandscape->SupplyDayInYear();
1504  if ((today<GrowStopDate) && (today>
1506  {
1507  if (m_Weight<20)
1508  {
1510  }
1511  else if ((m_Mature==true) && (m_Weight<MaxWeightF))
1512  {
1515  }
1516  }
1517  else if (today==1) m_BornLastYear=true; // must be true if alive on 1st Jan.
1518  }
1519 }

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), TAnimal::CheckManagement(), Vole_Base::CurrentVState, GrowStopDate, growthperdayF, Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_FemaleTerritoryRangeSlope, Vole_Base::m_Mature, Vole_Base::m_MinFemaleTerritorySize, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, Vole_Population_Manager::m_VoleRecordMort, Vole_Base::m_Weight, MaxWeightF, MinReproWeightF, Vole_Base::st_Dying(), Landscape::SupplyDayInYear(), Vole_Population_Manager::SupplyGrowthStartDate(), tovmort_FStarve, and tovs_FDying.

◆ FreeLocation()

void Vole_JuvenileFemale::FreeLocation ( )
inlineprotectedvirtual

◆ GetLocation()

bool Vole_JuvenileFemale::GetLocation ( int  px,
int  py 
)
inlineprotectedvirtual

Location map function.

Reimplemented from Vole_Base.

Definition at line 1799 of file Vole_all.cpp.

1799  {
1800  if( m_OurPopulation->m_VoleMap->GetMapValue(px,py)!=NULL) return true;
1801  return false;
1802  };

References Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.

◆ OnFarmEvent()

bool Vole_JuvenileFemale::OnFarmEvent ( FarmToDo  event)
virtual

External event handler.

This method evaluates external events and chooses a suitable response (in this case a probability of dying because other effects will be taken up by the evaluate and explore state.

Reimplemented from TAnimal.

Definition at line 1529 of file Vole_all.cpp.

1530 {
1531  switch(event)
1532  {
1533 case sleep_all_day:
1534  break;
1535 case autumn_plough:
1538  break;
1539 case autumn_harrow:
1542  break;
1543 case autumn_roll:
1546  break;
1547 case autumn_sow:
1550  break;
1551 case winter_plough:
1554  break;
1555 case deep_ploughing:
1558  break;
1559 case spring_plough:
1562  break;
1563 case spring_harrow:
1566  break;
1567 case spring_roll:
1570  break;
1571 case spring_sow:
1574  break;
1575 case fp_npks:
1576  break;
1577 case fp_npk:
1578  break;
1579 case fp_pk:
1580  break;
1581 case fp_liquidNH3:
1582  break;
1583 case fp_slurry:
1584  break;
1586  break;
1587 case fp_manure:
1588  break;
1589 case fp_greenmanure:
1590  break;
1591 case fp_sludge:
1592  break;
1593 case fa_npk:
1594  break;
1595 case fa_pk:
1596  break;
1597 case fa_slurry:
1598  break;
1599 case fa_ammoniumsulphate:
1600  break;
1601 case fa_manure:
1602  break;
1603 case fa_greenmanure:
1604  break;
1605 case fa_sludge:
1606  break;
1607 case herbicide_treat:
1608  break;
1609 case growth_regulator:
1610  break;
1611 case fungicide_treat:
1612  break;
1613 case insecticide_treat:
1614  break;
1615 case molluscicide:
1616  break;
1617 case glyphosate:
1618  break;
1619 case row_cultivation:
1622  break;
1623 case strigling:
1626  break;
1627 case hilling_up:
1630  break;
1631 case water:
1632  break;
1633 case swathing:
1636  break;
1637 case harvest:
1640  break;
1641 case cattle_out:
1642 case cattle_out_low:
1643  break;
1644 case cut_to_hay:
1647  break;
1648 case cut_to_silage:
1651  break;
1652 case straw_chopping:
1655  break;
1656 case hay_turning:
1659  break;
1660 case hay_bailing:
1663  break;
1664 case stubble_harrowing:
1667  break;
1671  break;
1672 case burn_straw_stubble:
1675  break;
1676 case mow:
1679  break;
1680 case cut_weeds:
1683  break;
1684 case pigs_out:
1687  break;
1688 case strigling_sow:
1691  break;
1693 case trial_toxiccontrol:
1694 case trial_control:
1695  break;
1696 default:
1697  g_msg->Warn( WARN_FILE, "Vole_Female::OnFarmEvent(): Unknown event type:",
1699  exit( 1 );
1700  }
1702  {
1704  return true;
1705  }
1706  else
1707  return false;
1708 }

References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, burn_straw_stubble, cattle_out, cattle_out_low, cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_greenmanure, fa_manure, fa_npk, fa_pk, fa_sludge, fa_slurry, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, molluscicide, mow, pigs_out, row_cultivation, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, straw_chopping, strigling, strigling_sow, stubble_harrowing, swathing, tovmort_FFarm, tovs_FDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, VoleHarvestMort, VolePigGrazingMort, VoleSoilCultivationMort, VoleStriglingMort, water, and winter_plough.

◆ OnKilled()

void Vole_JuvenileFemale::OnKilled ( )
virtual

Death from external entity.

External event has caused death - probably eaten by a explicitly modelled predator

Reimplemented from Vole_Base.

Definition at line 1718 of file Vole_all.cpp.

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, tovmort_FPred, and tovs_FDying.

◆ ReInit()

void Vole_JuvenileFemale::ReInit ( struct_Vole_Adult p_aVoleStruct)
virtual

Reimplemented from Vole_Base.

Reimplemented in Vole_Female.

Definition at line 1363 of file Vole_all.cpp.

1363  {
1364  Init(p_aVoleStruct);
1365  m_Sex = false;
1368  m_BornLastYear = false;
1370  m_Age = 14;
1371 #ifdef __VOLEPESTICIDEON
1372  m_maturitydelay = 0.0;
1373 #endif
1374 }

References Vole_Base::Init(), Vole_Base::m_Age, Vole_Base::m_BornLastYear, Vole_Base::m_MinFemaleTerritorySize, Vole_Base::m_MinTerrRange, Vole_Base::m_Sex, Vole_Base::m_TerrRange, Vole_Base::m_Weight, and WeanedWeight.

Referenced by Vole_Population_Manager::CreateObjects().

◆ SetLocation()

void Vole_JuvenileFemale::SetLocation ( )
inlineprotectedvirtual

Location map function.

Reimplemented from Vole_Base.

Definition at line 1785 of file Vole_all.cpp.

1785  {
1786  m_OurPopulation->m_VoleMap->SetMapValue(m_Location_x,m_Location_y,this);
1787  };

References TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_OurPopulation, and Vole_Population_Manager::m_VoleMap.

Referenced by Dispersal(), and Vole_Female::st_Special_Explore().

◆ st_BecomeSubAdult()

void Vole_JuvenileFemale::st_BecomeSubAdult ( void  )
protected

Definition at line 1725 of file Vole_all.cpp.

1726 {
1727  struct_Vole_Adult* av;
1728  av = new struct_Vole_Adult;
1729  av->VPM = m_OurPopulation;
1730  av->L = m_OurLandscape;
1731  av->m_flag=true; // Used to signal pesticide effect to CreateObjects
1732  // Create the new voles (50% chance of male/female)
1736  av->FatherId = m_FatherId;
1737  av->MotherId = m_MotherId;
1738  av->x = m_Location_x;
1739  av->y = m_Location_y;
1740  av->weight = m_Weight;
1741  // Do the genetics
1742  av->Genes = m_MyGenes;
1743  av->age = m_Age;
1745  // Remove the current object
1747  FreeLocation();
1748  m_CurrentStateNo = -1;
1749  m_StepDone = true;
1750 }

References struct_Vole_Adult::age, Vole_Population_Manager::CreateObjects(), Vole_Base::CurrentVState, struct_Vole_Adult::ElemBorn, struct_Vole_Adult::FatherId, FreeLocation(), struct_Vole_Adult::Genes, struct_Vole_Adult::L, Vole_Base::m_Age, TALMaSSObject::m_CurrentStateNo, Vole_Base::m_FatherId, struct_Vole_Adult::m_flag, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MotherId, Vole_Base::m_MyGenes, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Base::m_Weight, struct_Vole_Adult::MotherId, struct_Vole_Adult::PolyRefBorn, Landscape::SupplyElementType(), Landscape::SupplyPolyRef(), Landscape::SupplyVegType(), tovs_FDying, struct_Vole_Adult::VegBorn, vob_Female, struct_Vole_Adult::VPM, struct_Vole_Adult::weight, struct_Vole_Adult::x, and struct_Vole_Adult::y.

Referenced by Step().

◆ st_Evaluate_n_Explore()

int Vole_JuvenileFemale::st_Evaluate_n_Explore ( )
protected

Main territory evaluation behaviour.

Evaluates the quality of her habitat and does some limited exploration in the surrounding area to see if she can improve it by moving.

Definition at line 1760 of file Vole_all.cpp.

1761 {
1762 #ifdef __USINGTRAPLINES
1763  CheckTraps();
1764 #endif
1766  // This function determines whether he must leave and whether he does
1767  // an explore. He will do this if he is not in optimal conditions
1768 
1769  if (Qual < m_MinFVoleHabQual)
1770  {
1771  // check an area MinFemaleMovement to FemaleMovement metres away
1772  m_DispVector = random(8);
1773  // Not quality dependent dispersal, very directed
1774  return Dispersal(-1, random(FemaleMovement) + 1);
1775  }
1776  else return (Dispersal(Qual, 1 + random(FemaleMovement) + 1)); // returns 1 if it has died of extra dispersal mortality or starvation
1777 }

References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), Vole_Base::CheckTraps(), Dispersal(), FemaleMovement, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, and Vole_Base::m_MinFVoleHabQual.

Referenced by Step().

◆ Step()

void Vole_JuvenileFemale::Step ( void  )
virtual

JuvenileFemale vole Step.

The Step is one of the three timestep divisions. This is called repeatedly after BeginStep and before EndStep, until all voles report that they are done with Step.

Most of the behaviours are controlled by moving voles between behavioural states in Step (for other models this is also done in BeginStep and EndStep).
When a vole is done for the day it will signal this by setting m_StepDone==true. NB that a call to one behaviour may trigger a call to another behaviour on the next call to step inside the same timestep. In this way a daily cycle of activity can be undertaken (i.e. do reproduction and explore)

Reimplemented from Vole_Base.

Reimplemented in Vole_Female.

Definition at line 1426 of file Vole_all.cpp.

1427 {
1428  if (m_StepDone) return;
1429  switch (CurrentVState)
1430  {
1431  case 0: // Initial state
1433  break;
1434  case tovs_FEvaluateExplore: // Evaluate & Explore
1435  switch(st_Evaluate_n_Explore())
1436  {
1437  case 1: // Dead from dispersal mortality
1438  CurrentVState=tovs_FDying; // Die
1439  break;
1440  case 2: // Starved
1442  CurrentVState=tovs_FDying; // Die
1443  break;
1444  default:
1445  ; // Do nothing
1446  }
1447 #ifdef __VOLEPESTICIDEON
1448  if (m_Age >= MinReproAgeF+ m_maturitydelay ) st_BecomeSubAdult();
1449 #else
1451 #endif
1452  m_StepDone=true;
1453  break;
1454  case tovs_FDying: // Die
1455  FreeLocation();
1456  m_StepDone=true;
1457  break;
1458  default:
1459  m_OurLandscape->Warn("Vole_Female::Step - unknown state",NULL);
1460  exit(9);
1461  }
1462 }

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, FreeLocation(), Vole_Base::m_Age, TAnimal::m_OurLandscape, Vole_Base::m_OurPopulation, TALMaSSObject::m_StepDone, Vole_Population_Manager::m_VoleRecordMort, MinReproAgeF, st_BecomeSubAdult(), st_Evaluate_n_Explore(), tovmort_FStarve, tovs_FDying, tovs_FEvaluateExplore, and Landscape::Warn().


The documentation for this class was generated from the following files:
insecticide_treat
Definition: treatment.h:74
Vole_Base::m_LifeSpan
int m_LifeSpan
Definition: vole_all.h:190
g_rand_uni
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
Vole_Base::m_MotherId
unsigned m_MotherId
Definition: vole_all.h:166
strigling
Definition: treatment.h:77
hay_bailing
Definition: treatment.h:89
MinReproAgeF
int MinReproAgeF
Definition: Vole_all.cpp:147
autumn_roll
Definition: treatment.h:38
Vole_Base::CurrentVState
TTypeOfVoleState CurrentVState
Definition: vole_all.h:407
Landscape::SupplyVegType
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Definition: Landscape.h:1321
Landscape::SupplyElementType
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Definition: Landscape.h:1110
Vole_Base::m_MinTerrRange
unsigned int m_MinTerrRange
Definition: vole_all.h:164
MinReproWeightF
const int MinReproWeightF
Definition: Vole_all.cpp:151
Vole_Base::MoveTo
void MoveTo(int p_Vector, int p_Distance, int iterations)
Movement.
Definition: Vole_all.cpp:907
fa_ammoniumsulphate
Definition: treatment.h:65
vob_Female
Definition: vole_all.h:103
autumn_harrow
Definition: treatment.h:37
Vole_Base::CheckTraps
void CheckTraps()
Definition: Vole_all.cpp:2800
tovs_FEvaluateExplore
Definition: vole_all.h:65
Vole_Population_Manager::SupplyGrowthStartDate
int SupplyGrowthStartDate()
Definition: VolePopulationManager.h:237
Vole_Base::m_Mature
bool m_Mature
Definition: vole_all.h:176
autumn_sow
Definition: treatment.h:41
glyphosate
Definition: treatment.h:102
harvest
Definition: treatment.h:82
VoleSoilCultivationMort
const double VoleSoilCultivationMort
Definition: Vole_all.cpp:196
cfg_VoleDDepConst
CfgInt cfg_VoleDDepConst("VOLE_DDEPCONST", CFG_CUSTOM, 4)
VoleSummaryOutput::ChangeData
void ChangeData(int a_data, int a_value)
Definition: VolePopulationManager.cpp:4048
TAnimal::m_OurLandscape
Landscape * m_OurLandscape
Definition: PopulationManager.h:229
fp_slurry
Definition: treatment.h:52
WeanedWeight
const int WeanedWeight
Definition: Vole_all.cpp:131
g_extradispmort
double g_extradispmort
Definition: Vole_all.cpp:204
fa_sludge
Definition: treatment.h:68
struct_Vole_Adult
A struct for passing data to create a new vole.
Definition: vole_all.h:122
fp_greenmanure
Definition: treatment.h:56
Vole_Base::m_MyGenes
GeneticMaterial m_MyGenes
Definition: vole_all.h:213
hay_turning
Definition: treatment.h:88
VoleHarvestMort
const double VoleHarvestMort
Definition: Vole_all.cpp:192
GrowStopDate
const int GrowStopDate
Definition: Vole_all.cpp:143
struct_Vole_Adult::weight
double weight
Definition: vole_all.h:128
tovmort_FDisp
Definition: VolePopulationManager.h:80
water
Definition: treatment.h:80
fp_liquidNH3
Definition: treatment.h:51
molluscicide
Definition: treatment.h:75
Vole_Base::m_Weight
double m_Weight
Definition: vole_all.h:192
burn_straw_stubble
Definition: treatment.h:92
Vole_Population_Manager::CreateObjects
void CreateObjects(VoleObject ob_type, TAnimal *pvo, struct_Vole_Adult *as, int number)
Definition: VolePopulationManager.cpp:3455
Vole_JuvenileFemale::st_Evaluate_n_Explore
int st_Evaluate_n_Explore()
Main territory evaluation behaviour.
Definition: Vole_all.cpp:1760
cattle_out_low
Definition: treatment.h:100
Vole_JuvenileFemale::Dispersal
int Dispersal(double p_OldQual, int p_Distance)
Female dispersal.
Definition: Vole_all.cpp:1817
fp_pk
Definition: treatment.h:50
fa_npk
Definition: treatment.h:61
cattle_out
Definition: treatment.h:83
VoleStriglingMort
const double VoleStriglingMort
Definition: Vole_all.cpp:194
MaxWeightF
const double MaxWeightF
Definition: Vole_all.cpp:135
Vole_JuvenileFemale::st_BecomeSubAdult
void st_BecomeSubAdult(void)
Definition: Vole_all.cpp:1725
fp_npk
Definition: treatment.h:49
stubble_harrowing
Definition: treatment.h:90
struct_Vole_Adult::Genes
GeneticMaterial Genes
Definition: vole_all.h:141
autumn_plough
Definition: treatment.h:34
cfg_RecordVoleMort
CfgBool cfg_RecordVoleMort
fp_manure
Definition: treatment.h:55
TAnimal::m_Location_y
int m_Location_y
Definition: PopulationManager.h:228
strigling_sow
Definition: treatment.h:95
tovs_FDying
Definition: vole_all.h:73
struct_Vole_Adult::FatherId
int FatherId
Definition: vole_all.h:135
winter_plough
Definition: treatment.h:42
struct_Vole_Adult::VPM
Vole_Population_Manager * VPM
Definition: vole_all.h:139
Vole_Base::m_DispVector
int m_DispVector
Definition: vole_all.h:202
tovmort_FBck
Definition: VolePopulationManager.h:76
tovmort_FLife
Definition: VolePopulationManager.h:84
fp_sludge
Definition: treatment.h:57
straw_chopping
Definition: treatment.h:87
Vole_Base::m_MinFVoleHabQual
static double m_MinFVoleHabQual
Definition: vole_all.h:224
fungicide_treat
Definition: treatment.h:73
deep_ploughing
Definition: treatment.h:43
Landscape::SupplyDayInYear
int SupplyDayInYear(void)
Definition: Landscape.h:1596
mow
Definition: treatment.h:93
fa_pk
Definition: treatment.h:62
Vole_Base::st_Dying
void st_Dying()
All voles end here on death.
Definition: Vole_all.cpp:348
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:118
Vole_Base::m_Sex
bool m_Sex
Definition: vole_all.h:174
spring_harrow
Definition: treatment.h:45
Vole_Base::Vole_Base
Vole_Base(struct_Vole_Adult *p_aVoleStruct)
Constructor for Vole_Base.
Definition: Vole_all.cpp:228
Vole_Base::CalculateCarryingCapacity
double CalculateCarryingCapacity(int x, int y, int a_ddep)
Definition: Vole_all.cpp:384
struct_Vole_Adult::y
int y
Definition: vole_all.h:126
struct_Vole_Adult::L
Landscape * L
Definition: vole_all.h:138
hilling_up
Definition: treatment.h:79
Landscape::EventtypeToString
std::string EventtypeToString(int a_event)
Definition: Landscape.cpp:3918
fa_manure
Definition: treatment.h:66
Vole_JuvenileFemale::FreeLocation
virtual void FreeLocation()
Location map function.
Definition: Vole_all.cpp:1792
fp_npks
Definition: treatment.h:48
row_cultivation
Definition: treatment.h:76
growthperdayF
const double growthperdayF
Definition: Vole_all.cpp:141
trial_insecticidetreat
Definition: treatment.h:96
tovmort_FStarve
Definition: VolePopulationManager.h:74
Vole_Base::m_OurPopulation
Vole_Population_Manager * m_OurPopulation
Definition: vole_all.h:408
struct_Vole_Adult::MotherId
int MotherId
Definition: vole_all.h:136
spring_plough
Definition: treatment.h:44
fa_greenmanure
Definition: treatment.h:67
Vole_Base::m_Age
int m_Age
Definition: vole_all.h:178
VolePigGrazingMort
const double VolePigGrazingMort
Definition: Vole_all.cpp:198
TAnimal::CheckManagement
void CheckManagement(void)
Definition: PopulationManager.cpp:1404
struct_Vole_Adult::VegBorn
int VegBorn
Definition: vole_all.h:133
trial_toxiccontrol
Definition: treatment.h:97
spring_roll
Definition: treatment.h:46
cut_weeds
Definition: treatment.h:94
Vole_Population_Manager::m_VoleRecordMort
VoleSummaryOutput * m_VoleRecordMort
Definition: VolePopulationManager.h:197
Vole_Base::m_BornLastYear
bool m_BornLastYear
A flag set if the female was born the year before.
Definition: vole_all.h:162
Vole_Base::Init
virtual void Init(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:240
fp_manganesesulphate
Definition: treatment.h:53
herbicide_treat
Definition: treatment.h:71
Vole_Base::m_FemaleTerritoryRangeSlope
static double m_FemaleTerritoryRangeSlope
Definition: vole_all.h:232
struct_Vole_Adult::m_flag
bool m_flag
Definition: vole_all.h:142
growth_regulator
Definition: treatment.h:72
cut_to_silage
Definition: treatment.h:86
Vole_Base::m_FatherId
unsigned m_FatherId
Definition: vole_all.h:168
struct_Vole_Adult::x
int x
Definition: vole_all.h:125
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:116
pigs_out
Definition: treatment.h:84
trial_control
Definition: treatment.h:98
Vole_JuvenileFemale::SetLocation
virtual void SetLocation()
Location map function.
Definition: Vole_all.cpp:1785
cut_to_hay
Definition: treatment.h:85
tovmort_FPred
Definition: VolePopulationManager.h:82
spring_sow
Definition: treatment.h:47
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Definition: Landscape.h:1579
struct_Vole_Adult::ElemBorn
int ElemBorn
Definition: vole_all.h:132
struct_Vole_Adult::age
int age
Definition: vole_all.h:127
sleep_all_day
Definition: treatment.h:33
Vole_Base::m_MinFemaleTerritorySize
static unsigned int m_MinFemaleTerritorySize
Definition: vole_all.h:222
Vole_Base::MortalityTest
virtual bool MortalityTest()
Do a mortality test.
Definition: Vole_all.cpp:362
Vole_Base::m_TerrRange
int m_TerrRange
Definition: vole_all.h:172
TAnimal::m_Location_x
int m_Location_x
Definition: PopulationManager.h:225
autumn_or_spring_plough
Definition: treatment.h:91
Landscape::SupplyPolyRef
int SupplyPolyRef(int a_x, int a_y)
Definition: Landscape.h:1488
tovmort_FFarm
Definition: VolePopulationManager.h:78
fa_slurry
Definition: treatment.h:63
swathing
Definition: treatment.h:81
Vole_Population_Manager::m_VoleMap
IDMap< TAnimal * > * m_VoleMap
Definition: VolePopulationManager.h:284
FemaleMovement
const unsigned FemaleMovement
Definition: Vole_all.cpp:174
struct_Vole_Adult::PolyRefBorn
int PolyRefBorn
Definition: vole_all.h:131