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

The class for juvenile male voles. More...

#include <vole_all.h>

Public Member Functions

 Vole_JuvenileMale (struct_Vole_Adult *p_aVoleStruct)
 Vole_JuvenileMale constructor. More...
 
virtual ~Vole_JuvenileMale ()
 
virtual void ReInit (struct_Vole_Adult *p_aVoleStruct)
 
virtual bool OnFarmEvent (FarmToDo event)
 JuvenileMale vole exernal event handler. More...
 
virtual void BeginStep ()
 Juvenile Male vole BeginStep. More...
 
virtual void Step ()
 Juvenile Male vole Step. More...
 
virtual void EndStep ()
 Juvenile Male vole EndStep. More...
 
virtual void OnKilled ()
 JuvenileMale vole death by 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

virtual void SetLocation ()
 Map location function. More...
 
virtual void FreeLocation ()
 Map location function. More...
 
virtual bool GetLocation (int px, int py)
 Map location function. More...
 
TTypeOfVoleState Dispersal (double p_OldQual, int p_Distance)
 JuvenileMale vole dispersal behaviour. More...
 
void DetermineTerritorySize ()
 
bool CanFeed ()
 
void st_JuvenileExplore (void)
 Extra movement on weaning. More...
 
void st_BecomeSubAdult (void)
 
TTypeOfVoleState st_Eval_n_Explore (void)
 JuvenileMale vole main territory assessment behaviour. 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 juvenile male voles.

Contains all the behaviour specific to the male vole. Only st_Infanticide and st_JuvenileExplore are specific to the male, other behaviours differ only in details from the female.

Definition at line 452 of file vole_all.h.

Constructor & Destructor Documentation

◆ Vole_JuvenileMale()

Vole_JuvenileMale::Vole_JuvenileMale ( struct_Vole_Adult p_aVoleStruct)

◆ ~Vole_JuvenileMale()

Vole_JuvenileMale::~Vole_JuvenileMale ( )
virtual

Definition at line 3333 of file Vole_all.cpp.

3334 {
3335  // Nothing to do
3336 }

Member Function Documentation

◆ BeginStep()

void Vole_JuvenileMale::BeginStep ( void  )
virtual

Juvenile Male 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.

Reimplemented from Vole_Base.

Definition at line 3108 of file Vole_all.cpp.

3109 {
3110  if (MortalityTest())
3111  {
3114  m_StepDone=true;
3115  }
3116  else
3117  {
3118  if (--m_LifeSpan<1)
3119  {
3122  m_StepDone=true;
3123  }
3124  }
3125 #ifdef __VOLEPESTICIDEON
3126  PesticideIngestion();
3127  ActOnPesticideDose();
3128 #endif
3129 }

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_MBck, tovmort_MLife, and tovs_MDying.

◆ CanFeed()

bool Vole_JuvenileMale::CanFeed ( )
inlineprotected

◆ DetermineTerritorySize()

void Vole_JuvenileMale::DetermineTerritorySize ( )
protected

◆ Dispersal()

TTypeOfVoleState Vole_JuvenileMale::Dispersal ( double  p_OldQual,
int  p_Distance 
)
protected

JuvenileMale vole dispersal behaviour.

Definition at line 3237 of file Vole_all.cpp.

3238 {
3239  if (g_rand_uni() < g_extradispmort )
3240  {
3242  return tovs_MDying;
3243  }
3244  // Returns 1 for die, 0 for carry on
3245  if (m_DispVector == -1) m_DispVector = random(8); // Choose direction 0-7
3246  // Go that far in that direction (assuming it is possible to do that)
3247  int oldx = m_Location_x;
3248  int oldy = m_Location_y;
3249  MoveTo(m_DispVector, p_Distance,10);
3250  // Now we are there so what is the new quality
3251  // 1. Get the carrying capacity
3253  if ( CC <= p_OldQual )
3254  {
3255  // Don't want to move
3256  FreeLocation();
3257  m_Location_x=oldx;
3258  m_Location_y=oldy;
3259  SetLocation();
3260  }
3261  return tovs_MEvaluateExplore;
3262 }

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(), tovmort_MDisp, tovs_MDying, and tovs_MEvaluateExplore.

Referenced by st_Eval_n_Explore().

◆ EndStep()

void Vole_JuvenileMale::EndStep ( void  )
virtual

Juvenile Male vole EndStep.

The EndStep is 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.

Reimplemented in Vole_Male.

Definition at line 3181 of file Vole_all.cpp.

3182 {
3183  CheckManagement();
3185  {
3186  st_Dying();
3187  }
3188  else
3189  {
3190  m_Age++;
3193  if (m_OurLandscape->SupplyDayInYear() == 1) {
3194  m_BornLastYear = true; // must be true if alive on 1st Jan.
3195  }
3196  }
3197 }

References TAnimal::CheckManagement(), Vole_Base::CurrentVState, growthperdayM, Vole_Base::m_Age, Vole_Base::m_BornLastYear, TAnimal::m_OurLandscape, Vole_Base::m_Weight, MinReproAgeM, Vole_Base::st_Dying(), Landscape::SupplyDayInYear(), tovs_MDying, and tovs_MMaturation.

◆ FreeLocation()

void Vole_JuvenileMale::FreeLocation ( )
inlineprotectedvirtual

◆ GetLocation()

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

Map location function.

Reimplemented from Vole_Base.

Definition at line 3094 of file Vole_all.cpp.

3094  {
3095  if( m_OurPopulation->m_VoleMap->GetMapValue(px,py)!=NULL) return true;
3096  return false;
3097  };

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

Referenced by Vole_Male::st_Eval_n_Explore().

◆ OnFarmEvent()

bool Vole_JuvenileMale::OnFarmEvent ( FarmToDo  event)
virtual

JuvenileMale vole exernal 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.
This method is inherited by the adult male class

Reimplemented from TAnimal.

Definition at line 2887 of file Vole_all.cpp.

2888 {
2889  switch(event)
2890  {
2891 case sleep_all_day:
2892  break;
2893 case autumn_plough:
2896  break;
2897 case autumn_harrow:
2900  break;
2901 case autumn_roll:
2904  break;
2905 case autumn_sow:
2908  break;
2909 case winter_plough:
2912  break;
2913 case deep_ploughing:
2916  break;
2917 case spring_plough:
2920  break;
2921 case spring_harrow:
2924  break;
2925 case spring_roll:
2928  break;
2929 case spring_sow:
2932  break;
2933 case fp_npks:
2934  break;
2935 case fp_npk:
2936  break;
2937 case fp_pk:
2938  break;
2939 case fp_liquidNH3:
2940  break;
2941 case fp_slurry:
2942  break;
2944  break;
2945 case fp_manure:
2946  break;
2947 case fp_greenmanure:
2948  break;
2949 case fp_sludge:
2950  break;
2951 case fa_npk:
2952  break;
2953 case fa_pk:
2954  break;
2955 case fa_slurry:
2956  break;
2957 case fa_ammoniumsulphate:
2958  break;
2959 case fa_manure:
2960  break;
2961 case fa_greenmanure:
2962  break;
2963 case fa_sludge:
2964  break;
2965 case glyphosate:
2966  break;
2967 case herbicide_treat:
2970  break;
2971 case growth_regulator:
2972  break;
2973 case fungicide_treat:
2974  break;
2975 case insecticide_treat:
2978  break;
2979 case molluscicide:
2980  break;
2981 case row_cultivation:
2984  break;
2985 case strigling:
2988  break;
2989 case hilling_up:
2992  break;
2993 case water:
2994  break;
2995 case swathing:
2998  break;
2999 case harvest:
3002  break;
3003 case cattle_out:
3004 case cattle_out_low:
3005  break;
3006 case cut_to_hay:
3009  break;
3010 case cut_to_silage:
3013  break;
3014 case straw_chopping:
3017  break;
3018 case hay_turning:
3021  break;
3022 case hay_bailing:
3025  break;
3026 case stubble_harrowing:
3029  break;
3033  break;
3034 case burn_straw_stubble:
3037  break;
3038 case mow:
3041  break;
3042 case cut_weeds:
3045  break;
3046 case pigs_out:
3049  break;
3050 case strigling_sow:
3053  break;
3055 case trial_toxiccontrol:
3056 case trial_control:
3057  break;
3058 default:
3059  g_msg->Warn( WARN_FILE, "Vole_JuvenileMale::OnFarmEvent(): Unknown event type:",
3061  exit( 1 );
3062  }
3063  if (CurrentVState==tovs_MDying) {
3065  return true;
3066  }
3067  else
3068  return false;
3069 }

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_MFarm, tovs_MDying, trial_control, trial_insecticidetreat, trial_toxiccontrol, VoleHarvestMort, VoleHerbicicideMort, VoleInsecticideMort, VolePigGrazingMort, VoleSoilCultivationMort, VoleStriglingMort, water, and winter_plough.

◆ OnKilled()

void Vole_JuvenileMale::OnKilled ( )
virtual

JuvenileMale vole death by external entity.

Response to external death event - most likely eaten by a explicitly modelled predator

Reimplemented from Vole_Base.

Definition at line 3302 of file Vole_all.cpp.

References cfg_RecordVoleMort, VoleSummaryOutput::ChangeData(), Vole_Base::CurrentVState, Vole_Base::m_OurPopulation, Vole_Population_Manager::m_VoleRecordMort, tovmort_MPred, and tovs_MDying.

◆ ReInit()

void Vole_JuvenileMale::ReInit ( struct_Vole_Adult p_aVoleStruct)
virtual

Reimplemented from Vole_Base.

Reimplemented in Vole_Male.

Definition at line 3323 of file Vole_all.cpp.

3323  {
3324  Init(p_aVoleStruct);
3325  m_Age = 14;
3327  m_Sex = true;
3330 }

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

◆ SetLocation()

void Vole_JuvenileMale::SetLocation ( )
inlineprotectedvirtual

Map location function.

Reimplemented from Vole_Base.

Definition at line 3076 of file Vole_all.cpp.

3076  {
3077  m_OurPopulation->m_VoleMap->SetMapValue(m_Location_x,m_Location_y,this);
3078  };

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

Referenced by Dispersal(), Vole_Male::Dispersal(), and Vole_Male::st_Eval_n_Explore().

◆ st_BecomeSubAdult()

void Vole_JuvenileMale::st_BecomeSubAdult ( void  )
protected

Definition at line 3264 of file Vole_all.cpp.

3265 {
3266  struct_Vole_Adult* av;
3267  av = new struct_Vole_Adult;
3268  av->VPM = m_OurPopulation;
3269  av->L = m_OurLandscape;
3270  if (m_MyGenes.GetDirectFlag() == 0) av->m_dflag = false; else av->m_flag = true;
3271  if (m_MyGenes.GetGeneticFlag() == 0) av->m_gflag = false; else av->m_gflag = true;
3272  av->m_flag=true; // Used to signal pesticide effect to CreateObjects
3273  // Create the new voles (50% chance of male/female)
3277  av->FatherId = m_FatherId;
3278  av->MotherId = m_MotherId;
3279  av->x = m_Location_x;
3280  av->y = m_Location_y;
3281  av->weight = m_Weight;
3282  // Do the genetics
3283  av->Genes = m_MyGenes;
3284  av->age = m_Age;
3286  // Remove the current object
3288  FreeLocation();
3289  m_CurrentStateNo = -1;
3290  m_StepDone = true;
3291 
3292 }

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, GeneticMaterial::GetDirectFlag(), GeneticMaterial::GetGeneticFlag(), struct_Vole_Adult::L, Vole_Base::m_Age, TALMaSSObject::m_CurrentStateNo, struct_Vole_Adult::m_dflag, Vole_Base::m_FatherId, struct_Vole_Adult::m_flag, struct_Vole_Adult::m_gflag, 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_MDying, struct_Vole_Adult::VegBorn, vob_Male, struct_Vole_Adult::VPM, struct_Vole_Adult::weight, struct_Vole_Adult::x, and struct_Vole_Adult::y.

Referenced by Step().

◆ st_Eval_n_Explore()

TTypeOfVoleState Vole_JuvenileMale::st_Eval_n_Explore ( void  )
protected

JuvenileMale vole main territory assessment behaviour.

Evaluates the quality of his habitat and does some limited exploration in the surrounding area to see if he can improve it by moving.
Returns 1 if it has died of extra dispersal mortality or starvation

Definition at line 3209 of file Vole_all.cpp.

3210 {
3211 #ifdef __USINGTRAPLINES
3212  CheckTraps();
3213 #endif
3216  bool NoMates = false;
3217  if (NoFemales<1) if ((g_rand_uni() < g_NoFemalesMove)) NoMates = true;
3218  //if (NoFemales<1) NoMates = true;
3219  int OldMales = 1;
3220  OldMales = m_OurPopulation->SupplyInOlderTerr(m_Location_x, m_Location_y, m_Age, m_TerrRange); // returns -1 if a male has p_x,p_y in his territory and is older than p_Age else returns the number of females present
3221  if ((Qual < m_MinJMVoleHabQual) || (OldMales<1) || NoMates)
3222  //if ((Qual < m_MinJMVoleHabQual) || (OldMales < 1))
3223  {
3224  m_DispVector = random(8);
3225  // Not quality dependent dispersal, very directed
3226  return Dispersal(-1, random(MaleMovement[0]) + 1);
3227  }
3228  else return (Dispersal(Qual, 1 + random(MaleMovement[0]) + 1));
3229 }

References Vole_Base::CalculateCarryingCapacity(), cfg_VoleDDepConst(), Vole_Base::CheckTraps(), Dispersal(), g_NoFemalesMove, g_rand_uni, Vole_Base::m_Age, Vole_Base::m_DispVector, TAnimal::m_Location_x, TAnimal::m_Location_y, Vole_Base::m_MinJMVoleHabQual, Vole_Base::m_OurPopulation, Vole_Base::m_TerrRange, MaleMovement, Vole_Population_Manager::SupplyCountFemales(), and Vole_Population_Manager::SupplyInOlderTerr().

Referenced by Step().

◆ st_JuvenileExplore()

void Vole_JuvenileMale::st_JuvenileExplore ( void  )
protected

Extra movement on weaning.

Cause the vole to do some exploration on maturity, just to move him away from the litter centre.
After this first day he will go into the normal Eval_n_Explore.

Definition at line 2873 of file Vole_all.cpp.

2874 {
2875  // Just do some movement at first
2876  MoveTo(random(8),MinMaleMovement,20);
2877 }

References MinMaleMovement, and Vole_Base::MoveTo().

Referenced by Step().

◆ Step()

void Vole_JuvenileMale::Step ( void  )
virtual

Juvenile Male 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.

Reimplemented from Vole_Base.

Reimplemented in Vole_Male.

Definition at line 3141 of file Vole_all.cpp.

3142 {
3143  if (m_StepDone || m_CurrentStateNo == -1) return;
3144  switch (CurrentVState)
3145  {
3146  case tovs_InitialState: //initial state
3148  break;
3149  case tovs_JuvenileExploration: // Juvenile Exploration
3152  m_StepDone=true;
3153  break;
3154  case tovs_MEvaluateExplore: // Eval&Explore
3156  m_StepDone=true;
3157  break;
3158  case tovs_MMaturation:
3160  break;
3161  case tovs_MDying:
3162  FreeLocation();
3163  m_StepDone=true;
3164  break;
3165  default:
3166  m_OurLandscape->Warn("Vole_JuvenileMale::Step - unknown return error",NULL);
3167  exit(1);
3168  }
3169 }

References Vole_Base::CurrentVState, FreeLocation(), TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, st_BecomeSubAdult(), st_Eval_n_Explore(), st_JuvenileExplore(), tovs_InitialState, tovs_JuvenileExploration, tovs_MDying, tovs_MEvaluateExplore, tovs_MMaturation, and Landscape::Warn().


The documentation for this class was generated from the following files:
insecticide_treat
Definition: treatment.h:74
growthperdayM
const double growthperdayM
Definition: Vole_all.cpp:139
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
MinReproAgeM
int MinReproAgeM
Definition: Vole_all.cpp:145
strigling
Definition: treatment.h:77
hay_bailing
Definition: treatment.h:89
autumn_roll
Definition: treatment.h:38
Vole_Population_Manager::SupplyCountFemales
int SupplyCountFemales(unsigned p_x, unsigned p_y, unsigned p_TerrRange)
Definition: VolePopulationManager.cpp:2897
tovmort_MPred
Definition: VolePopulationManager.h:81
Vole_Base::CurrentVState
TTypeOfVoleState CurrentVState
Definition: vole_all.h:407
Landscape::SupplyVegType
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Definition: Landscape.h:1321
tovs_MDying
Definition: vole_all.h:63
Landscape::SupplyElementType
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Definition: Landscape.h:1110
Vole_Base::m_MinTerrRange
unsigned int m_MinTerrRange
Definition: vole_all.h:164
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
autumn_harrow
Definition: treatment.h:37
Vole_Base::CheckTraps
void CheckTraps()
Definition: Vole_all.cpp:2800
Vole_JuvenileMale::SetLocation
virtual void SetLocation()
Map location function.
Definition: Vole_all.cpp:3076
Vole_JuvenileMale::st_Eval_n_Explore
TTypeOfVoleState st_Eval_n_Explore(void)
JuvenileMale vole main territory assessment behaviour.
Definition: Vole_all.cpp:3209
autumn_sow
Definition: treatment.h:41
Vole_JuvenileMale::Dispersal
TTypeOfVoleState Dispersal(double p_OldQual, int p_Distance)
JuvenileMale vole dispersal behaviour.
Definition: Vole_all.cpp:3237
glyphosate
Definition: treatment.h:102
tovmort_MLife
Definition: VolePopulationManager.h:83
harvest
Definition: treatment.h:82
VoleSoilCultivationMort
const double VoleSoilCultivationMort
Definition: Vole_all.cpp:196
cfg_VoleDDepConst
CfgInt cfg_VoleDDepConst("VOLE_DDEPCONST", CFG_CUSTOM, 4)
tovmort_MFarm
Definition: VolePopulationManager.h:77
Vole_Population_Manager::SupplyInOlderTerr
int SupplyInOlderTerr(unsigned p_x, unsigned p_y, unsigned p_Age, unsigned p_Range)
Definition: VolePopulationManager.cpp:3043
vob_Male
Definition: vole_all.h:102
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
Vole_Base::m_MinJMVoleHabQual
static double m_MinJMVoleHabQual
Definition: vole_all.h:226
WeanedWeight
const int WeanedWeight
Definition: Vole_all.cpp:131
MaleMovement
const unsigned MaleMovement[4]
Definition: Vole_all.cpp:179
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
g_NoFemalesMove
double g_NoFemalesMove
Definition: Vole_all.cpp:205
VoleHarvestMort
const double VoleHarvestMort
Definition: Vole_all.cpp:192
struct_Vole_Adult::weight
double weight
Definition: vole_all.h:128
water
Definition: treatment.h:80
fp_liquidNH3
Definition: treatment.h:51
tovs_InitialState
Definition: vole_all.h:57
GeneticMaterial::GetDirectFlag
uint32 GetDirectFlag()
Definition: GeneticMaterial.cpp:191
molluscicide
Definition: treatment.h:75
Vole_Base::m_Weight
double m_Weight
Definition: vole_all.h:192
burn_straw_stubble
Definition: treatment.h:92
tovs_JuvenileExploration
Definition: vole_all.h:59
Vole_Population_Manager::CreateObjects
void CreateObjects(VoleObject ob_type, TAnimal *pvo, struct_Vole_Adult *as, int number)
Definition: VolePopulationManager.cpp:3455
cattle_out_low
Definition: treatment.h:100
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
fp_npk
Definition: treatment.h:49
struct_Vole_Adult::m_gflag
bool m_gflag
Definition: vole_all.h:143
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
VoleHerbicicideMort
const double VoleHerbicicideMort
Definition: Vole_all.cpp:200
Vole_Base::m_MinMaleTerritorySize
static unsigned int m_MinMaleTerritorySize
Definition: vole_all.h:220
struct_Vole_Adult::FatherId
int FatherId
Definition: vole_all.h:135
MinMaleMovement
const unsigned MinMaleMovement
Definition: Vole_all.cpp:181
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
GeneticMaterial::GetGeneticFlag
uint32 GetGeneticFlag()
Definition: GeneticMaterial.cpp:187
tovmort_MDisp
Definition: VolePopulationManager.h:79
fp_sludge
Definition: treatment.h:57
straw_chopping
Definition: treatment.h:87
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
VoleInsecticideMort
const double VoleInsecticideMort
Definition: Vole_all.cpp:202
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_JuvenileMale::FreeLocation
virtual void FreeLocation()
Map location function.
Definition: Vole_all.cpp:3085
fp_npks
Definition: treatment.h:48
row_cultivation
Definition: treatment.h:76
trial_insecticidetreat
Definition: treatment.h:96
Vole_JuvenileMale::st_BecomeSubAdult
void st_BecomeSubAdult(void)
Definition: Vole_all.cpp:3264
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
tovmort_MBck
Definition: VolePopulationManager.h:75
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
tovs_MMaturation
Definition: vole_all.h:60
trial_control
Definition: treatment.h:98
cut_to_hay
Definition: treatment.h:85
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::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
struct_Vole_Adult::m_dflag
bool m_dflag
Definition: vole_all.h:144
fa_slurry
Definition: treatment.h:63
swathing
Definition: treatment.h:81
tovs_MEvaluateExplore
Definition: vole_all.h:61
Vole_JuvenileMale::st_JuvenileExplore
void st_JuvenileExplore(void)
Extra movement on weaning.
Definition: Vole_all.cpp:2873
Vole_Population_Manager::m_VoleMap
IDMap< TAnimal * > * m_VoleMap
Definition: VolePopulationManager.h:284
struct_Vole_Adult::PolyRefBorn
int PolyRefBorn
Definition: vole_all.h:131