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 75 #include "../Landscape/ls.h" 76 #include "../BatchALMaSS/BoostRandomGenerators.h" 78 extern boost::variate_generator<base_generator_type&, boost::uniform_real<> >
g_rand_uni;
95 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,
96 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,
97 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,
101 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,
102 0,0.242857,0.485714,0.728571,0.971429,1.214286,1.457143,1.7,1.7,1.7,1.7,
103 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,
104 1.53,1.36,1.19,1.02,0.85,0.68,0.51,0.34,0.17,0,0,0,0,0,0
146 #define EL_GROWTH_DAYDEG_MAGIC l_el_growth_daydeg_magic.value() 152 #define EL_GROWTH_DATE_MAGIC (g_date->DayInYear(1,9)) 158 #define EL_GROWTH_PHASE_SHIFT_LEVEL (l_el_growth_phase_shift_level.value()) 170 #define EL_PLANT_BIOMASS (l_el_plant_biomass_proport.value()) // Scaled to dry matter on Spring Barley for 2001 & 2002 175 #define EL_VEG_START_LAIT (l_el_veg_start_lait.value()) 179 #define EL_VEG_HEIGHTSCALE (l_el_veg_heightscale.value()) 182 #define RV_CUT_MAY (l_el_rv_cut_may.value()) 185 #define RV_CUT_JUN (l_el_rv_cut_jun.value()) 188 #define RV_CUT_JUL (l_el_rv_cut_jul.value()) 191 #define RV_CUT_AUG (l_el_rv_cut_aug.value()) 194 #define RV_CUT_SEP (l_el_rv_cut_sep.value()) 197 #define RV_CUT_OCT (l_el_rv_cut_oct.value()) 200 #define RV_MAY_1ST (l_el_rv_may_1st.value()) 203 #define RV_CUT_HEIGHT (l_el_rv_cut_height.value()) 205 #define RV_CUT_GREEN (l_el_rv_cut_green.value()) 207 #define RV_CUT_TOTAL (l_el_rv_cut_total.value()) 215 #define EL_WEED_PERCENT (l_el_weed_percent.value()) 219 #define EL_WEED_SLOPE (l_el_weed_slope.value()) 223 #define EL_BUG_SLOPE (l_el_bug_slope.value()) 229 #define EL_WEED_GLUE (l_el_weed_glue.value()) 233 #define EL_BUG_GLUE (l_el_bug_glue.value()) 254 {0.9009, 0.9434, 0.9901, 1.0101, 1.0417, 1.0870,
255 1.0870, 1.0753, 1.0753, 1.0101, 0.9804, 0.9434};
258 {15,9,4,5,14,54,332,381,252,206,204,215,
259 231,256,335,470,384,270,191,130,91,100,99,60};
262 {4,3,1,1,4,15,94,108,71,58,58,61,
263 65,73,95,133,109,76,54,37,26,28,28,17};
273 m_lasttreat.resize(1);
281 m_cattle_grazing = 0;
282 m_default_grazing_level = 0;
283 m_pig_grazing =
false;
287 m_days_since_insecticide_spray = 0;
288 m_tramlinesdecay = 0;
290 m_herbicidedelay = 0;
292 m_unsprayedmarginpolyref = -1;
296 m_squares_in_map = 0;
297 m_management_loop_detect_date = 0;
298 m_management_loop_detect_count = 0;
299 m_repeat_start =
false;
300 m_skylarkscrapes =
false;
302 SetALMaSSEleType(-1);
308 m_countrydesignation = -1;
313 m_vege_danger_store = -1;
314 m_PesticideGridCell = -1;
320 m_almass_le_type = -1;
321 m_farmfunc_tried_to_do = -1;
322 m_birdseedforage = -1;
323 m_birdmaizeforage = -1;
326 for (
int i = 0; i<10; i++) SetMConstants(i, 1);
327 for (
int i = 0; i < 366; i++)
330 m_gooseNosTimed[i] = 0;
331 for (
int l = 0; l < gs_foobar; l++)
333 m_gooseSpNos[i][l] = 0;
334 m_gooseSpNosTimed[i][l] = 0;
337 for (
int l = 0; l < gs_foobar; l++)
339 m_goosegrazingforage[l] = 0;
341 for (
int i = 0; i < 25; i++)
349 for (
int i = 0; i < 256; i++ ) {
413 for (
int i = 0; i < 366; i++)
417 for (
int l = 0; l < gs_foobar; l++)
423 for (
int l = 0; l < gs_foobar; l++)
427 for (
int i = 0; i < 25; i++)
429 MDates[0][i] = a_LE->
MDates[0][i];
430 MDates[1][i] = a_LE->
MDates[1][i];
432 for (
int i = 0; i<10; i++) SetMConstants(i, a_LE->
MConsts[i]);
442 m_farmfunc_tried_to_do = a_value;
445 m_ptrace[ m_pindex++ ] = a_value;
451 for (
int i = 0; i < 256; i++ ) {
460 m_farmfunc_tried_to_do = a_value;
469 SetLastTreatment( a_treatment );
473 unsigned sz = (int) m_lasttreat.size();
474 if ( m_lastindex == sz )
475 m_lasttreat.resize( m_lastindex + 1 );
477 m_lasttreat[ m_lastindex++ ] = a_treatment;
494 if ( * a_index == (
int )m_lastindex )
496 int i = ( * a_index ) ++;
497 int treat = m_lasttreat[ i ];
504 if ( m_tramlinesdecay > 0 )
506 if ( m_mowndecay > 0 )
508 if ( m_herbicidedelay > 0 ) m_herbicidedelay--;
532 geese += m_gooseNos[ ind ];
542 for (
unsigned i = 0; i < (unsigned)gs_foobar; i++) {
553 for (
unsigned i = 0; i < (unsigned)gs_foobar; i++) {
1156 float weedpercent, bugpercent_a, bugpercent_b, bugpercent_c, bugpercent_d;
1157 if ( 2 != fscanf(
m_ifile,
"%d %f %f %f %f %f", & vegnum, & weedpercent, & bugpercent_a, & bugpercent_b,
1158 & bugpercent_c, & bugpercent_d ) ) {
1160 sprintf( vegnums,
"%d", tov_Undefined );
1162 "VegElement::ReadBugPercentageFile(): Unable to read" 1163 " sufficient number of int/double pairs from bug percentage file."" Lines expected:", vegnums );
1307 default:
return false;
1343 double usefull_veg_cover = 1.0 - ( exp(
m_LAgreen * -0.4 ) );
1356 if (fintensity==1) {
1401 for (
int i=0; i<32; i++) {
1417 for (
unsigned i = 0; i < gs_foobar; i++) {
1423 else for (
unsigned i = 0; i < gs_foobar; i++) {
1429 for (
unsigned i = 0; i < gs_foobar; i++) {
1440 double temp_bugmass =
1444 if ( temp_bugmass < 0.05 ) temp_bugmass = 0.05;
1464 * a_LAtotal =
EL_VEG_START_LAIT * ( ( ( ( double )( random( 21 ) - 10 ) ) / 100.0 ) + 1.0 );
1465 * a_LAgreen = * a_LAtotal / 4.0;
1467 * a_weed_biomass = * a_LAgreen * 0.1;
1473 if (a_phase ==
sow) {
1554 double LAgreen_target;
1556 double LAtotal_target;
1557 double veg_height_target;
1558 int next_phase, daysleft;
1570 if ( daysleft <= 0 )
1580 RandomVegStartValues( & LAtotal_target, & LAgreen_target, & veg_height_target, & Weed_target );
1646 #ifdef __EXTSHRINKSHEIGHT 1649 if (fintensity==1) {
1671 for (
unsigned i = 0; i < gs_foobar; i++) {
1789 double a_cover,
int a_grazed ) {
1799 TTypesOfVegetation a_veg,
double a_wb,
double a_cover,
int a_grazed,
double a_ins,
bool a_patchy,
double a_dens ) {
2025 int sprayday2 = cfg_pest_productapplic_startdate2.
value();
2026 int sprayday3 = cfg_pest_productapplic_startdate3.
value();
2027 int sprayday=cfg_pest_productapplic_startdate.
value();
2029 if ( ( today == sprayday ) || ( today == sprayday2 ) || ( today == sprayday3 ) )
2042 if ( today == ( sprayday - 7 ) ) Cutting( today );
2045 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) || ( today == 196 ) )
2049 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) ) Cutting( today );
2052 if ( ( today == 259 ) || ( today == 122 ) ) Cutting( today );
2055 if ( ( today == 259 ) ) Cutting( today );
2066 m_DateCut = a_today;
2083 if ( ( today >= (
March + 15 ) ) && ( today % 42 == 0 )) {
2084 if (today <
October) Cutting( today );
2088 if ( ( today == 151 ) )
2092 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) || ( today == 196 ) )
2096 if ( ( today == 259 ) || ( today == 122 ) || ( today == 92 ) ) Cutting( today );
2099 if ( ( today == 259 ) || ( today == 122 ) ) Cutting( today );
2102 if ( ( today == 259 ) ) Cutting( today );
2113 m_DateCut = a_today;
2128 if ((today == 0) || (today-m_LastSprayed > 90)) m_LastSprayed = 999999;
2131 int sprayday2 = cfg_pest_productapplic_startdate2.
value();
2132 int sprayday3 = cfg_pest_productapplic_startdate3.
value();
2133 int sprayday=cfg_pest_productapplic_startdate.
value();
2135 if ( ( today == sprayday ) || ( today == sprayday2 ) || ( today == sprayday3 ) ) {
2232 if ( temp_bugmass < 0.05 ) temp_bugmass = 0.05;
2438 if (
m_area > 400) area = 400;
2439 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 };
2598 static char error_num[ 20 ];
2601 switch ( EleReference ) {
2682 sprintf( error_num,
"%d", EleReference );
2683 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::TranslateEleTypes(): ""Unknown landscape element type:", error_num );
2693 char error_num[ 20 ];
2696 switch ( VegReference ) {
2856 sprintf( error_num,
"%d", VegReference );
2857 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::TranslateVegTypes(): ""Unknown vegetation type:", error_num );
2865 char error_num[ 20 ];
2868 switch ( VegReference ) {
3034 sprintf( error_num,
"%d", VegReference );
3035 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::BackTranslateVegTypes(): ""Unknown vegetation type:", error_num );
3043 static char error_num[ 20 ];
3046 switch ( EleReference )
3119 sprintf( error_num,
"%d", EleReference );
3120 g_msg->
Warn(
WARN_FILE,
"LE_TypeClass::BackTranslateEleTypes(): ""Unknown vegetation type:", error_num );
3129 m_insect_pop = m_insect_pop * 3.0;
virtual void DoDevelopment(void)
virtual void ZeroVeg(void)
static CfgInt cfg_OrchardSprayDay2("TOX_ORCHARDSPRAYDAYTWO", CFG_CUSTOM, 200000)
static double m_monthly_traffic[]
Used for birds that feed on grain on cereal fields 3% spill is expected.
static CfgFloat l_el_weed_glue("ELEM_WEED_GLUE", CFG_PRIVATE, 0.99)
static CfgFloat cfg_BBPatchyChance("BEETLEBANKBPATCHYCHANCE", CFG_CUSTOM, 0.5)
The chance that a beetlebank being created is patchy or not.
int SupplyPolyRef(int a_x, int a_y)
static CfgBool l_el_read_bug_percentage_file("ELEM_READ_BUG_PERCENTAGE_FILE", CFG_CUSTOM, false)
BuiltUpWithParkland(void)
CfgFloat l_el_o_cut_height("ELEM_RV_CUT_HEIGHT", CFG_PRIVATE, 10.0)
#define EL_BUG_PERCENT_WR_A
static double g_bug_percent_c[tov_Undefined]
int VegTypeToCurveNum(TTypesOfVegetation VegReference)
int m_unsprayedmarginpolyref
CropActualValues m_CropDataStorage[2]
Keeps data on pesticide applications, biomass at harvest etc. Data for maximum two crops can be store...
int GetGooseNos()
For goose model functionality, returns the number of geese yesterday.
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
void IncTreatCounter(int a_treat)
#define EL_BUG_PERCENT_Edges_C
static double m_largeroad_load[]
LE * SupplyLEPointer(int a_polyref)
int GetUnsprayedMarginPolyRef(void)
#define EL_BUG_PERCENT_WR_C
double m_birdmaizeforage
The maize forage present in KJ/m2.
static CfgInt l_el_rv_cut_jul("ELEM_RV_CUT_JUL", CFG_PRIVATE, 35)
double GetLAtotalDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
virtual void DoDevelopment(void)
static CfgFloat l_el_weed_slope("ELEM_WEED_SLOPE", CFG_PRIVATE, 0.15)
CfgInt cfg_pest_productapplic_startdate3
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
virtual void DoDevelopment()
bool SubtractLarvalFood(double a_food)
Called by a larva when feeding, removes an age specific amount of larval food.
int m_gooseNos[366]
The number of geese each day.
bool m_MaleNewtPresent
Flag for presence of a male newt.
void FloatToDouble(double &, float)
int m_default_grazing_level
static CfgFloat l_el_rv_cut_height("ELEM_RV_CUT_HEIGHT", CFG_PRIVATE, 10.0)
double m_LarvalFood
The amount of larval food present.
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
Integer configurator entry class.
double m_pondpesticide
Holds the pesticide content per unit pond water.
static CfgInt l_el_rv_cut_oct("ELEM_RV_CUT_OCT", CFG_PRIVATE, 49)
#define EL_BUG_PERCENT_WW_A
void DailyQueueAdd(LE *a_element_sprayed, double a_amount)
static CfgFloat cfg_ele_weedscaling("ELE_WEEDSCALING", CFG_CUSTOM, 1.0)
static double g_bug_percent_b[tov_Undefined]
static CfgFloat l_el_veg_start_lait("ELEM_VEG_START_LAIT", CFG_PRIVATE, 1.08)
static CfgFloat cfg_beetlebankinsectscaler("ELE_BBINSECTSCALER", CFG_CUSTOM, 1.0)
static CfgInt cfg_OrchardSprayDay("TOX_ORCHARDSPRAYDAY", CFG_CUSTOM, 150)
virtual void SetVegPatchy(bool p)
static double g_bug_percent_a[tov_Undefined]
static double g_bug_percent_d[tov_Undefined]
CfgInt g_el_herbicide_delaytime_days("ELEM_HERBICIDE_DELAYTIME_DAYS", CFG_PRIVATE, 35)
int GetGooseNosToday()
For goose model functionality, returns the number of geese today.
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)
void Cutting(int a_today)
CfgFloat l_pest_insecticide_amount
#define EL_BUG_PERCENT_G_B
static CfgStr l_el_bug_percentage_file("ELEM_BUG_PERCENTAGE_FILE", CFG_CUSTOM,"bugpercents.txt")
long m_management_loop_detect_date
static CfgFloat cfg_SetAsidePatchyChance("SETASIDEPATCHYCHANCE", CFG_CUSTOM, 1.0)
The chance that a setaside being created is patchy or not.
virtual void DoDevelopment(void)
static CfgInt cfg_MownGrassNoCutsDay("ELE_MOWNGRASSNOCUTS", CFG_CUSTOM,-1)
static CfgInt l_el_growth_daydeg_magic("ELEM_GROWTH_DAYDEG_MAGIC", CFG_PRIVATE, 100)
PermPastureTussocky(void)
void Cutting(int a_today)
TTypesOfVegetation m_lastsownvegtype
Records the last vegegetation type that was sown on the element.
static CfgFloat l_el_bug_slope("ELEM_BUG_SLOPE", CFG_PRIVATE, 0.2)
#define EL_BUG_PERCENT_WR_B
void SetSprayedToday(bool a_didit)
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...
void SetMownDecay(int a_decaytime_days)
virtual void SetCropData(double, double, double, TTypesOfVegetation, double, int)
int m_almass_le_type
This holds the ALMaSS element type reference number.
TTypesOfLandscapeElement TranslateEleTypes(int EleReference)
#define EL_BUG_PERCENT_G_C
double SupplyPesticide(int a_x, int a_y)
Gets total pesticide for a location.
class Weather * g_weather
#define EL_BUG_PERCENT_WW_B
virtual void SetGrowthPhase(int a_phase)
CfgInt g_el_strigling_delaytime_days("ELEM_STRIGLING_DELAYTIME_DAYS", CFG_PRIVATE, 28)
static double g_biomass_scale[tov_Undefined]
class LE_TypeClass * g_letype
static CfgFloat l_pest_productOrchard_amount("PEST_PRODUCTORCHARD_AMOUNT", CFG_CUSTOM, 0.0)
TTypesOfVegetation m_vege_type
virtual void DoDevelopment(void)
CfgInt cfg_pest_productapplic_startdate
bool m_skylarkscrapes
For management testing of skylark scrapes.
class MapErrorMsg * g_msg
virtual void GrazeVegetationTotal(double a_grams)
double GetDDDegs(long a_date)
vector< int > m_lasttreat
double GetHeightDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
static double m_smallroad_load[]
bool m_forced_phase_shift
CfgBool cfg_calc_pond_pesticide("POND_PEST_CALC_ON", CFG_CUSTOM, false)
Flag to determine whether to calculate pond pesticide concentration.
UnsprayedFieldMargin(void)
virtual void DoDevelopment(void)
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
double m_LarvalFoodScaler
The proportion of larval food per m2.
static CfgInt l_el_veg_heightscale("ELEM_VEG_HEIGHTSCALE", CFG_PRIVATE, 16)
int GetGooseNosTodayTimed()
For goose model functionality, returns the number of geese today at a predefined time.
CfgFloat l_el_o_cut_green("ELEM_RV_CUT_GREEN", CFG_PRIVATE, 1.5)
double m_goosegrazingforage[gs_foobar]
The grazing forage present in KJ/min.
bool StartValid(int a_veg_type, int a_phase)
virtual void DoDevelopment(void)
virtual void ReduceVeg(double a_reduc)
double SupplyGlobalRadiation()
static CfgFloat l_el_growth_phase_shift_level("ELEM_GROWTH_PHASE_SHIFT_LEVEL", CFG_PRIVATE, 0.5)
static CfgFloat l_el_rv_cut_total("ELEM_RV_CUT_TOTAL", CFG_PRIVATE, 2.0)
virtual void DoDevelopment(void)
void SetSubType(int a_subtype)
virtual double GetTrafficLoad(void)
#define EL_GROWTH_PHASE_SHIFT_LEVEL
virtual void DoDevelopment(void)
static double g_weed_percent[tov_Undefined]
virtual void ReduceVeg_Extended(double a_reduc)
double m_total_biomass_old
virtual void SetCropDataAll(double, double, double, double, TTypesOfVegetation, double, double, int, double, bool, double)
static CfgInt cfg_UMPatchyChance("UMPATCHYCHANCE", CFG_CUSTOM, 0)
virtual APoint GetCentroid()
virtual void DoDevelopment(void)
#define EL_GROWTH_DAYDEG_MAGIC
TTypesOfVegetation TranslateVegTypes(int VegReference)
int GetLastTreatment(int *a_index)
CfgInt g_el_tramline_decaytime_days("ELEM_TRAMLINE_DECAYTIME_DAYS", CFG_PRIVATE, 21)
PermPastureLowYield(void)
Bool configurator entry class.
#define EL_BUG_PERCENT_WRy_A
static CfgFloat l_el_bug_glue("ELEM_BUG_GLUE", CFG_PRIVATE, 0.50)
int m_gooseSpNos[366][gs_foobar]
The number of geese of each species each day.
virtual void DoDevelopment(void)
virtual void ForceGrowthTest(void)
virtual void DoDevelopment(void)
void SetLastTreatment(int a_treatment)
#define EL_BUG_PERCENT_SB_C
double m_oldnewgrowth[32]
static CfgInt l_el_rv_cut_may("ELEM_RV_CUT_MAY", CFG_PRIVATE, 142)
virtual void InsectMortality(double a_fraction)
virtual void DoDevelopment()
double m_force_veg_height
double m_birdseedforage
The grain forage present in KJ/m2.
virtual void GrazeVegetation(double a_grams, bool a_force)
CfgInt cfg_pest_productapplic_startdate2
double GetStartValue(int a_veg_type, int a_phase, int a_type)
int m_farmfunc_tried_to_do
void DoCopy(const LE *a_Le)
a copy function to be used because a copy constuctor won't work
TTypesOfVegetation GetPreviousCrop(int a_index)
virtual double GetTrafficLoad(void)
CfgFloat cfg_goose_GrainDecayRate
static CfgFloat cfg_MGPatchyChance("MOWNGRASSPATCHYCHANCE", CFG_CUSTOM, 0.5)
The chance that a beetlebank being created is patchy or not.
#define EL_GROWTH_DATE_MAGIC
TTypesOfVegetation GetPreviousCrop(int a_index)
static CfgInt l_el_rv_cut_aug("ELEM_RV_CUT_AUG", CFG_PRIVATE, 42)
int GetGooseSpNosToday(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday. ...
int m_gooseNosTimed[366]
The number of geese at a predefined time per day.
virtual void ForceGrowthInitialize(void)
#define EL_BUG_PERCENT_SB_A
int m_poly
The polyref number for this polygon.
void SetALMaSSEleType(int a_type)
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
#define EL_BUG_PERCENT_G_A
#define EL_VEG_HEIGHTSCALE
void RandomVegStartValues(double *a_LAtotal, double *a_LAgreen, double *a_veg_height, double *a_weed_biomass)
void ForceGrowthSpringTest(void)
void SetCopyTreatment(int a_treatment)
double biomass_at_harvest
const double c_SolarConversion[2][81]
int SupplyFarmIntensity(int a_x, int a_y)
void CalcPondPesticide()
Calculates the amount of pesticide per unit pond water.
#define EL_BUG_PERCENT_Edges_A
void ReadBugPercentageFile(void)
#define EL_BUG_PERCENT_WRy_C
virtual void DoDevelopment(void)
CfgInt cfg_OrchardNoCutsDay("TOX_ORCHARDNOCUTS", CFG_CUSTOM,-1)
static CfgInt l_el_rv_cut_sep("ELEM_RV_CUT_SEP", CFG_PRIVATE, 49)
virtual bool IsMatureCereal()
double GetLAgreenDiff(double a_ddegs, double a_yddegs, int a_plant, int a_phase)
static CfgFloat l_el_rv_cut_green("ELEM_RV_CUT_GREEN", CFG_PRIVATE, 1.5)
TTypesOfLandscapeElement m_type
CfgInt cfg_goosecountperiod("GOOSE_GOOSECOUNTPERIOD", CFG_CUSTOM, 1)
The number of days a goose count can be used.
CfgFloat cfg_PondLarvalFoodR("POND_LARVALFOODFOODR", CFG_CUSTOM, 0.04)
The instanteous rate of growth for larval food (r from logistic equation)
#define EL_BUG_PERCENT_Edges_B
int GetGooseSpNosTodayTimed(GooseSpecies a_goose)
For goose model functionality, returns the number of geese per species yesterday at a predefined time...
void ResetGeese(void)
Reset geese numbers to zero in case this was not done by the population manager (the normal situation...
CfgFloat cfg_PondLarvalFoodBiomassConst("POND_LARVALFOODBIOMASSCONST", CFG_CUSTOM, 255.0)
A constant relating the proportion of food units per m2. The value is calibrated to estimates of newt...
int m_days_since_insecticide_spray
virtual void DoDevelopment(void)
static CfgFloat l_el_weed_percent("ELEM_WEED_PERCENT", CFG_PRIVATE, 0.1)
Double configurator entry class.
int m_gooseSpNosTimed[366][gs_foobar]
The number of geese of each species at a predefined time per day.
static CfgInt l_el_rv_cut_jun("ELEM_RV_CUT_JUN", CFG_PRIVATE, 28)
long m_management_loop_detect_count
#define EL_VEG_START_LAIT
CfgInt cfg_pest_productapplic_period
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
static CfgInt l_el_rv_may_1st("ELEM_RV_MAY_1ST", CFG_PRIVATE, 121)
virtual bool IsGooseGrass()
static CfgFloat l_el_plant_biomass_proport("ELEM_PLANT_BIOMASS_PROPORT", CFG_PRIVATE, 41.45)
int m_openness
The openness metric for a field (if any)
void Cutting(int a_today)
virtual void RecalculateBugsNStuff(void)
#define EL_BUG_PERCENT_WW_C
virtual void ForceGrowthDevelopment(void)
#define EL_BUG_PERCENT_SB_B
#define EL_BUG_PERCENT_WRy_B
virtual void DoDevelopment()
TTypesOfVegetation tov_type
class Landscape * g_landscape_p
void SetHigh(bool a_high)
void CalcLarvalFood()
Calculates the amount of larval food present.
void Clean_CropDataStorage(int index)