ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
Go to the documentation of this file.
25 #define _CRT_SECURE_NO_DEPRECATE
29 #define __WEED_CURVE 99 //99 // 99 is the weed curve
32 #define EL_BUG_PERCENT_A 0.0
33 #define EL_BUG_PERCENT_B 0.2975
34 #define EL_BUG_PERCENT_C 0.095916647275
35 #define EL_BUG_PERCENT_D 0
38 #define EL_BUG_PERCENT_SB_A 0
39 #define EL_BUG_PERCENT_SB_B 0.380763296
40 #define EL_BUG_PERCENT_SB_C 0
41 #define EL_BUG_PERCENT_D 0
44 #define EL_BUG_PERCENT_WW_A 0.0
45 #define EL_BUG_PERCENT_WW_B 0.1283
46 #define EL_BUG_PERCENT_WW_C 0.0
47 #define EL_BUG_PERCENT_D 0
50 #define EL_BUG_PERCENT_WRy_A 0.0
51 #define EL_BUG_PERCENT_WRy_B 0.395651915
52 #define EL_BUG_PERCENT_WRy_C 0.0
53 #define EL_BUG_PERCENT_D 0
56 #define EL_BUG_PERCENT_WR_A 0.0
57 #define EL_BUG_PERCENT_WR_B 0.028271643
58 #define EL_BUG_PERCENT_WR_C 0.0
59 #define EL_BUG_PERCENT_D 0
62 #define EL_BUG_PERCENT_G_A 4.123817127
63 #define EL_BUG_PERCENT_G_B 0.151015629
64 #define EL_BUG_PERCENT_G_C -0.228228353
65 #define EL_BUG_PERCENT_D 0
68 #define EL_BUG_PERCENT_Edges_A 10.72459109
69 #define EL_BUG_PERCENT_Edges_B 0.4
70 #define EL_BUG_PERCENT_Edges_C 2.529631141
71 #define EL_BUG_PERCENT_D 0
74 #include "../Landscape/ls.h"
75 #include "../BatchALMaSS/BoostRandomGenerators.h"
79 extern boost::variate_generator<base_generator_type&, boost::uniform_real<> >
g_rand_uni;
105 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.28,
106 0.56,0.84,1.12,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,
107 1.4,1.4,1.26,1.12,0.98,0.84,0.7,0.56,0.42,0.28,0.14,0,0,0,0,0,0,0,0,0,0,0,
111 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
112 0,0.242857,0.485714,0.728571,0.971429,1.214286,1.457143,1.7,1.7,1.7,1.7,
113 1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,1.7,
114 1.53,1.36,1.19,1.02,0.85,0.68,0.51,0.34,0.17,0,0,0,0,0,0
158 #define EL_GROWTH_DAYDEG_MAGIC l_el_growth_daydeg_magic.value()
164 #define EL_GROWTH_DATE_MAGIC (g_date->DayInYear(1,9))
170 #define EL_GROWTH_PHASE_SHIFT_LEVEL (l_el_growth_phase_shift_level.value())
182 #define EL_PLANT_BIOMASS (l_el_plant_biomass_proport.value()) // Scaled to dry matter on Spring Barley for 2001 & 2002
187 #define EL_VEG_START_LAIT (l_el_veg_start_lait.value())
191 #define EL_VEG_HEIGHTSCALE (l_el_veg_heightscale.value())
194 #define RV_CUT_MAY (l_el_rv_cut_may.value())
197 #define RV_CUT_JUN (l_el_rv_cut_jun.value())
200 #define RV_CUT_JUL (l_el_rv_cut_jul.value())
203 #define RV_CUT_AUG (l_el_rv_cut_aug.value())
206 #define RV_CUT_SEP (l_el_rv_cut_sep.value())
209 #define RV_CUT_OCT (l_el_rv_cut_oct.value())
212 #define RV_MAY_1ST (l_el_rv_may_1st.value())
215 #define RV_CUT_HEIGHT (l_el_rv_cut_height.value())
217 #define RV_CUT_GREEN (l_el_rv_cut_green.value())
219 #define RV_CUT_TOTAL (l_el_rv_cut_total.value())
227 #define EL_WEED_PERCENT (l_el_weed_percent.value())
231 #define EL_WEED_SLOPE (l_el_weed_slope.value())
235 #define EL_BUG_SLOPE (l_el_bug_slope.value())
241 #define EL_WEED_GLUE (l_el_weed_glue.value())
245 #define EL_BUG_GLUE (l_el_bug_glue.value())
266 {0.9009, 0.9434, 0.9901, 1.0101, 1.0417, 1.0870,
267 1.0870, 1.0753, 1.0753, 1.0101, 0.9804, 0.9434};
270 {15,9,4,5,14,54,332,381,252,206,204,215,
271 231,256,335,470,384,270,191,130,91,100,99,60};
274 {4,3,1,1,4,15,94,108,71,58,58,61,
275 65,73,95,133,109,76,54,37,26,28,28,17};
285 m_lasttreat.resize(1);
293 m_cattle_grazing = 0;
294 m_default_grazing_level = 0;
295 m_pig_grazing =
false;
299 m_days_since_insecticide_spray = 0;
300 m_tramlinesdecay = 0;
302 m_herbicidedelay = 0;
304 m_unsprayedmarginpolyref = -1;
308 m_squares_in_map = 0;
309 m_management_loop_detect_date = 0;
310 m_management_loop_detect_count = 0;
311 m_repeat_start =
false;
312 m_skylarkscrapes =
false;
314 SetALMaSSEleType(-1);
320 m_countrydesignation = -1;
325 m_vege_danger_store = -1;
326 m_PesticideGridCell = -1;
332 m_almass_le_type = -1;
333 m_farmfunc_tried_to_do = -1;
335 m_birdseedforage = -1;
336 m_birdmaizeforage = -1;
341 m_currentOsmiaNests = 0;
342 for (
int i = 0; i<10; i++) SetMConstants(i, 1);
343 for (
int i = 0; i < 366; i++)
346 m_gooseNosTimed[i] = 0;
347 for (
int l = 0; l < gs_foobar; l++)
349 m_gooseSpNos[i][l] = 0;
350 m_gooseSpNosTimed[i][l] = 0;
353 for (
int l = 0; l < gs_foobar; l++)
355 m_goosegrazingforage[l] = 0;
357 for (
int i = 0; i < 25; i++)
365 for (
int i = 0; i < 256; i++ ) {
403 m_repeat_start = a_LE->m_repeat_start;
429 for (
int i = 0; i < 366; i++)
433 for (
int l = 0; l < gs_foobar; l++)
439 for (
int l = 0; l < gs_foobar; l++)
443 for (
int i = 0; i < 25; i++)
445 MDates[0][i] = a_LE->
MDates[0][i];
446 MDates[1][i] = a_LE->
MDates[1][i];
448 for (
int i = 0; i<10; i++) SetMConstants(i, a_LE->
MConsts[i]);
457 void LE::Trace(
int a_value ) {
458 m_farmfunc_tried_to_do = a_value;
459 #ifdef __RECORDFARMEVENTS
463 m_ptrace[ m_pindex++ ] = a_value;
467 void LE::ResetTrace(
void ) {
469 for (
int i = 0; i < 256; i++ ) {
477 void LE::Trace(
int a_value ) {
478 m_farmfunc_tried_to_do = a_value;
481 void LE::ResetTrace(
void ) {
487 SetLastTreatment( a_treatment );
491 unsigned sz = (int) m_lasttreat.size();
492 if ( m_lastindex == sz )
493 m_lasttreat.resize( m_lastindex + 1 );
495 m_lasttreat[ m_lastindex++ ] = a_treatment;
512 if ( * a_index == (
int )m_lastindex )
514 int i = ( * a_index ) ++;
515 int treat = m_lasttreat[ i ];
519 void LE::Tick(
void ) {
522 if ( m_tramlinesdecay > 0 )
524 if ( m_mowndecay > 0 )
526 if ( m_herbicidedelay > 0 ) m_herbicidedelay--;
531 void LE::DoDevelopment(
void ) {
534 APoint LE::GetCentroid()
550 geese += m_gooseNos[ ind ];
563 geese += m_gooseSpNos[ind][gs_Pinkfoot];
564 geese += m_gooseSpNos[ind][gs_Greylag];
574 for (
unsigned i = 0; i < (unsigned)gs_foobar; i++) {
585 for (
unsigned i = 0; i < (unsigned)gs_foobar; i++) {
602 return int(m_dist_to_closest_roost[a_goose]);
607 m_pollenquality.m_quality = m_pollencurve->GetData(365);
608 m_nectarquality.m_quality = m_nectarcurve->GetData(365);
1448 float weedpercent, bugpercent_a, bugpercent_b, bugpercent_c, bugpercent_d;
1449 if ( 2 != fscanf( lm_ifile,
"%d %f %f %f %f %f", & vegnum, & weedpercent, & bugpercent_a, & bugpercent_b,
1450 & bugpercent_c, & bugpercent_d ) ) {
1454 "VegElement::ReadBugPercentageFile(): Unable to read"
1455 " sufficient number of int/double pairs from bug percentage file."" Lines expected:", vegnums );
1640 default:
return false;
1681 double newgrowth = 0;
1683 double usefull_veg_cover = 1.0 - (exp(
m_LAgreen * -0.4));
1696 if (fintensity == 1) {
1749 for (
int i = 0; i < 32; i++) {
1763 double temp_bugmass =
1767 if (temp_bugmass < 0.05) temp_bugmass = 0.05;
1821 for (
unsigned i = 0; i < gs_foobar; i++) {
1834 for (
unsigned i = 0; i < gs_foobar; i++) {
1844 * a_LAtotal =
EL_VEG_START_LAIT * ( ( ( ( double )( random( 21 ) - 10 ) ) / 100.0 ) + 1.0 );
1845 * a_LAgreen = * a_LAtotal / 4.0;
1847 * a_weed_biomass = * a_LAgreen * 0.1;
1853 if (a_phase ==
sow) {
1931 double LAgreen_target;
1933 double LAtotal_target;
1934 double veg_height_target;
1935 int next_phase, daysleft;
1947 if ( daysleft <= 0 )
1957 RandomVegStartValues( & LAtotal_target, & LAgreen_target, & veg_height_target, & Weed_target );
2023 #ifdef __EXTSHRINKSHEIGHT
2026 if (fintensity == 1) {
2050 for (
unsigned i = 0; i < gs_foobar; i++) {
2182 double a_cover,
int a_grazed ) {
2192 TTypesOfVegetation a_veg,
double a_wb,
double a_cover,
int a_grazed,
double a_ins,
bool a_patchy,
double a_dens ) {
2442 if ( ( today == sprayday ) || ( today == sprayday2 ) || ( today == sprayday3 ) )
2455 if ( today == ( sprayday - 7 ) )
Cutting( today );
2458 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) || ( today == 196 ) )
2462 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) )
Cutting( today );
2465 if ( ( today == 259 ) || ( today == 122 ) )
Cutting( today );
2468 if ( ( today == 259 ) )
Cutting( today );
2496 if ( ( today >= (
March + 15 ) ) && ( today % 42 == 0 )) {
2501 if ( ( today == 151 ) )
2505 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) || ( today == 196 ) )
2509 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) )
Cutting( today );
2512 if ( ( today == 259 ) || ( today == 122 ) )
Cutting( today );
2515 if ( ( today == 259 ) )
Cutting( today );
2548 if ( ( today == sprayday ) || ( today == sprayday2 ) || ( today == sprayday3 ) ) {
2641 if ( temp_bugmass < 0.05 ) temp_bugmass = 0.05;
2785 LE::DoDevelopment();
2837 if (
m_area > 400) area = 400;
2838 const double LarvalFoodMonthlyK[12] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
2996 static char error_num[ 20 ];
2999 switch ( EleReference ) {
3078 sprintf( error_num,
"%d", EleReference );
3079 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::TranslateEleTypes(): ""Unknown landscape element type:", error_num );
3089 char error_num[ 20 ];
3092 switch ( VegReference ) {
3337 sprintf( error_num,
"%d", VegReference );
3338 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::TranslateVegTypes(): ""Unknown vegetation type:", error_num );
3346 char error_num[ 20 ];
3349 switch ( VegReference ) {
3602 sprintf( error_num,
"%d", VegReference );
3603 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::BackTranslateVegTypes(): ""Unknown vegetation type:", error_num );
3611 static char error_num[ 20 ];
3614 switch ( EleReference )
3695 sprintf( error_num,
"%d", EleReference );
3696 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::BackTranslateEleTypes(): ""Unknown landscape element type:", error_num );
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
CfgBool cfg_randompondquality("POND_RANDOMQUALITY", CFG_CUSTOM, false)
Controls whether random pond quality is used.
#define EL_BUG_PERCENT_SB_A
virtual void ReduceVeg_Extended(double a_reduc)
bool m_MaleNewtPresent
Flag for presence of a male newt.
static CfgInt cfg_MownGrassNoCutsDay("ELE_MOWNGRASSNOCUTS", CFG_CUSTOM, -1)
LE * SupplyLEPointer(int a_polyref)
static double m_monthly_traffic[]
Used for birds that feed on grain on cereal fields 3% spill is expected.
CfgInt cfg_OrchardNoCutsDay("TOX_ORCHARDNOCUTS", CFG_CUSTOM, -1)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
double m_area
The element area in m2.
CfgInt g_el_strigling_delaytime_days("ELEM_STRIGLING_DELAYTIME_DAYS", CFG_PRIVATE, 28)
static CfgInt l_el_rv_cut_sep("ELEM_RV_CUT_SEP", CFG_PRIVATE, 49)
PollenNectarQuality m_pollenquality
virtual void DoDevelopment(void)
double GetLAgreenDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in LA green for the day degrees experienced.
#define EL_GROWTH_PHASE_SHIFT_LEVEL
static CfgFloat cfg_SetAsidePatchyChance("SETASIDEPATCHYCHANCE", CFG_CUSTOM, 1.0)
The chance that a setaside being created is patchy or not.
static CfgFloat cfg_MGPatchyChance("MOWNGRASSPATCHYCHANCE", CFG_CUSTOM, 0.5)
The chance that a beetlebank being created is patchy or not.
CfgFloat cfg_PondLarvalFoodBiomassConst("POND_LARVALFOODBIOMASSCONST", CFG_CUSTOM, 215.0)
A constant relating the proportion of food units per m2. The value is calibrated to estimates of newt...
bool SubtractLarvalFood(double a_food)
Called by a larva when feeding, removes an age specific amount of larval food
#define EL_BUG_PERCENT_WW_B
#define EL_BUG_PERCENT_WW_A
#define EL_BUG_PERCENT_WRy_A
CfgInt g_el_tramline_decaytime_days("ELEM_TRAMLINE_DECAYTIME_DAYS", CFG_PRIVATE, 21)
int m_gooseNos[366]
The number of geese each day.
void CalcLarvalFood()
Calculates the amount of larval food present
class LE_TypeClass * g_letype
double m_total_biomass_old
static CfgFloat l_el_veg_start_lait("ELEM_VEG_START_LAIT", CFG_PRIVATE, 1.08)
#define EL_BUG_PERCENT_SB_C
double m_force_veg_height
CfgBool cfg_pollen_nectar_on("ELE_POLLENNECTAR_ON", CFG_CUSTOM, false)
Flag to determine whether nectar and pollen models are used - should be set to true for pollinator mo...
double GetLAtotalDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in LA total for the day degrees experienced.
virtual void ForceGrowthTest(void)
PollenNectarDevelopmentCurve * m_pollencurve
pointer to the correct pollen curve set
static CfgInt l_el_rv_cut_jul("ELEM_RV_CUT_JUL", CFG_PRIVATE, 35)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
static CfgInt l_el_rv_cut_may("ELEM_RV_CUT_MAY", CFG_PRIVATE, 142)
virtual void DoDevelopment(void)
virtual void SetGrowthPhase(int a_phase)
double GetDDDegs(long a_date)
int m_openness
The openness metric for a field (if any)
int GetGooseNos()
For goose model functionality, returns the number of geese yesterday.
void ResetingVeg(int a_today)
TTypesOfVegetation GetPreviousCrop(int a_index)
static CfgInt l_el_veg_heightscale("ELEM_VEG_HEIGHTSCALE", CFG_PRIVATE, 16)
static CfgFloat l_el_rv_cut_height("ELEM_RV_CUT_HEIGHT", CFG_PRIVATE, 10.0)
static CfgInt l_el_rv_may_1st("ELEM_RV_MAY_1ST", CFG_PRIVATE, 121)
CfgInt cfg_pest_productapplic_startdate2
virtual void GrazeVegetationTotal(double a_grams)
static CfgInt l_el_rv_cut_aug("ELEM_RV_CUT_AUG", CFG_PRIVATE, 42)
CfgInt cfg_pest_productapplic_startdate
PollenNectarDevelopmentCurve * m_pollencurveptr
bool m_forced_phase_shift
double m_LarvalFood
The amount of larval food present
static double m_largeroad_load[]
void RandomVegStartValues(double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
static CfgInt cfg_UMPatchyChance("UMPATCHYCHANCE", CFG_CUSTOM, 0)
TTypesOfVegetation m_vege_type
virtual void DoDevelopment(void)
static CfgFloat l_el_weed_percent("ELEM_WEED_PERCENT", CFG_PRIVATE, 0.1)
CfgInt cfg_pest_productapplic_startdate3
void FloatToDouble(double &, float)
void ResetGeese(void)
Reset geese numbers to zero in case this was not done by the population manager (the normal situation...
virtual void DoDevelopment(void)
#define EL_BUG_PERCENT_Edges_A
double GetLAgreenDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in LA green for the day degrees experienced, scalable depending on plant growth ...
static CfgFloat cfg_BBPatchyChance("BEETLEBANKBPATCHYCHANCE", CFG_CUSTOM, 0.5)
The chance that a beetlebank being created is patchy or not.
CfgFloat l_el_o_cut_height("ELEM_RV_CUT_HEIGHT", CFG_PRIVATE, 10.0)
void Cutting(int a_today)
static CfgFloat l_el_rv_cut_green("ELEM_RV_CUT_GREEN", CFG_PRIVATE, 1.5)
#define EL_BUG_PERCENT_SB_B
double GetData(int a_index)
The basic return function for the curve - day indexed.
void ForceGrowthSpringTest(void)
PollenNectarDevelopmentCurveSet GetPollenNectarCurvePtr(int a_almassLEref)
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
double m_birdmaizeforage
The maize forage present in KJ/m2.
long m_management_loop_detect_date
static CfgFloat l_el_plant_biomass_proport("ELEM_PLANT_BIOMASS_PROPORT", CFG_PRIVATE, 41.45)
class MapErrorMsg * g_msg
double m_pondpesticide
Holds the pesticide content per unit pond water.
static double g_bug_percent_c[tov_Undefined]
CfgFloat l_pest_insecticide_amount
static CfgFloat l_el_bug_glue("ELEM_BUG_GLUE", CFG_PRIVATE, 0.50)
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
static double m_smallroad_load[]
void SetSprayedToday(bool a_didit)
BuiltUpWithParkland(void)
void PollenNectarPhenologyCalculation()
This methods calculates the daily availability of pollen and nectar per square meter and in total.
static CfgFloat l_el_bug_slope("ELEM_BUG_SLOPE", CFG_PRIVATE, 0.2)
virtual bool IsGooseGrass()
CfgFloat cfg_PondLarvalFoodR("POND_LARVALFOODFOODR", CFG_CUSTOM, 0.15)
The instanteous rate of growth for larval food (r from logistic equation)
int m_almass_le_type
This holds the ALMaSS element type reference number.
virtual void DoDevelopment(void)
vector< int > m_lasttreat
CfgFloat cfg_pondpesticiderunoff("POND_PEST_RUNOFFFACTOR", CFG_CUSTOM, 10.0)
The multiplication factor assumed to account for ingress of pesticide from run-off and soil water to ...
CfgFloat l_el_o_cut_total("ELEM_RV_CUT_TOTAL", CFG_PRIVATE, 2.0)
double m_birdseedforage
The grain forage present in KJ/m2.
PollenNectarDevelopmentCurveSet tovGetPollenNectarCurvePtr(int a_tov_ref)
int m_default_grazing_level
double SupplyPesticide(int a_x, int a_y, PlantProtectionProducts a_ppp)
Gets total pesticide for a location.
#define EL_BUG_PERCENT_WRy_B
#define EL_GROWTH_DAYDEG_MAGIC
static double g_weed_percent[tov_Undefined]
void Cutting(int a_today)
bool m_skylarkscrapes
For management testing of skylark scrapes.
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
CfgInt cfg_goosecountperiod("GOOSE_GOOSECOUNTPERIOD", CFG_CUSTOM, 1)
The number of days a goose count can be used.
virtual void InsectMortality(double a_fraction)
void Clean_CropDataStorage(int index)
Bool configurator entry class.
int GetGooseNosTodayTimed()
For goose model functionality, returns the number of geese today at a predefined time.
static CfgFloat l_el_weed_slope("ELEM_WEED_SLOPE", CFG_PRIVATE, 0.15)
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min. The last value indicates cereal 1 or not -1.
class Landscape * g_landscape_p
void SetMownDecay(int a_decaytime_days)
double m_pondquality
a factor used to alter the pond qualities (default behaviour is random 0.0-1.0)
virtual double GetTrafficLoad(void)
double SupplyGooseGrazingForageH(double a_height, GooseSpecies a_goose)
Returns the leaf forage resource as seen from a goose standpoint at a polygon based on the height onl...
int GetGooseNosToday()
For goose model functionality, returns the number of geese today.
int GetGooseRoostDist(GooseSpecies a_goose)
For goose model functionality, returns the distance to closest roost.
virtual void DoDevelopment(void)
virtual void ForceGrowthDevelopment(void)
UnsprayedFieldMargin(void)
CropActualValues m_CropDataStorage[2]
Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be store...
CfgInt cfg_pest_productapplic_period
int GetLastTreatment(int *a_index)
const double c_SolarConversion[2][81]
double m_LarvalFoodScaler
The proportion of larval food per m2
A standard class to manage a range of pollen and nectar development curves based on indexed rates.
CfgFloat cfg_goose_GrainDecayRateWinter
CfgInt g_el_herbicide_delaytime_days("ELEM_HERBICIDE_DELAYTIME_DAYS", CFG_PRIVATE, 35)
void DailyQueueAdd(LE *a_element_sprayed, double a_amount, PlantProtectionProducts a_ppp)
virtual void SetVegType(TTypesOfVegetation a_vege_type, TTypesOfVegetation a_weed_type)
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
double GetHeightDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
Get the differential in veg height for the day degrees experienced.
#define EL_VEG_START_LAIT
#define EL_BUG_PERCENT_Edges_B
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
TTypesOfVegetation tov_type
double GetStartValue(int a_veg_type, int a_phase, int a_type)
double GetHeightDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in veg height for the day degrees experienced, scalable depending on plant growt...
static CfgInt l_el_rv_cut_oct("ELEM_RV_CUT_OCT", CFG_PRIVATE, 49)
virtual void DoDevelopment(void)
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
#define EL_BUG_PERCENT_WRy_C
int m_days_since_insecticide_spray
virtual bool IsMatureCereal()
static double g_biomass_scale[tov_Undefined]
double biomass_at_harvest
int m_farmfunc_tried_to_do
class PlantGrowthData * g_crops
virtual void DoDevelopment(void)
static CfgFloat l_el_growth_phase_shift_level("ELEM_GROWTH_PHASE_SHIFT_LEVEL", CFG_PRIVATE, 0.5)
#define EL_BUG_PERCENT_WR_C
TTypesOfVegetation TranslateVegTypes(int VegReference)
PollenNectarDevelopmentCurve * m_nectarcurveptr
void Cutting(int a_today)
static double g_bug_percent_d[tov_Undefined]
virtual void DoDevelopment()
void SetStubble(bool a_flag)
Sets the in stubble flag.
void SetPollenNectarData(int a_almasstype)
sets the pollen and nectar information
int GetGooseSpNosTodayTimed(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday at a predefined time...
double SupplyGlobalRadiation()
void SetHigh(bool a_high)
CfgFloat cfg_goose_grass_to_winter_cereal_scaler
void SetCopyTreatment(int a_treatment)
static double g_bug_percent_a[tov_Undefined]
virtual void DoDevelopment(void)
double GetLAtotalDiffScaled(double a_ddegs, double a_yddegs, int a_plant, int a_phase, double a_scaler)
Get the differential in LA total for the day degrees experienced, scalable depending on plant growth ...
void SetPollenNectarCurves(PollenNectarDevelopmentCurve *a_pollencurnve, PollenNectarDevelopmentCurve *a_nectarcurve)
Set method for pollen and nectar curves.
#define EL_BUG_PERCENT_G_B
#define EL_BUG_PERCENT_WR_A
virtual void ReduceVeg(double a_reduc)
static CfgFloat l_pest_productOrchard_amount("PEST_PRODUCTORCHARD_AMOUNT", CFG_CUSTOM, 0.0)
void SetLastTreatment(int a_treatment)
#define EL_BUG_PERCENT_G_A
Integer configurator entry class.
virtual void SetVegPatchy(bool p)
virtual double GetTrafficLoad(void)
PermPastureLowYield(void)
int GetGooseSpNosToday(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday.
void DoCopy(const LE *a_Le)
a copy function to be used because a copy constuctor won't work
virtual void RecalculateBugsNStuff(void)
This method is responsible for.
CfgFloat cfg_PermanentVegGrowthMinScaler("VEG_GROWTHSCALERMIN", CFG_CUSTOM, 1.0)
Scales the growth of vegetation - min value.
virtual void DoDevelopment(void)
virtual void DoDevelopment()
Double configurator entry class.
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
static CfgInt l_el_growth_daydeg_magic("ELEM_GROWTH_DAYDEG_MAGIC", CFG_PRIVATE, 100)
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
#define EL_BUG_PERCENT_Edges_C
static CfgInt l_el_rv_cut_jun("ELEM_RV_CUT_JUN", CFG_PRIVATE, 28)
int GetUnsprayedMarginPolyRef(void)
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
PollenNectarDevelopmentCurve * m_nectarcurve
pointer to the correct nectar curve set
class PollenNectarDevelopmentData * g_nectarpollen
PermPastureTussocky(void)
virtual void ZeroVeg(void)
static CfgInt cfg_OrchardSprayDay("TOX_ORCHARDSPRAYDAY", CFG_CUSTOM, 150)
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
TTypesOfVegetation GetPreviousCrop(int a_index)
virtual void DoDevelopment(void)
#define EL_GROWTH_DATE_MAGIC
bool StartValid(int a_veg_type, int a_phase)
double m_oldnewgrowth[32]
virtual void GrazeVegetation(double a_grams, bool a_force)
static CfgFloat cfg_beetlebankinsectscaler("ELE_BBINSECTSCALER", CFG_CUSTOM, 1.0)
static CfgFloat l_el_rv_cut_total("ELEM_RV_CUT_TOTAL", CFG_PRIVATE, 2.0)
int m_poly
The polyref number for this polygon.
#define EL_BUG_PERCENT_WW_C
static CfgInt cfg_OrchardSprayDay2("TOX_ORCHARDSPRAYDAYTWO", CFG_CUSTOM, 200000)
static CfgFloat l_el_weed_glue("ELEM_WEED_GLUE", CFG_PRIVATE, 0.99)
static CfgFloat cfg_ele_weedscaling("ELE_WEEDSCALING", CFG_CUSTOM, 1.0)
int SupplyPolyRef(int a_x, int a_y)
CfgFloat cfg_goose_GrainDecayRateSpring
#define EL_BUG_PERCENT_WR_B
int SupplyFarmIntensity(int a_x, int a_y)
void CalcGooseForageResources()
Calculates spilled grain and grazing forage resources for geese.
virtual void DoDevelopment(void)
#define EL_BUG_PERCENT_G_C
virtual void ForceGrowthInitialize(void)
class Weather * g_weather
void CalcPondPesticide()
Calculates the amount of pesticide per unit pond water
void ReadBugPercentageFile(void)
int GetQuarryNos()
For goose model functionality, returns the number of geese yesterday which can be hunted as legal qua...
int m_unsprayedmarginpolyref
long m_management_loop_detect_count
virtual void DoDevelopment()
static double g_bug_percent_b[tov_Undefined]
virtual void DoDevelopment(void)
#define EL_VEG_HEIGHTSCALE
void IncTreatCounter(int a_treat)
CfgFloat cfg_PermanentVegGrowthMaxScaler("VEG_GROWTHSCALERMAX", CFG_CUSTOM, 1.0)
Scales the growth of vegetation - max value.
CfgBool cfg_calc_pond_pesticide("POND_PEST_CALC_ON", CFG_CUSTOM, false)
Flag to determine whether to calculate pond pesticide concentration.
TTypesOfLandscapeElement m_type
CfgFloat l_el_o_cut_green("ELEM_RV_CUT_GREEN", CFG_PRIVATE, 1.5)