ALMaSS Rodenticide Model ODdox  1.0
LE Class Reference

#include <elements.h>

Public Member Functions

void AddArea (double a_area_diff)
 
void BumpRunNum (void)
 
void DoCopy (const LE *a_Le)
 a copy function to be used because a copy constuctor won't work More...
 
virtual void DoDevelopment (void)
 
virtual void ForceGrowthDevelopment (void)
 
virtual void ForceGrowthInitialize (void)
 
virtual void ForceGrowthTest (void)
 
int GetALMaSSEleType (void)
 
double GetArea (void)
 
double GetBirdMaize (void)
 
double GetBirdSeed (void)
 
LEGetBorder (void)
 
int GetCattleGrazing (void)
 
virtual APoint GetCentroid ()
 
virtual int GetCentroidX ()
 
virtual int GetCentroidY ()
 
int GetCountryDesignation (void)
 
virtual double GetDayDegrees (void)
 
virtual double GetDeadBiomass (void)
 
virtual double GetDigestability (void)
 
virtual TTypesOfLandscapeElement GetElementType (void)
 
double GetGooseGrazingForage (GooseSpecies a_goose)
 
int GetGooseNos ()
 For goose model functionality, returns the number of geese yesterday. More...
 
int GetGooseNosToday ()
 For goose model functionality, returns the number of geese today. More...
 
int GetGooseNosTodayTimed ()
 For goose model functionality, returns the number of geese today at a predefined time. More...
 
int GetGooseSpNosToday (GooseSpecies a_goose)
 For goose model functionality, returns the number of geese per species yesterday. More...
 
int GetGooseSpNosTodayTimed (GooseSpecies a_goose)
 For goose model functionality, returns the number of geese per species yesterday at a predefined time. More...
 
virtual double GetGreenBiomass (void)
 
bool GetHigh (void)
 
virtual double GetInsectPop (void)
 
virtual double GetLAGreen (void)
 
TTypesOfVegetation GetLastSownVeg ()
 Returns the last vegetation type to be sown. More...
 
int GetLastTreatment (int *a_index)
 
virtual double GetLATotal (void)
 
int GetMapIndex (void)
 
bool GetMapValid (void)
 
int GetMaxX (void)
 
int GetMaxY (void)
 
int GetMConstants (int a)
 
int GetMDates (int a, int b)
 
long GetMgtLoopDetectCount (void)
 
long GetMgtLoopDetectDate (void)
 
int GetMinX (void)
 
int GetMinY (void)
 
long GetOldDays (void)
 
int GetOpenness (void)
 For goose model functionality, openness score for the polygon. More...
 
Farm * GetOwner (void)
 
int GetOwnerFile (void)
 
int GetOwnerIndex (void)
 
int GetPesticideCell ()
 
bool GetPigGrazing (void)
 
bool GetPoison (void)
 
int GetPoly (void)
 Returns the polyref number for this polygon. More...
 
virtual TTypesOfVegetation GetPreviousCrop (int)
 
int GetRotIndex (void)
 
long GetRunNum (void)
 
LE_Signal GetSignal (void)
 
virtual bool GetSkScrapes (void)
 
int GetSoilType ()
 
int GetSoilTypeR ()
 
int GetSubType (void)
 
virtual double GetTrafficLoad (void)
 
int GetUnsprayedMarginPolyRef (void)
 
int GetValidX (void)
 
int GetValidY (void)
 
int GetVegAge ()
 
virtual double GetVegBiomass (void)
 
virtual double GetVegCover (void)
 
virtual int GetVegDensity (void)
 
virtual double GetVegHeight (void)
 
virtual bool GetVegPatchy (void)
 
virtual int GetVegPhase (void)
 
int GetVegStore (void)
 
virtual TTypesOfVegetation GetVegType (void)
 
virtual double GetWeedBiomass (void)
 
virtual void GrazeVeg_Extended (double)
 
virtual void GrazeVegetation (double, bool)
 
virtual void GrazeVegetationTotal (double)
 
bool HasTramlines (void)
 
virtual void Insecticide (double)
 
virtual void InsectMortality (double)
 
virtual bool IsCereal ()
 
virtual bool IsGrass ()
 
virtual bool IsMaleNewtPresent ()
 Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts. More...
 
virtual bool IsMatureCereal ()
 
bool IsRecentlyMown (void)
 
int IsRecentlySprayed (void)
 
 LE (void)
 
virtual void RecalculateBugsNStuff (void)
 
virtual void ReduceVeg (double)
 
virtual void ReduceVeg_Extended (double)
 
virtual void ReduceWeedBiomass (double)
 
virtual void ResetDigestability ()
 sets growth record to zero in descendent classes More...
 
void ResetTrace (void)
 
void SetALMaSSEleType (int a_type)
 
void SetArea (double a_area)
 
void SetBirdMaize (double a_forage)
 
void SetBirdSeed (double a_forage)
 
void SetBorder (LE *a_border)
 
virtual void SetCentroid (int x, int y)
 
void SetCopyTreatment (int a_treatment)
 
void SetCountryDesignation (int a_designation)
 
virtual void SetCropData (double, double, double, TTypesOfVegetation, double, int)
 
virtual void SetCropDataAll (double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
 
void SetElementType (int a_type)
 
void SetGooseNos (int a_number, int a_day)
 
void SetGooseNosTimed (int a_number, int a_day)
 
void SetGooseSpNos (int a_number, int a_day, GooseSpecies a_goose)
 
void SetGooseSpNosTimed (int a_number, int a_day, GooseSpecies a_goose)
 
virtual void SetGrowthPhase (int)
 
void SetHerbicideDelay (int a_decaytime_days)
 
void SetHigh (bool a_high)
 
virtual void SetInsectPop (double)
 
void SetLastSownVeg (TTypesOfVegetation a_tov)
 Records the last vegetation type to be sown. More...
 
void SetLastTreatment (int a_treatment)
 
virtual void SetMaleNewtPresent (bool)
 Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts. More...
 
void SetMapIndex (int a_map_index)
 
void SetMapValid (bool a_valid)
 
void SetMaxX (int x)
 
void SetMaxY (int y)
 
void SetMConstants (int a, int c)
 
void SetMDates (int a, int b, int c)
 
void SetMgtLoopDetectCount (long a_num)
 
void SetMgtLoopDetectDate (long a_num)
 
void SetMinX (int x)
 
void SetMinY (int y)
 
void SetMownDecay (int a_decaytime_days)
 
void SetOldDays (long a_days)
 
void SetOpenness (int a_openness)
 Records the openness statistic for this polygon. More...
 
void SetOwner (Farm *a_owner, int a_owner_num, int a_owner_index)
 
void SetPesticideCell (int a_cell)
 
void SetPoison (bool a_poison)
 
void SetPoly (int a_poly)
 
void SetRotIndex (int a_index)
 
void SetSignal (LE_Signal a_signal)
 
void SetSoilType (int a_st)
 
void SetSubType (int a_subtype)
 
void SetTramlinesDecay (int a_decaytime_days)
 
void SetUnsprayedMarginPolyRef (int a_unsprayedmargin)
 
void SetValidXY (int a_valid_x, int a_valid_y)
 
virtual void SetVegBiomass (int)
 
virtual void SetVegHeight (double)
 
virtual void SetVegParameters (double, double, double, double)
 
virtual void SetVegPatchy (bool)
 
void SetVegStore (int a_veg)
 
virtual void SetVegType (TTypesOfVegetation, TTypesOfVegetation)
 
virtual void StoreLAItotal ()
 
void Tick (void)
 
virtual void ToggleCattleGrazing (void)
 
virtual void TogglePigGrazing (void)
 
void Trace (int a_value)
 
virtual void ZeroVeg (void)
 
void ZeroVegAge ()
 
virtual ~LE (void)
 

Public Attributes

bool m_repeat_start
 
bool m_skylarkscrapes
 For management testing of skylark scrapes. More...
 
int m_squares_in_map
 
int m_tried_to_do
 
long m_user [EL_MAX_USERSPACE]
 Variable used to record the current grazing pressure by e.g. voles. More...
 

Protected Attributes

int m_almass_le_type
 This holds the ALMaSS element type reference number. More...
 
double m_area
 
double m_birdmaizeforage
 The maize forage present in KJ/m2. More...
 
double m_birdseedforage
 The grain forage present in KJ/m2. More...
 
LEm_border
 
int m_cattle_grazing
 
int m_centroidx
 
int m_centroidy
 
int m_countrydesignation
 
int m_days_since_insecticide_spray
 
double m_ddegs
 
int m_default_grazing_level
 
int m_farmfunc_tried_to_do
 
double m_goosegrazingforage [gs_foobar]
 The grazing forage present in KJ/min. More...
 
int m_gooseNos [366]
 The number of geese each day. More...
 
int m_gooseNosTimed [366]
 The number of geese at a predefined time per day. More...
 
int m_gooseSpNos [366][gs_foobar]
 The number of geese of each species each day. More...
 
int m_gooseSpNosTimed [366][gs_foobar]
 The number of geese of each species at a predefined time per day. More...
 
int m_herbicidedelay
 
bool m_high
 
bool m_is_in_map
 
unsigned int m_lastindex
 
TTypesOfVegetation m_lastsownvegtype
 Records the last vegegetation type that was sown on the element. More...
 
vector< intm_lasttreat
 
long m_management_loop_detect_count
 
long m_management_loop_detect_date
 
int m_map_index
 
int m_maxx
 
int m_maxy
 
int m_minx
 
int m_miny
 
int m_mowndecay
 
long m_olddays
 
int m_openness
 The openness metric for a field (if any) More...
 
Farm * m_owner
 
int m_owner_file
 
int m_owner_index
 
int m_PesticideGridCell
 
bool m_pig_grazing
 
bool m_poison
 
int m_poly
 The polyref number for this polygon. More...
 
int m_rot_index
 
long m_running
 
LE_Signal m_signal_mask
 
int m_soiltype
 
int m_subtype
 
int m_tramlinesdecay
 
TTypesOfLandscapeElement m_type
 
int m_unsprayedmarginpolyref
 
int m_valid_x
 
int m_valid_y
 
int m_vegage
 
int m_vege_danger_store
 
double m_yddegs
 
int MConsts [10]
 
int MDates [2][25]
 

Static Protected Attributes

static double m_largeroad_load []
 
static double m_monthly_traffic []
 Used for birds that feed on grain on cereal fields 3% spill is expected. More...
 
static double m_smallroad_load []
 

Constructor & Destructor Documentation

LE::LE ( void  )

The major job of this constructor is simply to provide default values for all members

267  {
268 
272  m_signal_mask = 0;
273  m_lasttreat.resize(1);
274  m_lasttreat[0] = sleep_all_day;
275  m_lastindex = 0;
276  m_running = 0;
277  m_poison = false;
278  m_owner_file = -1;
279  m_owner_index = -1;
280  m_high = false;
281  m_cattle_grazing = 0;
282  m_default_grazing_level = 0; // this means any grazed elements must set this in their constructor.
283  m_pig_grazing = false;
284  m_yddegs = 0.0;
285  m_olddays = 0;
287  m_tramlinesdecay = 0;
288  m_mowndecay = 0;
289  m_herbicidedelay = 0;
290  m_border = NULL;
292  m_valid_x = -1;
293  m_valid_y = -1;
294  m_is_in_map = false;
295  m_squares_in_map = 0;
298  m_repeat_start = false;
299  m_skylarkscrapes = false;
300  m_type = tole_Foobar;
301  SetALMaSSEleType(-1);
302  m_ddegs = 0.0;
303  m_maxx = -1; // a very small number
304  m_maxy = -1;
305  m_minx = 9999999; // a very big number
306  m_miny = 9999999;
307  m_countrydesignation = -1; // default not set
308  m_soiltype = -1;
309  m_area = 0;
310  m_centroidx = -1;
311  m_centroidy = -1;
312  m_vege_danger_store = -1;
313  m_PesticideGridCell = -1;
314  m_subtype = -1;
315  m_owner = NULL;
316  m_rot_index = -1;
317  m_poly = -1;
318  m_map_index = -1;
319  m_almass_le_type = -1;
321  m_birdseedforage = -1;
322  m_birdmaizeforage = -1;
323  m_openness = -1;
324  m_vegage = -1;
325  for (int i = 0; i<10; i++) SetMConstants(i, 1);
326  for (int i = 0; i < 366; i++)
327  {
328  m_gooseNos[i] = 0;
329  m_gooseNosTimed[i] = 0;
330  for (int l = 0; l < gs_foobar; l++)
331  {
332  m_gooseSpNos[i][l] = 0;
333  m_gooseSpNosTimed[i][l] = 0;
334  }
335  }
336  for (int l = 0; l < gs_foobar; l++)
337  {
338  m_goosegrazingforage[l] = 0;
339  }
340  for (int i = 0; i < 25; i++)
341  {
342  MDates[0][i] = -1;
343  MDates[1][i] = -1;
344  }
345  SetLastSownVeg(tov_Undefined);
346 #ifdef FMDEBUG
347  m_pindex = 0;
348  for ( int i = 0; i < 256; i++ ) {
349  m_pdates[ i ] = 0;
350  m_ptrace[ i ] = 0;
351  }
352 #endif
353 }
int m_minx
Definition: elements.h:397
int m_unsprayedmarginpolyref
Definition: elements.h:382
int m_valid_y
Definition: elements.h:387
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:432
int m_squares_in_map
Definition: elements.h:86
long m_running
Definition: elements.h:370
int m_gooseNos[366]
The number of geese each day.
Definition: elements.h:422
int m_default_grazing_level
Definition: elements.h:445
bool m_poison
Definition: elements.h:443
int m_maxx
Definition: elements.h:396
LE_Signal m_signal_mask
Definition: elements.h:458
int m_mowndecay
Definition: elements.h:417
int m_PesticideGridCell
Definition: elements.h:391
int m_vegage
Definition: elements.h:439
bool m_is_in_map
Definition: elements.h:393
long m_management_loop_detect_date
Definition: elements.h:401
bool m_repeat_start
Definition: elements.h:106
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
Definition: elements.h:287
int m_almass_le_type
This holds the ALMaSS element type reference number.
Definition: elements.h:414
int m_soiltype
Definition: elements.h:440
int m_herbicidedelay
Definition: elements.h:418
int m_valid_x
Definition: elements.h:386
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: elements.h:88
bool m_high
Definition: elements.h:442
vector< int > m_lasttreat
Definition: elements.h:450
int MDates[2][25]
Definition: elements.h:456
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min.
Definition: elements.h:434
long m_olddays
Definition: elements.h:400
int m_map_index
Definition: elements.h:412
double m_ddegs
Definition: elements.h:448
int m_centroidx
Definition: elements.h:388
LE * m_border
Definition: elements.h:381
unsigned int m_lastindex
Definition: elements.h:451
Farm * m_owner
Definition: elements.h:403
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:424
int m_centroidy
Definition: elements.h:389
int m_miny
Definition: elements.h:399
int m_tramlinesdecay
Definition: elements.h:416
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:430
int m_farmfunc_tried_to_do
Definition: elements.h:415
bool m_pig_grazing
Definition: elements.h:446
int m_countrydesignation
Definition: elements.h:404
int m_owner_index
Definition: elements.h:406
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
Definition: elements.h:426
double m_yddegs
Definition: elements.h:447
int m_rot_index
Definition: elements.h:407
int m_poly
The polyref number for this polygon.
Definition: elements.h:409
void SetALMaSSEleType(int a_type)
Definition: elements.h:112
int m_owner_file
Definition: elements.h:405
int m_vege_danger_store
Definition: elements.h:390
int m_subtype
Definition: elements.h:395
TTypesOfLandscapeElement m_type
Definition: elements.h:419
int m_cattle_grazing
Definition: elements.h:444
int m_days_since_insecticide_spray
Definition: elements.h:441
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:428
void SetMConstants(int a, int c)
Definition: elements.h:336
double m_area
Definition: elements.h:420
long m_management_loop_detect_count
Definition: elements.h:402
int m_openness
The openness metric for a field (if any)
Definition: elements.h:438
int m_maxy
Definition: elements.h:398
LE::~LE ( void  )
virtual

References ResetTrace(), and Trace().

434  {
435 }

Member Function Documentation

void LE::AddArea ( double  a_area_diff)
inline

Referenced by Landscape::BeetleBankAdd(), Landscape::BorderScan(), and Landscape::UnsprayedMarginScan().

308 { m_area += a_area_diff; }
double m_area
Definition: elements.h:420
void LE::BumpRunNum ( void  )
inline
118 { m_running++; }
long m_running
Definition: elements.h:370
void LE::DoCopy ( const LE a_Le)

a copy function to be used because a copy constuctor won't work

The major job of this method is simply to copy values for all members from one LE to another

References m_almass_le_type, m_area, m_birdmaizeforage, m_birdseedforage, m_border, m_cattle_grazing, m_centroidx, m_centroidy, m_countrydesignation, m_days_since_insecticide_spray, m_ddegs, m_default_grazing_level, m_farmfunc_tried_to_do, m_goosegrazingforage, m_gooseNos, m_gooseNosTimed, m_gooseSpNos, m_gooseSpNosTimed, m_herbicidedelay, m_high, m_is_in_map, m_lastindex, m_lasttreat, m_management_loop_detect_count, m_management_loop_detect_date, m_map_index, m_maxx, m_maxy, m_minx, m_miny, m_mowndecay, m_olddays, m_openness, m_owner, m_owner_file, m_owner_index, m_PesticideGridCell, m_pig_grazing, m_poison, m_poly, m_repeat_start, m_rot_index, m_running, m_signal_mask, m_skylarkscrapes, m_soiltype, m_squares_in_map, m_subtype, m_tramlinesdecay, m_type, m_unsprayedmarginpolyref, m_valid_x, m_valid_y, m_vegage, m_vege_danger_store, m_yddegs, MConsts, and MDates.

Referenced by Landscape::Landscape().

355  {
356 
360  m_signal_mask = a_LE->m_signal_mask;
361  m_lasttreat = a_LE->m_lasttreat;
362  m_lastindex = a_LE->m_lastindex;
363  m_running = a_LE->m_running;
364  m_poison = a_LE->m_poison;
365  m_owner_file = a_LE->m_owner_file;
366  m_owner_index = a_LE->m_owner_index;
367  m_high = a_LE->m_high;
368  m_cattle_grazing = a_LE->m_cattle_grazing;
369  m_default_grazing_level = a_LE->m_default_grazing_level; // this means any grazed elements must set this in their constructor.
370  m_pig_grazing = a_LE->m_pig_grazing;
371  m_yddegs = a_LE->m_yddegs;
372  m_olddays = a_LE->m_olddays;
373  m_days_since_insecticide_spray = a_LE->m_days_since_insecticide_spray;
374  m_tramlinesdecay = a_LE->m_tramlinesdecay;
375  m_mowndecay = a_LE->m_mowndecay;
376  m_herbicidedelay = a_LE->m_herbicidedelay;
377  m_border = a_LE->m_border;
378  m_unsprayedmarginpolyref = a_LE->m_unsprayedmarginpolyref;
379  m_valid_x = a_LE->m_valid_x;
380  m_valid_y = a_LE->m_valid_y;
381  m_is_in_map = a_LE->m_is_in_map;
382  m_squares_in_map = a_LE->m_squares_in_map;
383  m_management_loop_detect_date = a_LE->m_management_loop_detect_date;
384  m_management_loop_detect_count = a_LE->m_management_loop_detect_count;
385  m_repeat_start = a_LE->m_repeat_start;
386  m_skylarkscrapes = a_LE->m_skylarkscrapes;
387  m_type = a_LE->m_type;
388  m_birdseedforage = a_LE->m_birdseedforage;
389  m_birdmaizeforage = a_LE->m_birdmaizeforage;
390  m_ddegs = a_LE->m_ddegs;
391  m_maxx = a_LE->m_maxy; // a very small number
392  m_maxy = a_LE->m_maxx;
393  m_minx = a_LE->m_minx; // a very big number
394  m_miny = a_LE->m_miny;
395  m_countrydesignation = a_LE->m_countrydesignation; // default not set
396  m_soiltype = a_LE->m_soiltype;
397  m_area = a_LE->m_area;
398  m_centroidx = a_LE->m_centroidx;
399  m_centroidy = a_LE->m_centroidy;
400  m_vege_danger_store = a_LE->m_vege_danger_store;
401  m_PesticideGridCell = a_LE->m_PesticideGridCell;
402  m_subtype = a_LE->m_subtype;
403  m_owner = a_LE->m_owner;
404  m_rot_index = a_LE->m_rot_index;
405  m_poly = a_LE->m_poly;
406  m_map_index = a_LE->m_map_index;
407  m_almass_le_type = a_LE->m_almass_le_type;
408  m_farmfunc_tried_to_do = a_LE->m_farmfunc_tried_to_do;
409  m_openness = a_LE->m_openness;
410  m_vegage = a_LE->m_vegage;
411  for (int i = 0; i < 366; i++)
412  {
413  m_gooseNos[i] = a_LE->m_gooseNos[i];
414  m_gooseNosTimed[i] = a_LE->m_gooseNosTimed[i];
415  for (int l = 0; l < gs_foobar; l++)
416  {
417  m_gooseSpNos[i][l] = a_LE->m_gooseSpNos[i][l];
418  m_gooseSpNosTimed[i][l] = a_LE->m_gooseSpNosTimed[i][l];
419  }
420  }
421  for (int l = 0; l < gs_foobar; l++)
422  {
423  m_goosegrazingforage[l] = a_LE->m_goosegrazingforage[l];
424  }
425  for (int i = 0; i < 25; i++)
426  {
427  MDates[0][i] = a_LE->MDates[0][i];
428  MDates[1][i] = a_LE->MDates[1][i];
429  }
430  for (int i = 0; i<10; i++) SetMConstants(i, a_LE->MConsts[i]);
431 }
int m_minx
Definition: elements.h:397
int m_unsprayedmarginpolyref
Definition: elements.h:382
int m_valid_y
Definition: elements.h:387
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:432
int m_squares_in_map
Definition: elements.h:86
long m_running
Definition: elements.h:370
int m_gooseNos[366]
The number of geese each day.
Definition: elements.h:422
int m_default_grazing_level
Definition: elements.h:445
bool m_poison
Definition: elements.h:443
int m_maxx
Definition: elements.h:396
LE_Signal m_signal_mask
Definition: elements.h:458
int m_mowndecay
Definition: elements.h:417
int m_PesticideGridCell
Definition: elements.h:391
int m_vegage
Definition: elements.h:439
bool m_is_in_map
Definition: elements.h:393
long m_management_loop_detect_date
Definition: elements.h:401
bool m_repeat_start
Definition: elements.h:106
int m_almass_le_type
This holds the ALMaSS element type reference number.
Definition: elements.h:414
int m_soiltype
Definition: elements.h:440
int m_herbicidedelay
Definition: elements.h:418
int m_valid_x
Definition: elements.h:386
bool m_skylarkscrapes
For management testing of skylark scrapes.
Definition: elements.h:88
bool m_high
Definition: elements.h:442
vector< int > m_lasttreat
Definition: elements.h:450
int MDates[2][25]
Definition: elements.h:456
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min.
Definition: elements.h:434
long m_olddays
Definition: elements.h:400
int m_map_index
Definition: elements.h:412
double m_ddegs
Definition: elements.h:448
int m_centroidx
Definition: elements.h:388
LE * m_border
Definition: elements.h:381
unsigned int m_lastindex
Definition: elements.h:451
Farm * m_owner
Definition: elements.h:403
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:424
int m_centroidy
Definition: elements.h:389
int m_miny
Definition: elements.h:399
int m_tramlinesdecay
Definition: elements.h:416
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:430
int m_farmfunc_tried_to_do
Definition: elements.h:415
bool m_pig_grazing
Definition: elements.h:446
int m_countrydesignation
Definition: elements.h:404
int m_owner_index
Definition: elements.h:406
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
Definition: elements.h:426
double m_yddegs
Definition: elements.h:447
int m_rot_index
Definition: elements.h:407
int m_poly
The polyref number for this polygon.
Definition: elements.h:409
int m_owner_file
Definition: elements.h:405
int m_vege_danger_store
Definition: elements.h:390
int m_subtype
Definition: elements.h:395
TTypesOfLandscapeElement m_type
Definition: elements.h:419
int m_cattle_grazing
Definition: elements.h:444
int m_days_since_insecticide_spray
Definition: elements.h:441
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:428
void SetMConstants(int a, int c)
Definition: elements.h:336
double m_area
Definition: elements.h:420
long m_management_loop_detect_count
Definition: elements.h:402
int m_openness
The openness metric for a field (if any)
Definition: elements.h:438
int m_maxy
Definition: elements.h:398
virtual void LE::ForceGrowthDevelopment ( void  )
inlinevirtual

Reimplemented in VegElement.

173 {;}
virtual void LE::ForceGrowthInitialize ( void  )
inlinevirtual

Reimplemented in VegElement.

171 {;}
virtual void LE::ForceGrowthTest ( void  )
inlinevirtual

Reimplemented in VegElement.

172 {;}
int LE::GetALMaSSEleType ( void  )
inline
111 { return m_almass_le_type; }
int m_almass_le_type
This holds the ALMaSS element type reference number.
Definition: elements.h:414
double LE::GetArea ( void  )
inline

Referenced by Landscape::BeetleBankPossible(), and Landscape::BorderScan().

196 { return m_area; }
double m_area
Definition: elements.h:420
double LE::GetBirdMaize ( void  )
inline
204  {
205  return m_birdmaizeforage;
206  }
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:432
double LE::GetBirdSeed ( void  )
inline
198  {
199  return m_birdseedforage;
200  }
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:430
LE* LE::GetBorder ( void  )
inline

Referenced by Landscape::BorderScan().

309 { return m_border; }
LE * m_border
Definition: elements.h:381
int LE::GetCattleGrazing ( void  )
inline
183 { return m_cattle_grazing; }
int m_cattle_grazing
Definition: elements.h:444
APoint LE::GetCentroid ( )
virtual

References APoint::m_x, and APoint::m_y.

515 {
516  APoint p;
517  p.m_x=m_centroidx;
518  p.m_y=m_centroidy;
519  return p;
520 }
int m_y
Definition: ALMaSS_Setup.h:54
int m_centroidx
Definition: elements.h:388
int m_centroidy
Definition: elements.h:389
int m_x
Definition: ALMaSS_Setup.h:53
A simple class defining an x,y coordinate set.
Definition: ALMaSS_Setup.h:50
virtual int LE::GetCentroidX ( )
inlinevirtual

Referenced by Landscape::BeetleBankPossible(), and Landscape::BorderScan().

137 { return m_centroidx; }
int m_centroidx
Definition: elements.h:388
virtual int LE::GetCentroidY ( )
inlinevirtual

Referenced by Landscape::BeetleBankPossible(), and Landscape::BorderScan().

138 { return m_centroidy; }
int m_centroidy
Definition: elements.h:389
int LE::GetCountryDesignation ( void  )
inline
210 { return m_countrydesignation; }
int m_countrydesignation
Definition: elements.h:404
virtual double LE::GetDayDegrees ( void  )
inlinevirtual
149 { return m_ddegs; }
double m_ddegs
Definition: elements.h:448
virtual double LE::GetDeadBiomass ( void  )
inlinevirtual

Reimplemented in VegElement.

153 { return 0.0; }
virtual double LE::GetDigestability ( void  )
inlinevirtual

Reimplemented in VegElement.

140 { return 0.0; }
virtual TTypesOfLandscapeElement LE::GetElementType ( void  )
inlinevirtual

Referenced by Landscape::ReadPolys2().

113 { return m_type; }
TTypesOfLandscapeElement m_type
Definition: elements.h:419
double LE::GetGooseGrazingForage ( GooseSpecies  a_goose)
inline
197 { return m_goosegrazingforage[a_goose]; }
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min.
Definition: elements.h:434
int LE::GetGooseNos ( )

For goose model functionality, returns the number of geese yesterday.

This simply looks X days behind at the moment and sums the total number of geese seen.The length of the backward count can be altered by changing the config variable value cfg_goosecountperiod (default 1, only care about yesterday).

References cfg_goosecountperiod().

522  {
527  int geese = 0;
528  for (unsigned i = 1; i <= (unsigned)cfg_goosecountperiod.value( ); i++) {
529  unsigned ind = ((unsigned)g_date->DayInYear( ) - i) % 365;
530  geese += m_gooseNos[ ind ];
531  }
532  return geese;
533 }
int m_gooseNos[366]
The number of geese each day.
Definition: elements.h:422
CfgInt cfg_goosecountperiod("GOOSE_GOOSECOUNTPERIOD", CFG_CUSTOM, 1)
The number of days a goose count can be used.
int LE::GetGooseNosToday ( )

For goose model functionality, returns the number of geese today.

This simply sums the total number of geese seen today.

535  {
539  int geese = 0;
540  for (unsigned i = 0; i < (unsigned)gs_foobar; i++) {
541  geese += m_gooseSpNos[g_date->DayInYear()][i];
542  }
543  return geese;
544 }
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:424
int LE::GetGooseNosTodayTimed ( )

For goose model functionality, returns the number of geese today at a predefined time.

This simply sums the total number of geese seen today at our predefined timepoint.

546  {
550  int geese = 0;
551  for (unsigned i = 0; i < (unsigned)gs_foobar; i++) {
552  geese += m_gooseSpNosTimed[g_date->DayInYear()][i];
553  }
554  return geese;
555 }
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:428
int LE::GetGooseSpNosToday ( GooseSpecies  a_goose)

For goose model functionality, returns the number of geese per species yesterday.

Returns the number of geese of a specific species on a field today.

558  {
559  return m_gooseSpNos[g_date->DayInYear()][a_goose];
560 }
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:424
int LE::GetGooseSpNosTodayTimed ( GooseSpecies  a_goose)

For goose model functionality, returns the number of geese per species yesterday at a predefined time.

Returns the number of geese of a specific species on a field today.

563  {
564  return m_gooseSpNosTimed[g_date->DayInYear()][a_goose];
565 }
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:428
virtual double LE::GetGreenBiomass ( void  )
inlinevirtual

Reimplemented in VegElement.

152 { return 0.0; }
bool LE::GetHigh ( void  )
inline
182 { return m_high; }
bool m_high
Definition: elements.h:442
virtual double LE::GetInsectPop ( void  )
inlinevirtual

Reimplemented in VegElement.

156 { return 0.0; }
virtual double LE::GetLAGreen ( void  )
inlinevirtual

Reimplemented in VegElement.

150 { return 0.0; }
TTypesOfVegetation LE::GetLastSownVeg ( )
inline

Returns the last vegetation type to be sown.

293  {
294  return m_lastsownvegtype;
295  }
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
Definition: elements.h:436
int LE::GetLastTreatment ( int a_index)
491  {
492  if ( * a_index == ( int )m_lastindex )
493  return sleep_all_day;
494  int i = ( * a_index ) ++;
495  int treat = m_lasttreat[ i ];
496  return treat;
497 }
vector< int > m_lasttreat
Definition: elements.h:450
unsigned int m_lastindex
Definition: elements.h:451
virtual double LE::GetLATotal ( void  )
inlinevirtual

Reimplemented in VegElement.

151 { return 0.0; }
int LE::GetMapIndex ( void  )
inline
190 { return m_map_index; }
int m_map_index
Definition: elements.h:412
bool LE::GetMapValid ( void  )
inline
222 { return m_is_in_map; }
bool m_is_in_map
Definition: elements.h:393
int LE::GetMaxX ( void  )
inline
325 { return m_maxx; }
int m_maxx
Definition: elements.h:396
int LE::GetMaxY ( void  )
inline
326 { return m_maxy; }
int m_maxy
Definition: elements.h:398
int LE::GetMConstants ( int  a)
inline
335 {return MConsts[a];}
int MConsts[10]
Definition: elements.h:457
int LE::GetMDates ( int  a,
int  b 
)
inline
333 {return MDates[a][b];}
int MDates[2][25]
Definition: elements.h:456
long LE::GetMgtLoopDetectCount ( void  )
inline
long m_management_loop_detect_count
Definition: elements.h:402
long LE::GetMgtLoopDetectDate ( void  )
inline
long m_management_loop_detect_date
Definition: elements.h:401
int LE::GetMinX ( void  )
inline
327 { return m_minx; }
int m_minx
Definition: elements.h:397
int LE::GetMinY ( void  )
inline
328 { return m_miny; }
int m_miny
Definition: elements.h:399
long LE::GetOldDays ( void  )
inline
212 { return m_olddays; }
long m_olddays
Definition: elements.h:400
int LE::GetOpenness ( void  )
inline

For goose model functionality, openness score for the polygon.

338 { return m_openness; }
int m_openness
The openness metric for a field (if any)
Definition: elements.h:438
Farm* LE::GetOwner ( void  )
inline
195 { return m_owner; }
Farm * m_owner
Definition: elements.h:403
int LE::GetOwnerFile ( void  )
inline
192 { return m_owner_file; }
int m_owner_file
Definition: elements.h:405
int LE::GetOwnerIndex ( void  )
inline
193 { return m_owner_index; }
int m_owner_index
Definition: elements.h:406
int LE::GetPesticideCell ( )
inline
316 { return m_PesticideGridCell; }
int m_PesticideGridCell
Definition: elements.h:391
bool LE::GetPigGrazing ( void  )
inline
184 { return m_pig_grazing; }
bool m_pig_grazing
Definition: elements.h:446
bool LE::GetPoison ( void  )
inline
180 { return m_poison; }
bool m_poison
Definition: elements.h:443
int LE::GetPoly ( void  )
inline

Returns the polyref number for this polygon.

Referenced by Landscape::BorderScan(), Landscape::FindFieldCenter(), and Landscape::UnsprayedMarginScan().

189 { return m_poly; }
int m_poly
The polyref number for this polygon.
Definition: elements.h:409
virtual TTypesOfVegetation LE::GetPreviousCrop ( int  )
inlinevirtual

Reimplemented in Field.

179 { return tov_None; }
int LE::GetRotIndex ( void  )
inline
301 { return m_rot_index; }
int m_rot_index
Definition: elements.h:407
long LE::GetRunNum ( void  )
inline
117 { return m_running; }
long m_running
Definition: elements.h:370
LE_Signal LE::GetSignal ( void  )
inline
107 { return m_signal_mask; }
LE_Signal m_signal_mask
Definition: elements.h:458
virtual bool LE::GetSkScrapes ( void  )
inlinevirtual

Reimplemented in VegElement.

142 { return false; }
int LE::GetSoilType ( )
inline

/brief Gets the soil type ref number for the polygon

% Agricultural Usage AlmCode SoilType 0.99% None 0 Lake 4.45% None 1 Sand dunes 11.73% Poor 2 Lavbund 0.78% None 3 Marshland 6.28% Good 4 Clay / Sand 0.54% None 5 Sand dunes 4.57% Average 6 Moraine sand and gravel 38.11% Good 7 Moraine clay and silt( clay soil ) 19.31% Poor 8 Sandy 1.03% Good 9 Heavy Clay 9.91% Average 10 Sand / gravel - how is this different from moraine sand and gravel, smaller gravels maybe, no flints ? 1.79% Poor 11 Limestone ? 0.34% Poor 12 Chalk 0.15% None 13 Stoney

235  {
253  return m_soiltype;
254  }
int m_soiltype
Definition: elements.h:440
int LE::GetSoilTypeR ( )
inline

/brief Gets the soil type ref number for the polygon for rabbit warrens

The soil type follows the Danish Soil Classification and is denoted by a JB number see GetSoilType. Those types that are Sandy return 1, otherwise suitable for burrows 0, and 3 if unsuitable. If not soil types are specified then heavy soils suitable for long-term burrows are returned as default.

256  {
261  switch (m_soiltype)
262  {
263  case 0: return 3;
264  case 1: return 1;
265  case 2: return 3;
266  case 3: return 3;
267  case 4: return 0;
268  case 5: return 1;
269  case 6: return 0;
270  case 7: return 0;
271  case 8: return 1;
272  case 9: return 0;
273  case 10: return 0;
274  case 11: return 0;
275  case 12: return 0;
276  case 13: return 3;
277  default:
278  return 3;
279  }
280  }
int m_soiltype
Definition: elements.h:440
int LE::GetSubType ( void  )
inline
109 { return m_subtype; }
int m_subtype
Definition: elements.h:395
virtual double LE::GetTrafficLoad ( void  )
inlinevirtual

Reimplemented in SmallRoad, and LargeRoad.

178 { return 0.0; }
int LE::GetUnsprayedMarginPolyRef ( void  )
inline

Referenced by Field::DoDevelopment(), and Landscape::UnsprayedMarginScan().

311 { return m_unsprayedmarginpolyref; }
int m_unsprayedmarginpolyref
Definition: elements.h:382
int LE::GetValidX ( void  )
inline

Referenced by Landscape::BorderAdd(), Landscape::UnsprayedMarginAdd(), and Landscape::UnsprayedMarginScan().

322 { return m_valid_x; }
int m_valid_x
Definition: elements.h:386
int LE::GetValidY ( void  )
inline

Referenced by Landscape::BorderAdd(), Landscape::UnsprayedMarginAdd(), and Landscape::UnsprayedMarginScan().

323 { return m_valid_y; }
int m_valid_y
Definition: elements.h:387
int LE::GetVegAge ( )
inline
130 { return m_vegage; }
int m_vegage
Definition: elements.h:439
virtual double LE::GetVegBiomass ( void  )
inlinevirtual

Reimplemented in VegElement.

154 { return 0.0; }
virtual double LE::GetVegCover ( void  )
inlinevirtual

Reimplemented in VegElement.

134 { return 0.0; }
virtual int LE::GetVegDensity ( void  )
inlinevirtual

Reimplemented in VegElement.

141 { return 0; }
virtual double LE::GetVegHeight ( void  )
inlinevirtual

Reimplemented in VegElement.

135 { return 0.0; }
virtual bool LE::GetVegPatchy ( void  )
inlinevirtual

Reimplemented in VegElement.

146 { return false; }
virtual int LE::GetVegPhase ( void  )
inlinevirtual

Reimplemented in VegElement.

133 { return vegphase_foobar; }
int LE::GetVegStore ( void  )
inline
126 { return m_vege_danger_store; }
int m_vege_danger_store
Definition: elements.h:390
virtual TTypesOfVegetation LE::GetVegType ( void  )
inlinevirtual

Reimplemented in VegElement.

125 { return tov_None; }
virtual double LE::GetWeedBiomass ( void  )
inlinevirtual

Reimplemented in VegElement.

155 { return 0.0; }
virtual void LE::GrazeVeg_Extended ( double  )
inlinevirtual
177 { ; }
virtual void LE::GrazeVegetation ( double  ,
bool   
)
inlinevirtual

/brief Reduces the total vegetation biomass as a result of grazing in descendent classes, per m2 mass

Reimplemented in VegElement.

226  {
227  ;
228  }
virtual void LE::GrazeVegetationTotal ( double  )
inlinevirtual

/brief Reduces the total vegetation biomass as a result of grazing in descendent classes, total polygon mass

Reimplemented in VegElement.

231  {
232  ;
233  }
bool LE::HasTramlines ( void  )
inline
185 { return ( m_tramlinesdecay>0 ); }
int m_tramlinesdecay
Definition: elements.h:416
virtual void LE::Insecticide ( double  )
inlinevirtual

Reimplemented in VegElement.

158 { ; }
virtual void LE::InsectMortality ( double  )
inlinevirtual

Reimplemented in VegElement.

159 { ; }
virtual bool LE::IsCereal ( void  )
inlinevirtual

Reimplemented in VegElement.

144 { return false; }
virtual bool LE::IsGrass ( )
inlinevirtual

Reimplemented in VegElement.

145 { return false; }
virtual bool LE::IsMaleNewtPresent ( )
inlinevirtual

Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts.

Reimplemented in Pond.

370 { return false; };
virtual bool LE::IsMatureCereal ( void  )
inlinevirtual

Reimplemented in VegElement.

143 { return false; }
bool LE::IsRecentlyMown ( void  )
inline
186 { return ( m_mowndecay>0 ); }
int m_mowndecay
Definition: elements.h:417
int LE::IsRecentlySprayed ( void  )
inline
187 { return ( m_herbicidedelay ); }
int m_herbicidedelay
Definition: elements.h:418
virtual void LE::RecalculateBugsNStuff ( void  )
inlinevirtual

Reimplemented in VegElement.

132 { }
virtual void LE::ReduceVeg ( double  )
inlinevirtual

Reimplemented in VegElement.

175 {;}
virtual void LE::ReduceVeg_Extended ( double  )
inlinevirtual

Reimplemented in VegElement.

176 { ; }
virtual void LE::ReduceWeedBiomass ( double  )
inlinevirtual

Reimplemented in VegElement.

160 { ; }
virtual void LE::ResetDigestability ( )
inlinevirtual

sets growth record to zero in descendent classes

Reimplemented in VegElement.

364 { ; }
void LE::ResetTrace ( void  )

Referenced by ~LE().

461  {
462 }
void LE::SetALMaSSEleType ( int  a_type)
inline

Referenced by ActivePit::ActivePit(), AmenityGrass::AmenityGrass(), BareRock::BareRock(), BeetleBank::BeetleBank(), Landscape::BeetleBankAdd(), Building::Building(), BuiltUpWithParkland::BuiltUpWithParkland(), Carpark::Carpark(), ChameleonLE::ChameleonLE(), Churchyard::Churchyard(), Coast::Coast(), ConiferousForest::ConiferousForest(), Copse::Copse(), DeciduousForest::DeciduousForest(), Field::Field(), FieldBoundary::FieldBoundary(), FishFarm::FishFarm(), Freshwater::Freshwater(), Heath::Heath(), HedgeBank::HedgeBank(), Hedges::Hedges(), HeritageSite::HeritageSite(), Landscape::Landscape(), LargeRoad::LargeRoad(), Marsh::Marsh(), MetalledPath::MetalledPath(), MownGrass::MownGrass(), NaturalGrassDry::NaturalGrassDry(), NaturalGrassWet::NaturalGrassWet(), Landscape::NewElement(), Orchard::Orchard(), OrchardBand::OrchardBand(), Parkland::Parkland(), PermanentSetaside::PermanentSetaside(), PermPasture::PermPasture(), PermPastureLowYield::PermPastureLowYield(), PermPastureTussocky::PermPastureTussocky(), PitDisused::PitDisused(), PlantNursery::PlantNursery(), Pond::Pond(), Pylon::Pylon(), Railway::Railway(), Landscape::ReadPolys2(), River::River(), RiversidePlants::RiversidePlants(), RiversideTrees::RiversideTrees(), RoadsideSlope::RoadsideSlope(), RoadsideVerge::RoadsideVerge(), Saltmarsh::Saltmarsh(), Saltwater::Saltwater(), SandDune::SandDune(), Scrub::Scrub(), SmallRoad::SmallRoad(), StoneWall::StoneWall(), Stream::Stream(), Track::Track(), UnsprayedFieldMargin::UnsprayedFieldMargin(), UrbanNoVeg::UrbanNoVeg(), UrbanPark::UrbanPark(), Vildtager::Vildtager(), Wasteland::Wasteland(), WindTurbine::WindTurbine(), and YoungForest::YoungForest().

112 { m_almass_le_type = a_type; }
int m_almass_le_type
This holds the ALMaSS element type reference number.
Definition: elements.h:414
void LE::SetArea ( double  a_area)
inline
void LE::SetBirdMaize ( double  a_forage)
inline
207  {
208  m_birdmaizeforage = a_forage;
209  }
double m_birdmaizeforage
The maize forage present in KJ/m2.
Definition: elements.h:432
void LE::SetBirdSeed ( double  a_forage)
inline
201  {
202  m_birdseedforage = a_forage;
203  }
double m_birdseedforage
The grain forage present in KJ/m2.
Definition: elements.h:430
void LE::SetBorder ( LE a_border)
inline

Referenced by Landscape::BorderAdd(), and Landscape::ReadPolys2().

312 { m_border = a_border; }
LE * m_border
Definition: elements.h:381
virtual void LE::SetCentroid ( int  x,
int  y 
)
inlinevirtual

Referenced by Landscape::Landscape(), and Landscape::ReadPolys2().

139 { m_centroidx=x; m_centroidy=y; }
int m_centroidx
Definition: elements.h:388
int m_centroidy
Definition: elements.h:389
void LE::SetCopyTreatment ( int  a_treatment)
466  {
467  SetLastTreatment( a_treatment );
468 }
void SetLastTreatment(int a_treatment)
Definition: elements.cpp:470
void LE::SetCountryDesignation ( int  a_designation)
inline
211 { m_countrydesignation = a_designation; }
int m_countrydesignation
Definition: elements.h:404
virtual void LE::SetCropData ( double  ,
double  ,
double  ,
TTypesOfVegetation  ,
double  ,
int   
)
inlinevirtual

Reimplemented in VegElement.

Referenced by Field::DoDevelopment().

167 { ; }
virtual void LE::SetCropDataAll ( double  ,
double  ,
double  ,
double  ,
TTypesOfVegetation  ,
double  ,
double  ,
int  ,
double  ,
bool  ,
double   
)
inlinevirtual

Reimplemented in VegElement.

Referenced by Field::DoDevelopment().

168 {;}
void LE::SetElementType ( int  a_type)
inline

Referenced by Landscape::Landscape(), and Landscape::NewElement().

114 { m_type = (TTypesOfLandscapeElement) a_type; }
TTypesOfLandscapeElement m_type
Definition: elements.h:419
void LE::SetGooseNos ( int  a_number,
int  a_day 
)
inline

For goose model functionality, records the number of geese on a_day day

340 { m_gooseNos[a_day] = a_number; }
int m_gooseNos[366]
The number of geese each day.
Definition: elements.h:422
void LE::SetGooseNosTimed ( int  a_number,
int  a_day 
)
inline

For goose model functionality, records the number of geese on a_day day

346 { m_gooseNosTimed[a_day] = a_number; }
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
Definition: elements.h:426
void LE::SetGooseSpNos ( int  a_number,
int  a_day,
GooseSpecies  a_goose 
)
inline

For goose model functionality, records the number of geese on a_day day

342  {
343  m_gooseSpNos[a_day][a_goose] = a_number;
344  }
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
Definition: elements.h:424
void LE::SetGooseSpNosTimed ( int  a_number,
int  a_day,
GooseSpecies  a_goose 
)
inline

For goose model functionality, records the number of geese on a_day day

348  {
349  m_gooseSpNosTimed[a_day][a_goose] = a_number;
350  }
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
Definition: elements.h:428
virtual void LE::SetGrowthPhase ( int  )
inlinevirtual

Reimplemented in VegElement.

170 {;}
void LE::SetHerbicideDelay ( int  a_decaytime_days)
inline
305  { m_herbicidedelay = a_decaytime_days; }
int m_herbicidedelay
Definition: elements.h:418
virtual void LE::SetInsectPop ( double  )
inlinevirtual

Reimplemented in VegElement.

157 { ; }
void LE::SetLastSownVeg ( TTypesOfVegetation  a_tov)
inline

Records the last vegetation type to be sown.

287  {
288  m_lastsownvegtype = a_tov;
289  }
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
Definition: elements.h:436
void LE::SetLastTreatment ( int  a_treatment)

References g_landscape_p, and Landscape::IncTreatCounter().

Referenced by RoadsideVerge::Cutting(), Orchard::Cutting(), and MownGrass::Cutting().

470  {
471  unsigned sz = (int) m_lasttreat.size();
472  if ( m_lastindex == sz )
473  m_lasttreat.resize( m_lastindex + 1 );
474 
475  m_lasttreat[ m_lastindex++ ] = a_treatment;
476 
477  // Count this treatment in the grand scope of things.
478  g_landscape_p->IncTreatCounter( a_treatment );
479  // If we have a field margin then we need to tell it about this
480  // but not if it is an insecticide spray etc..
481  /* if (m_unsprayedmarginpolyref!=-1) { switch (a_treatment) { case herbicide_treat: case growth_regulator:
482  case fungicide_treat: case insecticide_treat: case trial_insecticidetreat: case syninsecticide_treat: case molluscicide:
483  break; // Do not add sprayings default: LE* le=g_landscape_p->SupplyLEPointer(m_unsprayedmarginpolyref);
484  le->SetCopyTreatment(a_treatment); // Now we also need to do something with the treatment
485 
486  break; }
487 
488  } */
489 }
void IncTreatCounter(int a_treat)
Definition: Landscape.cpp:3333
vector< int > m_lasttreat
Definition: elements.h:450
unsigned int m_lastindex
Definition: elements.h:451
class Landscape * g_landscape_p
Definition: Landscape.cpp:238
virtual void LE::SetMaleNewtPresent ( bool  )
inlinevirtual

Sets a male newt as present/absent in descendent classes - here only to prevent need for dynamic casts.

Reimplemented in Pond.

368 { ; };
void LE::SetMapIndex ( int  a_map_index)
inline
191 { m_map_index = a_map_index; }
int m_map_index
Definition: elements.h:412
void LE::SetMapValid ( bool  a_valid)
inline

Referenced by Landscape::BeetleBankAdd(), and Landscape::BorderScan().

221 { m_is_in_map = a_valid; }
bool m_is_in_map
Definition: elements.h:393
void LE::SetMaxX ( int  x)
inline
329 { m_maxx=x; }
int m_maxx
Definition: elements.h:396
void LE::SetMaxY ( int  y)
inline
330 { m_maxy=y; }
int m_maxy
Definition: elements.h:398
void LE::SetMConstants ( int  a,
int  c 
)
inline
336 {MConsts[a]=c;}
int MConsts[10]
Definition: elements.h:457
void LE::SetMDates ( int  a,
int  b,
int  c 
)
inline
334 {MDates[a][b]=c;}
int MDates[2][25]
Definition: elements.h:456
void LE::SetMgtLoopDetectCount ( long  a_num)
inline
long m_management_loop_detect_count
Definition: elements.h:402
void LE::SetMgtLoopDetectDate ( long  a_num)
inline
long m_management_loop_detect_date
Definition: elements.h:401
void LE::SetMinX ( int  x)
inline
331 { m_minx=x; }
int m_minx
Definition: elements.h:397
void LE::SetMinY ( int  y)
inline
332 { m_miny=y; }
int m_miny
Definition: elements.h:399
void LE::SetMownDecay ( int  a_decaytime_days)
inline

Referenced by Orchard::Cutting(), and MownGrass::Cutting().

307  { m_mowndecay = a_decaytime_days; }
int m_mowndecay
Definition: elements.h:417
void LE::SetOldDays ( long  a_days)
inline
298 { m_olddays = a_days; }
long m_olddays
Definition: elements.h:400
void LE::SetOpenness ( int  a_openness)
inline

Records the openness statistic for this polygon.

Referenced by Landscape::Landscape(), and Landscape::ReadPolys2().

362 { m_openness=a_openness; }
int m_openness
The openness metric for a field (if any)
Definition: elements.h:438
void LE::SetOwner ( Farm *  a_owner,
int  a_owner_num,
int  a_owner_index 
)
inline
214  {
215  m_owner = a_owner;
216  m_owner_file = a_owner_num;
217  m_owner_index = a_owner_index;
218  }
Farm * m_owner
Definition: elements.h:403
int m_owner_index
Definition: elements.h:406
int m_owner_file
Definition: elements.h:405
void LE::SetPesticideCell ( int  a_cell)
inline
315 { m_PesticideGridCell = a_cell; }
int m_PesticideGridCell
Definition: elements.h:391
void LE::SetPoison ( bool  a_poison)
inline
181 { m_poison = a_poison; }
bool m_poison
Definition: elements.h:443
void LE::SetPoly ( int  a_poly)
inline

Referenced by Landscape::BeetleBankAdd(), Landscape::BorderAdd(), Landscape::Landscape(), Landscape::ReadPolys2(), and Landscape::UnsprayedMarginAdd().

220 { m_poly = a_poly; }
int m_poly
The polyref number for this polygon.
Definition: elements.h:409
void LE::SetRotIndex ( int  a_index)
inline
299 { m_rot_index = a_index; }
int m_rot_index
Definition: elements.h:407
void LE::SetSignal ( LE_Signal  a_signal)
inline
108 { m_signal_mask = a_signal; }
LE_Signal m_signal_mask
Definition: elements.h:458
void LE::SetSoilType ( int  a_st)
inline

Referenced by Landscape::Landscape(), and Landscape::ReadPolys2().

281  {
282  m_soiltype = a_st;
283  }
int m_soiltype
Definition: elements.h:440
void LE::SetSubType ( int  a_subtype)
inline

Referenced by HedgeBank::HedgeBank(), and Hedges::Hedges().

110 { m_subtype = a_subtype; }
int m_subtype
Definition: elements.h:395
void LE::SetTramlinesDecay ( int  a_decaytime_days)
inline
303  { m_tramlinesdecay = a_decaytime_days; }
int m_tramlinesdecay
Definition: elements.h:416
void LE::SetUnsprayedMarginPolyRef ( int  a_unsprayedmargin)
inline

Referenced by Landscape::Landscape(), Landscape::ReadPolys2(), and Landscape::UnsprayedMarginAdd().

314 { m_unsprayedmarginpolyref = a_unsprayedmargin; }
int m_unsprayedmarginpolyref
Definition: elements.h:382
void LE::SetValidXY ( int  a_valid_x,
int  a_valid_y 
)
inline

Referenced by Landscape::BeetleBankAdd().

318  {
319  m_valid_x = a_valid_x;
320  m_valid_y = a_valid_y;
321  }
int m_valid_y
Definition: elements.h:387
int m_valid_x
Definition: elements.h:386
virtual void LE::SetVegBiomass ( int  )
inlinevirtual
163 {;}
virtual void LE::SetVegHeight ( double  )
inlinevirtual

Reimplemented in VegElement.

165 { ; }
virtual void LE::SetVegParameters ( double  ,
double  ,
double  ,
double   
)
inlinevirtual

Reimplemented in VegElement.

166 { ; }
virtual void LE::SetVegPatchy ( bool  )
inlinevirtual

Reimplemented in VegElement.

Referenced by Landscape::BeetleBankAdd().

148 { ;}
void LE::SetVegStore ( int  a_veg)
inline
128  { m_vege_danger_store = a_veg; }
int m_vege_danger_store
Definition: elements.h:390
virtual void LE::SetVegType ( TTypesOfVegetation  ,
TTypesOfVegetation   
)
inlinevirtual

Reimplemented in VegElement.

164 {;}
virtual void LE::StoreLAItotal ( )
inlinevirtual

Reimplemented in VegElement.

169 {;}
void LE::Tick ( void  )
499  {
500  m_lastindex = 0;
501  m_lasttreat[ 0 ] = sleep_all_day;
502  if ( m_tramlinesdecay > 0 )
504  if ( m_mowndecay > 0 )
505  m_mowndecay--;
506  if ( m_herbicidedelay > 0 ) m_herbicidedelay--;
507 }
int m_mowndecay
Definition: elements.h:417
int m_herbicidedelay
Definition: elements.h:418
vector< int > m_lasttreat
Definition: elements.h:450
unsigned int m_lastindex
Definition: elements.h:451
int m_tramlinesdecay
Definition: elements.h:416
virtual void LE::ToggleCattleGrazing ( void  )
inlinevirtual

Reimplemented in VegElement.

161 {;}
virtual void LE::TogglePigGrazing ( void  )
inlinevirtual

Reimplemented in VegElement.

162 {;}
void LE::Trace ( int  a_value)

Referenced by ~LE().

457  {
458  m_farmfunc_tried_to_do = a_value;
459 }
int m_farmfunc_tried_to_do
Definition: elements.h:415
virtual void LE::ZeroVeg ( void  )
inlinevirtual

Reimplemented in VegElement.

174 {;}
void LE::ZeroVegAge ( )
inline
129 { m_vegage=0; }
int m_vegage
Definition: elements.h:439

Member Data Documentation

int LE::m_almass_le_type
protected

This holds the ALMaSS element type reference number.

Referenced by DoCopy().

double LE::m_birdmaizeforage
protected

The maize forage present in KJ/m2.

Referenced by DoCopy(), VegElement::RecalculateBugsNStuff(), and VegElement::ZeroVeg().

double LE::m_birdseedforage
protected

The grain forage present in KJ/m2.

Referenced by DoCopy(), VegElement::RecalculateBugsNStuff(), and VegElement::ZeroVeg().

LE* LE::m_border
protected

Referenced by DoCopy().

int LE::m_cattle_grazing
protected
int LE::m_centroidx
protected

Referenced by DoCopy().

int LE::m_centroidy
protected

Referenced by DoCopy().

int LE::m_countrydesignation
protected

Referenced by Building::Building(), and DoCopy().

int LE::m_days_since_insecticide_spray
protected
int LE::m_farmfunc_tried_to_do
protected

Referenced by DoCopy().

double LE::m_goosegrazingforage[gs_foobar]
protected

The grazing forage present in KJ/min.

Referenced by DoCopy(), and VegElement::RecalculateBugsNStuff().

int LE::m_gooseNos[366]
protected

The number of geese each day.

Referenced by DoCopy(), and VegElement::ResetGeese().

int LE::m_gooseNosTimed[366]
protected

The number of geese at a predefined time per day.

Referenced by DoCopy().

int LE::m_gooseSpNos[366][gs_foobar]
protected

The number of geese of each species each day.

Referenced by DoCopy(), and VegElement::ResetGeese().

int LE::m_gooseSpNosTimed[366][gs_foobar]
protected

The number of geese of each species at a predefined time per day.

Referenced by DoCopy(), and VegElement::ResetGeese().

int LE::m_herbicidedelay
protected
bool LE::m_high
protected

Referenced by DoCopy().

bool LE::m_is_in_map
protected

Referenced by DoCopy().

double LE::m_largeroad_load
staticprotected
Initial value:
=
{15,9,4,5,14,54,332,381,252,206,204,215,
231,256,335,470,384,270,191,130,91,100,99,60}

Referenced by LargeRoad::GetTrafficLoad().

unsigned int LE::m_lastindex
protected

Referenced by DoCopy().

TTypesOfVegetation LE::m_lastsownvegtype
protected

Records the last vegegetation type that was sown on the element.

Referenced by VegElement::IsCereal(), and VegElement::IsGooseGrass().

vector<int> LE::m_lasttreat
protected

Referenced by DoCopy().

long LE::m_management_loop_detect_count
protected

Referenced by DoCopy().

long LE::m_management_loop_detect_date
protected

Referenced by DoCopy().

int LE::m_map_index
protected

Referenced by DoCopy().

int LE::m_maxx
protected

Referenced by Pond::CalcPondPesticide(), and DoCopy().

int LE::m_maxy
protected

Referenced by Pond::CalcPondPesticide(), and DoCopy().

int LE::m_minx
protected

Referenced by Pond::CalcPondPesticide(), and DoCopy().

int LE::m_miny
protected

Referenced by Pond::CalcPondPesticide(), and DoCopy().

double LE::m_monthly_traffic
staticprotected
Initial value:
=
{0.9009, 0.9434, 0.9901, 1.0101, 1.0417, 1.0870,
1.0870, 1.0753, 1.0753, 1.0101, 0.9804, 0.9434}

Used for birds that feed on grain on cereal fields 3% spill is expected.

Yield % kg/Ha spill kJ/kg kj/m 0.85 0.01 8.5 13680 11.628 0.85 0.02 17 13680 23.256 0.85 0.03 25.5 13680 34.884 0.85 0.04 34 13680 46.512 0.85 0.05 42.5 13680 58.14 0.85 0.06 51 13680 69.768

Referenced by LargeRoad::GetTrafficLoad(), and SmallRoad::GetTrafficLoad().

int LE::m_mowndecay
protected

Referenced by DoCopy().

long LE::m_olddays
protected

Referenced by DoCopy().

int LE::m_openness
protected

The openness metric for a field (if any)

Referenced by DoCopy().

Farm* LE::m_owner
protected

Referenced by DoCopy(), and Field::GetPreviousCrop().

int LE::m_owner_file
protected

Referenced by DoCopy().

int LE::m_owner_index
protected
int LE::m_PesticideGridCell
protected

Referenced by DoCopy().

bool LE::m_pig_grazing
protected

Referenced by DoCopy().

bool LE::m_poison
protected

Referenced by DoCopy().

int LE::m_poly
protected

The polyref number for this polygon.

Referenced by Pond::CalcPondPesticide(), DoCopy(), VegElement::DoDevelopment(), and VegElement::RecalculateBugsNStuff().

bool LE::m_repeat_start

Referenced by DoCopy().

int LE::m_rot_index
protected

Referenced by DoCopy().

long LE::m_running
protected

Referenced by DoCopy().

LE_Signal LE::m_signal_mask
protected

Referenced by DoCopy().

bool LE::m_skylarkscrapes

For management testing of skylark scrapes.

Referenced by DoCopy().

double LE::m_smallroad_load
staticprotected
Initial value:
=
{4,3,1,1,4,15,94,108,71,58,58,61,
65,73,95,133,109,76,54,37,26,28,28,17}

Referenced by SmallRoad::GetTrafficLoad().

int LE::m_soiltype
protected

Referenced by DoCopy().

int LE::m_squares_in_map

Referenced by DoCopy().

int LE::m_subtype
protected

Referenced by DoCopy().

int LE::m_tramlinesdecay
protected

Referenced by DoCopy().

int LE::m_tried_to_do
TTypesOfLandscapeElement LE::m_type
protected

Referenced by ActivePit::ActivePit(), AmenityGrass::AmenityGrass(), BareRock::BareRock(), BeetleBank::BeetleBank(), Building::Building(), BuiltUpWithParkland::BuiltUpWithParkland(), Carpark::Carpark(), ChameleonLE::ChameleonLE(), Churchyard::Churchyard(), Coast::Coast(), ConiferousForest::ConiferousForest(), Copse::Copse(), DeciduousForest::DeciduousForest(), DoCopy(), Field::DoDevelopment(), Field::Field(), FieldBoundary::FieldBoundary(), FishFarm::FishFarm(), Freshwater::Freshwater(), Garden::Garden(), Heath::Heath(), HedgeBank::HedgeBank(), Hedges::Hedges(), HeritageSite::HeritageSite(), IndividualTree::IndividualTree(), LargeRoad::LargeRoad(), Marsh::Marsh(), MetalledPath::MetalledPath(), MixedForest::MixedForest(), MownGrass::MownGrass(), NaturalGrassDry::NaturalGrassDry(), NaturalGrassWet::NaturalGrassWet(), Orchard::Orchard(), OrchardBand::OrchardBand(), Parkland::Parkland(), PermanentSetaside::PermanentSetaside(), PermPasture::PermPasture(), PermPastureLowYield::PermPastureLowYield(), PermPastureTussocky::PermPastureTussocky(), PitDisused::PitDisused(), PlantNursery::PlantNursery(), Pond::Pond(), Pylon::Pylon(), Railway::Railway(), River::River(), RiversidePlants::RiversidePlants(), RiversideTrees::RiversideTrees(), RoadsideSlope::RoadsideSlope(), RoadsideVerge::RoadsideVerge(), Saltmarsh::Saltmarsh(), Saltwater::Saltwater(), SandDune::SandDune(), Scrub::Scrub(), SmallRoad::SmallRoad(), StoneWall::StoneWall(), Stream::Stream(), Track::Track(), UnsprayedFieldMargin::UnsprayedFieldMargin(), UrbanNoVeg::UrbanNoVeg(), UrbanPark::UrbanPark(), Vildtager::Vildtager(), Wasteland::Wasteland(), WindTurbine::WindTurbine(), WoodlandMargin::WoodlandMargin(), WoodyEnergyCrop::WoodyEnergyCrop(), and YoungForest::YoungForest().

int LE::m_unsprayedmarginpolyref
protected

Referenced by DoCopy().

long LE::m_user[EL_MAX_USERSPACE]

Variable used to record the current grazing pressure by e.g. voles.

Variable used to reduce the grazing pressure Variable used to record the current grazing pressure by e.g. voles Change the current grazing pressure by e.g. voles Get the current total grazing pressure by e.g. voles Calculate the current grazing pressure by e.g. voles Get the current grazing pressure by e.g. voles Reset the current grazing pressure by e.g. voles

int LE::m_valid_x
protected

Referenced by DoCopy().

int LE::m_valid_y
protected

Referenced by DoCopy().

int LE::m_vegage
protected

Referenced by DoCopy().

int LE::m_vege_danger_store
protected

Referenced by DoCopy().

int LE::MConsts[10]
protected

Referenced by DoCopy().

int LE::MDates[2][25]
protected

Referenced by DoCopy().


The documentation for this class was generated from the following files: