ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
The base class for all farm types. More...
#include <farm.h>
Public Member Functions | |
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) |
Protected Member Functions | |
int | GetFirstDate (TTypesOfVegetation a_tov) |
Gets the start date for a crop type. More... | |
int | GetNextCropStartDate (LE *a_field, TTypesOfVegetation &a_curr_veg) |
Returns the start date of the next crop in the rotation. More... | |
virtual int | GetFirstCropIndex (TTypesOfLandscapeElement a_type) |
Gets the first crop for the farm. More... | |
virtual int | GetNextCropIndex (int a_rot_index) |
Returns the next crop in the rotation. More... | |
virtual void | HandleEvents (void) |
If there are events to carry out do this, and perhaps start a new crop. More... | |
bool | LeSwitch (FarmEvent *ev) |
Call do function for any crop with an outstanding event. Signal if the crop has terminated. More... | |
void | CheckRotationManagementLoop (FarmEvent *ev) |
void | ReadRotation (std::string fname) |
Reads a rotation file into the rotation. More... | |
void | AssignPermanentCrop (TTypesOfVegetation tov, int pct) |
Used to assign a permanent crop to an otherwise rotational field polygon. More... | |
int | InvIntPartition (vector< tpct > *items, int target) |
Finds all possible sums of the integers in the items array. More... | |
Protected Attributes | |
FarmManager * | m_OurManager |
Pointer to the FarmManager. More... | |
LowPriority< FarmEvent * > | m_queue |
vector< LE * > | m_fields |
vector< TTypesOfVegetation > | m_rotation |
vector< PermCropData > | m_PermCrops |
TTypesOfFarm | m_farmtype |
HunterList | m_HuntersList |
A list of hunters allocated to this farm. More... | |
bool | m_stockfarmer |
int | m_farm_num |
int | m_rotation_sync_index |
int | m_intensity |
int | m_farm_centroidx |
Farm's centroid, value x. Equal to the average of the x centroid values of all farm's fields. More... | |
int | m_farm_centroidy |
Farm's centroid, value y. Equal to the average of the y centroid values of all farm's fields. More... | |
Carrots * | m_carrots |
BroadBeans * | m_broadbeans |
FodderGrass * | m_foddergrass |
CloverGrassGrazed1 * | m_CGG1 |
CloverGrassGrazed2 * | m_CGG2 |
FieldPeas * | m_fieldpeas |
FieldPeasSilage * | m_fieldpeassilage |
Fodderbeet * | m_fodderbeet |
Sugarbeet * | m_sugarbeet |
OFodderbeet * | m_ofodderbeet |
Maize * | m_maize |
MaizeSilage * | m_maizesilage |
OMaizeSilage * | m_omaizesilage |
OBarleyPeaCloverGrass * | m_OBarleyPCG |
OCarrots * | m_ocarrots |
OCloverGrassGrazed1 * | m_OCGG1 |
OCloverGrassGrazed2 * | m_OCGG2 |
OCloverGrassSilage1 * | m_OCGS1 |
OFieldPeas * | m_ofieldpeas |
OFieldPeasSilage * | m_ofieldpeassilage |
OFirstYearDanger * | m_ofirstyeardanger |
OGrazingPigs * | m_ograzingpigs |
OrchardCrop * | m_orchardcrop |
Oats * | m_oats |
OOats * | m_ooats |
OPermanentGrassGrazed * | m_opermgrassgrazed |
OPotatoes * | m_opotatoes |
OSeedGrass1 * | m_oseedgrass1 |
OSeedGrass2 * | m_oseedgrass2 |
OSpringBarley * | m_ospringbarley |
OSpringBarleyExt * | m_ospringbarleyext |
OSpringBarleyPigs * | m_ospringbarleypigs |
OSBarleySilage * | m_osbarleysilage |
OTriticale * | m_otriticale |
OWinterBarley * | m_owinterbarley |
OWinterBarleyExt * | m_owinterbarleyext |
OWinterRape * | m_owinterrape |
OWinterRye * | m_owinterrye |
OWinterWheatUndersown * | m_owinterwheatundersown |
OWinterWheat * | m_owinterwheat |
OWinterWheatUndersownExt * | m_owinterwheatundersownext |
PermanentGrassGrazed * | m_permgrassgrazed |
PermanentGrassLowYield * | m_permgrasslowyield |
PermanentGrassTussocky * | m_permgrasstussocky |
PermanentSetAside * | m_permanentsetaside |
Potatoes * | m_potatoes |
PotatoesIndustry * | m_potatoesindustry |
SeedGrass1 * | m_seedgrass1 |
SeedGrass2 * | m_seedgrass2 |
SetAside * | m_setaside |
SpringBarley * | m_springbarley |
SpringBarleySpr * | m_springbarleyspr |
SpringBarleySKManagement * | m_springbarleyskmanagement |
SpringBarleyPTreatment * | m_springbarleyptreatment |
SpringBarleyCloverGrass * | m_sbarleyclovergrass |
SpringBarleySeed * | m_springbarleyseed |
SpringBarleySilage * | m_springbarleysilage |
SpringRape * | m_springrape |
Triticale * | m_triticale |
WinterBarley * | m_winterbarley |
WinterRape * | m_winterrape |
WinterRye * | m_winterrye |
WinterWheat * | m_winterwheat |
WWheatPControl * | m_wwheatpcontrol |
WWheatPToxicControl * | m_wwheatptoxiccontrol |
WWheatPTreatment * | m_wwheatptreatment |
AgroChemIndustryCereal * | m_agrochemindustrycereal |
WinterWheatStrigling * | m_winterwheatstrigling |
WinterWheatStriglingCulm * | m_winterwheatstriglingculm |
WinterWheatStriglingSingle * | m_winterwheatstriglingsingle |
SpringBarleyCloverGrassStrigling * | m_springbarleyclovergrassstrigling |
SpringBarleyStrigling * | m_springbarleystrigling |
SpringBarleyStriglingCulm * | m_springbarleystriglingculm |
SpringBarleyStriglingSingle * | m_springbarleystriglingsingle |
MaizeStrigling * | m_maizestrigling |
WinterRapeStrigling * | m_winterrapestrigling |
WinterRyeStrigling * | m_winterryestrigling |
WinterBarleyStrigling * | m_winterbarleystrigling |
FieldPeasStrigling * | m_fieldpeasstrigling |
SpringBarleyPeaCloverGrassStrigling * | m_springbarleypeaclovergrassstrigling |
YoungForestCrop * | m_youngforest |
NorwegianPotatoes * | m_norwegianpotatoes |
NorwegianOats * | m_norwegianoats |
NorwegianSpringBarley * | m_norwegianspringbarley |
PLWinterWheat * | m_plwinterwheat |
PLWinterRape * | m_plwinterrape |
PLWinterBarley * | m_plwinterbarley |
PLWinterTriticale * | m_plwintertriticale |
PLWinterRye * | m_plwinterrye |
PLSpringWheat * | m_plspringwheat |
PLSpringBarley * | m_plspringbarley |
PLMaize * | m_plmaize |
PLMaizeSilage * | m_plmaizesilage |
PLPotatoes * | m_plpotatoes |
PLBeet * | m_plbeet |
PLFodderLucerne1 * | m_plfodderlucerne1 |
PLFodderLucerne2 * | m_plfodderlucerne2 |
PLCarrots * | m_plcarrots |
PLSpringBarleySpr * | m_plspringbarleyspr |
PLWinterWheatLate * | m_plwinterwheatlate |
PLBeetSpr * | m_plbeetspr |
PLBeans * | m_plbeans |
NLBeet * | m_nlbeet |
NLCarrots * | m_nlcarrots |
NLMaize * | m_nlmaize |
NLPotatoes * | m_nlpotatoes |
NLSpringBarley * | m_nlspringbarley |
NLWinterWheat * | m_nlwinterwheat |
NLCabbage * | m_nlcabbage |
NLTulips * | m_nltulips |
NLGrassGrazed1 * | m_nlgrassgrazed1 |
NLGrassGrazed1Spring * | m_nlgrassgrazed1spring |
NLGrassGrazed2 * | m_nlgrassgrazed2 |
NLGrassGrazedLast * | m_nlgrassgrazedlast |
NLPermanentGrassGrazed * | m_nlpermanentgrassgrazed |
NLBeetSpring * | m_nlbeetspring |
NLCarrotsSpring * | m_nlcarrotsspring |
NLMaizeSpring * | m_nlmaizespring |
NLPotatoesSpring * | m_nlpotatoesspring |
NLSpringBarleySpring * | m_nlspringbarleyspring |
NLCabbageSpring * | m_nlcabbagespring |
NLCatchPeaCrop * | m_nlcatchpeacrop |
DummyCropPestTesting * | m_dummycroppesttesting |
Farm::Farm | ( | FarmManager * | a_manager | ) |
|
virtual |
Farm destructor - deletes all crop instances and empties event queues.
Definition at line 1199 of file farm.cpp.
References LowPriPair< ELEMTYPE >::m_element.
void Farm::AddField | ( | LE * | a_newfield | ) |
Adds a field to a farm.
Definition at line 1447 of file farm.cpp.
References tole_Orchard, tole_PermanentSetaside, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_PlantNursery, and tole_YoungForest.
|
inline |
Definition at line 922 of file farm.h.
References m_HuntersList.
void Farm::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 | ||
) |
void Farm::Assign_rotation | ( | vector< TTypesOfVegetation > | a_new_rotation | ) |
Definition at line 1488 of file farm.cpp.
Referenced by FarmManager::Switch_rotation().
|
protected |
Used to assign a permanent crop to an otherwise rotational field polygon.
Definition at line 2401 of file farm.cpp.
References CompPcts(), GetArea(), tpct::index, InvIntPartition(), m_fields, tpct::pct, and tov_Undefined.
Referenced by OptimisingFarm::InitiateManagement().
|
virtual |
Carry out a harrow event in the autumn on a_field.
Definition at line 261 of file farmfuncs.cpp.
References autumn_harrow, DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a ploughing event in the autumn on a_field.
Definition at line 132 of file farmfuncs.cpp.
References autumn_plough, DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a roll event in the autumn on a_field.
Definition at line 288 of file farmfuncs.cpp.
References autumn_roll, DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a sowing event in the autumn on a_field.
Definition at line 364 of file farmfuncs.cpp.
References autumn_sow, DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastSownVeg(), LE::SetLastTreatment(), sow, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Do bed forming up on a_field, probably of carrots.
Definition at line 1690 of file farmfuncs.cpp.
References bed_forming, DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Biocide applied on a_field.
Definition at line 2415 of file farmfuncs.cpp.
References biocide, DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out a bulb harvest on a_field.
Definition at line 2465 of file farmfuncs.cpp.
References bulb_harvest, Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, LE::GetInsectPop(), Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), LE::ResetDigestability(), LE::SetGrowthPhase(), LE::SetInsectPop(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Burn stubble on a_field.
Definition at line 2236 of file farmfuncs.cpp.
References burn_straw_stubble, Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::ReduceVeg(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
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.
Definition at line 1974 of file farmfuncs.cpp.
References cattle_out, Calendar::DayInYear(), g_date, g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::GetVegBiomass(), LE::GrazeVegetation(), l_farm_cattle_veg_reduce, LE::SetLastTreatment(), Landscape::SupplyLEPointer(), LE::ToggleCattleGrazing(), and CfgFloat::value().
|
virtual |
Generate a 'cattle_out_low' event for every day the cattle are on a_field.
Definition at line 2018 of file farmfuncs.cpp.
References cattle_out_low, Calendar::DayInYear(), g_date, g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::GetVegBiomass(), LE::GrazeVegetation(), l_farm_cattle_veg_reduce2, LE::SetLastTreatment(), Landscape::SupplyLEPointer(), LE::ToggleCattleGrazing(), and CfgFloat::value().
|
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.
Definition at line 1910 of file farmfuncs.cpp.
References cattle_out, DO_IT_PROB, g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::GrazeVegetation(), l_farm_cattle_veg_reduce, LE::SetLastTreatment(), Landscape::SupplyLEPointer(), LE::ToggleCattleGrazing(), and CfgFloat::value().
|
virtual |
Start a extensive grazing event on a_field today.
Definition at line 1944 of file farmfuncs.cpp.
References cattle_out_low, DO_IT_PROB, g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::GrazeVegetation(), l_farm_cattle_veg_reduce2, LE::SetLastTreatment(), Landscape::SupplyLEPointer(), LE::ToggleCattleGrazing(), and CfgFloat::value().
void Farm::Centroids | ( | ) |
Finds farm's centroids - x and y.
Calculate a farm's centroid as an average of its fields' centroids.
Definition at line 5334 of file farm.cpp.
References m_farm_centroidx, m_farm_centroidy, and m_fields.
Referenced by FarmManager::FindNeighbours().
|
protected |
Rotation error check function
Definition at line 839 of file farm.cpp.
References Calendar::Date(), g_date, g_msg, FarmEvent::m_field, MapErrorMsg::Warn(), and WARN_BUG.
|
virtual |
Cut vegetation on orchard crop. //based on cut to silage - values from cutting function of orchard.
Definition at line 2362 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), l_el_o_cut_green, l_el_o_cut_height, l_el_o_cut_total, mow, Weather::Raining(), LE::ReduceVeg_Extended(), LE::SetGrowthPhase(), LE::SetLastTreatment(), LE::SetMownDecay(), LE::SetVegParameters(), Landscape::SupplyLEPointer(), and CfgFloat::value().
|
virtual |
Carry out hay cutting on a_field.
Definition at line 2269 of file farmfuncs.cpp.
References cut_to_hay, Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), LE::ReduceVeg_Extended(), LE::SetGrowthPhase(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), LE::SetVegHeight(), and Landscape::SupplyLEPointer().
|
virtual |
Cut vegetation for silage on a_field.
Definition at line 2329 of file farmfuncs.cpp.
References cut_to_silage, DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), Weather::Raining(), LE::ReduceVeg_Extended(), LE::ResetDigestability(), LE::SetGrowthPhase(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), LE::SetVegHeight(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out weed topping on a_field.
Definition at line 2303 of file farmfuncs.cpp.
References cut_weeds, DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::ReduceVeg(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out a deep ploughing event on a_field.
Definition at line 417 of file farmfuncs.cpp.
References deep_ploughing, DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
bool Farm::DoIt | ( | double | a_probability | ) |
bool Farm::DoIt_prob | ( | double | a_probability | ) |
|
virtual |
Apply ammonium sulphate to a_field owned by an stock farmer.
Definition at line 990 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_ammoniumsulphate, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Calcium applied on a_field owned by a stock farmer.
Definition at line 1133 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_calcium, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread green manure on a_field owned by an stock farmer.
Definition at line 1062 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_greenmanure, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply manganese sulphate to a_field owned by an stock farmer.
Definition at line 1013 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_manganesesulphate, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread manure on a_field owned by an stock farmer.
Definition at line 1036 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_manure, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply NPK fertilizer to a_field owned by an stock farmer.
Definition at line 917 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_npk, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply NPKS fertilizer, on a_field owned by a stock farmer.
Definition at line 891 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_npks, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), sleep_all_day, and Landscape::SupplyLEPointer().
|
virtual |
Apply PK fertilizer to a_field owned by an stock farmer.
Definition at line 941 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_pk, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
RSM (ammonium nitrate solution) applied on a_field owned by a stock farmer.
Definition at line 1111 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_rsm, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread sewege sludge on a_field owned by an stock farmer.
Definition at line 1086 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_sludge, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spready slurry on a_field owned by an stock farmer.
Definition at line 965 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fa_slurry, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Flower cutting applied on a_field.
Definition at line 2437 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, flower_cutting, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::ReduceVeg_Extended(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), LE::SetVegHeight(), and Landscape::SupplyLEPointer().
|
virtual |
Apply Ammonium Sulphate to a_field owned by an arable farmer.
Definition at line 750 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_ammoniumsulphate, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Calcium applied on a_field owned by an arable farmer.
Definition at line 869 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_calcium, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread green manure on a_field owned by an arable farmer.
Definition at line 798 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_greenmanure, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply liquid ammonia fertilizer to a_field owned by an arable farmer.
Definition at line 677 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_liquidNH3, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply Manganse Sulphate to a_field owned by an arable farmer.
Definition at line 727 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_manganesesulphate, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread manure on a_field owned by an arable farmer.
Definition at line 773 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_manure, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply NPK fertilizer, on a_field owned by an arable farmer.
Definition at line 629 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_npk, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply NPKS fertilizer, on a_field owned by an arable farmer.
Definition at line 602 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_npks, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), harvest1, LE::InsectMortality(), Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), sleep_all_day, and Landscape::SupplyLEPointer().
|
virtual |
Apply PK fertilizer, on a_field owned by an arable farmer.
Definition at line 653 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_pk, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
RSM (ammonium nitrate solution) applied on a_field owned by an arable farmer.
Definition at line 847 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_rsm, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Spread sewege on a_field owned by an arable farmer.
Definition at line 822 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_sludge, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply slurry to a_field owned by an arable farmer.
Definition at line 701 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fp_slurry, g_landscape_p, g_weather, Weather::GetTemp(), LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Apply fungicide to a_field.
Reimplemented in OptimisingFarm.
Definition at line 1279 of file farmfuncs.cpp.
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, fungicide, fungicide_treat, g_landscape_p, g_weather, Weather::GetWind(), LE_SIG_NO_FUNGICIDE, Weather::Raining(), LE::SetLastTreatment(), and LE::SetTramlinesDecay().
int Farm::GetArea | ( | void | ) |
Returns the area of arable fields owned by that farm.
Definition at line 1331 of file farm.cpp.
References tole_Field.
Referenced by OptimisingFarm::ActualProfit(), AssignPermanentCrop(), FarmManager::DumpFarmAreas(), and OptimisingFarm::Match_crop_to_field().
double Farm::GetAreaDouble | ( | void | ) |
Returns the area of arable fields owned by that farm.
Definition at line 1350 of file farm.cpp.
References tole_Field.
Referenced by OptimisingFarm::findTotalArea(), and FarmManager::Save_diff_farm_types_areas().
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
|
inline |
|
inline |
Definition at line 914 of file farm.h.
References m_rotation.
|
inline |
Definition at line 782 of file farm.h.
References m_farm_num.
Referenced by FarmManager::FarmManagement(), and InvIntPartition().
|
protectedvirtual |
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.
Definition at line 1385 of file farm.cpp.
References g_farm_fixed_rotation_enable, g_farm_fixed_rotation_farms_async, and CfgBool::value().
|
protected |
Gets the start date for a crop type.
Definition at line 1582 of file farm.cpp.
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.
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
Returns the next crop in the rotation.
Also provides the possibility of over-riding rotations using configuration settings
Definition at line 1427 of file farm.cpp.
References g_farm_enable_crop_rotation, and CfgBool::value().
|
protected |
Returns the start date of the next crop in the rotation.
Definition at line 864 of file farm.cpp.
References g_farm_fixed_crop_enable, LE::GetRotIndex(), and CfgBool::value().
|
inline |
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
|
inline |
Definition at line 909 of file farm.h.
References m_rotation.
Referenced by Field::GetPreviousCrop().
int Farm::GetTotalArea | ( | void | ) |
|
inline |
|
inline |
|
virtual |
Apply growth regulator to a_field.
Definition at line 1250 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_weather, Weather::GetWind(), growth_regulator, LE_SIG_NO_GROWTH_REG, Weather::Raining(), LE::SetLastTreatment(), and LE::SetTramlinesDecay().
|
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.
Definition at line 882 of file farm.cpp.
References Calendar::Date(), g_date, g_farm_fixed_crop_enable, g_farm_fixed_crop_type, g_letype, LE::GetRotIndex(), LowPriPair< ELEMTYPE >::m_element, FarmEvent::m_field, LowPriPair< ELEMTYPE >::m_pri, PROG_START, LE::SetRotIndex(), LE::SetVegType(), tov_Undefined, LE_TypeClass::TranslateVegTypes(), CfgInt::value(), and CfgBool::value().
|
virtual |
Carry out a harvest on a_field.
Reimplemented in OptimisingFarm.
Definition at line 1769 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, LE::GetInsectPop(), Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), harvest, harvest1, LE::InsectMortality(), LE::ResetDigestability(), LE::SetBirdMaize(), LE::SetBirdSeed(), LE::SetGrowthPhase(), LE::SetInsectPop(), LE::SetLastTreatment(), LE::SetStubble(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out a harvest on a_field.
Definition at line 1821 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB_LONG, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, LE::GetInsectPop(), Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), harvest, harvest1, LE::InsectMortality(), LE::ResetDigestability(), LE::SetBirdMaize(), LE::SetBirdSeed(), LE::SetGrowthPhase(), LE::SetInsectPop(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out hay bailing on a_field.
Definition at line 2184 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), hay_bailing, LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Carry out hay turning on a_field.
Definition at line 2159 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), hay_turning, LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
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.
Definition at line 217 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), heavy_cultivator_aggregate, LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Apply herbicide to a_field.
Reimplemented in OptimisingFarm.
Definition at line 1156 of file farmfuncs.cpp.
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, EL_HERBICIDE_DELAYTIME, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, Weather::GetWind(), herbicide, herbicide_treat, l_farm_herbicide_kills, LE_SIG_NO_HERBICIDE, Weather::Raining(), LE::ReduceWeedBiomass(), LE::SetHerbicideDelay(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and CfgBool::value().
|
virtual |
Do hilling up on a_field, probably of potatoes.
Definition at line 1663 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), hilling_up, LE::InsectMortality(), Weather::Raining(), LE::ReduceWeedBiomass(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
virtual |
Kicks off the farm's management.
Reimplemented in OptimisingFarm, and UserDefinedFarm.
Definition at line 1514 of file farm.cpp.
References Calendar::Date(), g_date, g_farm_fixed_crop_enable, g_farm_fixed_crop_type, g_letype, g_msg, janfirst, 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, tov_YoungForest, LE_TypeClass::TranslateVegTypes(), CfgInt::value(), CfgBool::value(), and MapErrorMsg::Warn().
Referenced by UserDefinedFarm::InitiateManagement(), and OptimisingFarm::InitiateManagement().
|
virtual |
Apply insecticide to a_field.
Reimplemented in OptimisingFarm.
Definition at line 1348 of file farmfuncs.cpp.
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, Weather::GetWind(), insecticide, LE::Insecticide(), insecticide_treat, l_farm_insecticide_kills, LE_SIG_NO_INSECTICIDE, Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), and CfgBool::value().
|
protected |
Finds all possible sums of the integers in the items array.
Definition at line 2493 of file farm.cpp.
References g_msg, GetFarmNumber(), and MapErrorMsg::Warn().
Referenced by AssignPermanentCrop().
|
inline |
|
protected |
Call do function for any crop with an outstanding event. Signal if the crop has terminated.
Definition at line 386 of file farm.cpp.
References g_msg, FarmEvent::m_event, FarmEvent::m_field, FarmEvent::m_run, FarmEvent::m_todo, LE::m_tried_to_do, 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, tov_YoungForest, MapErrorMsg::Warn(), and WARN_FILE.
polylist * Farm::ListOpenFields | ( | int | a_openness | ) |
|
inlinevirtual |
Reimplemented in PesticideTrialTreatment, PesticideTrialToxicControl, PesticideTrialControl, OrganicPlant, and ConventionalPlant.
Definition at line 906 of file farm.h.
References m_stockfarmer.
|
virtual |
|
virtual |
Apply molluscidie to a_field.
Definition at line 1481 of file farmfuncs.cpp.
References Landscape::CheckForPesticideRecord(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, Weather::GetWind(), insecticide, LE_SIG_NO_MOLLUSC, molluscicide, Weather::Raining(), LE::SetLastTreatment(), and LE::SetTramlinesDecay().
|
virtual |
Start a pig grazing event on a_field today or soon.
Definition at line 2112 of file farmfuncs.cpp.
References g_landscape_p, LE::GetUnsprayedMarginPolyRef(), Landscape::SupplyLEPointer(), and LE::TogglePigGrazing().
|
virtual |
Start a pig grazing event on a_field today - no exceptions.
Definition at line 2090 of file farmfuncs.cpp.
References g_landscape_p, LE::GetUnsprayedMarginPolyRef(), l_farm_pig_veg_reduce, pigs_out, LE::ReduceVeg_Extended(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and CfgFloat::value().
|
virtual |
Generate a 'pigs_out' event for every day the cattle are on a_field.
Definition at line 2062 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, LE::GetUnsprayedMarginPolyRef(), l_farm_pig_veg_reduce, pigs_out, LE::ReduceVeg_Extended(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), LE::TogglePigGrazing(), and CfgFloat::value().
|
virtual |
Carry out preseeding cultivation on a_field (tilling set including cultivator and string roller to compact soil)
Definition at line 311 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), preseeding_cultivator, Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out preseeding cultivation together with sow on a_field (tilling and sowing set including cultivator and string roller to compact soil)
Definition at line 337 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), preseeding_cultivator_sow, Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastSownVeg(), LE::SetLastTreatment(), sow, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
inlinevirtual |
|
virtual |
Apply test pesticide to a_field.
Definition at line 1445 of file farmfuncs.cpp.
References cfg_CustomInsecticideKillProp, Landscape::CheckForPesticideRecord(), Pesticide::DailyQueueAdd(), EL_TRAMLINE_DECAYTIME, g_landscape_p, g_pest, g_weather, Weather::GetWind(), LE::Insecticide(), l_farm_insecticide_kills, product_treat, Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), testpesticide, CfgFloat::value(), and CfgBool::value().
|
virtual |
Special pesticide trial functionality.
This methods tests for date limitations
Definition at line 2396 of file farmfuncs.cpp.
References cfg_CustomInsecticideKillProp, cfg_productapplicendyear, cfg_productapplicstartyear, Pesticide::DailyQueueAdd(), EL_TRAMLINE_DECAYTIME, g_landscape_p, g_pest, LE::InsectMortality(), LE::SetLastTreatment(), LE::SetSprayedToday(), LE::SetTramlinesDecay(), Landscape::SupplyYearNumber(), trial_insecticidetreat, CfgInt::value(), and CfgFloat::value().
|
protected |
Reads a rotation file into the rotation.
Definition at line 816 of file farm.cpp.
References g_farmmanager, g_msg, FarmManager::TranslateCropCodes(), and MapErrorMsg::Warn().
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().
void Farm::RemoveField | ( | LE * | a_field | ) |
Removes a field from a farm.
Definition at line 1473 of file farm.cpp.
References g_msg, MapErrorMsg::Warn(), and WARN_BUG.
|
inline |
|
virtual |
Carry out a harrowing between crop rows on a_field.
Definition at line 1510 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::ReduceWeedBiomass(), row_cultivation, LE::SetLastTreatment(), LE::SetTramlinesDecay(), and Landscape::SupplyLEPointer().
|
inline |
|
virtual |
Carry out a shallow harrow event on a_field, e.g., after grass cutting event.
Definition at line 498 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::ReduceVeg(), LE::SetLastTreatment(), shallow_harrow, and Landscape::SupplyLEPointer().
|
virtual |
Nothing to to today on a_field.
Definition at line 241 of file farmfuncs.cpp.
References g_landscape_p, LE::GetUnsprayedMarginPolyRef(), LE::SetLastTreatment(), sleep_all_day, and Landscape::SupplyLEPointer().
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Carry out a harrow event in the spring on a_field.
Definition at line 471 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), spring_harrow, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a ploughing event in the spring on a_field.
Definition at line 444 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), spring_plough, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a roll event in the spring on a_field.
Definition at line 525 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), spring_roll, and Landscape::SupplyLEPointer().
|
virtual |
Carry out a sowing event in the spring on a_field.
Definition at line 546 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastSownVeg(), LE::SetLastTreatment(), sow, spring_sow, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out a sowing event with start fertilizer in the spring on a_field.
Definition at line 574 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetGrowthPhase(), LE::SetLastSownVeg(), LE::SetLastTreatment(), sow, spring_sow_with_ferti, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out straw chopping on a_field.
Definition at line 2132 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), straw_chopping, and Landscape::SupplyLEPointer().
|
virtual |
Straw covering applied on a_field.
Definition at line 2502 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), straw_covering, and Landscape::SupplyLEPointer().
|
virtual |
Straw covering applied on a_field.
Definition at line 2524 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), straw_removal, and Landscape::SupplyLEPointer().
|
virtual |
Carry out a mechanical weeding on a_field.
Definition at line 1545 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_STRIGLING_DELAYTIME, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::ReduceWeedBiomass(), LE::SetHerbicideDelay(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), strigling, and Landscape::SupplyLEPointer().
|
virtual |
Carry out a mechanical weeding on a_field followed by hilling up (probably on potatoes)
Definition at line 1635 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::ReduceWeedBiomass(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), strigling_hill, and Landscape::SupplyLEPointer().
|
virtual |
Carry out a mechanical weeding followed by sowing on a_field.
Definition at line 1597 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, EL_STRIGLING_DELAYTIME, EL_TRAMLINE_DECAYTIME, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::ReduceWeedBiomass(), LE::SetHerbicideDelay(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), strigling_sow, and Landscape::SupplyLEPointer().
|
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)
Definition at line 193 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), stubble_cultivator_heavy, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Carry out stubble harrowing on a_field.
Definition at line 2209 of file farmfuncs.cpp.
References Calendar::Date(), DO_IT_PROB, g_date, g_landscape_p, g_weather, Weather::GetRainPeriod(), LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), LE::SetLastTreatment(), stubble_harrowing, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
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)
Definition at line 169 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), stubble_plough, Landscape::SupplyLEPointer(), and LE::ZeroVeg().
|
virtual |
Cut the crop on a_field and leave it lying (probably rape)
Definition at line 1744 of file farmfuncs.cpp.
References DO_IT_PROB, EL_TRAMLINE_DECAYTIME, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), LE::SetTramlinesDecay(), Landscape::SupplyLEPointer(), and swathing.
|
virtual |
Carry out a watering on a_field.
Definition at line 1717 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), and water.
|
virtual |
Carry out a ploughing event in the winter on a_field.
Definition at line 392 of file farmfuncs.cpp.
References DO_IT_PROB, g_landscape_p, g_weather, LE::GetUnsprayedMarginPolyRef(), LE::InsectMortality(), Weather::Raining(), LE::SetLastTreatment(), Landscape::SupplyLEPointer(), winter_plough, and LE::ZeroVeg().
|
protected |
|
protected |
|
protected |
Farm's centroid, value x. Equal to the average of the x centroid values of all farm's fields.
Definition at line 959 of file farm.h.
Referenced by Centroids(), GetCentroids(), and OptimisingFarm::GetFarmCentroidX().
|
protected |
Farm's centroid, value y. Equal to the average of the y centroid values of all farm's fields.
Definition at line 961 of file farm.h.
Referenced by Centroids(), GetCentroids(), and OptimisingFarm::GetFarmCentroidY().
|
protected |
Definition at line 944 of file farm.h.
Referenced by GetFarmNumber(), and SetFarmNumber().
|
protected |
Definition at line 940 of file farm.h.
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().
|
protected |
Definition at line 937 of file farm.h.
Referenced by OptimisingFarm::ActualProfit(), AssignPermanentCrop(), Centroids(), GetMaxOpenness(), GetNoFields(), GetValidCoords(), OptimisingFarm::InitiateManagement(), ListOpenFields(), and OptimisingFarm::Match_crop_to_field().
|
protected |
A list of hunters allocated to this farm.
Definition at line 942 of file farm.h.
Referenced by AddHunter(), and RemoveHunter().
|
protected |
Definition at line 946 of file farm.h.
Referenced by GetIntensity().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Pointer to the FarmManager.
Definition at line 935 of file farm.h.
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().
|
protected |
|
protected |
|
protected |
Definition at line 939 of file farm.h.
Referenced by OptimisingFarm::Init(), OptimisingFarm::InitiateManagement(), OptimisingFarm::Make_rotations(), and UserDefinedFarm::UserDefinedFarm().
|
protected |
|
protected |
Definition at line 938 of file farm.h.
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().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 943 of file farm.h.
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().
|
protected |
|
protected |
|
protected |
|
protected |