40 #define UNREFERENCED_PARAMETER(P) (P) 58 #define DO_IT_PROB (l_farm_event_do_it_prob.value()) 59 #define DO_IT_PROB_LONG (l_farm_event_do_it_prob_long.value()) 837 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
857 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
938 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
951 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
1023 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
1044 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
1110 double p=l_pest_product_0_amount.
value();
1120 double p=l_pest_product_0_amount.
value();
1145 double p=l_pest_product_1_amount.
value();
1155 double p=l_pest_product_1_amount.
value();
1203 if ( (0 >= a_days) ||
1233 if ( (0 >= a_days) )
1253 if ( (0 >= a_days) ||
1290 if ( (0 >= a_days) ||
1413 double someseed = 0.0;
1414 double somemaize = 0.0;
1415 if (dynamic_cast<VegElement*>(a_field)->IsMatureCereal()) {
1416 someseed = m_OurManager->GetSpilledGrain();
1418 else if (dynamic_cast<VegElement*>(a_field)->IsMaize()) {
1419 somemaize = m_OurManager->GetSpilledMaize();
1453 if ((0 >= a_days) ||
1467 double someseed = 0.0;
1491 if ( (0 >= a_days) ||
1496 if(!cfg_OptimiseBedriftsmodelCrops.
value()){
1608 if (biomass > 100.0)
1627 if (d1 > a_max) d1 = a_max;
1628 if ((((
g_date->
DayInYear() > d1) && (10 >= a_days)) && DoIt(10)) || (0 >= a_days))
1652 if (biomass > 100.0)
1671 if (d1 > a_max) d1 = a_max;
1672 if ((((
g_date->
DayInYear() > d1) && (10 >= a_days)) && DoIt(10)) || (0 >= a_days))
1743 if ( (0 >= a_days)|| DoIt(50/a_days)) {
1763 if ( (0 >= a_days) ||
1790 if ( (0 >= a_days) ||
1815 if ( (0 >= a_days) ||
1840 if ( (0 >= a_days) ||
2026 if (year < cfg_productapplicstartyear.
value())
return false;
2027 if (year > cfg_productapplicendyear.
value())
return false;
#define LE_SIG_NO_FUNGICIDE
CfgFloat l_pest_product_0_amount
static CfgInt l_farm_event_do_it_prob_long("FARM_EVENT_DO_IT_PROB_LONG", CFG_PRIVATE, 5)
#define EL_STRIGLING_DELAYTIME
The landscape class containing all environmental and topographical data.
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
virtual bool FP_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by an arable farmer.
virtual bool BurnStrawStubble(LE *a_field, double a_user, int a_days)
Burn stubble on a_field.
CfgInt cfg_SB_InsecticideMonth("PEST_SBINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in spring barley crops - this ...
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
virtual bool CattleIsOut(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out' event for every day the cattle are on a_field.
#define LE_SIG_NO_MOLLUSC
CfgFloat l_el_o_cut_height
static CfgBool l_farm_insecticide_kills("FARM_INSECTICIDE_KILLS", CFG_CUSTOM, true)
LE * SupplyLEPointer(int a_polyref)
int GetUnsprayedMarginPolyRef(void)
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
virtual void SetInsectPop(double)
void SetTramlinesDecay(int a_decaytime_days)
CfgInt cfg_SB_InsecticideDay("PEST_SBINSECTONEDAY", CFG_CUSTOM, 15)
Provided to allow configuration control of the first insecticide spray in spring barley crops - this ...
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
virtual bool CutWeeds(LE *a_field, double a_user, int a_days)
Carry out weed topping on a_field.
virtual bool FP_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply Manganse Sulphate to a_field owned by an arable farmer.
virtual bool PigsAreOut(LE *a_field, double a_user, int a_days)
Start a pig grazing event on a_field today or soon.
virtual void SetVegParameters(double, double, double, double)
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
virtual void TogglePigGrazing(void)
virtual bool FA_Sludge(LE *a_field, double a_user, int a_days)
Spread sewege sludge on a_field owned by an stock farmer.
virtual bool FP_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer, on a_field owned by an arable farmer.
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
virtual bool InsecticideTreat(LE *a_field, double, int a_days)
Carries out insecticide application. Saves information on each application for a given crop...
virtual bool FA_Slurry(LE *a_field, double a_user, int a_days)
Spready slurry on a_field owned by an stock farmer.
#define LE_SIG_NO_HERBICIDE
virtual bool Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscidie to a_field.
double GetWind(long a_date)
#define LE_SIG_NO_GROWTH_REG
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
Integer configurator entry class.
virtual bool FA_GreenManure(LE *a_field, double a_user, int a_days)
Spread green manure on a_field owned by an stock farmer.
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
void DailyQueueAdd(LE *a_element_sprayed, double a_amount)
virtual bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
virtual bool FA_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer to a_field owned by an stock farmer.
virtual double GetVegHeight(void)
virtual bool PigsAreOutForced(LE *a_field, double a_user, int a_days)
Start a pig grazing event on a_field today - no exceptions.
CfgInt cfg_OSR_InsecticideDay("PEST_OSRINSECTONEDAY", CFG_CUSTOM, 30)
Provided to allow configuration control of the first insecticide spray in OSR - this changes the day ...
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
static CfgFloat l_farm_cattle_veg_reduce("FARM_CATTLE_VEG_REDUCE", CFG_CUSTOM, 1.5)
virtual bool Trial_Control(LE *a_field, double a_user, int a_days)
Special pesticide trial functionality.
virtual bool CattleIsOutLow(LE *a_field, double a_user, int a_days, int a_max)
Generate a 'cattle_out_low' event for every day the cattle are on a_field.
virtual bool CattleOutLowGrazing(LE *a_field, double a_user, int a_days)
Start a extensive grazing event on a_field today.
virtual bool HerbicideTreat(LE *a_field, double, int a_days)
Carries out herbicide application. Saves information on each application for a given crop...
CfgFloat l_pest_product_1_amount
virtual bool CutToHay(LE *a_field, double a_user, int a_days)
Carry out hay cutting on a_field.
void SetSprayedToday(bool a_didit)
void SetMownDecay(int a_decaytime_days)
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
virtual void SetVegHeight(double)
virtual bool AutumnSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the autumn on a_field.
class Weather * g_weather
CfgInt l_pest_productapplic_startdate
virtual bool Trial_PesticideTreat_GS(LE *a_field, double a_user, int a_days)
Special pesticide trial functionality.
virtual TTypesOfVegetation GetVegType(void)
double GetTemp(long a_date)
Get the temperature on a particular date.
virtual TTypesOfVegetation GetVegType(void)
virtual void ReduceVeg(double)
static CfgInt l_farm_event_do_it_prob("FARM_EVENT_DO_IT_PROB", CFG_PRIVATE, 50)
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
int SupplyYearNumber(void)
virtual double GetVegBiomass(void)
CfgInt cfg_productapplicendyear
virtual void ResetDigestability()
sets growth record to zero in descendent classes
virtual void ReduceVeg_Extended(double)
CfgFloat l_pest_insecticide_amount
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
#define EL_HERBICIDE_DELAYTIME
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium supahte to a_field owned by an stock farmer.
CfgInt l_pest_productapplic_enddate
virtual void ToggleCattleGrazing(void)
CfgFloat l_el_o_cut_green
void Set_biomass_at_harvest(double a_biomass, int index)
CfgBool cfg_OptimiseBedriftsmodelCrops
If set to true, the original farm optimisation model's crop set is used in the farmer decision making...
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
virtual void InsectMortality(double)
virtual bool CutOrch(LE *a_field, double a_user, int a_days)
Cut vegetation on orchard crop. //based on cut to silage - values from cutting function of orchard...
virtual bool AutumnRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the autumn on a_field.
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
Bool configurator entry class.
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
CfgFloat l_el_o_cut_total
static CfgBool l_farm_herbicide_kills("FARM_PESTICIDE_KILLS", CFG_CUSTOM, true)
virtual bool Glyphosate(LE *a_field, double a_user, int a_days)
void SetLastTreatment(int a_treatment)
virtual bool FP_GreenManure(LE *a_field, double a_user, int a_days)
Spread green manure on a_field owned by an arable farmer.
static CfgFloat l_farm_cattle_veg_reduce2("FARM_CATTLE_VEG_REDUCE_LOW", CFG_CUSTOM, 1.00)
CfgInt cfg_productapplicstartyear
Landscape * g_landscape_p
void SetBirdMaize(double a_forage)
#define LE_SIG_NO_SYNG_INSECT
CfgInt cfg_WW_InsecticideMonth("PEST_WWINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
CfgInt cfg_OSR_InsecticideMonth("PEST_OSRINSECTONEMONTH", CFG_CUSTOM, 4)
Provided to allow configuration control of the first insecticide spray in OSR - this changes the mont...
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
LE_Signal GetSignal(void)
static CfgFloat l_farm_pig_veg_reduce("FARM_PIG_VEG_REDUCE", CFG_CUSTOM, 0.98)
virtual void Insecticide(double)
virtual void SetGrowthPhase(int)
virtual void RecalculateBugsNStuff(void)
virtual bool AutumnPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the autumn on a_field.
virtual bool Trial_PesticideTreat(LE *a_field, double a_user, int a_days)
Special pesticide trial functionality.
CfgInt cfg_WW_InsecticideDay("PEST_WWINSECTONEDAY", CFG_CUSTOM, 1)
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
virtual bool PigsOut(LE *a_field, double a_user, int a_days)
Generate a 'pigs_out' event for every day the cattle are on a_field.
virtual bool AutumnHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the autumn on a_field.
virtual bool ProductApplication1(LE *a_field, double a_user, int a_days)
Apply test pesticide to a_field.
virtual bool Trial_PesticideTreat_DateLimited(LE *a_field, double, int)
Special pesticide trial functionality.
void SetBirdSeed(double a_forage)
double GetRainPeriod(long a_date, unsigned int a_period)
virtual bool ProductApplication0(LE *a_field, double a_user, int a_days)
Apply test pesticide to a_field.
CfgInt l_pest_productapplic_period
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
#define EL_TRAMLINE_DECAYTIME
bool Harvest(LE *a_field, double a_user, int a_days)
OptimisingFarm's virtual version of Farm::Harvest(). Saves information on biomass of a crop at harves...
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
virtual bool SpringSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the spring on a_field.
void SetHerbicideDelay(int a_decaytime_days)
virtual bool FungicideTreat(LE *a_field, double, int a_days)
Carries out fungicide application. Saves information on each application for a given crop...
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
Double configurator entry class.
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
virtual void GrazeVegetation(double, bool)
virtual bool FP_LiquidNH3(LE *a_field, double a_user, int a_days)
Apply liquid ammonia fertilizer to a_field owned by an arable farmer.
virtual bool StriglingSow(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding followed by sowing on a_field.
virtual void ZeroVeg(void)
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
virtual void ReduceWeedBiomass(double)
virtual double GetInsectPop(void)
virtual bool FA_PK(LE *a_field, double a_user, int a_days)
Apply PK fertilizer to a_field owned by an stock farmer.
virtual bool FP_Sludge(LE *a_field, double a_user, int a_days)
Spread sewege on a_field owned by an arable farmer.
virtual bool Trial_ToxicControl(LE *a_field, double a_user, int a_days)
Special pesticide trial functionality.
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
virtual bool SynInsecticideTreat(LE *a_field, double a_user, int a_days)
Apply special insecticide to a_field.
virtual bool HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
#define LE_SIG_NO_INSECTICIDE
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.