ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
Go to the documentation of this file.
40 #define UNREFERENCED_PARAMETER(P) (P)
56 #define DO_IT_PROB (l_farm_event_do_it_prob.value())
57 #define DO_IT_PROB_LONG (l_farm_event_do_it_prob_long.value())
657 a_field->Trace(
fp_pk );
945 a_field->Trace(
fa_pk );
1214 Field * pf = dynamic_cast<Field*>(a_field);
1235 Field * pf = dynamic_cast<Field*>(a_field);
1319 Field * pf = dynamic_cast<Field*>(a_field);
1333 Field * pf = dynamic_cast<Field*>(a_field);
1408 Field * pf = dynamic_cast<Field*>(a_field);
1430 Field * pf = dynamic_cast<Field*>(a_field);
1519 if ( (0 >= a_days) ||
1549 if ( (0 >= a_days) )
1569 if ( (0 >= a_days) ||
1606 if ( (0 >= a_days) ||
1727 a_field->Trace(
water );
1780 a_field->RecalculateBugsNStuff();
1785 double someseed = 0.0;
1786 double somemaize = 0.0;
1787 if (dynamic_cast<VegElement*>(a_field)->IsMatureCereal()) {
1788 someseed = m_OurManager->GetSpilledGrain();
1791 else if (dynamic_cast<VegElement*>(a_field)->IsMaize()) {
1794 somemaize = m_OurManager->GetSpilledMaize();
1806 um->RecalculateBugsNStuff();
1809 if ((somemaize > 0) || (someseed > 0)) um->
SetStubble(
true);
1825 if ((0 >= a_days) ||
1835 a_field->RecalculateBugsNStuff();
1839 double someseed = 0.0;
1850 um->RecalculateBugsNStuff();
1863 if ( (0 >= a_days) ||
1869 Field * pf = dynamic_cast<Field*>(a_field);
1884 a_field->RecalculateBugsNStuff();
1897 um->RecalculateBugsNStuff();
1980 if (biomass > 100.0)
1999 if (d1 > a_max) d1 = a_max;
2000 if ((((
g_date->
DayInYear() > d1) && (10 >= a_days)) && DoIt(10)) || (0 >= a_days))
2024 if (biomass > 100.0)
2043 if (d1 > a_max) d1 = a_max;
2044 if ((((
g_date->
DayInYear() > d1) && (10 >= a_days)) && DoIt(10)) || (0 >= a_days))
2115 if ( (0 >= a_days)|| DoIt(50/a_days)) {
2135 if ( (0 >= a_days) ||
2162 if ( (0 >= a_days) ||
2187 if ( (0 >= a_days) ||
2212 if ( (0 >= a_days) ||
2366 a_field->Trace(
mow );
2478 a_field->RecalculateBugsNStuff();
2491 um->RecalculateBugsNStuff();
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 PigsAreOut(LE *a_field, double a_user, int a_days)
Start a pig grazing event on a_field today or soon.
static CfgBool l_farm_insecticide_kills("FARM_INSECTICIDE_KILLS", CFG_CUSTOM, true)
virtual bool SpringRoll(LE *a_field, double a_user, int a_days)
Carry out a roll event in the spring on a_field.
LE * SupplyLEPointer(int a_polyref)
virtual bool FA_Slurry(LE *a_field, double a_user, int a_days)
Spready slurry on a_field owned by an stock farmer.
virtual bool HerbicideTreat(LE *a_field, double, int a_days)
Carries out herbicide application. Saves information on each application for a given crop.
virtual bool PreseedingCultivator(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to co...
virtual bool SpringPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the spring on a_field.
PlantProtectionProducts
A list PPP names for tracking by the Pesticide class.
virtual bool HerbicideTreat(LE *a_field, double a_user, int a_days)
Apply herbicide to a_field.
CfgInt cfg_CAB_InsecticideDay("PEST_CABINSECTONEDAY", CFG_CUSTOM, 15)
Provided to allow configuration control of the first insecticide spray in cabbage crops - this change...
virtual bool Strigling(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field.
CfgInt cfg_WW_InsecticideMonth("PEST_WWINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in winter wheat - this changes...
void SetLastSownVeg(TTypesOfVegetation a_tov)
Records the last vegetation type to be sown.
virtual bool Harvest(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
virtual bool PreseedingCultivatorSow(LE *a_field, double a_user, int a_days)
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including culti...
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 StubbleCultivatorHeavy(LE *a_field, double a_user, int a_days)
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can...
virtual bool PigsAreOutForced(LE *a_field, double a_user, int a_days)
Start a pig grazing event on a_field today - no exceptions.
virtual bool ProductApplication(LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp)
Apply test pesticide to 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.
virtual bool FP_NPK(LE *a_field, double a_user, int a_days)
Apply NPK fertilizer, on a_field owned by an arable farmer.
virtual bool CutToSilage(LE *a_field, double a_user, int a_days)
Cut vegetation for silage on a_field.
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...
CfgInt cfg_TU_InsecticideDay("PEST_TUINSECTONEDAY", CFG_CUSTOM, 15)
Provided to allow configuration control of the first insecticide spray in tulip crops - this changes ...
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 Molluscicide(LE *a_field, double a_user, int a_days)
Apply molluscidie to a_field.
virtual bool StrawRemoval(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
virtual bool StubblePlough(LE *a_field, double a_user, int a_days)
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normall...
virtual bool FA_GreenManure(LE *a_field, double a_user, int a_days)
Spread green manure on a_field owned by an stock farmer.
static CfgFloat l_farm_pig_veg_reduce("FARM_PIG_VEG_REDUCE", CFG_CUSTOM, 0.98)
virtual bool BedForming(LE *a_field, double a_user, int a_days)
Do bed forming up on a_field, probably of carrots.
#define LE_SIG_NO_INSECTICIDE
void SetTramlinesDecay(int a_decaytime_days)
CfgFloat cfg_WW_NINV_tillage_prop2("TILLAGE_WWNINVTWOPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing second non-inversion tilla...
virtual bool FA_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an stock farmer.
virtual double GetInsectPop(void)
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 FA_Sludge(LE *a_field, double a_user, int a_days)
Spread sewege sludge on a_field owned by an stock farmer.
virtual bool SpringSowWithFerti(LE *a_field, double a_user, int a_days)
Carry out a sowing event with start fertilizer in the spring on a_field.
virtual void ReduceVeg_Extended(double)
virtual bool FA_NPKS(LE *a_field, double a_user, int a_days)
Apply NPKS fertilizer, on a_field owned by a stock farmer.
virtual TTypesOfVegetation GetVegType(void)
CfgFloat cfg_WW_isecticide_prop1("PEST_WWINSECTONEPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing first insecticide spray in...
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 ProductApplication_DateLimited(LE *a_field, double, int, double a_applicationrate, PlantProtectionProducts a_ppp)
Special pesticide trial functionality.
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 CutToHay(LE *a_field, double a_user, int a_days)
Carry out hay cutting on a_field.
virtual void SetInsectPop(double)
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 bool FungicideTreat(LE *a_field, double a_user, int a_days)
Apply fungicide to a_field.
static CfgInt l_farm_event_do_it_prob("FARM_EVENT_DO_IT_PROB", CFG_PRIVATE, 50)
virtual bool HillingUp(LE *a_field, double a_user, int a_days)
Do hilling up on a_field, probably of potatoes.
virtual double GetVegBiomass(void)
double GetWind(long a_date)
virtual void SetVegHeight(double)
CfgInt cfg_productapplicendyear
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 void TogglePigGrazing(void)
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 StriglingHill(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding on a_field followed by hilling up (probably on potatoes)
CfgInt l_pest_productapplic_period
CfgInt cfg_TU_InsecticideMonth("PEST_TUINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in tulip crops - this changes ...
virtual bool CattleOutLowGrazing(LE *a_field, double a_user, int a_days)
Start a extensive grazing event on a_field today.
#define LE_SIG_NO_GROWTH_REG
static CfgFloat cfg_CustomInsecticideKillProp("CUSTOMINSECTIVIDEKILLPROP", CFG_CUSTOM, 0.5, 0, 1.0)
virtual bool FP_Manure(LE *a_field, double a_user, int a_days)
Spread manure on a_field owned by an arable farmer.
void SetSprayedToday(bool a_didit)
virtual bool AutumnSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the autumn on a_field.
The landscape class containing all environmental and topographical data.
CfgFloat l_el_o_cut_height
virtual bool FA_RSM(LE *a_field, double a_user, int a_days)
RSM (ammonium nitrate solution) applied on a_field owned by a stock farmer.
CfgInt cfg_POT_InsecticideDay("PEST_POTINSECTONEDAY", CFG_CUSTOM, 15)
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
virtual bool Biocide(LE *a_field, double a_user, int a_days)
Biocide applied on a_field.
CfgFloat cfg_WW_isecticide_prop2("PEST_WWINSECTTWOPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing second insecticide spray i...
double GetTemp(long a_date)
Get the temperature on a particular date.
CfgInt l_pest_productapplic_enddate
CfgInt cfg_BE_InsecticideDay("PEST_BEINSECTONEDAY", CFG_CUSTOM, 15)
Provided to allow configuration control of the first insecticide spray in beet crops - this changes t...
virtual bool FP_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Bool configurator entry class.
virtual bool HayBailing(LE *a_field, double a_user, int a_days)
Carry out hay bailing on a_field.
void SetMownDecay(int a_decaytime_days)
virtual void ReduceVeg(double)
virtual bool FA_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by a stock farmer.
virtual bool StrawChopping(LE *a_field, double a_user, int a_days)
Carry out straw chopping on a_field.
CfgBool cfg_OptimiseBedriftsmodelCrops
If set to true, the original farm optimisation model's crop set is used in the farmer decision making...
CfgInt cfg_BE_InsecticideMonth("PEST_BEINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in beet crops - this changes t...
virtual bool InsecticideTreat(LE *a_field, double, int a_days)
Carries out insecticide application. Saves information on each application for a given crop.
#define LE_SIG_NO_FUNGICIDE
virtual bool FA_ManganeseSulphate(LE *a_field, double a_user, int a_days)
Apply manganese sulphate to a_field owned by an stock farmer.
CfgInt cfg_POT_InsecticideMonth("PEST_POTINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in potatoes crops - this chang...
CfgFloat l_el_o_cut_green
CfgInt cfg_CAB_InsecticideMonth("PEST_CABINSECTONEMONTH", CFG_CUSTOM, 5)
Provided to allow configuration control of the first insecticide spray in cabbage crops - this change...
static CfgBool l_farm_herbicide_kills("FARM_PESTICIDE_KILLS", CFG_CUSTOM, true)
virtual void ResetDigestability()
sets growth record to zero in descendent classes
CfgFloat cfg_WW_NINV_tillage_prop1("TILLAGE_WWNINVONEPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing first non-inversion tillag...
#define EL_STRIGLING_DELAYTIME
void DailyQueueAdd(LE *a_element_sprayed, double a_amount, PlantProtectionProducts a_ppp)
CfgFloat l_el_o_cut_total
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 FP_Calcium(LE *a_field, double a_user, int a_days)
Calcium applied on a_field owned by an arable farmer.
virtual bool FlowerCutting(LE *a_field, double a_user, int a_days)
Flower cutting applied on a_field.
CfgInt cfg_productapplicstartyear
void CheckForPesticideRecord(LE *a_field, TTypesOfPesticideCategory a_pcide)
Check if needed and record pesticide application.
int SupplyYearNumber(void)
static CfgFloat l_farm_cattle_veg_reduce("FARM_CATTLE_VEG_REDUCE", CFG_CUSTOM, 1.5)
virtual void InsectMortality(double)
#define EL_TRAMLINE_DECAYTIME
virtual void ToggleCattleGrazing(void)
virtual bool InsecticideTreat(LE *a_field, double a_user, int a_days)
Apply insecticide to a_field.
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 ShallowHarrow(LE *a_field, double a_user, int a_days)
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
virtual bool FP_Slurry(LE *a_field, double a_user, int a_days)
Apply slurry to a_field owned by an arable farmer.
virtual void ReduceWeedBiomass(double)
virtual bool HarvestLong(LE *a_field, double a_user, int a_days)
Carry out a harvest on a_field.
virtual bool SleepAllDay(LE *a_field, double a_user, int a_days)
Nothing to to today on a_field.
void SetStubble(bool a_flag)
Sets the in stubble flag.
virtual bool RowCultivation(LE *a_field, double a_user, int a_days)
Carry out a harrowing between crop rows on a_field.
virtual bool Water(LE *a_field, double a_user, int a_days)
Carry out a watering on a_field.
void SetBirdMaize(double a_forage)
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 SpringSow(LE *a_field, double a_user, int a_days)
Carry out a sowing event in the spring 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.
CfgFloat cfg_WW_isecticide_prop3("PEST_WWINSECTTHREEPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing third insecticide spray in...
virtual bool FA_AmmoniumSulphate(LE *a_field, double a_user, int a_days)
Apply ammonium sulphate to a_field owned by an stock farmer.
void SetLastTreatment(int a_treatment)
virtual void GrazeVegetation(double, bool)
Integer configurator entry class.
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.
void Set_biomass_at_harvest(double a_biomass, int index)
virtual bool StriglingSow(LE *a_field, double a_user, int a_days)
Carry out a mechanical weeding followed by sowing on a_field.
CfgInt l_pest_productapplic_startdate
Landscape * g_landscape_p
static CfgFloat l_farm_cattle_veg_reduce2("FARM_CATTLE_VEG_REDUCE_LOW", CFG_CUSTOM, 1.00)
virtual bool DeepPlough(LE *a_field, double a_user, int a_days)
Carry out a deep ploughing event on a_field.
virtual bool StrawCovering(LE *a_field, double a_user, int a_days)
Straw covering applied on a_field.
CfgFloat cfg_pest_product_1_amount
Double configurator entry class.
virtual bool FP_RSM(LE *a_field, double a_user, int a_days)
RSM (ammonium nitrate solution) applied on a_field owned by an arable farmer.
void SetBirdSeed(double a_forage)
virtual bool WinterPlough(LE *a_field, double a_user, int a_days)
Carry out a ploughing event in the winter on a_field.
virtual void SetGrowthPhase(int)
virtual bool BulbHarvest(LE *a_field, double a_user, int a_days)
Carry out a bulb harvest on a_field.
virtual bool FP_GreenManure(LE *a_field, double a_user, int a_days)
Spread green manure on a_field owned by an arable farmer.
virtual bool GrowthRegulator(LE *a_field, double a_user, int a_days)
Apply growth regulator to a_field.
int GetUnsprayedMarginPolyRef(void)
virtual void ZeroVeg(void)
void SetHerbicideDelay(int a_decaytime_days)
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 BurnStrawStubble(LE *a_field, double a_user, int a_days)
Burn stubble on a_field.
virtual void Insecticide(double)
CfgFloat cfg_WW_conv_tillage_prop1("TILLAGE_WWCONVONEPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing first conventional tillage...
#define LE_SIG_NO_MOLLUSC
virtual bool Swathing(LE *a_field, double a_user, int a_days)
Cut the crop on a_field and leave it lying (probably rape)
CfgFloat cfg_WW_conv_tillage_prop2("TILLAGE_WWCONVTWOPROP", CFG_CUSTOM, 1.0)
Provided to allow configuration control of the proportion of farmers doing second conventional tillag...
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...
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 ...
static CfgInt l_farm_event_do_it_prob_long("FARM_EVENT_DO_IT_PROB_LONG", CFG_PRIVATE, 5)
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 HayTurning(LE *a_field, double a_user, int a_days)
Carry out hay turning on a_field.
virtual bool CattleOut(LE *a_field, double a_user, int a_days)
Start a grazing event on a_field today.
class Weather * g_weather
virtual bool HeavyCultivatorAggregate(LE *a_field, double a_user, int a_days)
Carry out a heavy cultivation event on a_field. This is non-inversion type of cultivation which can b...
#define LE_SIG_NO_HERBICIDE
virtual void SetVegParameters(double, double, double, double)
double GetRainPeriod(long a_date, unsigned int a_period)
virtual bool StubbleHarrowing(LE *a_field, double a_user, int a_days)
Carry out stubble harrowing on a_field.
virtual bool SpringHarrow(LE *a_field, double a_user, int a_days)
Carry out a harrow event in the spring on a_field.
#define EL_HERBICIDE_DELAYTIME
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 CutWeeds(LE *a_field, double a_user, int a_days)
Carry out weed topping on a_field.