ALMaSS Skylark ODDox
1.1
The skylark model description following ODdox protocol
|
The base class for all farm types.
More...
#include <farm.h>
|
virtual void | Management (void) |
| Starts the main management loop for the farm and performs some error checking. More...
|
|
virtual void | InitiateManagement (void) |
| Kicks off the farm's management. More...
|
|
void | AddField (LE *a_newfield) |
| Adds a field to a farm. More...
|
|
void | RemoveField (LE *a_field) |
| Removes a field from a farm. More...
|
|
| Farm (FarmManager *a_manager) |
| Farm constructor - creates an instance of each possible crop type. More...
|
|
virtual | ~Farm (void) |
| Farm destructor - deletes all crop instances and empties event queues. More...
|
|
void | SetFarmNumber (int a_farm_num) |
|
int | GetFarmNumber (void) |
|
virtual bool | Spraying_herbicides (TTypesOfVegetation) |
|
virtual bool | Spraying_fungins (TTypesOfVegetation) |
|
virtual double | Prob_multiplier () |
|
void | Assign_rotation (vector< TTypesOfVegetation >a_new_rotation) |
|
polylist * | ListOpenFields (int a_openness) |
| Returns a list of fields with openness above a_openness. More...
|
|
void | Centroids () |
| Finds farm's centroids - x and y. More...
|
|
int | GetNoFields () |
| Returns the number of the fields owned. More...
|
|
int | GetNoOpenFields (int a_openness) |
| Returns the number of the fields above an openness of a_openness. More...
|
|
int | GetAreaOpenFields (int a_openness) |
| Returns the area of the fields above an openness of a_openness. More...
|
|
APoint | GetValidCoords () |
| Returns the valid coordinates of the first field owned by a farm. More...
|
|
int | GetMaxOpenness () |
| Returns the maximum openness score of the fields. More...
|
|
virtual bool | SleepAllDay (LE *a_field, double a_user, int a_days) |
| Nothing to to today on a_field. More...
|
|
virtual bool | AutumnPlough (LE *a_field, double a_user, int a_days) |
| Carry out a ploughing event in the autumn on a_field. More...
|
|
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 (normally 6-8cm, is special cases up to 12-15cm). Done as a part of after-harvest treatments (instead of stubble cultivation) More...
|
|
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 be done instead of autumn plough (on a depth up to 40 cm even, if necessary) More...
|
|
virtual bool | AutumnHarrow (LE *a_field, double a_user, int a_days) |
| Carry out a harrow event in the autumn on a_field. More...
|
|
virtual bool | AutumnRoll (LE *a_field, double a_user, int a_days) |
| Carry out a roll event in the autumn on a_field. More...
|
|
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 compact soil) More...
|
|
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 cultivator and string roller to compact soil) More...
|
|
virtual bool | AutumnSow (LE *a_field, double a_user, int a_days) |
| Carry out a sowing event in the autumn on a_field. More...
|
|
virtual bool | WinterPlough (LE *a_field, double a_user, int a_days) |
| Carry out a ploughing event in the winter on a_field. More...
|
|
virtual bool | DeepPlough (LE *a_field, double a_user, int a_days) |
| Carry out a deep ploughing event on a_field. More...
|
|
virtual bool | SpringPlough (LE *a_field, double a_user, int a_days) |
| Carry out a ploughing event in the spring on a_field. More...
|
|
virtual bool | SpringHarrow (LE *a_field, double a_user, int a_days) |
| Carry out a harrow event in the spring on a_field. More...
|
|
virtual bool | SpringRoll (LE *a_field, double a_user, int a_days) |
| Carry out a roll event in the spring on a_field. More...
|
|
virtual bool | SpringSow (LE *a_field, double a_user, int a_days) |
| Carry out a sowing event in the spring on a_field. More...
|
|
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. More...
|
|
virtual bool | HerbicideTreat (LE *a_field, double a_user, int a_days) |
| Apply herbicide to a_field. More...
|
|
virtual bool | GrowthRegulator (LE *a_field, double a_user, int a_days) |
| Apply growth regulator to a_field. More...
|
|
virtual bool | FungicideTreat (LE *a_field, double a_user, int a_days) |
| Apply fungicide to a_field. More...
|
|
virtual bool | InsecticideTreat (LE *a_field, double a_user, int a_days) |
| Apply insecticide to a_field. More...
|
|
virtual bool | ProductApplication (LE *a_field, double a_user, int a_days, double a_applicationrate, PlantProtectionProducts a_ppp) |
| Apply test pesticide to a_field. More...
|
|
virtual bool | ProductApplication_DateLimited (LE *a_field, double, int, double a_applicationrate, PlantProtectionProducts a_ppp) |
| Special pesticide trial functionality. More...
|
|
virtual bool | Molluscicide (LE *a_field, double a_user, int a_days) |
| Apply molluscidie to a_field. More...
|
|
virtual bool | RowCultivation (LE *a_field, double a_user, int a_days) |
| Carry out a harrowing between crop rows on a_field. More...
|
|
virtual bool | Strigling (LE *a_field, double a_user, int a_days) |
| Carry out a mechanical weeding on a_field. More...
|
|
virtual bool | StriglingSow (LE *a_field, double a_user, int a_days) |
| Carry out a mechanical weeding followed by sowing on a_field. More...
|
|
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) More...
|
|
virtual bool | HillingUp (LE *a_field, double a_user, int a_days) |
| Do hilling up on a_field, probably of potatoes. More...
|
|
virtual bool | Water (LE *a_field, double a_user, int a_days) |
| Carry out a watering on a_field. More...
|
|
virtual bool | Swathing (LE *a_field, double a_user, int a_days) |
| Cut the crop on a_field and leave it lying (probably rape) More...
|
|
virtual bool | Harvest (LE *a_field, double a_user, int a_days) |
| Carry out a harvest on a_field. More...
|
|
virtual bool | HarvestLong (LE *a_field, double a_user, int a_days) |
| Carry out a harvest on a_field. More...
|
|
virtual bool | CattleOut (LE *a_field, double a_user, int a_days) |
| Start a grazing event on a_field today. More...
|
|
virtual bool | CattleOutLowGrazing (LE *a_field, double a_user, int a_days) |
| Start a extensive grazing event on a_field today. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
virtual bool | PigsAreOut (LE *a_field, double a_user, int a_days) |
| Start a pig grazing event on a_field today or soon. More...
|
|
virtual bool | PigsAreOutForced (LE *a_field, double a_user, int a_days) |
| Start a pig grazing event on a_field today - no exceptions. More...
|
|
virtual bool | CutToHay (LE *a_field, double a_user, int a_days) |
| Carry out hay cutting on a_field. More...
|
|
virtual bool | CutWeeds (LE *a_field, double a_user, int a_days) |
| Carry out weed topping on a_field. More...
|
|
virtual bool | CutToSilage (LE *a_field, double a_user, int a_days) |
| Cut vegetation for silage on a_field. More...
|
|
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. More...
|
|
virtual bool | StrawChopping (LE *a_field, double a_user, int a_days) |
| Carry out straw chopping on a_field. More...
|
|
virtual bool | HayTurning (LE *a_field, double a_user, int a_days) |
| Carry out hay turning on a_field. More...
|
|
virtual bool | HayBailing (LE *a_field, double a_user, int a_days) |
| Carry out hay bailing on a_field. More...
|
|
virtual bool | BurnStrawStubble (LE *a_field, double a_user, int a_days) |
| Burn stubble on a_field. More...
|
|
virtual bool | StubbleHarrowing (LE *a_field, double a_user, int a_days) |
| Carry out stubble harrowing on a_field. More...
|
|
virtual bool | FP_NPKS (LE *a_field, double a_user, int a_days) |
| Apply NPKS fertilizer, on a_field owned by an arable farmer. More...
|
|
virtual bool | FP_NPK (LE *a_field, double a_user, int a_days) |
| Apply NPK fertilizer, on a_field owned by an arable farmer. More...
|
|
virtual bool | FP_PK (LE *a_field, double a_user, int a_days) |
| Apply PK fertilizer, on a_field owned by an arable farmer. More...
|
|
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. More...
|
|
virtual bool | FP_Slurry (LE *a_field, double a_user, int a_days) |
| Apply slurry to a_field owned by an arable farmer. More...
|
|
virtual bool | FP_ManganeseSulphate (LE *a_field, double a_user, int a_days) |
| Apply Manganse Sulphate to a_field owned by an arable farmer. More...
|
|
virtual bool | FP_AmmoniumSulphate (LE *a_field, double a_user, int a_days) |
| Apply Ammonium Sulphate to a_field owned by an arable farmer. More...
|
|
virtual bool | FP_Manure (LE *a_field, double a_user, int a_days) |
| Spread manure on a_field owned by an arable farmer. More...
|
|
virtual bool | FP_GreenManure (LE *a_field, double a_user, int a_days) |
| Spread green manure on a_field owned by an arable farmer. More...
|
|
virtual bool | FP_Sludge (LE *a_field, double a_user, int a_days) |
| Spread sewege on a_field owned by an arable farmer. More...
|
|
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. More...
|
|
virtual bool | FP_Calcium (LE *a_field, double a_user, int a_days) |
| Calcium applied on a_field owned by an arable farmer. More...
|
|
virtual bool | FA_NPKS (LE *a_field, double a_user, int a_days) |
| Apply NPKS fertilizer, on a_field owned by a stock farmer. More...
|
|
virtual bool | FA_NPK (LE *a_field, double a_user, int a_days) |
| Apply NPK fertilizer to a_field owned by an stock farmer. More...
|
|
virtual bool | FA_PK (LE *a_field, double a_user, int a_days) |
| Apply PK fertilizer to a_field owned by an stock farmer. More...
|
|
virtual bool | FA_Slurry (LE *a_field, double a_user, int a_days) |
| Spready slurry on a_field owned by an stock farmer. More...
|
|
virtual bool | FA_ManganeseSulphate (LE *a_field, double a_user, int a_days) |
| Apply manganese sulphate to a_field owned by an stock farmer. More...
|
|
virtual bool | FA_AmmoniumSulphate (LE *a_field, double a_user, int a_days) |
| Apply ammonium sulphate to a_field owned by an stock farmer. More...
|
|
virtual bool | FA_Manure (LE *a_field, double a_user, int a_days) |
| Spread manure on a_field owned by an stock farmer. More...
|
|
virtual bool | FA_GreenManure (LE *a_field, double a_user, int a_days) |
| Spread green manure on a_field owned by an stock farmer. More...
|
|
virtual bool | FA_Sludge (LE *a_field, double a_user, int a_days) |
| Spread sewege sludge on a_field owned by an stock farmer. More...
|
|
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. More...
|
|
virtual bool | FA_Calcium (LE *a_field, double a_user, int a_days) |
| Calcium applied on a_field owned by a stock farmer. More...
|
|
virtual bool | Biocide (LE *a_field, double a_user, int a_days) |
| Biocide applied on a_field. More...
|
|
virtual bool | BedForming (LE *a_field, double a_user, int a_days) |
| Do bed forming up on a_field, probably of carrots. More...
|
|
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. More...
|
|
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 be done after fertilizers application on spring for a spring crop. More...
|
|
virtual bool | FlowerCutting (LE *a_field, double a_user, int a_days) |
| Flower cutting applied on a_field. More...
|
|
virtual bool | BulbHarvest (LE *a_field, double a_user, int a_days) |
| Carry out a bulb harvest on a_field. More...
|
|
virtual bool | StrawCovering (LE *a_field, double a_user, int a_days) |
| Straw covering applied on a_field. More...
|
|
virtual bool | StrawRemoval (LE *a_field, double a_user, int a_days) |
| Straw covering applied on a_field. More...
|
|
void | AddNewEvent (TTypesOfVegetation a_event, long a_date, LE *a_field, int a_todo, long a_num, bool a_lock, int a_start, bool a_first_year, TTypesOfVegetation a_crop) |
| Adds an event to the event queue for a farm. More...
|
|
bool | DoIt (double a_probability) |
| Return chance out of 0 to 100. More...
|
|
bool | DoIt_prob (double a_probability) |
| Return chance out of 0 to 1. More...
|
|
TTypesOfFarm | GetType (void) |
|
int | GetArea (void) |
| Returns the area of arable fields owned by that farm. More...
|
|
int | GetTotalArea (void) |
| Returns the area of all fields owned by that farm. More...
|
|
double | GetAreaDouble (void) |
| Returns the area of arable fields owned by that farm. More...
|
|
bool | IsStockFarmer (void) |
|
virtual void | MakeStockFarmer (void) |
|
int | GetIntensity (void) |
|
APoint | GetCentroids () |
|
TTypesOfVegetation | GetPreviousCrop (int a_index) |
|
TTypesOfVegetation | GetCrop (int a_index) |
|
TTypesOfVegetation | GetNextCrop (int a_index) |
|
void | AddHunter (Hunter *a_hunter) |
|
void | RemoveHunter (Hunter *a_hunter) |
|
The base class for all farm types.
◆ Farm()
Farm constructor - creates an instance of each possible crop type.
◆ ~Farm()
Farm destructor - deletes all crop instances and empties event queues.
1321 LowPriPair < FarmEvent * > pair;
1326 delete pair.m_element;
◆ AddField()
void Farm::AddField |
( |
LE * |
a_newfield | ) |
|
◆ AddHunter()
void Farm::AddHunter |
( |
Hunter * |
a_hunter | ) |
|
|
inline |
◆ AddNewEvent()
Adds an event to the event queue for a farm.
791 FarmEvent * ev =
new FarmEvent( a_event, a_field, a_todo, a_run, a_lock, a_start, a_first_year, a_crop );
Referenced by Crop::SimpleEvent_().
◆ Assign_rotation()
◆ AssignPermanentCrop()
Used to assign a permanent crop to an otherwise rotational field polygon.
2411 (*cfi)->SetRotIndex(-4);
2421 fields_cpy.resize(
m_fields.size());
2428 int sz = (int) fields_cpy.size();
2430 for (
int i = sz - 1; i >= 0; i--) {
2431 if (fields_cpy[i]->GetRotIndex() < -1) {
2432 fields_cpy.erase(fields_cpy.begin() + i);
2436 for (
auto cfi = fields_cpy.begin(); cfi != fields_cpy.end(); ++cfi) area += (*cfi)->GetArea();
2439 int fnos = (int) fields_cpy.size();
2443 if (random(100)>=a_pct)
return;
2446 fields_cpy[0]->SetRotIndex(-4);
2453 for (
int i=0; i<fnos; i++) {
2454 a_tpct.
pct = (int) floor(0.5+((fields_cpy[i]->
GetArea()/area)*100));
2456 pcts.push_back(a_tpct);
2460 sort (pcts.begin(), pcts.end(),
CompPcts);
2465 while ((index==-1) && (ind< (int)pcts.size())) {
2466 if (pcts[ind++].pct>apct) index=ind;
2468 if (index!=-1) pcts.erase(pcts.begin()+index,pcts.end());
2476 for (
int h=0; h< (int)pcts.size(); h++) check+=fields_cpy[pcts[h].index]->
GetArea();
2478 if ((bits & mask) > 0) {
2480 fields_cpy[pcts[ind].index]->SetRotIndex(-4);
2482 fields_cpy[pcts[ind].index]->SetVegType(a_tov,
tov_Undefined);
2483 used += (int) fields_cpy[pcts[ind].index]->
GetArea();
References CompPcts(), GetArea(), tpct::index, InvIntPartition(), m_fields, tpct::pct, and tov_Undefined.
Referenced by OptimisingFarm::InitiateManagement().
◆ AutumnHarrow()
bool Farm::AutumnHarrow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a harrow event in the autumn on a_field.
264 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
268 a_field->InsectMortality( 0.1 );
271 int pref=a_field->GetUnsprayedMarginPolyRef();
276 um->InsectMortality( 0.1 );
References autumn_harrow, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OTriticale::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterWheat::Do(), OWinterRape::Do(), Triticale::Do(), WinterRyeStrigling::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterRape::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ AutumnPlough()
bool Farm::AutumnPlough |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a ploughing event in the autumn on a_field.
140 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
147 a_field->InsectMortality( 0.1 );
151 int pref=a_field->GetUnsprayedMarginPolyRef();
156 um->InsectMortality( 0.1 );
References autumn_plough, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), WinterRapeStrigling::Do(), NorwegianSpringBarley::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), Maize::Do(), OTriticale::Do(), MaizeStrigling::Do(), MaizeSilage::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), FieldPeasStrigling::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeas::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), SpringBarleyCloverGrass::Do(), OFodderbeet::Do(), Triticale::Do(), OWinterRape::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), PotatoesIndustry::Do(), Fodderbeet::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyStrigling::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterRape::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), NLTulips::Do(), and WinterWheat::Do().
◆ AutumnRoll()
bool Farm::AutumnRoll |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a roll event in the autumn on a_field.
291 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
295 int pref=a_field->GetUnsprayedMarginPolyRef();
References autumn_roll, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OTriticale::Do(), Triticale::Do(), WinterRyeStrigling::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), AgroChemIndustryCereal::Do(), and WinterWheat::Do().
◆ AutumnSow()
bool Farm::AutumnSow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a sowing event in the autumn on a_field.
367 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
370 a_field->SetGrowthPhase( sow );
371 a_field->SetLastSownVeg(a_field->GetVegType());
374 int pref=a_field->GetUnsprayedMarginPolyRef();
379 um->SetGrowthPhase( sow );
381 um->SetLastSownVeg(um->GetVegType());
References autumn_sow, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OTriticale::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterWheat::Do(), OWinterRape::Do(), Triticale::Do(), WinterRyeStrigling::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterRape::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ BedForming()
bool Farm::BedForming |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Do bed forming up on a_field, probably of carrots.
1693 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1696 a_field->InsectMortality(0.75);
1698 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1699 int pref = a_field->GetUnsprayedMarginPolyRef();
1705 um->InsectMortality(0.75);
1706 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References bed_forming, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
◆ Biocide()
bool Farm::Biocide |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ BulbHarvest()
bool Farm::BulbHarvest |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a bulb harvest on a_field.
2468 if ((0 >= a_days) || ((g_weather->GetRainPeriod(g_date->Date(), 5) < 0.1) &&
DoIt(
DO_IT_PROB))) {
2471 a_field->SetGrowthPhase(harvest1);
2473 a_field->InsectMortality(0.3);
2476 double insects = a_field->GetInsectPop();
2477 a_field->ResetDigestability();
2478 a_field->RecalculateBugsNStuff();
2479 a_field->SetInsectPop(insects);
2480 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
2481 int pref = a_field->GetUnsprayedMarginPolyRef();
2486 um->SetGrowthPhase(harvest1);
2487 um->InsectMortality(0.3);
2489 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
2490 um->ResetDigestability();
2491 um->RecalculateBugsNStuff();
References bulb_harvest, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
◆ BurnStrawStubble()
bool Farm::BurnStrawStubble |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ CattleIsOut()
bool Farm::CattleIsOut |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days, |
|
|
int |
a_max |
|
) |
| |
|
virtual |
Generate a 'cattle_out' event for every day the cattle are on a_field.
This is the main grazing method and as such is called by all grazed field management plans each day the cattle are out.
1979 double biomass = a_field->GetVegBiomass();
1980 if (biomass > 100.0)
1989 int pref = a_field->GetUnsprayedMarginPolyRef();
1998 int d1 = g_date->DayInYear(10, 9);
1999 if (d1 > a_max) d1 = a_max;
2000 if ((((g_date->DayInYear() > d1) && (10 >= a_days)) &&
DoIt(10)) || (0 >= a_days))
2002 a_field->ToggleCattleGrazing();
2003 int pref = a_field->GetUnsprayedMarginPolyRef();
2007 um->ToggleCattleGrazing();
References cattle_out, g_landscape_p, l_farm_cattle_veg_reduce(), and Landscape::SupplyLEPointer().
Referenced by PermanentGrassLowYield::Do(), OPermanentGrassGrazed::Do(), OBarleyPeaCloverGrass::Do(), PermanentGrassGrazed::Do(), SpringBarleyCloverGrassStrigling::Do(), SpringBarleyCloverGrass::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), and SetAside::Do().
◆ CattleIsOutLow()
bool Farm::CattleIsOutLow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days, |
|
|
int |
a_max |
|
) |
| |
|
virtual |
◆ CattleOut()
bool Farm::CattleOut |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Start a grazing event on a_field today.
This is the main initiate grazing method and as such is called by all grazed field management plans at the moment cattle are put out.
1917 a_field->ToggleCattleGrazing();
1925 int pref = a_field->GetUnsprayedMarginPolyRef();
1931 um->ToggleCattleGrazing();
References cattle_out, DO_IT_PROB, g_landscape_p, l_farm_cattle_veg_reduce(), and Landscape::SupplyLEPointer().
Referenced by PermanentGrassLowYield::Do(), OPermanentGrassGrazed::Do(), OBarleyPeaCloverGrass::Do(), PermanentGrassGrazed::Do(), SpringBarleyCloverGrassStrigling::Do(), SpringBarleyCloverGrass::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), and SetAside::Do().
◆ CattleOutLowGrazing()
bool Farm::CattleOutLowGrazing |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ Centroids()
◆ CheckRotationManagementLoop()
void Farm::CheckRotationManagementLoop |
( |
FarmEvent * |
ev | ) |
|
|
protected |
Rotation error check function
840 if ( ev->
m_field->GetMgtLoopDetectDate() == g_date->Date() ) {
845 ev->
m_field->SetMgtLoopDetectCount( ev->
m_field->GetMgtLoopDetectCount() + 1 );
847 if ( ev->
m_field->GetMgtLoopDetectCount() > ( long )(
m_rotation.size() + 2 ) ) {
851 g_msg->Warn( WARN_BUG,
"Rotation management loop detected in farmtype ", errornum );
855 ev->
m_field->SetMgtLoopDetectCount( 0 );
References FarmEvent::m_field.
◆ CutOrch()
bool Farm::CutOrch |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ CutToHay()
bool Farm::CutToHay |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ CutToSilage()
bool Farm::CutToSilage |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Cut vegetation for silage on a_field.
2332 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
2335 a_field->ReduceVeg_Extended( 0.2 );
2336 a_field->InsectMortality( 0.4 );
2337 a_field->SetVegHeight( 10 );
2338 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
2339 a_field->SetGrowthPhase(harvest1);
2341 int pref=a_field->GetUnsprayedMarginPolyRef();
2346 um->ReduceVeg_Extended( 0.2 );
2347 um->InsectMortality( 0.4 );
2348 um->SetVegHeight( 10 );
2349 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
2350 um->ResetDigestability();
2351 um->SetGrowthPhase(harvest1);
References cut_to_silage, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OSBarleySilage::Do(), OBarleyPeaCloverGrass::Do(), and SetAside::Do().
◆ CutWeeds()
bool Farm::CutWeeds |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ DeepPlough()
bool Farm::DeepPlough |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a deep ploughing event on a_field.
420 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
424 a_field->InsectMortality( 0.1 );
427 int pref=a_field->GetUnsprayedMarginPolyRef();
432 um->InsectMortality( 0.1 );
References deep_ploughing, DO_IT_PROB, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OWinterWheatUndersownExt::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStrigling::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterWheatStriglingCulm::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), and WinterWheat::Do().
◆ DoIt()
bool Farm::DoIt |
( |
double |
a_probability | ) |
|
Return chance out of 0 to 100.
801 return (
g_rand_uni() < (a_probability/100.0));
References g_rand_uni.
Referenced by PermanentGrassTussocky::Do(), NorwegianOats::Do(), WinterRapeStrigling::Do(), NorwegianSpringBarley::Do(), OrchardCrop::Do(), OSeedGrass1::Do(), BroadBeans::Do(), OSeedGrass2::Do(), PermanentGrassLowYield::Do(), OSBarleySilage::Do(), OFieldPeasSilage::Do(), OFieldPeas::Do(), OPermanentGrassGrazed::Do(), OCarrots::Do(), SeedGrass1::Do(), OBarleyPeaCloverGrass::Do(), PermanentGrassGrazed::Do(), OMaizeSilage::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), SeedGrass2::Do(), OWinterRye::Do(), OOats::Do(), Maize::Do(), OTriticale::Do(), MaizeSilage::Do(), MaizeStrigling::Do(), OSpringBarleyPigs::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), SpringBarleyCloverGrassStrigling::Do(), DummyCropPestTesting::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), OPotatoes::Do(), FieldPeasStrigling::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), SpringBarleyCloverGrass::Do(), OFodderbeet::Do(), OWinterRape::Do(), Triticale::Do(), PLFodderLucerne2::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), SetAside::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), Fodderbeet::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), PLCarrots::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), PLFodderLucerne1::Do(), SpringRape::Do(), WWheatPControl::Do(), WWheatPTreatment::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStriglingSingle::Do(), PLBeans::Do(), WWheatPToxicControl::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), PLWinterRye::Do(), PLMaizeSilage::Do(), PLSpringBarley::Do(), PLMaize::Do(), PLWinterTriticale::Do(), PLSpringWheat::Do(), PLWinterBarley::Do(), PLWinterWheatLate::Do(), PLBeet::Do(), PLPotatoes::Do(), PLWinterRape::Do(), WinterWheat::Do(), WinterRape::HerbiZero(), SpringRape::RowcolOne(), and WinterRape::RowcolOne().
◆ DoIt_prob()
bool Farm::DoIt_prob |
( |
double |
a_probability | ) |
|
◆ FA_AmmoniumSulphate()
bool Farm::FA_AmmoniumSulphate |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FA_Calcium()
bool Farm::FA_Calcium |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FA_GreenManure()
bool Farm::FA_GreenManure |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FA_ManganeseSulphate()
bool Farm::FA_ManganeseSulphate |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FA_Manure()
bool Farm::FA_Manure |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Spread manure on a_field owned by an stock farmer.
1039 if ( (0 >= a_days) || ((g_weather->GetTemp()>0)&&
1044 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1045 int pref=a_field->GetUnsprayedMarginPolyRef();
1050 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fa_manure, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OSBarleySilage::Do(), OBarleyPeaCloverGrass::Do(), OMaizeSilage::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), Maize::Do(), OTriticale::Do(), MaizeStrigling::Do(), MaizeSilage::Do(), OSpringBarleyExt::Do(), Oats::Do(), OSpringBarley::Do(), FieldPeasStrigling::Do(), FieldPeasSilage::Do(), FieldPeas::Do(), SpringBarleyCloverGrassStrigling::Do(), OPotatoes::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), OWinterRape::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WWheatPTreatment::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), NLTulips::Do(), and WinterWheat::Do().
◆ FA_NPK()
bool Farm::FA_NPK |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply NPK fertilizer to a_field owned by an stock farmer.
920 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
922 a_field->SetLastTreatment(
fa_npk );
923 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
924 int pref=a_field->GetUnsprayedMarginPolyRef();
928 um->SetLastTreatment(
fa_npk );
929 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fa_npk, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OMaizeSilage::Do(), PermanentGrassGrazed::Do(), Maize::Do(), MaizeSilage::Do(), OTriticale::Do(), MaizeStrigling::Do(), SpringBarleyCloverGrassStrigling::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), NLCabbageSpring::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarley::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ FA_NPKS()
bool Farm::FA_NPKS |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply NPKS fertilizer, on a_field owned by a stock farmer.
894 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
896 a_field->SetLastTreatment(
fa_npks);
897 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
898 int pref = a_field->GetUnsprayedMarginPolyRef();
903 um->SetGrowthPhase(harvest1);
904 um->InsectMortality(0.4);
905 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References DO_IT_PROB, fa_npks, g_landscape_p, sleep_all_day, and Landscape::SupplyLEPointer().
◆ FA_PK()
bool Farm::FA_PK |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply PK fertilizer to a_field owned by an stock farmer.
944 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
945 a_field->Trace(
fa_pk );
946 a_field->SetLastTreatment(
fa_pk );
947 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
948 int pref=a_field->GetUnsprayedMarginPolyRef();
952 um->SetLastTreatment(
fa_pk );
953 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fa_pk, g_landscape_p, and Landscape::SupplyLEPointer().
◆ FA_RSM()
bool Farm::FA_RSM |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
RSM (ammonium nitrate solution) applied on a_field owned by a stock farmer.
1113 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1115 a_field->SetLastTreatment(
fa_rsm);
1116 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1117 int pref = a_field->GetUnsprayedMarginPolyRef();
1121 um->SetLastTreatment(
fa_rsm);
1122 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References DO_IT_PROB, fa_rsm, g_landscape_p, and Landscape::SupplyLEPointer().
◆ FA_Sludge()
bool Farm::FA_Sludge |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FA_Slurry()
bool Farm::FA_Slurry |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Spready slurry on a_field owned by an stock farmer.
968 if ( (0 >= a_days) || ((g_weather->GetTemp()>0)&&
973 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
974 int pref=a_field->GetUnsprayedMarginPolyRef();
979 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fa_slurry, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OSBarleySilage::Do(), OPermanentGrassGrazed::Do(), OCarrots::Do(), OBarleyPeaCloverGrass::Do(), OMaizeSilage::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), MaizeSilage::Do(), OTriticale::Do(), Maize::Do(), MaizeStrigling::Do(), OSpringBarleyExt::Do(), Oats::Do(), OSpringBarley::Do(), OPotatoes::Do(), SpringBarleyCloverGrassStrigling::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), OWinterRape::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), Fodderbeet::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), WinterRye::Do(), SpringBarley::Do(), WWheatPControl::Do(), WWheatPTreatment::Do(), WinterWheatStriglingSingle::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ FlowerCutting()
bool Farm::FlowerCutting |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Flower cutting applied on a_field.
2439 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
2441 a_field->ReduceVeg_Extended(0.8);
2442 a_field->InsectMortality(0.9);
2443 a_field->SetVegHeight(35);
2445 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
2446 int pref = a_field->GetUnsprayedMarginPolyRef();
2450 um->ReduceVeg_Extended(0.8);
2451 um->InsectMortality(0.9);
2452 um->SetVegHeight(30);
2454 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References DO_IT_PROB, flower_cutting, g_landscape_p, and Landscape::SupplyLEPointer().
◆ FP_AmmoniumSulphate()
bool Farm::FP_AmmoniumSulphate |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FP_Calcium()
bool Farm::FP_Calcium |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FP_GreenManure()
bool Farm::FP_GreenManure |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FP_LiquidNH3()
bool Farm::FP_LiquidNH3 |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply liquid ammonia fertilizer to a_field owned by an arable farmer.
680 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
683 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
684 int pref=a_field->GetUnsprayedMarginPolyRef();
689 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_liquidNH3, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by SpringBarleySeed::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStrigling::Do(), and SpringBarley::Do().
◆ FP_ManganeseSulphate()
bool Farm::FP_ManganeseSulphate |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply Manganse Sulphate to a_field owned by an arable farmer.
730 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
733 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
734 int pref=a_field->GetUnsprayedMarginPolyRef();
739 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_manganesesulphate, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRyeStrigling::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStriglingSingle::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ FP_Manure()
bool Farm::FP_Manure |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Spread manure on a_field owned by an arable farmer.
776 if ( (0 >= a_days) || ((g_weather->GetTemp()>0)&&
780 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
781 int pref=a_field->GetUnsprayedMarginPolyRef();
786 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_manure, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OSpringBarleyExt::Do(), OSpringBarley::Do(), FieldPeasSilage::Do(), OPotatoes::Do(), FieldPeasStrigling::Do(), FieldPeas::Do(), OWinterWheatUndersown::Do(), OWinterWheat::Do(), OWinterWheatUndersownExt::Do(), OWinterRape::Do(), and NLTulips::Do().
◆ FP_NPK()
bool Farm::FP_NPK |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply NPK fertilizer, on a_field owned by an arable farmer.
632 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
634 a_field->SetLastTreatment(
fp_npk );
635 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
636 int pref=a_field->GetUnsprayedMarginPolyRef();
640 um->SetLastTreatment(
fp_npk);
641 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_npk, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by OSeedGrass1::Do(), OSeedGrass2::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), SeedGrass2::Do(), SpringBarleySeed::Do(), Carrots::Do(), PotatoesIndustry::Do(), NLCabbageSpring::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarley::Do(), WWheatPControl::Do(), NLPermanentGrassGrazed::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), NLGrassGrazed2::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), NLGrassGrazedLast::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), NLPotatoesSpring::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ FP_NPKS()
bool Farm::FP_NPKS |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FP_PK()
bool Farm::FP_PK |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply PK fertilizer, on a_field owned by an arable farmer.
656 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
657 a_field->Trace(
fp_pk );
658 a_field->SetLastTreatment(
fp_pk );
659 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
660 int pref=a_field->GetUnsprayedMarginPolyRef();
664 um->SetLastTreatment(
fp_pk);
665 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_pk, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by SpringBarleySeed::Do(), PLFodderLucerne2::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), and PLBeet::Do().
◆ FP_RSM()
bool Farm::FP_RSM |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
RSM (ammonium nitrate solution) applied on a_field owned by an arable farmer.
849 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
851 a_field->SetLastTreatment(
fp_rsm);
852 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
853 int pref = a_field->GetUnsprayedMarginPolyRef();
857 um->SetLastTreatment(
fp_rsm);
858 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References DO_IT_PROB, fp_rsm, g_landscape_p, and Landscape::SupplyLEPointer().
◆ FP_Sludge()
bool Farm::FP_Sludge |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ FP_Slurry()
bool Farm::FP_Slurry |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply slurry to a_field owned by an arable farmer.
704 if ( (0 >= a_days) || ((g_weather->GetTemp()>0)&&
709 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
710 int pref=a_field->GetUnsprayedMarginPolyRef();
715 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, fp_slurry, g_landscape_p, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OCarrots::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OSpringBarleyPigs::Do(), OSpringBarleyExt::Do(), OSpringBarley::Do(), OPotatoes::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterRape::Do(), Carrots::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), PLBeans::Do(), WinterWheatStriglingSingle::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), PLWinterRye::Do(), NLPotatoes::Do(), PLSpringBarley::Do(), PLMaizeSilage::Do(), PLMaize::Do(), PLWinterTriticale::Do(), PLWinterWheat::Do(), PLWinterBarley::Do(), PLSpringWheat::Do(), PLWinterWheatLate::Do(), PLPotatoes::Do(), PLWinterRape::Do(), and WinterWheat::Do().
◆ FungicideTreat()
bool Farm::FungicideTreat |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply fungicide to a_field.
Reimplemented in OptimisingFarm.
1284 if ( ( ! a_field->GetSignal() & LE_SIG_NO_FUNGICIDE ))
1288 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1293 else if ( (g_weather->GetWind()<4.5) &&
1295 if ( ! (a_field->GetSignal() & LE_SIG_NO_FUNGICIDE) ) {
1298 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, fungicide, fungicide_treat, and g_landscape_p.
Referenced by WinterRapeStrigling::Do(), SeedGrass1::Do(), SeedGrass2::Do(), SpringBarleySeed::Do(), FieldPeas::Do(), FieldPeasStrigling::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStrigling::Do(), WinterRye::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WinterWheatStriglingSingle::Do(), WWheatPTreatment::Do(), WinterRape::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ GetArea()
int Farm::GetArea |
( |
void |
| ) |
|
◆ GetAreaDouble()
double Farm::GetAreaDouble |
( |
void |
| ) |
|
◆ GetAreaOpenFields()
int Farm::GetAreaOpenFields |
( |
int |
a_openness | ) |
|
Returns the area of the fields above an openness of a_openness.
Returns the area of fields owned by that farm with an openness above a_openness
1372 for (
unsigned int i = 0; i <
m_fields.size(); i++) {
◆ GetCentroids()
APoint Farm::GetCentroids |
( |
| ) |
|
|
inline |
◆ GetCrop()
◆ GetFarmNumber()
int Farm::GetFarmNumber |
( |
void |
| ) |
|
|
inline |
◆ GetFirstCropIndex()
Gets the first crop for the farm.
This method also synchronises farm rotations either within or between farms if needed. This is useful to try simple what if scenarios.
1388 if ( g_farm_fixed_rotation_enable.value() ) {
1390 if ( !g_farm_fixed_rotation_farms_async.value() ) {
◆ GetFirstDate()
Gets the start date for a crop type.
References tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FodderBeet, tov_FodderGrass, tov_Maize, tov_MaizeSilage, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NorwegianOats, tov_NorwegianPotatoes, tov_NorwegianSpringBarley, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFirstYearDanger, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSpringBarley, tov_OSpringBarleyExt, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_OWinterWheatUndersownExt, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SugarBeet, tov_Triticale, tov_WinterBarley, tov_WinterRape, tov_WinterRye, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, and tov_YoungForest.
◆ GetIntensity()
int Farm::GetIntensity |
( |
void |
| ) |
|
|
inline |
◆ GetMaxOpenness()
int Farm::GetMaxOpenness |
( |
| ) |
|
|
inline |
Returns the maximum openness score of the fields.
805 for (
int i = 0; i <
m_fields.size(); i++)
807 int openness =
m_fields[i]->GetOpenness();
808 if (openness > op) op = openness;
References m_fields.
◆ GetNextCrop()
◆ GetNextCropIndex()
int Farm::GetNextCropIndex |
( |
int |
a_rot_index | ) |
|
|
protectedvirtual |
Returns the next crop in the rotation.
Also provides the possibility of over-riding rotations using configuration settings
1428 if ( !g_farm_enable_crop_rotation.value() ) {
1433 if ( a_rot_index == -1 )
1436 if ( (
unsigned int ) ( ++a_rot_index ) ==
m_rotation.size() )
◆ GetNextCropStartDate()
◆ GetNoFields()
int Farm::GetNoFields |
( |
| ) |
|
|
inline |
Returns the number of the fields owned.
References m_fields.
◆ GetNoOpenFields()
int Farm::GetNoOpenFields |
( |
int |
a_openness | ) |
|
Returns the number of the fields above an openness of a_openness.
Returns the number of fields owned by that farm with an openness above a_openness
1362 for (
unsigned int i = 0; i <
m_fields.size(); i++) {
1363 if (
m_fields[i]->GetOpenness() > a_openness) num++;
◆ GetPreviousCrop()
910 int ind = a_index - 1;
911 if (ind < 0) ind = (int)
m_rotation.size() - 1;
References m_rotation.
◆ GetTotalArea()
int Farm::GetTotalArea |
( |
void |
| ) |
|
Returns the area of all fields owned by that farm.
1342 for (
unsigned int i = 0; i <
m_fields.size(); i++)
◆ GetType()
References m_farmtype.
Referenced by PermanentSetAside::Do(), PermanentGrassTussocky::Do(), OrchardCrop::Do(), OSeedGrass1::Do(), OSeedGrass2::Do(), BroadBeans::Do(), YoungForestCrop::Do(), PermanentGrassLowYield::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), NLCatchPeaCrop::Do(), SeedGrass2::Do(), MaizeSilage::Do(), OTriticale::Do(), Maize::Do(), NLMaizeSpring::Do(), Oats::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), DummyCropPestTesting::Do(), OFodderbeet::Do(), Triticale::Do(), PLFodderLucerne2::Do(), Carrots::Do(), NLMaize::Do(), NLBeetSpring::Do(), NLCarrotsSpring::Do(), SetAside::Do(), NLBeet::Do(), NLCarrots::Do(), Sugarbeet::Do(), NLCabbageSpring::Do(), NLSpringBarleySpring::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), Potatoes::Do(), NLCabbage::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), PLCarrots::Do(), WinterRye::Do(), NLSpringBarley::Do(), NLWinterWheat::Do(), PLSpringBarleySpr::Do(), SpringBarley::Do(), PLFodderLucerne1::Do(), SpringRape::Do(), NLPermanentGrassGrazed::Do(), PLBeetSpr::Do(), NLGrassGrazed1Spring::Do(), NLGrassGrazed2::Do(), PLBeans::Do(), NLGrassGrazedLast::Do(), WinterRape::Do(), NLGrassGrazed1::Do(), NLPotatoesSpring::Do(), WinterBarley::Do(), PLWinterRye::Do(), NLPotatoes::Do(), PLMaizeSilage::Do(), PLMaize::Do(), PLSpringBarley::Do(), NLTulips::Do(), PLWinterTriticale::Do(), PLBeet::Do(), PLWinterWheatLate::Do(), PLWinterBarley::Do(), PLWinterWheat::Do(), PLSpringWheat::Do(), PLPotatoes::Do(), PLWinterRape::Do(), and WinterWheat::Do().
◆ GetValidCoords()
APoint Farm::GetValidCoords |
( |
| ) |
|
|
inline |
Returns the valid coordinates of the first field owned by a farm.
800 { APoint pt; pt.m_x =
m_fields[0]->GetValidX(); pt.m_y =
m_fields[0]->GetValidY();
return pt; }
References m_fields.
◆ GrowthRegulator()
bool Farm::GrowthRegulator |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply growth regulator to a_field.
1255 if ( (!g_weather->Raining()) && (g_weather->GetWind()<4.5) &&
1256 (!(a_field->GetSignal() & LE_SIG_NO_GROWTH_REG) )) {
1259 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1263 else if ( (g_weather->GetWind()<4.5) &&
1265 if ( ! (a_field->GetSignal() & LE_SIG_NO_GROWTH_REG) ) {
1268 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, and growth_regulator.
Referenced by SeedGrass2::Do(), SpringBarleySeed::Do(), FieldPeas::Do(), FieldPeasStrigling::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleySilage::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), WWheatPControl::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ HandleEvents()
void Farm::HandleEvents |
( |
void |
| ) |
|
|
protectedvirtual |
If there are events to carry out do this, and perhaps start a new crop.
Call the management plan for the current crop and it this return done=true starts the next management.
Sets the new index to the rotation.
Save the new veg type as the LE vegetation type
Reimplemented in OptimisingFarm.
886 LowPriPair < FarmEvent * > pair =
m_queue.Bottom();
888 while ( pair.m_pri <= g_date->Date() ) {
905 if ( ev->
m_field->GetRotIndex() >= 0 ) {
910 new_veg = g_letype->TranslateVegTypes( g_farm_fixed_crop_type.value() );
913 ev->
m_field->SetRotIndex( new_index );
939 ev->
m_field->SetMgtLoopDetectDate( g_date->Date() );
References g_farm_fixed_crop_enable, FarmEvent::m_field, PROG_START, and tov_Undefined.
◆ Harvest()
bool Farm::Harvest |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a harvest on a_field.
Reimplemented in OptimisingFarm.
1772 if ((0 >= a_days) || ((g_weather->GetRainPeriod(g_date->Date(), 5) < 0.1) &&
DoIt(
DO_IT_PROB))) {
1774 a_field->SetLastTreatment(
harvest);
1775 a_field->SetGrowthPhase(harvest1);
1777 a_field->InsectMortality(0.4);
1778 double insects = a_field->GetInsectPop();
1779 a_field->ResetDigestability();
1780 a_field->RecalculateBugsNStuff();
1781 a_field->SetInsectPop(insects);
1782 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1783 int pref = a_field->GetUnsprayedMarginPolyRef();
1785 double someseed = 0.0;
1786 double somemaize = 0.0;
1787 if (dynamic_cast<VegElement*>(a_field)->IsMatureCereal()) {
1789 a_field->SetStubble(
true);
1791 else if (dynamic_cast<VegElement*>(a_field)->IsMaize()) {
1793 a_field->SetStubble(
true);
1796 a_field->SetBirdSeed( someseed );
1797 a_field->SetBirdMaize( somemaize );
1801 um->SetLastTreatment(
harvest);
1802 um->SetGrowthPhase(harvest1);
1803 um->InsectMortality(0.4);
1804 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1805 um->ResetDigestability();
1806 um->RecalculateBugsNStuff();
1807 um->SetBirdSeed( someseed );
1808 um->SetBirdMaize( somemaize );
1809 if ((somemaize > 0) || (someseed > 0)) um->SetStubble(
true);
References DO_IT_PROB, g_landscape_p, harvest, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), OSeedGrass1::Do(), NorwegianSpringBarley::Do(), WinterRapeStrigling::Do(), BroadBeans::Do(), OSeedGrass2::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OCarrots::Do(), SeedGrass1::Do(), OMaizeSilage::Do(), OBarleyPeaCloverGrass::Do(), OWinterBarleyExt::Do(), SeedGrass2::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), MaizeSilage::Do(), Maize::Do(), MaizeStrigling::Do(), OSpringBarleyPigs::Do(), OTriticale::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrassStrigling::Do(), OPotatoes::Do(), FieldPeasStrigling::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), OWinterRape::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), PotatoesIndustry::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyStrigling::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingSingle::Do(), WWheatPToxicControl::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ HarvestLong()
bool Farm::HarvestLong |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a harvest on a_field.
1825 if ((0 >= a_days) ||
1829 a_field->SetLastTreatment(
harvest);
1830 a_field->SetGrowthPhase(harvest1);
1832 a_field->InsectMortality(0.4);
1833 double insects = a_field->GetInsectPop();
1834 a_field->ResetDigestability();
1835 a_field->RecalculateBugsNStuff();
1836 a_field->SetInsectPop(insects);
1837 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1838 int pref = a_field->GetUnsprayedMarginPolyRef();
1839 double someseed = 0.0;
1840 a_field->SetBirdSeed( someseed );
1841 a_field->SetBirdMaize( someseed );
1845 um->SetLastTreatment(
harvest);
1846 um->SetGrowthPhase(harvest1);
1847 um->InsectMortality(0.4);
1848 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1849 um->ResetDigestability();
1850 um->RecalculateBugsNStuff();
1851 um->SetBirdSeed( someseed );
1852 um->SetBirdMaize( someseed );
References DO_IT_PROB_LONG, g_landscape_p, harvest, and Landscape::SupplyLEPointer().
Referenced by Sugarbeet::Do().
◆ HayBailing()
bool Farm::HayBailing |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out hay bailing on a_field.
2187 if ( (0 >= a_days) ||
2188 ((g_weather->GetRainPeriod(g_date->Date(),5)<0.1) &&
DoIt(
DO_IT_PROB))
2192 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
2193 int pref=a_field->GetUnsprayedMarginPolyRef();
2198 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, g_landscape_p, hay_bailing, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), WinterRapeStrigling::Do(), NorwegianSpringBarley::Do(), PermanentGrassLowYield::Do(), OPermanentGrassGrazed::Do(), PermanentGrassGrazed::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), OSpringBarleyPigs::Do(), OTriticale::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), SpringBarleyCloverGrassStrigling::Do(), OWinterWheatUndersownExt::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), SpringBarleySKManagement::Do(), WinterRyeStrigling::Do(), SpringBarleySpr::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStrigling::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterWheatStriglingSingle::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ HayTurning()
bool Farm::HayTurning |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out hay turning on a_field.
2162 if ( (0 >= a_days) ||
2163 ((g_weather->GetRainPeriod(g_date->Date(),5)<0.1) &&
DoIt(
DO_IT_PROB))
2167 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
2168 int pref=a_field->GetUnsprayedMarginPolyRef();
2173 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, g_landscape_p, hay_turning, and Landscape::SupplyLEPointer().
Referenced by OSeedGrass1::Do(), OSeedGrass2::Do(), PermanentGrassLowYield::Do(), OPermanentGrassGrazed::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), SeedGrass2::Do(), OWinterRye::Do(), OTriticale::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterWheat::Do(), Triticale::Do(), WinterRyeStrigling::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStriglingCulm::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingSingle::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ HeavyCultivatorAggregate()
bool Farm::HeavyCultivatorAggregate |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a heavy cultivation event on a_field. This is non-inversion type of cultivation which can be done after fertilizers application on spring for a spring crop.
219 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
222 a_field->InsectMortality(0.1);
224 int pref = a_field->GetUnsprayedMarginPolyRef();
229 um->InsectMortality(0.1);
References DO_IT_PROB, g_landscape_p, heavy_cultivator_aggregate, and Landscape::SupplyLEPointer().
◆ HerbicideTreat()
bool Farm::HerbicideTreat |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply herbicide to a_field.
Reimplemented in OptimisingFarm.
1161 if (((a_field->GetSignal() & LE_SIG_NO_HERBICIDE)==0 ))
1167 a_field->ReduceWeedBiomass( 0.05 );
1169 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1170 a_field->SetHerbicideDelay( EL_HERBICIDE_DELAYTIME );
1176 else if ((g_weather->GetWind()<4.5) && (!g_weather->Raining()) &&
DoIt(
DO_IT_PROB))
1178 if ( !(a_field->GetSignal() & LE_SIG_NO_HERBICIDE) )
1184 a_field->ReduceWeedBiomass( 0.05 );
1186 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1187 a_field->SetHerbicideDelay( EL_HERBICIDE_DELAYTIME );
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, g_landscape_p, herbicide, herbicide_treat, and l_farm_herbicide_kills().
Referenced by PermanentGrassLowYield::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), SeedGrass2::Do(), MaizeStrigling::Do(), Maize::Do(), MaizeSilage::Do(), Oats::Do(), SpringBarleySeed::Do(), FieldPeasSilage::Do(), FieldPeas::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), Carrots::Do(), PotatoesIndustry::Do(), Sugarbeet::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), WinterRye::Do(), NLWinterWheat::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), PLFodderLucerne1::Do(), SpringRape::Do(), WWheatPControl::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), WinterWheat::Do(), and WinterRape::HerbiZero().
◆ HillingUp()
bool Farm::HillingUp |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ InitiateManagement()
void Farm::InitiateManagement |
( |
void |
| ) |
|
|
virtual |
Kicks off the farm's management.
Reimplemented in OptimisingFarm, and UserDefinedFarm.
1515 for (
unsigned int i = 0; i <
m_fields.size(); i++ ) {
1516 int rot_index =
m_fields[ i ]->GetRotIndex();
1519 if ( rot_index < -1 ) {
1545 if (rot_index != -4) {
1547 g_msg->Warn(
"Unexpected negative value in Farm::InitiateManagement",
"");
1552 new_veg =
m_fields[i]->GetVegType();
1562 int fv = g_farm_fixed_crop_type.value();
1563 new_veg = g_letype->TranslateVegTypes( fv );
1566 m_fields[ i ]->SetRotIndex( rot_index );
1567 m_fields[ i ]->SetGrowthPhase( janfirst );
1570 long prog_start_date = g_date->Date();
References g_farm_fixed_crop_enable, PROG_START, tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PlantNursery, tole_YoungForest, tov_OrchardCrop, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PlantNursery, tov_Undefined, and tov_YoungForest.
Referenced by UserDefinedFarm::InitiateManagement(), and OptimisingFarm::InitiateManagement().
◆ InsecticideTreat()
bool Farm::InsecticideTreat |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply insecticide to a_field.
Reimplemented in OptimisingFarm.
1353 if (( ! (a_field->GetSignal() & LE_SIG_NO_INSECTICIDE) ))
1362 a_field->Insecticide( 0.36 );
1364 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1369 else if ( (g_weather->GetWind()<4.5) &&
1371 if ( ! (a_field->GetSignal() & LE_SIG_NO_INSECTICIDE )) {
1378 a_field->Insecticide( 0.36 );
1380 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, g_landscape_p, insecticide, insecticide_treat, and l_farm_insecticide_kills().
Referenced by WinterRapeStrigling::Do(), Oats::Do(), DummyCropPestTesting::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), FieldPeas::Do(), SpringBarleyCloverGrassStrigling::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), PotatoesIndustry::Do(), Sugarbeet::Do(), Potatoes::Do(), Fodderbeet::Do(), NorwegianPotatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleySilage::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), WinterRye::Do(), SpringBarley::Do(), SpringRape::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WinterWheatStriglingSingle::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ InvIntPartition()
int Farm::InvIntPartition |
( |
vector< tpct > * |
items, |
|
|
int |
target |
|
) |
| |
|
protected |
Finds all possible sums of the integers in the items array.
2498 long long int sz = (
long long int) items->size();
2501 g_msg->Warn(
"Too many potential fields in UserDefinedFarm::InvIntPartition: ",sz);
2505 long int calcs = (1 << sz);
2510 for (
long int i=1; i<calcs; i++) {
2515 for (
int bit=0; bit<sz; bit++) {
2516 if ((i & mask) > 0) {
2517 sum+=(*items)[bit].pct;
2522 if (abs(sum-target) < diff ){
2524 diff = abs(sum-target);
References GetFarmNumber().
Referenced by AssignPermanentCrop().
◆ IsStockFarmer()
bool Farm::IsStockFarmer |
( |
void |
| ) |
|
|
inline |
References m_stockfarmer.
Referenced by WinterRapeStrigling::Do(), OPermanentGrassGrazed::Do(), OCarrots::Do(), PermanentGrassGrazed::Do(), NLCatchPeaCrop::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), OTriticale::Do(), Oats::Do(), OSpringBarleyExt::Do(), OSpringBarley::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), FieldPeas::Do(), OPotatoes::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), PLFodderLucerne2::Do(), OWinterRape::Do(), Carrots::Do(), NLBeetSpring::Do(), NLMaize::Do(), NLCarrotsSpring::Do(), SetAside::Do(), NLCarrots::Do(), NLCabbageSpring::Do(), NLSpringBarleySpring::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), NLCabbage::Do(), SpringBarleySKManagement::Do(), WinterRyeStrigling::Do(), PLCarrots::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), NLSpringBarley::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), PLFodderLucerne1::Do(), SpringRape::Do(), WWheatPControl::Do(), NLPermanentGrassGrazed::Do(), WWheatPToxicControl::Do(), WinterWheatStrigling::Do(), WWheatPTreatment::Do(), WinterWheatStriglingCulm::Do(), NLGrassGrazed2::Do(), WinterWheatStriglingSingle::Do(), PLBeans::Do(), NLGrassGrazedLast::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), NLPotatoesSpring::Do(), WinterBarley::Do(), PLWinterRye::Do(), PLMaizeSilage::Do(), PLSpringBarley::Do(), PLMaize::Do(), NLTulips::Do(), PLWinterTriticale::Do(), PLWinterWheat::Do(), PLWinterWheatLate::Do(), PLSpringWheat::Do(), PLBeet::Do(), PLWinterBarley::Do(), PLPotatoes::Do(), PLWinterRape::Do(), WinterWheat::Do(), and WinterRape::HerbiZero().
◆ LeSwitch()
Call do function for any crop with an outstanding event. Signal if the crop has terminated.
776 sprintf( veg_type,
"%d", ev->
m_event );
777 g_msg->Warn( WARN_FILE,
"Farm::LeSwitch(): ""Unknown crop type: ", veg_type );
References FarmEvent::m_event, FarmEvent::m_field, FarmEvent::m_run, FarmEvent::m_todo, tov_AgroChemIndustryCereal, tov_BroadBeans, tov_Carrots, tov_CloverGrassGrazed1, tov_CloverGrassGrazed2, tov_DummyCropPestTesting, tov_FieldPeas, tov_FieldPeasSilage, tov_FieldPeasStrigling, tov_FodderBeet, tov_FodderGrass, tov_Lawn, tov_Maize, tov_MaizeSilage, tov_MaizeStrigling, tov_NLBeet, tov_NLBeetSpring, tov_NLCabbage, tov_NLCabbageSpring, tov_NLCarrots, tov_NLCarrotsSpring, tov_NLCatchPeaCrop, tov_NLGrassGrazed1, tov_NLGrassGrazed1Spring, tov_NLGrassGrazed2, tov_NLGrassGrazedLast, tov_NLMaize, tov_NLMaizeSpring, tov_NLPermanentGrassGrazed, tov_NLPotatoes, tov_NLPotatoesSpring, tov_NLSpringBarley, tov_NLSpringBarleySpring, tov_NLTulips, tov_NLWinterWheat, tov_NorwegianOats, tov_NorwegianPotatoes, tov_NorwegianSpringBarley, tov_Oats, tov_OBarleyPeaCloverGrass, tov_OCarrots, tov_OCloverGrassGrazed1, tov_OCloverGrassGrazed2, tov_OCloverGrassSilage1, tov_OFieldPeas, tov_OFieldPeasSilage, tov_OFodderBeet, tov_OGrazingPigs, tov_OMaizeSilage, tov_OOats, tov_OPermanentGrassGrazed, tov_OPotatoes, tov_OrchardCrop, tov_OSBarleySilage, tov_OSeedGrass1, tov_OSeedGrass2, tov_OSpringBarley, tov_OSpringBarleyExt, tov_OSpringBarleyPigs, tov_OTriticale, tov_OWinterBarley, tov_OWinterBarleyExt, tov_OWinterRape, tov_OWinterRye, tov_OWinterWheat, tov_OWinterWheatUndersown, tov_OWinterWheatUndersownExt, tov_PermanentGrassGrazed, tov_PermanentGrassLowYield, tov_PermanentGrassTussocky, tov_PermanentSetaside, tov_PlantNursery, tov_PLBeans, tov_PLBeet, tov_PLBeetSpr, tov_PLCarrots, tov_PLFodderLucerne1, tov_PLFodderLucerne2, tov_PLMaize, tov_PLMaizeSilage, tov_PLPotatoes, tov_PLSpringBarley, tov_PLSpringBarleySpr, tov_PLSpringWheat, tov_PLWinterBarley, tov_PLWinterRape, tov_PLWinterRye, tov_PLWinterTriticale, tov_PLWinterWheat, tov_PLWinterWheatLate, tov_Potatoes, tov_PotatoesIndustry, tov_SeedGrass1, tov_SeedGrass2, tov_Setaside, tov_SpringBarley, tov_SpringBarleyCloverGrass, tov_SpringBarleyCloverGrassStrigling, tov_SpringBarleyPeaCloverGrassStrigling, tov_SpringBarleyPTreatment, tov_SpringBarleySeed, tov_SpringBarleySilage, tov_SpringBarleySKManagement, tov_SpringBarleySpr, tov_SpringBarleyStrigling, tov_SpringBarleyStriglingCulm, tov_SpringBarleyStriglingSingle, tov_SpringRape, tov_SugarBeet, tov_Triticale, tov_WinterBarley, tov_WinterBarleyStrigling, tov_WinterRape, tov_WinterRapeStrigling, tov_WinterRye, tov_WinterRyeStrigling, tov_WinterWheat, tov_WinterWheatStrigling, tov_WinterWheatStriglingCulm, tov_WinterWheatStriglingSingle, tov_WWheatPControl, tov_WWheatPToxicControl, tov_WWheatPTreatment, and tov_YoungForest.
◆ ListOpenFields()
polylist * Farm::ListOpenFields |
( |
int |
a_openness | ) |
|
Returns a list of fields with openness above a_openness.
Returns the list of fields more open than a_openness.
9403 for (
int i = 0; i < nf; i++ )
9405 if (
m_fields[ i ]->GetOpenness() >= a_openness )
9407 p_list->push_back(
m_fields[i]->GetPoly());
References m_fields.
◆ MakeStockFarmer()
virtual void Farm::MakeStockFarmer |
( |
void |
| ) |
|
|
inlinevirtual |
◆ Management()
void Farm::Management |
( |
void |
| ) |
|
|
virtual |
Starts the main management loop for the farm and performs some error checking.
363 for (
unsigned int i = 0; i <
m_fields.size(); i++ ) {
365 int count =
m_fields[ i ]->GetVegStore();
367 m_fields[ i ]->SetVegStore( ++count );
371 char error_num[ 20 ];
372 sprintf( error_num,
"%d",
m_fields[ i ]->GetVegType() );
373 g_msg->Warn( WARN_BUG,
"I the Farm Manager caught infinite loop in tov type:", error_num );
374 sprintf( error_num,
"%d",
m_fields[ i ]->m_tried_to_do );
375 g_msg->Warn( WARN_BUG,
"It was last seen trying to perform action # ""(or thereabouts):", error_num );
◆ Molluscicide()
bool Farm::Molluscicide |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Apply molluscidie to a_field.
1485 if ( (!g_weather->Raining()) && (g_weather->GetWind()<4.5) &&
1486 (! (a_field->GetSignal() & LE_SIG_NO_MOLLUSC ))) {
1489 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1494 else if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1495 if ( ! (a_field->GetSignal() & LE_SIG_NO_MOLLUSC) ) {
1498 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, g_landscape_p, insecticide, and molluscicide.
◆ PigsAreOut()
bool Farm::PigsAreOut |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ PigsAreOutForced()
bool Farm::PigsAreOutForced |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ PigsOut()
bool Farm::PigsOut |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ PreseedingCultivator()
bool Farm::PreseedingCultivator |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ PreseedingCultivatorSow()
bool Farm::PreseedingCultivatorSow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including cultivator and string roller to compact soil)
339 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
342 a_field->SetGrowthPhase(sow);
343 a_field->SetLastSownVeg(a_field->GetVegType());
346 int pref = a_field->GetUnsprayedMarginPolyRef();
351 um->SetGrowthPhase(sow);
353 um->SetLastSownVeg(um->GetVegType());
References DO_IT_PROB, g_landscape_p, preseeding_cultivator_sow, and Landscape::SupplyLEPointer().
◆ Prob_multiplier()
virtual double Farm::Prob_multiplier |
( |
| ) |
|
|
inlinevirtual |
Reimplemented in OptimisingFarm.
Referenced by PermanentGrassLowYield::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), SeedGrass2::Do(), Maize::Do(), MaizeSilage::Do(), Oats::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), Carrots::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), Fodderbeet::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), WinterRye::Do(), SpringBarley::Do(), SpringRape::Do(), WinterRape::Do(), WinterBarley::Do(), WinterWheat::Do(), and WinterRape::HerbiZero().
◆ ProductApplication()
bool Farm::ProductApplication |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days, |
|
|
double |
a_applicationrate, |
|
|
PlantProtectionProducts |
a_ppp |
|
) |
| |
|
virtual |
Apply test pesticide to a_field.
1456 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1458 g_pest->DailyQueueAdd(a_field, a_applicationrate, a_ppp);
1462 if ((!g_weather->Raining()) && (g_weather->GetWind() < 4.5)) {
1468 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1470 g_pest->DailyQueueAdd(a_field, a_applicationrate, a_ppp);
References cfg_CustomInsecticideKillProp(), Landscape::CheckForPesticideRecord(), g_landscape_p, g_pest, l_farm_insecticide_kills(), product_treat, and testpesticide.
Referenced by OrchardCrop::Do(), SpringBarleyPTreatment::Do(), SpringRape::Do(), WWheatPTreatment::Do(), WWheatPToxicControl::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), and WinterWheat::Do().
◆ ProductApplication_DateLimited()
bool Farm::ProductApplication_DateLimited |
( |
LE * |
a_field, |
|
|
double |
, |
|
|
int |
, |
|
|
double |
a_applicationrate, |
|
|
PlantProtectionProducts |
a_ppp |
|
) |
| |
|
virtual |
Special pesticide trial functionality.
This methods tests for date limitations
2405 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
2406 a_field->SetSprayedToday(
true);
2407 g_pest->DailyQueueAdd(a_field, a_applicationrate, a_ppp);
References cfg_CustomInsecticideKillProp(), cfg_productapplicendyear, cfg_productapplicstartyear, g_landscape_p, g_pest, Landscape::SupplyYearNumber(), and trial_insecticidetreat.
Referenced by SpringBarleyCloverGrass::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), SpringBarley::Do(), WWheatPControl::Do(), and WinterRape::Do().
◆ ReadRotation()
void Farm::ReadRotation |
( |
std::string |
fname | ) |
|
|
protected |
Reads a rotation file into the rotation.
819 ifile.open(str.c_str(),ios::in);
820 if ( !ifile.is_open() ) {
821 g_msg->Warn(
"Cannot open file: ", str.c_str() );
828 for (
int i = 0; i < nocrops; i++ ) {
References g_farmmanager, and FarmManager::TranslateCropCodes().
Referenced by OrganicCattle::OrganicCattle(), OrganicPig::OrganicPig(), OrganicPlant::OrganicPlant(), PesticideTrialTreatment::PesticideTrialTreatment(), UserDefinedFarm1::UserDefinedFarm1(), UserDefinedFarm10::UserDefinedFarm10(), UserDefinedFarm11::UserDefinedFarm11(), UserDefinedFarm12::UserDefinedFarm12(), UserDefinedFarm13::UserDefinedFarm13(), UserDefinedFarm14::UserDefinedFarm14(), UserDefinedFarm15::UserDefinedFarm15(), UserDefinedFarm16::UserDefinedFarm16(), UserDefinedFarm17::UserDefinedFarm17(), UserDefinedFarm2::UserDefinedFarm2(), UserDefinedFarm3::UserDefinedFarm3(), UserDefinedFarm4::UserDefinedFarm4(), UserDefinedFarm5::UserDefinedFarm5(), UserDefinedFarm6::UserDefinedFarm6(), UserDefinedFarm7::UserDefinedFarm7(), UserDefinedFarm8::UserDefinedFarm8(), and UserDefinedFarm9::UserDefinedFarm9().
◆ RemoveField()
void Farm::RemoveField |
( |
LE * |
a_field | ) |
|
Removes a field from a farm.
1475 for (
int i = 0; i < nf; i++ ) {
1483 g_msg->Warn( WARN_BUG,
"Farm::RemoveField(LE* a_field): ""Unknown field! ",
"" );
◆ RemoveHunter()
void Farm::RemoveHunter |
( |
Hunter * |
a_hunter | ) |
|
|
inline |
◆ RowCultivation()
bool Farm::RowCultivation |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a harrowing between crop rows on a_field.
1513 if ( (0 >= a_days) && (g_weather->GetRainPeriod(g_date->Date(),3)<0.1) )
1519 if ( (0 >= a_days) ||
1520 ((g_weather->GetRainPeriod(g_date->Date(),3)<0.1) &&
DoIt(
DO_IT_PROB))
1524 a_field->ReduceWeedBiomass( 0.5 );
1525 a_field->InsectMortality( 0.25 );
1526 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1527 int pref=a_field->GetUnsprayedMarginPolyRef();
1532 um->InsectMortality( 0.25 );
1533 um->ReduceWeedBiomass( 0.5 );
1534 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, g_landscape_p, row_cultivation, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), BroadBeans::Do(), OCarrots::Do(), OMaizeSilage::Do(), Maize::Do(), MaizeSilage::Do(), MaizeStrigling::Do(), OFodderbeet::Do(), OWinterRape::Do(), Carrots::Do(), Sugarbeet::Do(), Fodderbeet::Do(), SpringRape::Do(), WinterRape::Do(), SpringRape::RowcolOne(), and WinterRape::RowcolOne().
◆ SetFarmNumber()
void Farm::SetFarmNumber |
( |
int |
a_farm_num | ) |
|
|
inline |
◆ ShallowHarrow()
bool Farm::ShallowHarrow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ SleepAllDay()
bool Farm::SleepAllDay |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ Spraying_fungins()
Reimplemented in OptimisingFarm.
Referenced by SeedGrass1::Do(), SeedGrass2::Do(), Oats::Do(), FieldPeasStrigling::Do(), FieldPeasSilage::Do(), FieldPeas::Do(), Triticale::Do(), Carrots::Do(), Sugarbeet::Do(), Fodderbeet::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), WinterRye::Do(), SpringBarley::Do(), SpringRape::Do(), WinterRape::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ Spraying_herbicides()
Reimplemented in OptimisingFarm.
Referenced by PermanentGrassLowYield::Do(), SeedGrass1::Do(), PermanentGrassGrazed::Do(), SeedGrass2::Do(), Maize::Do(), MaizeSilage::Do(), Oats::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), Triticale::Do(), Carrots::Do(), Sugarbeet::Do(), Fodderbeet::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), WinterRye::Do(), SpringBarley::Do(), WinterBarley::Do(), WinterWheat::Do(), and WinterRape::HerbiZero().
◆ SpringHarrow()
bool Farm::SpringHarrow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a harrow event in the spring on a_field.
474 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
478 a_field->InsectMortality( 0.7 );
481 int pref=a_field->GetUnsprayedMarginPolyRef();
486 um->InsectMortality( 0.7 );
References DO_IT_PROB, g_landscape_p, spring_harrow, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), NorwegianSpringBarley::Do(), BroadBeans::Do(), OSBarleySilage::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OCarrots::Do(), OMaizeSilage::Do(), OBarleyPeaCloverGrass::Do(), OOats::Do(), MaizeStrigling::Do(), MaizeSilage::Do(), Maize::Do(), OSpringBarleyPigs::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), OPotatoes::Do(), FieldPeas::Do(), SpringBarleyCloverGrassStrigling::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), SpringBarleyStrigling::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), and SpringRape::Do().
◆ SpringPlough()
bool Farm::SpringPlough |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a ploughing event in the spring on a_field.
447 if ((a_days <= 0) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
451 a_field->InsectMortality( 0.1 );
454 int pref=a_field->GetUnsprayedMarginPolyRef();
459 um->InsectMortality( 0.1);
References DO_IT_PROB, g_landscape_p, spring_plough, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), NorwegianSpringBarley::Do(), BroadBeans::Do(), OSBarleySilage::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OCarrots::Do(), OBarleyPeaCloverGrass::Do(), OMaizeSilage::Do(), OOats::Do(), MaizeStrigling::Do(), OSpringBarleyPigs::Do(), MaizeSilage::Do(), Maize::Do(), Oats::Do(), NLMaizeSpring::Do(), OSpringBarleyExt::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), FieldPeasSilage::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeasStrigling::Do(), OPotatoes::Do(), FieldPeas::Do(), SpringBarleyCloverGrass::Do(), OFodderbeet::Do(), Carrots::Do(), NLBeetSpring::Do(), NLCarrotsSpring::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), NLCarrots::Do(), Sugarbeet::Do(), NLSpringBarleySpring::Do(), PotatoesIndustry::Do(), NLCabbageSpring::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStrigling::Do(), PLSpringBarleySpr::Do(), SpringBarley::Do(), SpringRape::Do(), PLBeetSpr::Do(), and NLPotatoesSpring::Do().
◆ SpringRoll()
bool Farm::SpringRoll |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a roll event in the spring on a_field.
528 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
531 int pref=a_field->GetUnsprayedMarginPolyRef();
References DO_IT_PROB, g_landscape_p, spring_roll, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), NorwegianSpringBarley::Do(), BroadBeans::Do(), OSBarleySilage::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OBarleyPeaCloverGrass::Do(), OWinterRye::Do(), OOats::Do(), OSpringBarleyPigs::Do(), OTriticale::Do(), OSpringBarleyExt::Do(), Oats::Do(), OSpringBarley::Do(), SpringBarleySeed::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeas::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), SpringBarleyCloverGrass::Do(), OFodderbeet::Do(), Triticale::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleySilage::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), WWheatPControl::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), AgroChemIndustryCereal::Do(), and WinterWheat::Do().
◆ SpringSow()
bool Farm::SpringSow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a sowing event in the spring on a_field.
549 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
552 a_field->SetGrowthPhase( sow );
553 a_field->SetLastSownVeg(a_field->GetVegType());
556 int pref=a_field->GetUnsprayedMarginPolyRef();
561 um->SetGrowthPhase( sow );
563 um->SetLastSownVeg(um->GetVegType());
References DO_IT_PROB, g_landscape_p, spring_sow, and Landscape::SupplyLEPointer().
Referenced by NorwegianOats::Do(), NorwegianSpringBarley::Do(), BroadBeans::Do(), OSBarleySilage::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OCarrots::Do(), OMaizeSilage::Do(), OBarleyPeaCloverGrass::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), MaizeStrigling::Do(), MaizeSilage::Do(), OSpringBarleyPigs::Do(), Maize::Do(), OSpringBarleyExt::Do(), Oats::Do(), SpringBarleySeed::Do(), OSpringBarley::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), OPotatoes::Do(), FieldPeas::Do(), SpringBarleyCloverGrass::Do(), OFodderbeet::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Fodderbeet::Do(), Potatoes::Do(), SpringBarleySKManagement::Do(), SpringBarleySpr::Do(), SpringBarleySilage::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStrigling::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), and SpringRape::Do().
◆ SpringSowWithFerti()
bool Farm::SpringSowWithFerti |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a sowing event with start fertilizer in the spring on a_field.
577 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
580 a_field->SetGrowthPhase(sow);
581 a_field->SetLastSownVeg(a_field->GetVegType());
584 int pref = a_field->GetUnsprayedMarginPolyRef();
589 um->SetGrowthPhase(sow);
591 um->SetLastSownVeg(um->GetVegType());
References DO_IT_PROB, g_landscape_p, spring_sow_with_ferti, and Landscape::SupplyLEPointer().
◆ StrawChopping()
bool Farm::StrawChopping |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out straw chopping on a_field.
2135 if ( (0 >= a_days) ||
2136 ((g_weather->GetRainPeriod(g_date->Date(),5)<0.1) &&
DoIt(
DO_IT_PROB))
2140 a_field->InsectMortality( 0.4 );
2141 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
2142 int pref=a_field->GetUnsprayedMarginPolyRef();
2147 um->InsectMortality( 0.4 );
2148 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, g_landscape_p, straw_chopping, and Landscape::SupplyLEPointer().
Referenced by OSeedGrass1::Do(), WinterRapeStrigling::Do(), OSeedGrass2::Do(), OFieldPeas::Do(), SeedGrass1::Do(), OWinterBarleyExt::Do(), SeedGrass2::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), OSpringBarleyPigs::Do(), OTriticale::Do(), OSpringBarleyExt::Do(), Oats::Do(), OSpringBarley::Do(), FieldPeas::Do(), FieldPeasStrigling::Do(), FieldPeasSilage::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterRape::Do(), Triticale::Do(), SpringBarleySKManagement::Do(), WinterRyeStrigling::Do(), SpringBarleySpr::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingCulm::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WWheatPTreatment::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStrigling::Do(), WinterRape::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ StrawCovering()
bool Farm::StrawCovering |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ StrawRemoval()
bool Farm::StrawRemoval |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ Strigling()
bool Farm::Strigling |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a mechanical weeding on a_field.
1549 if ( (0 >= a_days) )
1553 a_field->ReduceWeedBiomass( 0.05 );
1554 a_field->InsectMortality( 0.7 );
1555 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1556 a_field->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
1557 int pref=a_field->GetUnsprayedMarginPolyRef();
1562 um->ReduceWeedBiomass( 0.05 );
1563 um->InsectMortality( 0.7 );
1564 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1565 um->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
1569 if ( (0 >= a_days) ||
1570 ((g_weather->GetRainPeriod(g_date->Date(),3)<0.1) &&
DoIt(
DO_IT_PROB))
1574 a_field->ReduceWeedBiomass( 0.05 );
1575 a_field->InsectMortality( 0.7 );
1576 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1577 a_field->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
1578 int pref=a_field->GetUnsprayedMarginPolyRef();
1583 um->ReduceWeedBiomass( 0.05 );
1584 um->InsectMortality( 0.7 );
1585 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1586 um->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
References DO_IT_PROB, g_landscape_p, strigling, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), BroadBeans::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), OWinterBarleyExt::Do(), OWinterBarley::Do(), OWinterRye::Do(), OOats::Do(), OSpringBarleyPigs::Do(), OTriticale::Do(), OSpringBarleyExt::Do(), OSpringBarley::Do(), OPotatoes::Do(), SpringBarleyCloverGrassStrigling::Do(), FieldPeasStrigling::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), Triticale::Do(), PotatoesIndustry::Do(), Potatoes::Do(), NorwegianPotatoes::Do(), SpringBarleySilage::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), WinterRye::Do(), WWheatPControl::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WinterWheatStriglingSingle::Do(), WWheatPTreatment::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), and WinterWheat::Do().
◆ StriglingHill()
bool Farm::StriglingHill |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a mechanical weeding on a_field followed by hilling up (probably on potatoes)
1638 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1641 a_field->InsectMortality(0.75);
1642 a_field->ReduceWeedBiomass(0.25);
1643 a_field->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
1644 int pref = a_field->GetUnsprayedMarginPolyRef();
1649 um->ReduceWeedBiomass(0.25);
1650 um->InsectMortality(0.75);
1651 um->SetTramlinesDecay(EL_TRAMLINE_DECAYTIME);
References DO_IT_PROB, g_landscape_p, strigling_hill, and Landscape::SupplyLEPointer().
◆ StriglingSow()
bool Farm::StriglingSow |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a mechanical weeding followed by sowing on a_field.
1601 if ( (0 >= a_days) && (g_weather->GetRainPeriod(g_date->Date(),3)<0.1) )
1606 if ( (0 >= a_days) ||
1607 ((g_weather->GetRainPeriod(g_date->Date(),3)<0.1) &&
DoIt(
DO_IT_PROB))
1611 a_field->ReduceWeedBiomass( 0.05 );
1612 a_field->InsectMortality( 0.7 );
1613 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1614 a_field->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
1615 int pref=a_field->GetUnsprayedMarginPolyRef();
1620 um->ReduceWeedBiomass( 0.05 );
1621 um->InsectMortality( 0.7 );
1622 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1623 um->SetHerbicideDelay( EL_STRIGLING_DELAYTIME );
References DO_IT_PROB, g_landscape_p, strigling_sow, and Landscape::SupplyLEPointer().
Referenced by OSpringBarleyPigs::Do(), SpringBarleyCloverGrassStrigling::Do(), OWinterWheat::Do(), OWinterWheatUndersownExt::Do(), OWinterWheatUndersown::Do(), and SpringBarleyPeaCloverGrassStrigling::Do().
◆ StubbleCultivatorHeavy()
bool Farm::StubbleCultivatorHeavy |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a stubble cultivation event on a_field. This is non-inversion type of cultivation which can be done instead of autumn plough (on a depth up to 40 cm even, if necessary)
195 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
198 a_field->InsectMortality(0.1);
200 int pref = a_field->GetUnsprayedMarginPolyRef();
205 um->InsectMortality(0.1);
References DO_IT_PROB, g_landscape_p, stubble_cultivator_heavy, and Landscape::SupplyLEPointer().
◆ StubbleHarrowing()
bool Farm::StubbleHarrowing |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out stubble harrowing on a_field.
2212 if ( (0 >= a_days) ||
2213 ((g_weather->GetRainPeriod(g_date->Date(),3)<0.1) &&
DoIt(
DO_IT_PROB))
2217 a_field->InsectMortality( 0.25 );
2219 int pref=a_field->GetUnsprayedMarginPolyRef();
2225 um->InsectMortality( 0.25 );
References DO_IT_PROB, g_landscape_p, stubble_harrowing, and Landscape::SupplyLEPointer().
Referenced by WinterRapeStrigling::Do(), OSeedGrass2::Do(), OMaizeSilage::Do(), NLCatchPeaCrop::Do(), OWinterBarleyExt::Do(), SeedGrass2::Do(), OWinterBarley::Do(), MaizeStrigling::Do(), Maize::Do(), MaizeSilage::Do(), OTriticale::Do(), OWinterWheat::Do(), OWinterWheatUndersown::Do(), OWinterWheatUndersownExt::Do(), OWinterRape::Do(), Triticale::Do(), NLMaize::Do(), NLBeet::Do(), SpringBarleySKManagement::Do(), WinterRyeStrigling::Do(), SpringBarleySpr::Do(), SpringBarleyStrigling::Do(), SpringBarleyStriglingCulm::Do(), NLWinterWheat::Do(), SpringBarleyPTreatment::Do(), SpringBarleyStriglingSingle::Do(), WinterRye::Do(), NLSpringBarley::Do(), SpringBarley::Do(), SpringRape::Do(), WWheatPControl::Do(), WWheatPTreatment::Do(), WinterWheatStrigling::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WWheatPToxicControl::Do(), WinterBarleyStrigling::Do(), WinterRape::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), NLPotatoes::Do(), and WinterWheat::Do().
◆ StubblePlough()
bool Farm::StubblePlough |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a stubble ploughing event on a_field. This is similar to normal plough but shallow (normally 6-8cm, is special cases up to 12-15cm). Done as a part of after-harvest treatments (instead of stubble cultivation)
171 if ((0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
174 a_field->InsectMortality(0.1);
176 int pref = a_field->GetUnsprayedMarginPolyRef();
181 um->InsectMortality(0.1);
References DO_IT_PROB, g_landscape_p, stubble_plough, and Landscape::SupplyLEPointer().
Referenced by PLCarrots::Do().
◆ Swathing()
bool Farm::Swathing |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Cut the crop on a_field and leave it lying (probably rape)
1747 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1749 a_field->SetLastTreatment(
swathing );
1750 a_field->InsectMortality( 0.5 );
1751 a_field->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
1752 int pref=a_field->GetUnsprayedMarginPolyRef();
1757 um->InsectMortality( 0.5 );
1758 um->SetTramlinesDecay( EL_TRAMLINE_DECAYTIME );
References DO_IT_PROB, g_landscape_p, Landscape::SupplyLEPointer(), and swathing.
Referenced by OSeedGrass1::Do(), WinterRapeStrigling::Do(), OSeedGrass2::Do(), SeedGrass1::Do(), SeedGrass2::Do(), OPotatoes::Do(), OWinterRape::Do(), SpringRape::Do(), and WinterRape::Do().
◆ Water()
bool Farm::Water |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
Carry out a watering on a_field.
1726 if ( (0 >= a_days) || (!g_weather->Raining() &&
DoIt(
DO_IT_PROB))) {
1727 a_field->Trace(
water );
1728 a_field->SetLastTreatment(
water );
1729 int pref=a_field->GetUnsprayedMarginPolyRef();
1733 um->SetLastTreatment(
water );
References DO_IT_PROB, g_landscape_p, Landscape::SupplyLEPointer(), and water.
Referenced by OSeedGrass1::Do(), BroadBeans::Do(), OSeedGrass2::Do(), OSBarleySilage::Do(), OFieldPeas::Do(), OFieldPeasSilage::Do(), SeedGrass1::Do(), OCarrots::Do(), OMaizeSilage::Do(), OBarleyPeaCloverGrass::Do(), SeedGrass2::Do(), MaizeSilage::Do(), Maize::Do(), MaizeStrigling::Do(), OTriticale::Do(), SpringBarleySeed::Do(), OPotatoes::Do(), FieldPeas::Do(), FieldPeasSilage::Do(), FieldPeasStrigling::Do(), SpringBarleyCloverGrassStrigling::Do(), OFodderbeet::Do(), SpringBarleyCloverGrass::Do(), Triticale::Do(), Carrots::Do(), SpringBarleyPeaCloverGrassStrigling::Do(), Sugarbeet::Do(), PotatoesIndustry::Do(), NorwegianPotatoes::Do(), Potatoes::Do(), Fodderbeet::Do(), SpringBarleySKManagement::Do(), SpringBarleySilage::Do(), SpringBarleySpr::Do(), WinterRyeStrigling::Do(), SpringBarleyStriglingSingle::Do(), SpringBarleyStriglingCulm::Do(), SpringBarleyStrigling::Do(), WinterRye::Do(), SpringBarleyPTreatment::Do(), SpringBarley::Do(), WWheatPControl::Do(), WinterWheatStrigling::Do(), WWheatPToxicControl::Do(), WinterWheatStriglingSingle::Do(), WinterWheatStriglingCulm::Do(), WWheatPTreatment::Do(), WinterBarleyStrigling::Do(), AgroChemIndustryCereal::Do(), WinterBarley::Do(), and WinterWheat::Do().
◆ WinterPlough()
bool Farm::WinterPlough |
( |
LE * |
a_field, |
|
|
double |
a_user, |
|
|
int |
a_days |
|
) |
| |
|
virtual |
◆ m_agrochemindustrycereal
◆ m_broadbeans
◆ m_carrots
◆ m_CGG1
◆ m_CGG2
◆ m_dummycroppesttesting
◆ m_farm_centroidx
int Farm::m_farm_centroidx |
|
protected |
◆ m_farm_centroidy
int Farm::m_farm_centroidy |
|
protected |
◆ m_farm_num
◆ m_farmtype
Referenced by AgroChemIndustryCerealFarm1::AgroChemIndustryCerealFarm1(), AgroChemIndustryCerealFarm2::AgroChemIndustryCerealFarm2(), AgroChemIndustryCerealFarm3::AgroChemIndustryCerealFarm3(), ConventionalCattle::ConventionalCattle(), ConventionalPig::ConventionalPig(), ConventionalPlant::ConventionalPlant(), ConvMarginalJord::ConvMarginalJord(), GetType(), NoPesticideBaseFarm::NoPesticideBaseFarm(), NoPesticideNoPFarm::NoPesticideNoPFarm(), OptimisingFarm::OptimisingFarm(), OrganicCattle::OrganicCattle(), OrganicPig::OrganicPig(), OrganicPlant::OrganicPlant(), PesticideTrialControl::PesticideTrialControl(), PesticideTrialToxicControl::PesticideTrialToxicControl(), PesticideTrialTreatment::PesticideTrialTreatment(), UserDefinedFarm1::UserDefinedFarm1(), UserDefinedFarm10::UserDefinedFarm10(), UserDefinedFarm11::UserDefinedFarm11(), UserDefinedFarm12::UserDefinedFarm12(), UserDefinedFarm13::UserDefinedFarm13(), UserDefinedFarm14::UserDefinedFarm14(), UserDefinedFarm15::UserDefinedFarm15(), UserDefinedFarm16::UserDefinedFarm16(), UserDefinedFarm17::UserDefinedFarm17(), UserDefinedFarm18::UserDefinedFarm18(), UserDefinedFarm19::UserDefinedFarm19(), UserDefinedFarm2::UserDefinedFarm2(), UserDefinedFarm20::UserDefinedFarm20(), UserDefinedFarm21::UserDefinedFarm21(), UserDefinedFarm22::UserDefinedFarm22(), UserDefinedFarm23::UserDefinedFarm23(), UserDefinedFarm24::UserDefinedFarm24(), UserDefinedFarm25::UserDefinedFarm25(), UserDefinedFarm26::UserDefinedFarm26(), UserDefinedFarm27::UserDefinedFarm27(), UserDefinedFarm28::UserDefinedFarm28(), UserDefinedFarm29::UserDefinedFarm29(), UserDefinedFarm3::UserDefinedFarm3(), UserDefinedFarm30::UserDefinedFarm30(), UserDefinedFarm31::UserDefinedFarm31(), UserDefinedFarm32::UserDefinedFarm32(), UserDefinedFarm33::UserDefinedFarm33(), UserDefinedFarm34::UserDefinedFarm34(), UserDefinedFarm35::UserDefinedFarm35(), UserDefinedFarm4::UserDefinedFarm4(), UserDefinedFarm5::UserDefinedFarm5(), UserDefinedFarm6::UserDefinedFarm6(), UserDefinedFarm7::UserDefinedFarm7(), UserDefinedFarm8::UserDefinedFarm8(), and UserDefinedFarm9::UserDefinedFarm9().
◆ m_fieldpeas
◆ m_fieldpeassilage
◆ m_fieldpeasstrigling
◆ m_fields
◆ m_fodderbeet
◆ m_foddergrass
◆ m_HuntersList
◆ m_intensity
◆ m_maize
◆ m_maizesilage
◆ m_maizestrigling
◆ m_nlbeet
◆ m_nlbeetspring
◆ m_nlcabbage
◆ m_nlcabbagespring
◆ m_nlcarrots
◆ m_nlcarrotsspring
◆ m_nlcatchpeacrop
◆ m_nlgrassgrazed1
◆ m_nlgrassgrazed1spring
◆ m_nlgrassgrazed2
◆ m_nlgrassgrazedlast
◆ m_nlmaize
◆ m_nlmaizespring
◆ m_nlpermanentgrassgrazed
◆ m_nlpotatoes
◆ m_nlpotatoesspring
◆ m_nlspringbarley
◆ m_nlspringbarleyspring
◆ m_nltulips
◆ m_nlwinterwheat
◆ m_norwegianoats
◆ m_norwegianpotatoes
◆ m_norwegianspringbarley
◆ m_oats
◆ m_OBarleyPCG
◆ m_ocarrots
◆ m_OCGG1
◆ m_OCGG2
◆ m_OCGS1
◆ m_ofieldpeas
◆ m_ofieldpeassilage
◆ m_ofirstyeardanger
◆ m_ofodderbeet
◆ m_ograzingpigs
◆ m_omaizesilage
◆ m_ooats
◆ m_opermgrassgrazed
◆ m_opotatoes
◆ m_orchardcrop
◆ m_osbarleysilage
◆ m_oseedgrass1
◆ m_oseedgrass2
◆ m_ospringbarley
◆ m_ospringbarleyext
◆ m_ospringbarleypigs
◆ m_otriticale
◆ m_OurManager
Pointer to the FarmManager.
Referenced by OptimisingFarm::ActualProfit(), OptimisingPigFarm::check_WRape_WBarley(), OptimisingCattleFarm::checkCattleRotation(), OptimisingCattleFarm::checkCattleRotation_almass(), AnimalFarm::checkWinterCrops(), NonAnimalFarm::checkWinterCrops(), AnimalFarm::checkWinterRotation1(), AnimalFarm::correctFodderDemand(), AnimalFarm::createFodderCrops(), OptimisingFarm::createVariableCrops(), OptimisingFarm::crop_parameter(), AnimalFarm::decreaseCrops(), OptimisingFarm::determineAreas(), AnimalFarm::determineFodderAreas(), AnimalFarm::determineMinFodder(), OptimisingFarm::findCropByName(), OptimisingFarm::findCropByName_almass(), OptimisingFarm::findFertilizer(), OptimisingFarm::findFodderDemand(), OptimisingFarm::findGrossMargin(), OptimisingFarm::findResponse(), OptimisingFarm::findTotalNanim(), AnimalFarm::increaseCrops(), OptimisingFarm::Initialize(), OptimisingFarm::Make_rotations(), OptimisingFarm::Match_crop_to_field(), OptimisingFarm::OptimisingFarm(), OptimisingFarm::optimizeCrops(), and OptimisingCattleFarm::setCattleCropsAtMin().
◆ m_owinterbarley
◆ m_owinterbarleyext
◆ m_owinterrape
◆ m_owinterrye
◆ m_owinterwheat
◆ m_owinterwheatundersown
◆ m_owinterwheatundersownext
◆ m_permanentsetaside
◆ m_PermCrops
◆ m_permgrassgrazed
◆ m_permgrasslowyield
◆ m_permgrasstussocky
◆ m_plbeans
◆ m_plbeet
◆ m_plbeetspr
◆ m_plcarrots
◆ m_plfodderlucerne1
◆ m_plfodderlucerne2
◆ m_plmaize
◆ m_plmaizesilage
◆ m_plpotatoes
◆ m_plspringbarley
◆ m_plspringbarleyspr
◆ m_plspringwheat
◆ m_plwinterbarley
◆ m_plwinterrape
◆ m_plwinterrye
◆ m_plwintertriticale
◆ m_plwinterwheat
◆ m_plwinterwheatlate
◆ m_potatoes
◆ m_potatoesindustry
◆ m_queue
◆ m_rotation
Referenced by AgroChemIndustryCerealFarm1::AgroChemIndustryCerealFarm1(), AgroChemIndustryCerealFarm2::AgroChemIndustryCerealFarm2(), AgroChemIndustryCerealFarm3::AgroChemIndustryCerealFarm3(), ConventionalCattle::ConventionalCattle(), ConventionalPig::ConventionalPig(), ConventionalPlant::ConventionalPlant(), ConvMarginalJord::ConvMarginalJord(), GetCrop(), GetNextCrop(), GetPreviousCrop(), OptimisingFarm::Init(), OptimisingFarm::Make_rotations(), OptimisingFarm::Match_crop_to_field(), NoPesticideBaseFarm::NoPesticideBaseFarm(), NoPesticideNoPFarm::NoPesticideNoPFarm(), PesticideTrialControl::PesticideTrialControl(), PesticideTrialToxicControl::PesticideTrialToxicControl(), OptimisingFarm::Print_rotations(), and UserDefinedFarm::UserDefinedFarm().
◆ m_rotation_sync_index
int Farm::m_rotation_sync_index |
|
protected |
◆ m_sbarleyclovergrass
◆ m_seedgrass1
◆ m_seedgrass2
◆ m_setaside
◆ m_springbarley
◆ m_springbarleyclovergrassstrigling
◆ m_springbarleypeaclovergrassstrigling
◆ m_springbarleyptreatment
◆ m_springbarleyseed
◆ m_springbarleysilage
◆ m_springbarleyskmanagement
◆ m_springbarleyspr
◆ m_springbarleystrigling
◆ m_springbarleystriglingculm
◆ m_springbarleystriglingsingle
◆ m_springrape
◆ m_stockfarmer
Referenced by AgroChemIndustryCerealFarm1::AgroChemIndustryCerealFarm1(), AgroChemIndustryCerealFarm2::AgroChemIndustryCerealFarm2(), AgroChemIndustryCerealFarm3::AgroChemIndustryCerealFarm3(), ConventionalCattle::ConventionalCattle(), ConventionalPig::ConventionalPig(), ConventionalPlant::ConventionalPlant(), ConvMarginalJord::ConvMarginalJord(), IsStockFarmer(), OptimisingFarm::Make_rotations(), MakeStockFarmer(), ConventionalPlant::MakeStockFarmer(), OrganicPlant::MakeStockFarmer(), PesticideTrialControl::MakeStockFarmer(), PesticideTrialToxicControl::MakeStockFarmer(), PesticideTrialTreatment::MakeStockFarmer(), NoPesticideBaseFarm::NoPesticideBaseFarm(), NoPesticideNoPFarm::NoPesticideNoPFarm(), OrganicCattle::OrganicCattle(), OrganicPig::OrganicPig(), OrganicPlant::OrganicPlant(), PesticideTrialControl::PesticideTrialControl(), PesticideTrialToxicControl::PesticideTrialToxicControl(), PesticideTrialTreatment::PesticideTrialTreatment(), UserDefinedFarm::UserDefinedFarm(), UserDefinedFarm1::UserDefinedFarm1(), UserDefinedFarm10::UserDefinedFarm10(), UserDefinedFarm11::UserDefinedFarm11(), UserDefinedFarm12::UserDefinedFarm12(), UserDefinedFarm13::UserDefinedFarm13(), UserDefinedFarm14::UserDefinedFarm14(), UserDefinedFarm15::UserDefinedFarm15(), UserDefinedFarm16::UserDefinedFarm16(), UserDefinedFarm17::UserDefinedFarm17(), UserDefinedFarm2::UserDefinedFarm2(), UserDefinedFarm3::UserDefinedFarm3(), UserDefinedFarm4::UserDefinedFarm4(), UserDefinedFarm5::UserDefinedFarm5(), UserDefinedFarm6::UserDefinedFarm6(), UserDefinedFarm7::UserDefinedFarm7(), UserDefinedFarm8::UserDefinedFarm8(), and UserDefinedFarm9::UserDefinedFarm9().
◆ m_sugarbeet
◆ m_triticale
◆ m_winterbarley
◆ m_winterbarleystrigling
◆ m_winterrape
◆ m_winterrapestrigling
◆ m_winterrye
◆ m_winterryestrigling
◆ m_winterwheat
◆ m_winterwheatstrigling
◆ m_winterwheatstriglingculm
◆ m_winterwheatstriglingsingle
◆ m_wwheatpcontrol
◆ m_wwheatptoxiccontrol
◆ m_wwheatptreatment
◆ m_youngforest
The documentation for this class was generated from the following files:
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyStrigling.cpp:40
Definition: WinterWheatStrigling.h:84
Definition: treatment.h:74
SpringBarley * m_springbarley
Definition: farm.h:1016
Definition: tov_declaration.h:55
PLWinterTriticale * m_plwintertriticale
Definition: farm.h:1054
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLMaize.cpp:64
Definition: tov_declaration.h:58
Definition: tov_declaration.h:85
Definition: tov_declaration.h:75
Definition: tov_declaration.h:93
FieldPeasStrigling * m_fieldpeasstrigling
Definition: farm.h:1044
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WWheatPToxicControl.cpp:39
PLFodderLucerne2 * m_plfodderlucerne2
Definition: farm.h:1063
LE * SupplyLEPointer(int a_polyref)
Definition: Landscape.h:1099
AgroChemIndustryCereal * m_agrochemindustrycereal
Definition: farm.h:1032
Definition: tov_declaration.h:102
Definition: tov_declaration.h:40
Definition: OrchardCrop.h:47
Definition: Fodderbeet.h:72
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: YoungForest.cpp:32
Definition: tov_declaration.h:47
PLFodderLucerne2 class .
Definition: PLFodderLucerne2.h:65
Definition: treatment.h:77
Definition: FodderGrass.h:54
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySeed.cpp:37
Definition: tov_declaration.h:92
Definition: OSpringBarleyExt.h:59
Definition: OFieldPeas.h:51
Definition: treatment.h:89
SpringBarleyStrigling * m_springbarleystrigling
Definition: farm.h:1037
Definition: treatment.h:109
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: AgroChemIndustryCereal.cpp:56
Carrots * m_carrots
Definition: farm.h:966
HunterList m_HuntersList
A list of hunters allocated to this farm.
Definition: farm.h:942
Definition: treatment.h:38
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterRapeStrigling.cpp:35
Definition: treatment.h:103
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterBarley.cpp:37
FieldPeas * m_fieldpeas
Definition: farm.h:971
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OFieldPeasSilage.cpp:33
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLPotatoes.cpp:64
WinterWheat * m_winterwheat
Definition: farm.h:1028
Definition: WinterBarley.h:90
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Fodderbeet.cpp:37
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterWheat.cpp:71
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Carrots.cpp:36
OOats * m_ooats
Definition: farm.h:990
Definition: tov_declaration.h:44
Definition: OSpringBarleyPigs.h:54
NLGrassGrazed1Spring class .
Definition: NLGrassGrazed1Spring.h:84
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLGrassGrazed1.cpp:54
bool LeSwitch(FarmEvent *ev)
Call do function for any crop with an outstanding event. Signal if the crop has terminated.
Definition: farm.cpp:386
virtual int GetFirstCropIndex(TTypesOfLandscapeElement a_type)
Gets the first crop for the farm.
Definition: farm.cpp:1385
SpringRape * m_springrape
Definition: farm.h:1023
OTriticale * m_otriticale
Definition: farm.h:999
PLWinterRape * m_plwinterrape
Definition: farm.h:1052
Definition: SpringBarleySilage.h:75
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLPotatoes.cpp:64
Definition: tov_declaration.h:84
SpringBarleySeed * m_springbarleyseed
Definition: farm.h:1021
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLFodderLucerne2.cpp:56
Rotational set-aside management class .
Definition: setaside.h:69
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PermanentGrassLowYield.cpp:37
Definition: tov_declaration.h:44
OMaizeSilage * m_omaizesilage
Definition: farm.h:978
CloverGrassGrazed2 * m_CGG2
Definition: farm.h:970
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Maize.cpp:36
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Sugarbeet.cpp:37
SpringBarleySpr * m_springbarleyspr
Definition: farm.h:1017
bool DoIt(double a_probability)
Return chance out of 0 to 100.
Definition: farm.cpp:800
Definition: treatment.h:65
Definition: treatment.h:37
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterRape.cpp:32
vector< unsigned > polylist
Definition: farm.h:207
Definition: OSeedGrass1.h:47
Definition: treatment.h:39
Definition: YoungForest.h:50
int GetFirstDate(TTypesOfVegetation a_tov)
Gets the start date for a crop type.
Definition: farm.cpp:1582
Definition: OCarrots.h:52
bool CompPcts(tpct i, tpct j)
Used for sorting a farmers field size vector.
Definition: farm.cpp:294
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OPotatoes.cpp:33
Definition: tov_declaration.h:78
vector< LE * > m_fields
Definition: farm.h:937
NLGrassGrazed1 class .
Definition: NLGrassGrazed1.h:88
Definition: tov_declaration.h:47
Definition: SpringBarleyStriglingSingle.h:76
Definition: tov_declaration.h:58
virtual int GetNextCropIndex(int a_rot_index)
Returns the next crop in the rotation.
Definition: farm.cpp:1427
NLMaizeSpring class .
Definition: NLMaizeSpring.h:59
PLSpringBarleySpr class .
Definition: PLSpringBarleySpr.h:77
Definition: treatment.h:41
Definition: OBarleyPeaCloverGrass.h:53
Definition: tov_declaration.h:49
Definition: Sugarbeet.h:71
WinterWheat class .
Definition: WinterWheat.h:116
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterBarley.cpp:64
NLTulips class .
Definition: NLTulips.h:95
Definition: tov_declaration.h:114
OGrazingPigs * m_ograzingpigs
Definition: farm.h:987
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLSpringBarley.cpp:64
Used for storing farmers field size vectors.
Definition: farm.h:454
NLPotatoesSpring * m_nlpotatoesspring
Definition: farm.h:1086
NorwegianPotatoes * m_norwegianpotatoes
Definition: farm.h:1047
PLPotatoes class .
Definition: PLPotatoes.h:99
double GetSpilledMaize()
Returns the average amount of spilled maize in KJ/m2 this year.
Definition: farm.cpp:3064
Definition: treatment.h:82
PLWinterRape class .
Definition: PLWinterRape.h:100
Definition: tov_declaration.h:56
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WWheatPTreatment.cpp:44
static CfgBool l_farm_insecticide_kills("FARM_INSECTICIDE_KILLS", CFG_CUSTOM, true)
Definition: tov_declaration.h:59
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLGrassGrazed1Spring.cpp:54
Definition: tov_declaration.h:100
PLWinterBarley * m_plwinterbarley
Definition: farm.h:1053
Definition: OTriticale.h:58
NLSpringBarley * m_nlspringbarley
Definition: farm.h:1074
SeedGrass2 * m_seedgrass2
Definition: farm.h:1014
Definition: PermanentGrassLowYield.h:50
OFodderbeet * m_ofodderbeet
Definition: farm.h:975
OWinterWheat * m_owinterwheat
Definition: farm.h:1005
Definition: tov_declaration.h:81
NLSpringBarley class .
Definition: NLSpringBarley.h:76
Definition: tov_declaration.h:55
Definition: treatment.h:52
NLGrassGrazedLast * m_nlgrassgrazedlast
Definition: farm.h:1081
NLMaize * m_nlmaize
Definition: farm.h:1072
PLBeetSpr class .
Definition: PLBeetSpr.h:83
Definition: winterrapestrigling.h:47
Definition: tov_declaration.h:43
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterWheatStrigling.cpp:38
Definition: tov_declaration.h:49
int GetNextCropStartDate(LE *a_field, TTypesOfVegetation &a_curr_veg)
Returns the start date of the next crop in the rotation.
Definition: farm.cpp:864
NLGrassGrazed1 * m_nlgrassgrazed1
Definition: farm.h:1078
PLMaize * m_plmaize
Definition: farm.h:1058
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterBarleyExt.cpp:33
Definition: OFodderbeet.h:64
OPotatoes * m_opotatoes
Definition: farm.h:992
Definition: tov_declaration.h:73
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PermanentGrassTussocky.cpp:37
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterWheatUndersown.cpp:33
Definition: treatment.h:58
Definition: treatment.h:68
Definition: tov_declaration.h:43
NLSpringBarleySpring * m_nlspringbarleyspring
Definition: farm.h:1087
Definition: tov_declaration.h:79
Definition: treatment.h:69
Definition: tov_declaration.h:95
Definition: FieldPeas.h:61
Definition: Potatoes.h:72
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLPotatoesSpring.cpp:64
Definition: Triticale.h:65
Definition: tov_declaration.h:80
OWinterRape * m_owinterrape
Definition: farm.h:1002
PLMaize class .
Definition: PLMaize.h:94
Definition: treatment.h:56
OWinterBarley * m_owinterbarley
Definition: farm.h:1000
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterRape.cpp:64
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OTriticale.cpp:38
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OCloverGrassGrazed1.cpp:37
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLBeans.cpp:64
Definition: tov_declaration.h:49
Definition: SpringBarleySpr.h:75
Definition: treatment.h:112
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterWheatStriglingSingle.cpp:39
NLCarrotsSpring class .
Definition: NLCarrotsSpring.h:68
CloverGrassGrazed1 * m_CGG1
Definition: farm.h:969
NLCabbageSpring * m_nlcabbagespring
Definition: farm.h:1088
Definition: PermanentGrassTussocky.h:45
TTypesOfFarm m_farmtype
Definition: farm.h:940
Definition: treatment.h:88
Definition: tov_declaration.h:63
SpringBarleyCloverGrassStrigling * m_springbarleyclovergrassstrigling
Definition: farm.h:1036
Definition: WinterWheatStriglingSingle.h:84
Definition: tov_declaration.h:104
Definition: treatment.h:110
NLTulips * m_nltulips
Definition: farm.h:1077
Definition: tov_declaration.h:74
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarley.cpp:48
Definition: tov_declaration.h:46
Definition: treatment.h:111
Definition: treatment.h:107
NLWinterWheat * m_nlwinterwheat
Definition: farm.h:1075
FodderGrass * m_foddergrass
Definition: farm.h:968
Definition: tov_declaration.h:50
Definition: winterrape.h:82
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterRyeStrigling.cpp:38
WinterRape * m_winterrape
Definition: farm.h:1026
Definition: treatment.h:108
Definition: tov_declaration.h:65
Definition: AgroChemIndustryCereal.h:89
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLMaizeSilage.cpp:64
Definition: treatment.h:80
Definition: tov_declaration.h:52
Definition: tov_declaration.h:65
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLBeetSpring.cpp:64
Definition: treatment.h:51
Definition: OWinterWheat.h:63
CfgInt cfg_productapplicendyear
Definition: tov_declaration.h:55
Definition: tov_declaration.h:91
NLSpringBarleySpring class .
Definition: NLSpringBarleySpring.h:71
Definition: treatment.h:75
Definition: tov_declaration.h:66
WinterRapeStrigling * m_winterrapestrigling
Definition: farm.h:1041
MaizeStrigling * m_maizestrigling
Definition: farm.h:1040
Definition: tov_declaration.h:62
Definition: tov_declaration.h:65
PLCarrots * m_plcarrots
Definition: farm.h:1064
Definition: treatment.h:92
OWinterWheatUndersownExt * m_owinterwheatundersownext
Definition: farm.h:1006
Definition: tov_declaration.h:43
Definition: tole_declaration.h:55
Definition: tov_declaration.h:63
NorwegianSpringBarley * m_norwegianspringbarley
Definition: farm.h:1049
Definition: CloverGrassGrazed1.h:55
Definition: tov_declaration.h:108
NLPotatoesSpring class .
Definition: NLPotatoesSpring.h:89
NLMaize class .
Definition: NLMaize.h:66
OSeedGrass2 * m_oseedgrass2
Definition: farm.h:994
#define DO_IT_PROB
Definition: farmfuncs.cpp:56
int InvIntPartition(vector< tpct > *items, int target)
Finds all possible sums of the integers in the items array.
Definition: farm.cpp:2493
OCarrots * m_ocarrots
Definition: farm.h:980
Definition: tov_declaration.h:41
double GetSpilledGrain()
Returns the average amount of spilled grain in KJ/m2 this year.
Definition: farm.cpp:3033
WinterBarleyStrigling * m_winterbarleystrigling
Definition: farm.h:1043
PLBeans class .
Definition: PLBeans.h:84
NLGrassGrazed2 class .
Definition: NLGrassGrazed2.h:84
Definition: OWinterWheatUndersownExt.h:63
PLWinterBarley class .
Definition: PLWinterBarley.h:98
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: BroadBeans.cpp:34
Sugarbeet * m_sugarbeet
Definition: farm.h:974
WinterRye * m_winterrye
Definition: farm.h:1027
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSeedGrass1.cpp:36
PermanentSetAside * m_permanentsetaside
Definition: farm.h:1010
Definition: treatment.h:100
Definition: tov_declaration.h:68
bool m_stockfarmer
Definition: farm.h:943
NLWinterWheat class .
Definition: NLWinterWheat.h:76
Definition: OWinterBarleyExt.h:54
Definition: treatment.h:50
Definition: treatment.h:61
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Triticale.cpp:37
Definition: treatment.h:83
CfgFloat l_el_o_cut_height
Oats * m_oats
Definition: farm.h:989
Definition: SpringBarleySeed.h:60
Definition: tov_declaration.h:60
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterWheat.cpp:33
WinterWheatStriglingCulm * m_winterwheatstriglingculm
Definition: farm.h:1034
Definition: SpringBarleyPTreatment.h:76
Definition: tov_declaration.h:65
NLMaizeSpring * m_nlmaizespring
Definition: farm.h:1085
Definition: tov_declaration.h:68
Definition: tov_declaration.h:52
Definition: tov_declaration.h:107
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterBarleyStrigling.cpp:38
Definition: treatment.h:49
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PotatoesIndustry.cpp:37
Definition: treatment.h:60
PLBeetSpr * m_plbeetspr
Definition: farm.h:1067
int GetFarmNumber(void)
Definition: farm.h:782
Definition: treatment.h:90
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSpringBarleyPigs.cpp:33
Definition: WinterWheatStriglingCulm.h:84
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: seedgrass1.cpp:36
Definition: tov_declaration.h:112
TTypesOfVegetation
Definition: tov_declaration.h:30
Definition: MaizeSilage.h:58
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OPermanentGrassGrazed.cpp:33
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Oats.cpp:35
Definition: treatment.h:35
Definition: tov_declaration.h:53
Definition: treatment.h:34
NLGrassGrazedLast class .
Definition: NLGrassGrazedLast.h:85
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLTulips.cpp:64
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: WinterWheat.cpp:101
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: CloverGrassGrazed1.cpp:42
Definition: tov_declaration.h:50
Definition: treatment.h:55
Definition: tov_declaration.h:63
Definition: SpringBarleyStriglingCulm.h:76
Definition: treatment.h:95
Definition: tov_declaration.h:62
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterWheatLate.cpp:64
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterWheatStriglingCulm.cpp:39
SpringBarleyStriglingCulm * m_springbarleystriglingculm
Definition: farm.h:1038
int GetFirstDate(void)
Definition: farm.h:562
NLCabbage class .
Definition: NLCabbage.h:74
NLBeet class .
Definition: NLBeet.h:69
Definition: tov_declaration.h:86
NLCarrots * m_nlcarrots
Definition: farm.h:1071
Definition: tov_declaration.h:66
Definition: tov_declaration.h:106
Definition: tov_declaration.h:31
NLPotatoes class .
Definition: NLPotatoes.h:93
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySilage.cpp:47
Definition: tov_declaration.h:101
Definition: tole_declaration.h:47
void AddNewEvent(TTypesOfVegetation a_event, long a_date, LE *a_field, int a_todo, long a_num, bool a_lock, int a_start, bool a_first_year, TTypesOfVegetation a_crop)
Adds an event to the event queue for a farm.
Definition: farm.cpp:789
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: winterrape.cpp:49
Definition: Landscape.h:63
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLCarrotsSpring.cpp:64
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OFodderbeet.cpp:31
Definition: tov_declaration.h:103
Definition: SpringBarleySKManagement.h:74
vector< TTypesOfVegetation > m_rotation
Definition: farm.h:938
NLPermanentGrassGrazed * m_nlpermanentgrassgrazed
Definition: farm.h:1082
int m_farm_centroidx
Farm's centroid, value x. Equal to the average of the x centroid values of all farm's fields.
Definition: farm.h:959
Definition: PermanentGrassGrazed.h:53
Definition: tov_declaration.h:52
Definition: NorwegianPotatoes.h:72
OSeedGrass1 * m_oseedgrass1
Definition: farm.h:993
Definition: WinterBarleyStrigling.h:87
Definition: treatment.h:42
NLBeetSpring class .
Definition: NLBeetSpring.h:66
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySKManagement.cpp:37
NLGrassGrazed1Spring * m_nlgrassgrazed1spring
Definition: farm.h:1079
Definition: tov_declaration.h:53
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLPermanentGrassGrazed.cpp:54
Definition: tov_declaration.h:44
Definition: tov_declaration.h:66
Definition: SpringRape.h:77
Definition: DummyCropPestTesting.h:61
Definition: tov_declaration.h:89
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLCabbage.cpp:64
Definition: MaizeStrigling.h:58
Definition: tov_declaration.h:68
NLCarrotsSpring * m_nlcarrotsspring
Definition: farm.h:1084
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OGrazingPigs.cpp:31
Definition: tole_declaration.h:46
Definition: tov_declaration.h:56
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterRye.cpp:37
Definition: seedgrass2.h:55
Definition: tov_declaration.h:60
Definition: tov_declaration.h:49
CfgFloat l_el_o_cut_green
NLCabbageSpring class .
Definition: NLCabbageSpring.h:71
Definition: OPotatoes.h:61
Definition: tov_declaration.h:33
PLWinterWheat * m_plwinterwheat
Definition: farm.h:1051
Definition: Landscape.h:63
Definition: tov_declaration.h:55
Definition: tov_declaration.h:71
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: seedgrass2.cpp:37
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSpringBarley.cpp:33
CfgFloat l_el_o_cut_total
Definition: tov_declaration.h:87
Definition: NorwegianSpringBarley.h:47
Definition: tov_declaration.h:58
PLSpringBarley * m_plspringbarley
Definition: farm.h:1057
SpringBarleySKManagement * m_springbarleyskmanagement
Definition: farm.h:1018
Definition: treatment.h:57
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyStriglingCulm.cpp:40
Definition: CloverGrassGrazed2.h:53
Definition: treatment.h:87
Definition: FieldPeasSilage.h:61
Definition: tov_declaration.h:50
WinterWheatStriglingSingle * m_winterwheatstriglingsingle
Definition: farm.h:1035
Definition: treatment.h:73
Definition: treatment.h:43
Definition: tov_declaration.h:59
Definition: treatment.h:40
Definition: tov_declaration.h:72
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterRye.cpp:64
Definition: Landscape.h:63
static CfgFloat cfg_CustomInsecticideKillProp("CUSTOMINSECTIVIDEKILLPROP", CFG_CUSTOM, 0.5, 0, 1.0)
OWinterRye * m_owinterrye
Definition: farm.h:1003
Fodderbeet * m_fodderbeet
Definition: farm.h:973
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSpringBarleyExt.cpp:33
TTypesOfVegetation m_event
Definition: farm.h:470
Definition: tov_declaration.h:62
Definition: treatment.h:93
Definition: treatment.h:62
CfgInt cfg_productapplicstartyear
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: NorwegianSpringBarley.cpp:33
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OCarrots.cpp:32
int m_farm_centroidy
Farm's centroid, value y. Equal to the average of the y centroid values of all farm's fields.
Definition: farm.h:961
FieldPeasSilage * m_fieldpeassilage
Definition: farm.h:972
int GetArea(void)
Returns the area of arable fields owned by that farm.
Definition: farm.cpp:1331
Definition: tov_declaration.h:96
NLGrassGrazed2 * m_nlgrassgrazed2
Definition: farm.h:1080
OFieldPeas * m_ofieldpeas
Definition: farm.h:984
Definition: tov_declaration.h:59
Definition: treatment.h:45
int pct
Definition: farm.h:456
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OBarleyPeaCloverGrass.cpp:33
Definition: WinterRye.h:76
void CheckForPesticideRecord(LE *a_field, TTypesOfPesticideCategory a_pcide)
Check if needed and record pesticide application.
Definition: Landscape.cpp:669
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLSpringWheat.cpp:64
int SupplyYearNumber(void)
Definition: Landscape.h:1616
LE * m_field
Definition: farm.h:472
Maize * m_maize
Definition: farm.h:976
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLFodderLucerne1.cpp:56
OBarleyPeaCloverGrass * m_OBarleyPCG
Definition: farm.h:979
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLMaizeSpring.cpp:64
Definition: tov_declaration.h:65
Definition: tole_declaration.h:71
PLSpringBarleySpr * m_plspringbarleyspr
Definition: farm.h:1065
OSpringBarley * m_ospringbarley
Definition: farm.h:995
Definition: tov_declaration.h:36
PermanentGrassTussocky * m_permgrasstussocky
Definition: farm.h:1009
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: FieldPeasStrigling.cpp:38
Definition: tov_declaration.h:47
Definition: tov_declaration.h:55
NLBeetSpring * m_nlbeetspring
Definition: farm.h:1083
Definition: SpringBarleyCloverGrassStrigling.h:61
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WWheatPControl.cpp:37
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyPTreatment.cpp:41
SpringBarleyStriglingSingle * m_springbarleystriglingsingle
Definition: farm.h:1039
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: setaside.cpp:86
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLSpringBarleySpr.cpp:64
int m_todo
Definition: farm.h:469
Definition: OWinterRape.h:62
Definition: tov_declaration.h:34
Definition: WWheatPToxicControl.h:84
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OMaizeSilage.cpp:32
Definition: tov_declaration.h:60
Definition: tov_declaration.h:66
TTypesOfVegetation TranslateCropCodes(std::string &str)
Definition: farm.cpp:1818
SeedGrass1 * m_seedgrass1
Definition: farm.h:1013
SpringBarleyPeaCloverGrassStrigling * m_springbarleypeaclovergrassstrigling
Definition: farm.h:1045
Definition: treatment.h:79
Definition: OWinterWheatUndersown.h:63
Definition: tov_declaration.h:97
Definition: tov_declaration.h:46
SpringBarleySilage * m_springbarleysilage
Definition: farm.h:1022
OFirstYearDanger * m_ofirstyeardanger
Definition: farm.h:986
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: NorwegianPotatoes.cpp:38
Definition: treatment.h:104
WinterRyeStrigling * m_winterryestrigling
Definition: farm.h:1042
BroadBeans * m_broadbeans
Definition: farm.h:967
Definition: tov_declaration.h:65
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringRape.cpp:45
Definition: tov_declaration.h:94
Definition: treatment.h:70
Definition: tov_declaration.h:77
Definition: tov_declaration.h:43
Definition: treatment.h:66
SpringBarleyCloverGrass * m_sbarleyclovergrass
Definition: farm.h:1020
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLWinterWheat.cpp:64
Definition: tole_declaration.h:45
Definition: SpringBarleyCloverGrass.h:64
Definition: tov_declaration.h:47
int m_intensity
Definition: farm.h:946
Definition: treatment.h:48
PLWinterTriticale class .
Definition: PLWinterTriticale.h:96
Definition: treatment.h:76
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: DummyCropPestTesting.cpp:38
Definition: tov_declaration.h:66
Definition: treatment.h:96
Definition: tov_declaration.h:76
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: MaizeStrigling.cpp:37
Definition: OCloverGrassSilage1.h:51
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLMaize.cpp:64
Definition: tov_declaration.h:63
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLCarrots.cpp:64
Definition: tov_declaration.h:59
Definition: tole_declaration.h:43
Definition: PotatoesIndustry.h:71
YoungForestCrop * m_youngforest
Definition: farm.h:1046
Definition: tov_declaration.h:62
LowPriority< FarmEvent * > m_queue
Definition: farm.h:936
Definition: tole_declaration.h:44
PLMaizeSilage class .
Definition: PLMaizeSilage.h:94
Definition: OSBarleySilage.h:50
Definition: BarleyPeaCloverGrassStrigling.h:69
Definition: OWinterBarley.h:55
Definition: seedgrass1.h:52
Definition: NorwegianOats.h:47
WinterBarley * m_winterbarley
Definition: farm.h:1025
WWheatPControl * m_wwheatpcontrol
Definition: farm.h:1029
Definition: Landscape.h:63
#define PROG_START
Definition: farm.h:76
Definition: treatment.h:54
PLSpringBarley class .
Definition: PLSpringBarley.h:94
Definition: treatment.h:36
NLPotatoes * m_nlpotatoes
Definition: farm.h:1073
PLBeet class .
Definition: PLBeet.h:98
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OCloverGrassSilage1.cpp:39
#define DO_IT_PROB_LONG
Definition: farmfuncs.cpp:57
Definition: tov_declaration.h:83
FarmManager * m_OurManager
Pointer to the FarmManager.
Definition: farm.h:935
Definition: tov_declaration.h:53
Definition: treatment.h:44
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLGrassGrazedLast.cpp:54
Definition: OMaizeSilage.h:53
Definition: treatment.h:67
int m_farm_num
Definition: farm.h:944
virtual void HandleEvents(void)
If there are events to carry out do this, and perhaps start a new crop.
Definition: farm.cpp:882
Definition: OCloverGrassGrazed1.h:51
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: FieldPeasSilage.cpp:37
WWheatPTreatment * m_wwheatptreatment
Definition: farm.h:1031
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OrchardCrop.cpp:43
Landscape * g_landscape_p
Definition: Landscape.cpp:258
TTypesOfLandscapeElement
Definition: tole_declaration.h:36
WWheatPToxicControl * m_wwheatptoxiccontrol
Definition: farm.h:1030
OCloverGrassGrazed2 * m_OCGG2
Definition: farm.h:982
Definition: tov_declaration.h:50
OrchardCrop * m_orchardcrop
Definition: farm.h:988
OSpringBarleyPigs * m_ospringbarleypigs
Definition: farm.h:997
static CfgFloat l_farm_cattle_veg_reduce2("FARM_CATTLE_VEG_REDUCE_LOW", CFG_CUSTOM, 1.00)
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PermanentGrassGrazed.cpp:37
NLCatchPeaCrop * m_nlcatchpeacrop
Definition: farm.h:1089
Definition: treatment.h:59
Definition: tov_declaration.h:62
PLSpringWheat * m_plspringwheat
Definition: farm.h:1056
Definition: treatment.h:46
NLCabbage * m_nlcabbage
Definition: farm.h:1076
Definition: treatment.h:64
PLWinterRye class .
Definition: PLWinterRye.h:91
Definition: tov_declaration.h:44
Definition: treatment.h:106
PLMaizeSilage * m_plmaizesilage
Definition: farm.h:1059
Definition: treatment.h:94
Definition: tole_declaration.h:95
Definition: SpringBarleyStrigling.h:76
OSBarleySilage * m_osbarleysilage
Definition: farm.h:998
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSBarleySilage.cpp:31
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLGrassGrazed2.cpp:54
PLFodderLucerne1 class .
Definition: PLFodderLucerne1.h:79
Definition: treatment.h:53
Definition: PermanentSetAside.h:42
NLCatchPeaCrop class .
Definition: NLCatchPeaCrop.h:54
OPermanentGrassGrazed * m_opermgrassgrazed
Definition: farm.h:991
Definition: tov_declaration.h:46
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLSpringBarley.cpp:64
OFieldPeasSilage * m_ofieldpeassilage
Definition: farm.h:985
SpringBarleyPTreatment * m_springbarleyptreatment
Definition: farm.h:1019
Definition: treatment.h:71
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OCloverGrassGrazed2.cpp:38
FarmManager * g_farmmanager
Definition: farm.cpp:284
Definition: WinterRyeStrigling.h:75
PLSpringWheat class .
Definition: PLSpringWheat.h:98
long m_run
Definition: farm.h:468
PLWinterWheatLate class .
Definition: PLWinterWheatLate.h:98
PLWinterWheatLate * m_plwinterwheatlate
Definition: farm.h:1066
Definition: tov_declaration.h:98
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterBarley.cpp:33
Definition: WWheatPControl.h:83
Definition: tov_declaration.h:56
Definition: treatment.h:72
PermanentGrassGrazed * m_permgrassgrazed
Definition: farm.h:1007
Definition: treatment.h:86
PLFodderLucerne1 * m_plfodderlucerne1
Definition: farm.h:1062
Definition: treatment.h:101
Definition: OFirstYearDanger.h:38
Definition: tov_declaration.h:52
Definition: tov_declaration.h:49
Definition: tov_declaration.h:90
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: FieldPeas.cpp:37
DummyCropPestTesting * m_dummycroppesttesting
Definition: farm.h:1091
NLPermanentGrassGrazed class .
Definition: NLPermanentGrassGrazed.h:83
Definition: tov_declaration.h:44
NorwegianOats * m_norwegianoats
Definition: farm.h:1048
Definition: tov_declaration.h:32
WinterWheatStrigling * m_winterwheatstrigling
Definition: farm.h:1033
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleySpr.cpp:42
Definition: treatment.h:84
Definition: tov_declaration.h:43
Definition: tov_declaration.h:35
MaizeSilage * m_maizesilage
Definition: farm.h:977
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLSpringBarleySpring.cpp:64
OSpringBarleyExt * m_ospringbarleyext
Definition: farm.h:996
NLCarrots class .
Definition: NLCarrots.h:70
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: NorwegianOats.cpp:33
Definition: tov_declaration.h:55
Definition: tov_declaration.h:82
Definition: tov_declaration.h:53
NLBeet * m_nlbeet
Definition: farm.h:1070
static CfgFloat l_farm_pig_veg_reduce("FARM_PIG_VEG_REDUCE", CFG_CUSTOM, 0.98)
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLCatchPeaCrop.cpp:56
Definition: tov_declaration.h:70
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLBeetSpr.cpp:64
OWinterBarleyExt * m_owinterbarleyext
Definition: farm.h:1001
Definition: treatment.h:85
PLWinterWheat class .
Definition: PLWinterWheat.h:98
PLBeet * m_plbeet
Definition: farm.h:1061
Definition: treatment.h:47
int index
Definition: farm.h:455
boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
Definition: OSeedGrass2.h:49
Definition: treatment.h:33
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLCabbageSpring.cpp:64
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OOats.cpp:33
Definition: tov_declaration.h:99
PLPotatoes * m_plpotatoes
Definition: farm.h:1060
OCloverGrassGrazed1 * m_OCGG1
Definition: farm.h:981
Definition: OSpringBarley.h:60
void CheckRotationManagementLoop(FarmEvent *ev)
Definition: farm.cpp:839
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: FodderGrass.cpp:45
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyStriglingSingle.cpp:43
Definition: SpringBarley.h:78
SetAside * m_setaside
Definition: farm.h:1015
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterRye.cpp:33
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OFieldPeas.cpp:33
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: MaizeSilage.cpp:36
Definition: FieldPeasStrigling.h:61
Definition: OPermanentGrassGrazed.h:51
Definition: tov_declaration.h:50
Triticale * m_triticale
Definition: farm.h:1024
OWinterWheatUndersown * m_owinterwheatundersown
Definition: farm.h:1004
Potatoes * m_potatoes
Definition: farm.h:1011
Definition: OWinterRye.h:56
Definition: treatment.h:105
Definition: WWheatPTreatment.h:84
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PermanentSetAside.cpp:32
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLBeet.cpp:64
CfgBool g_farm_fixed_crop_enable
PotatoesIndustry * m_potatoesindustry
Definition: farm.h:1012
PLWinterRye * m_plwinterrye
Definition: farm.h:1055
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterWheatUndersownExt.cpp:33
Definition: BroadBeans.h:50
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: PLWinterTriticale.cpp:64
PermanentGrassLowYield * m_permgrasslowyield
Definition: farm.h:1008
Definition: treatment.h:63
Definition: treatment.h:81
Definition: OGrazingPigs.h:44
int m_rotation_sync_index
Definition: farm.h:945
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: CloverGrassGrazed2.cpp:40
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLCarrots.cpp:64
OCloverGrassSilage1 * m_OCGS1
Definition: farm.h:983
PLCarrots class .
Definition: PLCarrots.h:75
virtual bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
The one and only method for a crop management plan. All farm actions go through here.
Definition: NLBeet.cpp:64
PLBeans * m_plbeans
Definition: farm.h:1068
Definition: OCloverGrassGrazed2.h:48
Definition: tov_declaration.h:63
Definition: OFieldPeasSilage.h:51
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyCloverGrassStrigling.cpp:38
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyPeaCloverGrassStrigling.cpp:38
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyCloverGrass.cpp:45
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Potatoes.cpp:38
static CfgFloat l_farm_cattle_veg_reduce("FARM_CATTLE_VEG_REDUCE", CFG_CUSTOM, 1.5)
static CfgBool l_farm_herbicide_kills("FARM_PESTICIDE_KILLS", CFG_CUSTOM, true)
Definition: tov_declaration.h:105
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSeedGrass2.cpp:32