ALMaSS Rabbit ODdox  1.00
The rabbit model description following ODdox protocol
Rabbit_Population_Manager.cpp
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 
4 Copyright (c) 2015, Christopher John Topping, Faarupvej 54, DK-8410 Rønde
5 ADAMA Makhteshim Ltd., PO Box 60, Beer-Sheva 84100, Israel
6 
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are met:
11 
12 1. Redistributions of source code must retain the above copyright notice, this
13 list of conditions and the following disclaimer.
14 2. Redistributions in binary form must reproduce the above copyright notice,
15 this list of conditions and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17 
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 
29 The views and conclusions contained in the software and documentation are those
30 of the authors and should not be interpreted as representing official policies,
31 either expressed or implied, of the FreeBSD Project.
32 
33 ********************************************************************************************************
34 
35 */
44 //---------------------------------------------------------------------------
45 
46 //#define __RABBITBREEDINGSEASONCHECK
47 //#define __RABBITDEBUG2
48 
49 
50 #include <iostream>
51 #include <fstream>
52 #include <vector>
53 #include <math.h>
54 #include "../BatchALMaSS/ALMaSS_Setup.h"
55 #include "../ALMaSSDefines.h"
56 #include "../Landscape/ls.h"
57 #include "../BatchALMaSS/PopulationManager.h"
58 #include "../Rabbit/Rabbit.h"
59 #include "../Rabbit/Rabbit_Population_Manager.h"
60 #include "../BatchALMaSS/BoostRandomGenerators.h"
61 //---------------------------------------------------------------------------------------
62 
63 extern boost::variate_generator<base_generator_type&, boost::uniform_real<> > g_rand_uni;
71 //---------------------------------------------------------------------------------------
72 
74 static CfgInt cfg_RabbitStartNos("RABBIT_STARTNOS",CFG_CUSTOM,25000);
76 CfgInt cfg_warrenfixedsize("RABBIT_WARRENFIXEDSIZE",CFG_CUSTOM,45);
78 static CfgBool cfg_warrenreadlocations("RABBIT_WARRENREADLOCATIONS", CFG_CUSTOM, true);
80 static CfgStr cfg_warrenlocationsfile("RABBIT_WARRENLOCATIONSFILE", CFG_CUSTOM, "RabbitWarrenLocations.txt");
82 static CfgInt cfg_warrenoccupancyrecordday("RABBIT_WARRENOCCUPANCYRECORDDAY", CFG_CUSTOM, 60);
84 static CfgInt cfg_maxWarrenNetworkDist("RABBIT_MAXWARRENNETWORKDIST",CFG_CUSTOM,1500);
86 static CfgFloat cfg_rabbitminbreedingtemp("RABBIT_MINBREEDINGTEMP",CFG_CUSTOM,300.0);
88 static CfgBool cfg_rabbit_use_fixed_soiltype("RABBIT_USE_FIXED_SOIL_TYPE", CFG_CUSTOM, true);
90 static CfgInt cfg_rabbit_fix_soiltype("RABBIT_FIX_SOIL_TYPE", CFG_CUSTOM, 0); // 0 chalk, 1 sand
92 CfgInt cfg_rabbitdensitydependencedelay( "RABBIT_DENDEPPERIOD", CFG_CUSTOM, 53 );
94 CfgInt cfg_rabbitdiseasedensitydependencedelay( "RABBITDISEASEDENDEPPERIOD", CFG_CUSTOM, 90 );
96 static CfgFloat cfg_rabbitdailygrowthparam1("RABBIT_DAILYGROWTHPARAM_ONE", CFG_CUSTOM, 1127.616084);
98 static CfgFloat cfg_rabbitdailygrowthparam2("RABBIT_DAILYGROWTHPARAM_TWO", CFG_CUSTOM, -0.013143202);
100 static CfgFloat cfg_rabbitdailygrowthparam3("RABBIT_DAILYGROWTHPARAM_THREE", CFG_CUSTOM, 0.0);
102 static CfgFloat cfg_rabbitminimumforagetemp( "RABBIT_MINFORAGETEMP", CFG_CUSTOM, -0.83 );
104 static CfgFloat cfg_rabbitmaxforagerainfall( "RABBIT_MAXFORAGERAINFALL", CFG_CUSTOM, 3.6 );
106 CfgBool cfg_RabbitUseNatalDispersalRecord( "RABBIT_USENATALDISPERSALRECORD", CFG_CUSTOM, false );
108 CfgInt cfg_RabbitUseNatalDispersalRecordAge( "RABBIT_USENATALDISPERSALRECORDAGE", CFG_CUSTOM, 30*6 );
110 CfgBool cfg_RabbitUseReproOutput("RABBIT_USEREPROOUTPUT", CFG_CUSTOM, false);
111 // Globals created from input parameters - this is just to avoid unnecessary calculations later. NB these must be initialized in the code after program start
112 int g_land_width = 0;
113 
114 //***************************************************************************
115 //*************** RABBIT POPULATION MANAGER CODE ****************************
116 //***************************************************************************
117 
119 {
121  m_ListNames[0] = "Young";
122  m_ListNames[1] = "Juvenile";
123  m_ListNames[2] = "Male";
124  m_ListNames[3] = "Female";
125  m_ListNames[4] = "Possible Warrens";
126  m_ListNameLength = 5;
128  g_land_width = m_TheLandscape->SupplySimAreaWidth(); // Needs the landscape to be square!!!
129 
130  strcpy( m_SimulationName, "Rabbit Simulation" );
135  struct_Rabbit* sp = new struct_Rabbit;
136  sp->m_NPM = this;
137  sp->m_L = m_TheLandscape;
138  sp->m_age = 100+random(265);
139  sp->m_Warren = NULL;
140  sp->m_x2 = -1;
141  sp->m_y2 = -1;
142  sp->m_weightage = 300; // Should not be weak animals to start with
143 
144  for (int i = 0; i< cfg_RabbitStartNos.value(); i++)
145  {
146  sp->m_x = random(SimW);
147  sp->m_y = random(SimH);
148  CreateObjects(rob_Male,NULL,sp,1); //
149  }
150  for (int i=0; i< cfg_RabbitStartNos.value(); i++)
151  {
152  sp->m_x = random(SimW);
153  sp->m_y = random(SimH);
154  CreateObjects(rob_Female,NULL,sp,1); //
155  }
156  delete sp;
157  // Load parameters
158  Rabbit_Warren::m_maxForageHeight = cfg_maxForageHeight.value();
159  Rabbit_Base::m_dispersalmortperm = cfg_dispersalmortperm.value();
162  m_reproswitchbuffer = 30;
163  m_rabbitBreedingSeason = false;
164 
170  {
172  }
173  else
174  {
177  }
179  // Open output files
180  if (cfg_RipleysOutput_used.value()) {
182  }
187  // Assign static variable
189  // Create the rabbit growth rate lookup data
190  for (int i = 1; i < 300; i++) {
192  }
193  // Now fill this in for up to 10 years (no rabbit should ever live that long )
194  for (int i = 300; i < 3350; i++) {
196  }
197 
198 }
199 //---------------------------------------------------------------------------
200 
202 {
205  struct_Rabbit* sp = new struct_Rabbit;
206  sp->m_NPM = this;
207  sp->m_L = m_TheLandscape;
208  sp->m_age = 100 + random(265);
209  sp->m_Warren = NULL;
210  Rabbit_Female* rf = new Rabbit_Female(0,0,-1,-1,m_TheLandscape,this,0, 300,NULL);
211  Rabbit_Warren* rw = new Rabbit_Warren(0, 0, m_TheLandscape, this, 0, NULL);
212  rw->m_maxForageHeight = cfg_maxForageHeight.value();
213  rw->m_minForageDigestability = cfg_minForageDigestability.value();
214  rf->m_dispersalmortperm = cfg_dispersalmortperm.value();
215  rf->SetMinKits(cfg_rabbitminkits.value());
216  rf->SetMaxKits(cfg_rabbitmaxkits.value() - cfg_rabbitminkits.value()); // Here we actually use the difference to calculate range
217  rf->m_pesticidedegradationrate = cfg_rabbit_pesticidedegradationrate.value(); // default of 0.0 will remove all body burden pesticide at the end of each day
218  delete rw;
219  delete rf;
220 }
221 //---------------------------------------------------------------------------
222 
224 {
233  }
237  }
239  for (unsigned i = 0; i < TheArray.size(); i++) {
240  for ( unsigned j = 0; j < TheArray[ i ].size(); j++ ) {
241  // This just stops a DEBUG error
242  TheArray[ i ] [ j ]->KillThis();
243  }
244  }
245 }
246 //---------------------------------------------------------------------------
247 
249 {
259  switch (ob_type)
260  {
261  case rob_Young:
262  Rabbit_Young* new_RabbitY;
263  for (int i=0; i<a_number; i++)
264  {
265  new_RabbitY = new Rabbit_Young(a_data->m_x, a_data->m_y, a_data->m_x2, a_data->m_y2, dynamic_cast<Rabbit_Female*>(pvo), a_data->m_L, a_data->m_NPM, a_data->m_Warren);
266  TheArray[ob_type].push_back(new_RabbitY);
267  dynamic_cast<Rabbit_Female*>(pvo)->AddYoung(new_RabbitY);
268  }
269  break;
270  case rob_Juvenile:
271  Rabbit_Juvenile* new_RabbitJ;
272  for (int i=0; i<a_number; i++)
273  {
274  new_RabbitJ = new Rabbit_Juvenile(a_data->m_x, a_data->m_y, a_data->m_x2, a_data->m_y2, dynamic_cast<Rabbit_Female*>(pvo), a_data->m_L, a_data->m_NPM, a_data->m_age, a_data->m_weightage, a_data->m_Warren);
275  TheArray[ob_type].push_back(new_RabbitJ);
276  }
277  break;
278  case rob_Male:
279  Rabbit_Male* new_RabbitM;
280  for (int i=0; i<a_number; i++)
281  {
282  new_RabbitM = new Rabbit_Male(a_data->m_x, a_data->m_y, a_data->m_x2, a_data->m_y2, a_data->m_L, a_data->m_NPM, a_data->m_age, a_data->m_weightage, a_data->m_Warren);
283  TheArray[ob_type].push_back(new_RabbitM);
284  }
285  break;
286  case rob_Female:
287  Rabbit_Female* new_RabbitF;
288  for (int i=0; i<a_number; i++)
289  {
290  new_RabbitF = new Rabbit_Female(a_data->m_x, a_data->m_y, a_data->m_x2, a_data->m_y2, a_data->m_L, a_data->m_NPM, a_data->m_age, a_data->m_weightage, a_data->m_Warren);
291  TheArray[ob_type].push_back(new_RabbitF);
292  }
293  break;
294  case rob_Warren:
295  Rabbit_Warren* new_RabbitW;
296  for (int i=0; i<a_number; i++)
297  {
301  new_RabbitW = new Rabbit_Warren(a_data->m_x, a_data->m_y, a_data->m_L, a_data->m_NPM, m_warrenfixedsize, a_data->m_soil);
302  if (new_RabbitW->GetCarryingCapacity()>0) TheArray[ob_type].push_back(new_RabbitW);
303  else delete new_RabbitW;
304  }
305  break;
306  }
307 }
308 //---------------------------------------------------------------------------
309 
311 {
312 #ifdef __RABBITDEBUG2
313  if (m_TheLandscape->SupplyYearNumber()== 1000)
314  if (m_TheLandscape->SupplyDayInYear() == 1) {
319  struct_Rabbit* sp = new struct_Rabbit;
320  sp->m_NPM = this;
321  sp->m_L = m_TheLandscape;
322  sp->m_age = 100 + random( 265 );
323  sp->m_Warren = NULL;
324  sp->m_x2 = -1;
325  sp->m_y2 = -1;
326  sp->m_weightage = 300; // Should not be weak animals to start with
327 
328  for (int i = 0; i< 500; i++) {
329  sp->m_x = random( SimW );
330  sp->m_y = random( SimH );
331  CreateObjects( rob_Male, NULL, sp, 1 ); //
332  }
333  for (int i = 0; i< 500; i++) {
334  sp->m_x = random( SimW );
335  sp->m_y = random( SimH );
336  CreateObjects( rob_Female, NULL, sp, 1 ); //
337  }
338  delete sp;
339  }
340 #endif
342  for (int r = (int)rob_Young; r < (int)rob_foobar; r++)
343  {
344  m_PesticideDeaths[r] = 0;
345  }
346  // Manage warren disease
348  {
349  for (unsigned i = 0; i < TheArray[rob_Warren].size(); i++) dynamic_cast<Rabbit_Warren*>(TheArray[rob_Warren][i])->CalcDisease();
350  }
351  // Determine whether today is forage day
352  double rainfall = m_TheLandscape->SupplyRain();
353  double temp = m_TheLandscape->SupplyTemp();
354  if ((temp<cfg_rabbitminimumforagetemp.value()) || (rainfall>cfg_rabbitmaxforagerainfall.value())) m_forageday = false; else m_forageday = true;
355 }
356 //---------------------------------------------------------------------------
357 
359 {
360  int today = m_TheLandscape->SupplyDayInYear();
361  // Do the output jobs
362  // Pesticide deaths
364  // Warren occupancy
373 }
374 //---------------------------------------------------------------------------
375 
377 {
386  cout << "Preprocessing Warren Locations" << endl;
387  int x = 0;
388  int y = 0;
389  int soil = 0;
390  for (int j=y; j<SimH-m_warrenfixedsize; j++)
391  {
392  for (int i=x; i<SimW-m_warrenfixedsize; i++)
393  {
394  if ( WarrenLegalPos(i,j) )
395  {
397  else
398  {
399  soil = m_TheLandscape->SupplySoilTypeR(i, j);
400  }
402  double pct = AssessPctForage(i,j);
403  if ((soil) != 3) // Soil type 3 is unsuitable therefore skipped
404  {
405  // Soil type 1 is sandy, 0 is chalk or otherwise hard soil
406  if (pct >= 1.0)
407  {
412  struct_Rabbit sR;
413  sR.m_NPM = this;
414  sR.m_L = m_TheLandscape;
415  sR.m_x = i;
416  sR.m_y = j;
417  sR.m_soil = soil;
418  CreateObjects(rob_Warren, NULL, &sR, 1);
419  --i += m_warrenfixedsize;
420  if (static_cast<unsigned>(TheArray.size()) % 1000 == 0) cout << TheArray.size() << '\t';
421  }
422  }
423  }
424  }
425  }
426 }
427 //---------------------------------------------------------------------------
428 
430 {
440  // If it is not in a warren already then we are legal here.
441  int sz = (int) TheArray[rob_Warren].size();
442  for (int i=0; i< sz; i++)
443  {
444  APoint pt = dynamic_cast<Rabbit_Warren*>(TheArray[rob_Warren][i])->SupplyPoint();
445  if ((abs(pt.m_x-a_x) < m_warrenfixedsize) && (abs(pt.m_y-a_y) < m_warrenfixedsize))
446  {
447  a_x += m_warrenfixedsize;
448  return false;
449  }
450  }
451  return true;
452 }
453 //---------------------------------------------------------------------------
454 
456 {
464  static char error_num[ 20 ];
465  switch (a_tole)
466  {
467  case tole_UnsprayedFieldMargin://31
468  case tole_Field://20&30
469  case tole_RoadsideVerge://13
470  case tole_BeetleBank://141
471  return torh_TemporaryForage;
472  break;
473  case tole_Railway://118
474  case tole_FieldBoundary://160
475  case tole_PermPastureLowYield://26
476  case tole_PermPastureTussocky://27
477  case tole_PermanentSetaside://33
478  case tole_PermPasture://35
479  case tole_NaturalGrassDry://110//case tole11
480  case tole_PitDisused://75
481  case tole_YoungForest://55
482  case tole_HedgeBank://140
483  case tole_Heath://94
484  case tole_Parkland://14
485  case tole_SandDune://101
486  case tole_Orchard://56
487  case tole_RoadsideSlope: //201
488  case tole_HeritageSite: //208
489  case tole_UnknownGrass:
490  case tole_Vildtager:
491  case tole_MownGrass:
492  case tole_Wasteland:
493  return torh_Forage;
494  break;
495  case tole_Hedges://130
496  case tole_Copse://41
497  case tole_Scrub://70
498  case tole_RiversideTrees://97
499  case tole_DeciduousForest://40
500  case tole_MixedForest://60
501  case tole_ConiferousForest://50
502  case tole_WoodlandMargin:
504  return torh_Cover;
505  break;
506  case tole_UrbanPark: //17
508  case tole_Churchyard: //204
509  case tole_Saltmarsh: //206
510  case tole_Stream: //207
511  case tole_Carpark: //203
512  case tole_IndividualTree: //42
513  case tole_MetalledPath: //202
514  case tole_StoneWall://15
515  case tole_Garden://11//case tole20
516  case tole_Track://123
517  case tole_SmallRoad://122
518  case tole_LargeRoad://121
519  case tole_Building://5
520  case tole_ActivePit://115
521  case tole_Pond:
522  case tole_Freshwater://90
523  case tole_FishFarm:
524  case tole_River://96
525  case tole_Saltwater://80
526  case tole_Coast://100
527  case tole_UrbanNoVeg://6
528  case tole_BuiltUpWithParkland://16
529  case tole_AmenityGrass://12
530  case tole_OrchardBand://57
531  case tole_BareRock://59
532  case tole_Marsh://95
533  case tole_RiversidePlants://98
534  case tole_PlantNursery:
535  case tole_Pylon:
536  case tole_WindTurbine:
538  return torh_Other;
539  break;
540  default:
541  sprintf( error_num, "%d", a_tole );
542  m_TheLandscape->Warn("Rabbit_Warren::InitEvaluation Unknown tole type: ", error_num);
543  exit(1);
544  break;
545  }
546 }
547 //---------------------------------------------------------------------------
548 
550 {
558 
568 
582 
591 
613 
643 
700 
738 
776 
854 
890 
914 
1066 
1162 
static CfgFloat cfg_rabbitminimumforagetemp("RABBIT_MINFORAGETEMP", CFG_CUSTOM,-0.83)
Input variable. The minimum forage temperature for rabbits.
void SetMaxKits(double a_num)
Definition: Rabbit.h:463
void ReproOutputRecordOutputClose()
Closes the reproductive output file.
The rabbit young class. All special young behaviour is described here.
Definition: Rabbit.h:319
The landscape class containing all environmental and topographical data.
Definition: landscape.h:109
CfgFloat cfg_minForageDigestability
Input variable. Input variable. The minimum digestability desirable for forage vegetation.
bool m_forageday
Flag to record whether today is a possible forage day.
bool m_rabbitBreedingSeason
The breeding season flag.
The rabbit female class. All special female behaviour is described here.
Definition: Rabbit.h:443
int m_warrenfixedsizediv2
Half max warren size in m - for speed.
RabbitObjectTypes
Definition: Rabbit.h:68
CfgFloat cfg_rabbit_pesticidedegradationrate
Holds 1-proportion of decay of body burden of pesticide per day. Default of 0.0 will remove all body ...
static double m_minForageDigestability
The minimum vegetation digestability allowed for foraging.
Definition: Rabbit.h:543
Rabbit_Warren * m_Warren
A pointer to the current warren.
Rabbit_Population_Manager * m_NPM
Rabbit_Population_Manager pointer.
static CfgFloat cfg_rabbitdailygrowthparam2("RABBIT_DAILYGROWTHPARAM_TWO", CFG_CUSTOM,-0.013143202)
Input variable. Parameter two of the rabbit growth curve.
void LoadWarrenLocations(void)
Load warren locations.
void CreateLocalWarrenNetworkLists(void)
Forms the local warren network list for this warren.
void WarrenOccupancyRecordOutput()
Print warren occupancy record to file.
void AssignStaticVariables()
Assigns any static variables needing config variable assignment.
static CfgFloat cfg_rabbitdailygrowthparam3("RABBIT_DAILYGROWTHPARAM_THREE", CFG_CUSTOM, 0.0)
Input variable. Parameter three of the rabbit growth curve.
static CfgStr cfg_warrenlocationsfile("RABBIT_WARRENLOCATIONSFILE", CFG_CUSTOM,"RabbitWarrenLocations.txt")
Input variable. The warren locations file.
The rabbit male class. All special male behaviour is described here.
Definition: Rabbit.h:422
Integer configurator entry class.
Definition: configurator.h:85
static double m_pesticidedegradationrate
State variable used to hold the daily degredation rate of the pesticide in the body.
Definition: Rabbit.h:174
CfgInt cfg_warrenfixedsize("RABBIT_WARRENFIXEDSIZE", CFG_CUSTOM, 45)
Input variable. The maximum size for a warren (length m). Value is 45 for light soil 55 for heavy soi...
A class to describe the rabbits warren system.
Definition: Rabbit.h:518
int m_y2
y-coord of birth
CfgBool cfg_RabbitUseNatalDispersalRecord("RABBIT_USENATALDISPERSALRECORD", CFG_CUSTOM, false)
Flag to denote using lifetime repro output file or not.
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Definition: landscape.h:1031
static CfgFloat cfg_rabbitdailygrowthparam1("RABBIT_DAILYGROWTHPARAM_ONE", CFG_CUSTOM, 1127.616084)
Input variable. Parameter one of the rabbit growth curve.
virtual ~Rabbit_Population_Manager(void)
Rabbit_Population_Manager Destructor.
double value(void)
Definition: configurator.h:107
int m_warrenfixedsize
Holds an input variable for max warren size in m.
vector< TListOfAnimals > TheArray
int SupplySimAreaWidth(void)
Definition: landscape.h:1558
int SupplySoilTypeR(int a_x, int a_y)
Returns the soil type in rabbit warren reference numbers.
Definition: landscape.h:430
Base class for all population managers.
void NatalDispersalRecordOutputClose()
Closes the reproductive output file.
void CreateObjects(RabbitObjectTypes ob_type, TAnimal *pvo, struct_Rabbit *a_data, int a_number)
Method for creating a new individual Rabbit.
bool WarrenLegalPos(int &a_x, int a_y)
Tests the warrens list to see if this position is legal.
void CheckForRabbitBreedingConditions(void)
Determines whether it is breeding season.
Used for creation of a new Rabbit object.
The rabbit juvenile class. All special juvenile behaviour is described here.
Definition: Rabbit.h:347
virtual void DoLast()
Things to do after the EndStep.
TTypesOfRabbitHabitat
A classification of rabbit habitat types. All landscape elements will be classified into one of the c...
Definition: Rabbit.h:101
Rabbit_Population_Manager(Landscape *L)
Rabbit_Population_Manager Constructor.
double AssessPctForage(int a_x, int a_y)
Assesses the percentage of forage for a location assuming max warren size.
static CfgInt cfg_rabbit_fix_soiltype("RABBIT_FIX_SOIL_TYPE", CFG_CUSTOM, 0)
Input variable. The soil type applied to all warrens.
static CfgBool cfg_rabbit_use_fixed_soiltype("RABBIT_USE_FIXED_SOIL_TYPE", CFG_CUSTOM, true)
Input variable. Assume fixed soil type or use landscape info?
CfgInt cfg_rabbitdiseasedensitydependencedelay("RABBITDISEASEDENDEPPERIOD", CFG_CUSTOM, 90)
Input variable. The period between recalculation of rabbit disease probability.
CfgInt cfg_rabbitdensitydependencedelay("RABBIT_DENDEPPERIOD", CFG_CUSTOM, 53)
Input variable. The period between recalculation of rabbit disease probability.
void PreProcessWarrenLocations()
This pre-scans the landscape and determines all potential warren locations on start-up.
int SupplyYearNumber(void)
Definition: landscape.h:1542
bool value(void)
Definition: configurator.h:123
void ReproOutputRecordOutputOpen()
Opens the reproductive output file.
int m_weightage
The rabbit age in terms of weight.
int m_age
The rabbit age.
void WarrenOccupancyRecordOutputOpen()
Opens the warren occupancy output file.
double SupplyRain(void)
Definition: landscape.h:1291
static CfgBool cfg_warrenreadlocations("RABBIT_WARRENREADLOCATIONS", CFG_CUSTOM, true)
Input variable. Should warren locations be calculated or read from a file?
CfgFloat cfg_rabbitminkits
The minimum number of kits in a litter.
The base class for all ALMaSS animal classes.
int m_PesticideDeaths[rob_foobar]
Holds the number of rabbits killed each day by pesticides.
int m_soil
The current warren soil type.
static CfgFloat cfg_rabbitminbreedingtemp("RABBIT_MINBREEDINGTEMP", CFG_CUSTOM, 300.0)
Input variable. The minimum 60 day average temperature for rabbit breeding.
double m_RabbitGrowth[3650]
Holds daily growth potential of rabbits for each day.
void SaveWarrenLocations(void)
Save warren locations.
String configurator entry class.
Definition: configurator.h:132
Bool configurator entry class.
Definition: configurator.h:116
TTypesOfRabbitHabitat ClassifyHabitat(TTypesOfLandscapeElement a_tole)
Classify a landscape element type according to the rabbit habitat classification. ...
static CfgInt cfg_maxWarrenNetworkDist("RABBIT_MAXWARRENNETWORKDIST", CFG_CUSTOM, 1500)
Input variable. The maximum distance between directly connected warrens.
CfgFloat cfg_maxForageHeight
Input variable. The maximum height desirable for forage vegetation.
CfgInt cfg_RabbitUseNatalDispersalRecordAge("RABBIT_USENATALDISPERSALRECORDAGE", CFG_CUSTOM, 30 *6)
Flag to denote using lifetime repro output file or not.
int SupplyDayInYear(void)
Definition: landscape.h:1522
void WarrenOutputAnalysis()
Does analysis on the warren output file and saves the results to RabbitPOMSummary.txt.
static double m_dispersalmortperm
The extra dispersal mortality per m travelled.
Definition: Rabbit.h:172
CfgBool cfg_RabbitUseReproOutput("RABBIT_USEREPROOUTPUT", CFG_CUSTOM, false)
Flag to denote using lifetime repro output file or not.
void PesticideDeathRecordOutputOpen()
Opens pesticide death output file.
static CfgInt cfg_warrenoccupancyrecordday("RABBIT_WARRENOCCUPANCYRECORDDAY", CFG_CUSTOM, 60)
Output control - the day in year for recording warren and population data.
void NatalDispersalAnalysis()
Does analysis on the natal dispersal output file and saves the results to RabbitPOMSummary.txt.
virtual void DoFirst()
Things to do before anything else at the start of a timestep.
void NatalDispersalRecordOutputOpen()
Opens the reproductive output file.
void PesticideDeathRecordOutput()
Print pesticide death record to file.
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
CfgFloat cfg_dispersalmortperm
Input variable. The additional mortality rate with distance for between warren dispersal.
void Warn(std::string a_msg1, std::string a_msg2)
Definition: landscape.h:1505
CfgBool cfg_RipleysOutput_used
int m_x2
x-coord of birth
int value(void)
Definition: configurator.h:92
void LifetimeReproAnalysis()
Does analysis on the lifetime reproductive output file and saves the results to RabbitPOMSummary.txt.
static CfgFloat cfg_rabbitmaxforagerainfall("RABBIT_MAXFORAGERAINFALL", CFG_CUSTOM, 3.6)
Input variable. The maximum rainfall before rabbits are assumed not to forage.
static CfgInt cfg_RabbitStartNos("RABBIT_STARTNOS", CFG_CUSTOM, 25000)
The starting number of rabbits.
TTypesOfLandscapeElement
void PesticideDeathRecordOutputClose()
Closes the pesticide death output file.
int m_reproswitchbuffer
Prevents continuous breeding season switching.
void SetMinKits(double a_num)
Definition: Rabbit.h:462
Double configurator entry class.
Definition: configurator.h:100
static double m_maxForageHeight
The maximum vegetation height assumed for forage potential.
Definition: Rabbit.h:541
const char * m_ListNames[10]
Landscape * m_L
Landscape pointer.
int GetCarryingCapacity()
Returns the carrying capacity in burrows.
Definition: Rabbit.h:578
Landscape * m_TheLandscape
double SupplyTemp(void)
Definition: landscape.h:1312
CfgFloat cfg_rabbitmaxkits
The maximum number of kits in a litter.
void WarrenOccupancyRecordOutputClose()
Closes the warren occupancy output file.