Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Farm.cpp File Reference

Farm.cpp This file contains the source for the Farm class
More...

#include <string.h>
#include <algorithm>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include "../ALMaSSDefines.h"
#include <math.h>
#include <time.h>
#include <unordered_set>
#include <random>
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../People/Farmers/Farmer.h"
#include "../Landscape/cropprogs/BroadBeans.h"
#include "../Landscape/cropprogs/Carrots.h"
#include "../Landscape/cropprogs/CloverGrassGrazed1.h"
#include "../Landscape/cropprogs/CloverGrassGrazed2.h"
#include "../Landscape/cropprogs/FieldPeas.h"
#include "../Landscape/cropprogs/FieldPeasSilage.h"
#include "../Landscape/cropprogs/FodderBeet.h"
#include "../Landscape/cropprogs/GenericCatchCrop.h"
#include "../Landscape/cropprogs/SugarBeet.h"
#include "../Landscape/cropprogs/FodderGrass.h"
#include "../Landscape/cropprogs/Maize.h"
#include "../Landscape/cropprogs/Horticulture.h"
#include "../Landscape/cropprogs/MaizeSilage.h"
#include "../Landscape/cropprogs/OFodderBeet.h"
#include "../Landscape/cropprogs/OMaizeSilage.h"
#include "../Landscape/cropprogs/OBarleyPeaCloverGrass.h"
#include "../Landscape/cropprogs/OSBarleySilage.h"
#include "../Landscape/cropprogs/OCarrots.h"
#include "../Landscape/cropprogs/OCloverGrassGrazed1.h"
#include "../Landscape/cropprogs/OCloverGrassGrazed2.h"
#include "../Landscape/cropprogs/OCloverGrassSilage1.h"
#include "../Landscape/cropprogs/OFirstYearDanger.h"
#include "../Landscape/cropprogs/OGrazingPigs.h"
#include "../Landscape/cropprogs/OPermanentGrassGrazed.h"
#include "../Landscape/cropprogs/OSeedGrass1.h"
#include "../Landscape/cropprogs/OSeedGrass2.h"
#include "../Landscape/cropprogs/OSpringBarleyPigs.h"
#include "../Landscape/cropprogs/OFieldPeas.h"
#include "../Landscape/cropprogs/OFieldPeasSilage.h"
#include "../Landscape/cropprogs/OrchardCrop.h"
#include "../Landscape/cropprogs/OOats.h"
#include "../Landscape/cropprogs/Oats.h"
#include "../Landscape/cropprogs/OPotatoes.h"
#include "../Landscape/cropprogs/OSpringBarley.h"
#include "../Landscape/cropprogs/OSpringBarleyExt.h"
#include "../Landscape/cropprogs/OWinterBarley.h"
#include "../Landscape/cropprogs/OWinterBarleyExt.h"
#include "../Landscape/cropprogs/OWinterRape.h"
#include "../Landscape/cropprogs/OWinterRye.h"
#include "../Landscape/cropprogs/OWinterWheat.h"
#include "../Landscape/cropprogs/OWinterWheatUndersown.h"
#include "../Landscape/cropprogs/OWinterWheatUndersownExt.h"
#include "../Landscape/cropprogs/PermanentGrassGrazed.h"
#include "../Landscape/cropprogs/PermanentGrassLowYield.h"
#include "../Landscape/cropprogs/PermanentGrassTussocky.h"
#include "../Landscape/cropprogs/PermanentSetAside.h"
#include "../Landscape/cropprogs/Potatoes.h"
#include "../Landscape/cropprogs/PotatoesIndustry.h"
#include "../Landscape/cropprogs/SeedGrass1.h"
#include "../Landscape/cropprogs/SeedGrass2.h"
#include "../Landscape/cropprogs/SetAside.h"
#include "../Landscape/cropprogs/SpringBarley.h"
#include "../Landscape/cropprogs/SpringBarleySpr.h"
#include "../Landscape/cropprogs/SpringBarleyPTreatment.h"
#include "../Landscape/cropprogs/SpringBarleySKManagement.h"
#include "../Landscape/cropprogs/SpringBarleyCloverGrass.h"
#include "../Landscape/cropprogs/SpringBarleySeed.h"
#include "../Landscape/cropprogs/SpringBarleySilage.h"
#include "../Landscape/cropprogs/SpringRape.h"
#include "../Landscape/cropprogs/Triticale.h"
#include "../Landscape/cropprogs/OTriticale.h"
#include "../Landscape/cropprogs/WinterBarley.h"
#include "../Landscape/cropprogs/WinterRape.h"
#include "../Landscape/cropprogs/WinterRye.h"
#include "../Landscape/cropprogs/WinterWheat.h"
#include "../Landscape/cropprogs/WinterWheatStrigling.h"
#include "../Landscape/cropprogs/WinterWheatStriglingCulm.h"
#include "../Landscape/cropprogs/WinterWheatStriglingSingle.h"
#include "../Landscape/cropprogs/SpringBarleyCloverGrassStrigling.h"
#include "../Landscape/cropprogs/SpringBarleyStrigling.h"
#include "../Landscape/cropprogs/SpringBarleyStriglingCulm.h"
#include "../Landscape/cropprogs/SpringBarleyStriglingSingle.h"
#include "../Landscape/cropprogs/MaizeStrigling.h"
#include "../Landscape/cropprogs/WinterRapeStrigling.h"
#include "../Landscape/cropprogs/WinterRyeStrigling.h"
#include "../Landscape/cropprogs/WinterBarleyStrigling.h"
#include "../Landscape/cropprogs/FieldPeasStrigling.h"
#include "../Landscape/cropprogs/SpringBarleyPeaCloverGrassStrigling.h"
#include "../Landscape/cropprogs/YoungForest.h"
#include "../Landscape/cropprogs/NorwegianPotatoes.h"
#include "../Landscape/cropprogs/NorwegianOats.h"
#include "../Landscape/cropprogs/NorwegianSpringBarley.h"
#include "../Landscape/cropprogs/PLWinterWheat.h"
#include "../Landscape/cropprogs/PLWinterRape.h"
#include "../Landscape/cropprogs/PLWinterBarley.h"
#include "../Landscape/cropprogs/PLWinterTriticale.h"
#include "../Landscape/cropprogs/PLWinterRye.h"
#include "../Landscape/cropprogs/PLSpringWheat.h"
#include "../Landscape/cropprogs/PLSpringBarley.h"
#include "../Landscape/cropprogs/PLMaize.h"
#include "../Landscape/cropprogs/PLMaizeSilage.h"
#include "../Landscape/cropprogs/PLPotatoes.h"
#include "../Landscape/cropprogs/PLBeet.h"
#include "../Landscape/cropprogs/PLFodderLucerne1.h"
#include "../Landscape/cropprogs/PLFodderLucerne2.h"
#include "../Landscape/cropprogs/PLCarrots.h"
#include "../Landscape/cropprogs/PLSpringBarleySpr.h"
#include "../Landscape/cropprogs/PLWinterWheatLate.h"
#include "../Landscape/cropprogs/PLBeetSpr.h"
#include "../Landscape/cropprogs/PLBeans.h"
#include "../Landscape/cropprogs/NLBeet.h"
#include "../Landscape/cropprogs/NLCarrots.h"
#include "../Landscape/cropprogs/NLMaize.h"
#include "../Landscape/cropprogs/NLPotatoes.h"
#include "../Landscape/cropprogs/NLSpringBarley.h"
#include "../Landscape/cropprogs/NLWinterWheat.h"
#include "../Landscape/cropprogs/NLCabbage.h"
#include "../Landscape/cropprogs/NLTulips.h"
#include "../Landscape/cropprogs/NLGrassGrazed1.h"
#include "../Landscape/cropprogs/NLGrassGrazed1Spring.h"
#include "../Landscape/cropprogs/NLGrassGrazed2.h"
#include "../Landscape/cropprogs/NLGrassGrazedLast.h"
#include "../Landscape/cropprogs/NLPermanentGrassGrazed.h"
#include "../Landscape/cropprogs/NLBeetSpring.h"
#include "../Landscape/cropprogs/NLCarrotsSpring.h"
#include "../Landscape/cropprogs/NLMaizeSpring.h"
#include "../Landscape/cropprogs/NLPotatoesSpring.h"
#include "../Landscape/cropprogs/NLSpringBarleySpring.h"
#include "../Landscape/cropprogs/NLCabbageSpring.h"
#include "../Landscape/cropprogs/NLCatchCropPea.h"
#include "../Landscape/cropprogs/NLOrchardCrop.h"
#include "../Landscape/cropprogs/NLPermanentGrassGrazedExtensive.h"
#include "../Landscape/cropprogs/NLGrassGrazedExtensive1.h"
#include "../Landscape/cropprogs/NLGrassGrazedExtensive1Spring.h"
#include "../Landscape/cropprogs/NLGrassGrazedExtensive2.h"
#include "../Landscape/cropprogs/NLGrassGrazedExtensiveLast.h"
#include "../Landscape/cropprogs/UKBeans.h"
#include "../Landscape/cropprogs/UKBeet.h"
#include "../Landscape/cropprogs/UKMaize.h"
#include "../Landscape/cropprogs/UKPermanentGrass.h"
#include "../Landscape/cropprogs/UKPotatoes.h"
#include "../Landscape/cropprogs/UKSpringBarley.h"
#include "../Landscape/cropprogs/UKTempGrass.h"
#include "../Landscape/cropprogs/UKWinterBarley.h"
#include "../Landscape/cropprogs/UKWinterRape.h"
#include "../Landscape/cropprogs/UKWinterWheat.h"
#include "../Landscape/cropprogs/PTPermanentGrassGrazed.h"
#include "../Landscape/cropprogs/PTWinterWheat.h"
#include "../Landscape/cropprogs/PTGrassGrazed.h"
#include "../Landscape/cropprogs/PTSorghum.h"
#include "../Landscape/cropprogs/PTFodderMix.h"
#include "../Landscape/cropprogs/PTTurnipGrazed.h"
#include "../Landscape/cropprogs/PTCloverGrassGrazed1.h"
#include "../Landscape/cropprogs/PTCloverGrassGrazed2.h"
#include "../Landscape/cropprogs/PTTriticale.h"
#include "../Landscape/cropprogs/PTOtherDryBeans.h"
#include "../Landscape/cropprogs/PTSetAside.h"
#include "../Landscape/cropprogs/PTShrubPastures.h"
#include "../Landscape/cropprogs/PTCorkOak.h"
#include "../Landscape/cropprogs/PTVineyards.h"
#include "../Landscape/cropprogs/PTWinterBarley.h"
#include "../Landscape/cropprogs/PTBeans.h"
#include "../Landscape/cropprogs/PTWinterRye.h"
#include "../Landscape/cropprogs/PTRyegrass.h"
#include "../Landscape/cropprogs/PTYellowLupin.h"
#include "../Landscape/cropprogs/PTMaize.h"
#include "../Landscape/cropprogs/PTMaize_Hort.h"
#include "../Landscape/cropprogs/PTOats.h"
#include "../Landscape/cropprogs/PTPotatoes.h"
#include "../Landscape/cropprogs/PTHorticulture.h"
#include "../Landscape/cropprogs/PTCabbage.h"
#include "../Landscape/cropprogs/PTCabbage_Hort.h"
#include "../Landscape/cropprogs/PTOliveGroveTraditional.h"
#include "../Landscape/cropprogs/PTOliveGroveTradOrganic.h"
#include "../Landscape/cropprogs/PTOliveGroveIntensive.h"
#include "../Landscape/cropprogs/PTOliveGroveSuperIntensive.h"
#include "../Landscape/cropprogs/DE_SugarBeet.h"
#include "../Landscape/cropprogs/DE_Cabbage.h"
#include "../Landscape/cropprogs/DE_Carrots.h"
#include "../Landscape/cropprogs/DE_GrasslandSilageAnnual.h"
#include "../Landscape/cropprogs/DE_GreenFallow_1year.h"
#include "../Landscape/cropprogs/DE_Legumes.h"
#include "../Landscape/cropprogs/DE_Maize.h"
#include "../Landscape/cropprogs/DE_MaizeSilage.h"
#include "../Landscape/cropprogs/DE_Oats.h"
#include "../Landscape/cropprogs/DE_OCabbages.h"
#include "../Landscape/cropprogs/DE_OCarrots.h"
#include "../Landscape/cropprogs/DE_OGrasslandSilageAnnual.h"
#include "../Landscape/cropprogs/DE_OGreenFallow_1year.h"
#include "../Landscape/cropprogs/DE_OLegume.h"
#include "../Landscape/cropprogs/DE_OMaize.h"
#include "../Landscape/cropprogs/DE_OMaizeSilage.h"
#include "../Landscape/cropprogs/DE_OOats.h"
#include "../Landscape/cropprogs/DE_OPeas.h"
#include "../Landscape/cropprogs/DE_OPermanentGrassGrazed.h"
#include "../Landscape/cropprogs/DE_OPotatoes.h"
#include "../Landscape/cropprogs/DE_OSpringRye.h"
#include "../Landscape/cropprogs/DE_OSugarBeet.h"
#include "../Landscape/cropprogs/DE_OTriticale.h"
#include "../Landscape/cropprogs/DE_OWinterBarley.h"
#include "../Landscape/cropprogs/DE_OWinterRape.h"
#include "../Landscape/cropprogs/DE_OWinterRye.h"
#include "../Landscape/cropprogs/DE_OWinterWheat.h"
#include "../Landscape/cropprogs/DE_Peas.h"
#include "../Landscape/cropprogs/DE_PermanentGrassGrazed.h"
#include "../Landscape/cropprogs/DE_PermanentGrassLowYield.h"
#include "../Landscape/cropprogs/DE_Potatoes.h"
#include "../Landscape/cropprogs/DE_PotatoesIndustry.h"
#include "../Landscape/cropprogs/DE_SpringRye.h"
#include "../Landscape/cropprogs/DE_Triticale.h"
#include "../Landscape/cropprogs/DE_WinterRye.h"
#include "../Landscape/cropprogs/DE_WinterBarley.h"
#include "../Landscape/cropprogs/DE_WinterRape.h"
#include "../Landscape/cropprogs/DE_WinterWheat.h"
#include "../Landscape/cropprogs/DE_WinterWheatLate.h"
#include "../Landscape/cropprogs/DE_AsparagusEstablishedPlantation.h"
#include "../Landscape/cropprogs/DE_HerbsPerennial_1year.h"
#include "../Landscape/cropprogs/DE_HerbsPerennial_after1year.h"
#include "../Landscape/cropprogs/DE_SpringBarley.h"
#include "../Landscape/cropprogs/DE_Orchard.h"
#include "../Landscape/cropprogs/DE_BushFruitPerm.h"
#include "../Landscape/cropprogs/DE_OOrchard.h"
#include "../Landscape/cropprogs/DE_OBushFruitPerm.h"
#include "../Landscape/cropprogs/DE_OPermanentGrassLowYield.h"
#include "../Landscape/cropprogs/DE_OAsparagusEstablishedPlantation.h"
#include "../Landscape/cropprogs/DE_OHerbsPerennial_1year.h"
#include "../Landscape/cropprogs/DE_OHerbsPerennial_after1year.h"
#include "../Landscape/cropprogs/DK_OLegume_Peas.h"
#include "../Landscape/cropprogs/DK_OLegume_Beans.h"
#include "../Landscape/cropprogs/DK_OLegume_Whole.h"
#include "../Landscape/cropprogs/DK_SugarBeet.h"
#include "../Landscape/cropprogs/DK_OSugarBeet.h"
#include "../Landscape/cropprogs/DK_Cabbages.h"
#include "../Landscape/cropprogs/DK_OCabbages.h"
#include "../Landscape/cropprogs/DK_Carrots.h"
#include "../Landscape/cropprogs/DK_OLegumeCloverGrass_Whole.h"
#include "../Landscape/cropprogs/DK_OCarrots.h"
#include "../Landscape/cropprogs/DK_Legume_Whole.h"
#include "../Landscape/cropprogs/DK_Legume_Peas.h"
#include "../Landscape/cropprogs/DK_Legume_Beans.h"
#include "../Landscape/cropprogs/DK_WinterWheat.h"
#include "../Landscape/cropprogs/DK_OWinterWheat.h"
#include "../Landscape/cropprogs/DK_SpringBarley.h"
#include "../Landscape/cropprogs/DK_OSpringBarley.h"
#include "../Landscape/cropprogs/DK_CerealLegume.h"
#include "../Landscape/cropprogs/DK_OCerealLegume.h"
#include "../Landscape/cropprogs/DK_CerealLegume_Whole.h"
#include "../Landscape/cropprogs/DK_OCerealLegume_Whole.h"
#include "../Landscape/cropprogs/DK_WinterCloverGrassGrazedSown.h"
#include "../Landscape/cropprogs/DK_CloverGrassGrazed1.h"
#include "../Landscape/cropprogs/DK_CloverGrassGrazed2.h"
#include "../Landscape/cropprogs/DK_CloverGrassGrazed3.h"
#include "../Landscape/cropprogs/DK_EnergyCrop_Perm.h"
#include "../Landscape/cropprogs/DK_OWinterCloverGrassGrazedSown.h"
#include "../Landscape/cropprogs/DK_OCloverGrassGrazed1.h"
#include "../Landscape/cropprogs/DK_OCloverGrassGrazed2.h"
#include "../Landscape/cropprogs/DK_OCloverGrassGrazed3.h"
#include "../Landscape/cropprogs/DK_BushFruit_Perm1.h"
#include "../Landscape/cropprogs/DK_BushFruit_Perm2.h"
#include "../Landscape/cropprogs/DK_OBushFruit_Perm1.h"
#include "../Landscape/cropprogs/DK_OBushFruit_Perm2.h"
#include "../Landscape/cropprogs/DK_ChristmasTrees_Perm.h"
#include "../Landscape/cropprogs/DK_OChristmasTrees_Perm.h"
#include "../Landscape/cropprogs/DK_OOrchardCrop_Perm.h"
#include "../Landscape/cropprogs/DK_OrchardCrop_Perm.h"
#include "../Landscape/cropprogs/DK_SetAside.h"
#include "../Landscape/cropprogs/DK_SetAside_SummerMow.h"
#include "../Landscape/cropprogs/DK_OEnergyCrop_Perm.h"
#include "../Landscape/cropprogs/DK_OSetAside.h"
#include "../Landscape/cropprogs/DK_SeedGrassFescue_Spring.h"
#include "../Landscape/cropprogs/DK_SeedGrassRye_Spring.h"
#include "../Landscape/cropprogs/DK_GrassGrazed_Perm.h"
#include "../Landscape/cropprogs/DK_GrassTussocky_Perm.h"
#include "../Landscape/cropprogs/DK_SpringFodderGrass.h"
#include "../Landscape/cropprogs/DK_WinterFodderGrass.h"
#include "../Landscape/cropprogs/DK_PotatoIndustry.h"
#include "../Landscape/cropprogs/DK_PotatoSeed.h"
#include "../Landscape/cropprogs/DK_Potato.h"
#include "../Landscape/cropprogs/DK_SpringBarley_Green.h"
#include "../Landscape/cropprogs/DK_SpringBarleySilage.h"
#include "../Landscape/cropprogs/DK_Maize.h"
#include "../Landscape/cropprogs/DK_MaizeSilage.h"
#include "../Landscape/cropprogs/DK_SpringOats.h"
#include "../Landscape/cropprogs/DK_SpringWheat.h"
#include "../Landscape/cropprogs/DK_FodderBeet.h"
#include "../Landscape/cropprogs/DK_WinterBarley.h"
#include "../Landscape/cropprogs/DK_WinterRye.h"
#include "../Landscape/cropprogs/DK_WinterRape.h"
#include "../Landscape/cropprogs/DK_FarmForest_Perm.h"
#include "../Landscape/cropprogs/DK_OFarmForest_Perm.h"
#include "../Landscape/cropprogs/DK_FarmYoungForest_Perm.h"
#include "../Landscape/cropprogs/DK_OFarmYoungForest_Perm.h"
#include "../Landscape/cropprogs/DK_PlantNursery_Perm.h"
#include "../Landscape/cropprogs/DK_GrazingPigs_Perm.h"
#include "../Landscape/cropprogs/DK_OGrazingPigs_Perm.h"
#include "../Landscape/cropprogs/DK_GrazingPigs.h"
#include "../Landscape/cropprogs/DK_OGrazingPigs.h"
#include "../Landscape/cropprogs/DK_GrassLowYield_Perm.h"
#include "../Landscape/cropprogs/DK_OGrassLowYield_Perm.h"
#include "../Landscape/cropprogs/DK_OFodderBeet.h"
#include "../Landscape/cropprogs/DK_OWinterFodderGrass.h"
#include "../Landscape/cropprogs/DK_OSpringFodderGrass.h"
#include "../Landscape/cropprogs/DK_OGrassGrazed_Perm.h"
#include "../Landscape/cropprogs/DK_OrchApple.h"
#include "../Landscape/cropprogs/DK_OrchPear.h"
#include "../Landscape/cropprogs/DK_OrchCherry.h"
#include "../Landscape/cropprogs/DK_OrchOther.h"
#include "../Landscape/cropprogs/DK_OOrchApple.h"
#include "../Landscape/cropprogs/DK_OOrchPear.h"
#include "../Landscape/cropprogs/DK_OOrchCherry.h"
#include "../Landscape/cropprogs/DK_OOrchOther.h"
#include "../Landscape/cropprogs/DK_CatchCrop.h"
#include "../Landscape/cropprogs/DK_OCatchCrop.h"
#include "../Landscape/cropprogs/DK_MixedVeg.h"
#include "../Landscape/cropprogs/DK_OMaize.h"
#include "../Landscape/cropprogs/DK_OMaizeSilage.h"
#include "../Landscape/cropprogs/DK_OMixedVeg.h"
#include "../Landscape/cropprogs/DK_OPotato.h"
#include "../Landscape/cropprogs/DK_OPotatoIndustry.h"
#include "../Landscape/cropprogs/DK_OPotatoSeed.h"
#include "../Landscape/cropprogs/DK_OptimalFlowerMix1.h"
#include "../Landscape/cropprogs/DK_OptimalFlowerMix2.h"
#include "../Landscape/cropprogs/DK_OptimalFlowerMix3.h"
#include "../Landscape/cropprogs/DK_OSeedGrassRye_Spring.h"
#include "../Landscape/cropprogs/DK_OSpringBarleySilage.h"
#include "../Landscape/cropprogs/DK_OSpringOats.h"
#include "../Landscape/cropprogs/DK_OSpringWheat.h"
#include "../Landscape/cropprogs/DK_OVegSeeds.h"
#include "../Landscape/cropprogs/DK_OWinterBarley.h"
#include "../Landscape/cropprogs/DK_OWinterRape.h"
#include "../Landscape/cropprogs/DK_OWinterRye.h"
#include "../Landscape/cropprogs/DK_VegSeeds.h"
#include "../Landscape/cropprogs/DK_SpringBarleyCloverGrass.h"
#include "../Landscape/cropprogs/DK_OSpringBarleyCloverGrass.h"
#include "../Landscape/cropprogs/DK_OWinterRye_CC.h"
#include "../Landscape/cropprogs/DK_WinterRye_CC.h"
#include "../Landscape/cropprogs/DK_OWinterWheat_CC.h"
#include "../Landscape/cropprogs/DK_WinterWheat_CC.h"
#include "../Landscape/cropprogs/DK_OSpringBarley_CC.h"
#include "../Landscape/cropprogs/DK_SpringBarley_CC.h"
#include "../Landscape/cropprogs/DK_OSpringOats_CC.h"
#include "../Landscape/cropprogs/DK_SpringOats_CC.h"
#include "../Landscape/cropprogs/DK_OLegume_Peas_CC.h"
#include "../Landscape/cropprogs/DK_OLegume_Beans_CC.h"
#include "../Landscape/cropprogs/DK_OLegume_Whole_CC.h"
#include "../Landscape/cropprogs/DK_OLupines.h"
#include "../Landscape/cropprogs/DK_OLentils.h"
#include "../Landscape/cropprogs/DK_OSetAside_AnnualFlower.h"
#include "../Landscape/cropprogs/DK_OSetAside_PerennialFlower.h"
#include "../Landscape/cropprogs/DK_OSetAside_SummerMow.h"
#include "../Landscape/cropprogs/FI_WinterWheat.h"
#include "../Landscape/cropprogs/FI_OWinterWheat.h"
#include "../Landscape/cropprogs/FI_SugarBeet.h"
#include "../Landscape/cropprogs/FI_StarchPotato_North.h"
#include "../Landscape/cropprogs/FI_StarchPotato_South.h"
#include "../Landscape/cropprogs/FI_OStarchPotato_North.h"
#include "../Landscape/cropprogs/FI_OStarchPotato_South.h"
#include "../Landscape/cropprogs/FI_SpringWheat.h"
#include "../Landscape/cropprogs/FI_OSpringWheat.h"
#include "../Landscape/cropprogs/FI_TurnipRape.h"
#include "../Landscape/cropprogs/FI_OTurnipRape.h"
#include "../Landscape/cropprogs/FI_SpringRape.h"
#include "../Landscape/cropprogs/FI_OSpringRape.h"
#include "../Landscape/cropprogs/FI_WinterRye.h"
#include "../Landscape/cropprogs/FI_OWinterRye.h"
#include "../Landscape/cropprogs/FI_Potato_North.h"
#include "../Landscape/cropprogs/FI_Potato_South.h"
#include "../Landscape/cropprogs/FI_OPotato_North.h"
#include "../Landscape/cropprogs/FI_OPotato_South.h"
#include "../Landscape/cropprogs/FI_PotatoIndustry_North.h"
#include "../Landscape/cropprogs/FI_PotatoIndustry_South.h"
#include "../Landscape/cropprogs/FI_OPotatoIndustry_North.h"
#include "../Landscape/cropprogs/FI_OPotatoIndustry_South.h"
#include "../Landscape/cropprogs/FI_SpringOats.h"
#include "../Landscape/cropprogs/FI_OSpringOats.h"
#include "../Landscape/cropprogs/FI_SpringBarley_Malt.h"
#include "../Landscape/cropprogs/FI_OSpringBarley_Malt.h"
#include "../Landscape/cropprogs/FI_FabaBean.h"
#include "../Landscape/cropprogs/FI_OFabaBean.h"
#include "../Landscape/cropprogs/FI_SpringBarley_Fodder.h"
#include "../Landscape/cropprogs/FI_SprSpringBarley_Fodder.h"
#include "../Landscape/cropprogs/FI_OSpringBarley_Fodder.h"
#include "../Landscape/cropprogs/FI_GrasslandPasturePerennial1.h"
#include "../Landscape/cropprogs/FI_GrasslandPasturePerennial2.h"
#include "../Landscape/cropprogs/FI_GrasslandSilagePerennial1.h"
#include "../Landscape/cropprogs/FI_GrasslandSilagePerennial2.h"
#include "../Landscape/cropprogs/FI_NaturalGrassland.h"
#include "../Landscape/cropprogs/FI_NaturalGrassland_Perm.h"
#include "../Landscape/cropprogs/FI_FeedingGround.h"
#include "../Landscape/cropprogs/FI_BufferZone.h"
#include "../Landscape/cropprogs/FI_BufferZone_Perm.h"
#include "../Landscape/cropprogs/FI_GreenFallow_1year.h"
#include "../Landscape/cropprogs/FI_GreenFallow_Perm.h"
#include "../Landscape/cropprogs/FI_GrasslandSilageAnnual.h"
#include "../Landscape/cropprogs/FI_Caraway1.h"
#include "../Landscape/cropprogs/FI_Caraway2.h"
#include "../Landscape/cropprogs/FI_OCaraway1.h"
#include "../Landscape/cropprogs/FI_OCaraway2.h"
#include "../Landscape/cropprogs/SE_SpringBarley.h"
#include "../Landscape/cropprogs/SE_WinterRape_Seed.h"
#include "../Landscape/cropprogs/SE_WinterWheat.h"
#include "../Landscape/cropprogs/FR_WinterWheat.h"
#include "../Landscape/cropprogs/FR_WinterBarley.h"
#include "../Landscape/cropprogs/FR_WinterTriticale.h"
#include "../Landscape/cropprogs/FR_WinterRape.h"
#include "../Landscape/cropprogs/FR_Maize.h"
#include "../Landscape/cropprogs/FR_Maize_Silage.h"
#include "../Landscape/cropprogs/FR_SpringBarley.h"
#include "../Landscape/cropprogs/FR_Grassland.h"
#include "../Landscape/cropprogs/FR_Grassland_Perm.h"
#include "../Landscape/cropprogs/FR_SpringOats.h"
#include "../Landscape/cropprogs/FR_Sunflower.h"
#include "../Landscape/cropprogs/FR_SpringWheat.h"
#include "../Landscape/cropprogs/FR_Potatoes.h"
#include "../Landscape/cropprogs/FR_Sorghum.h"
#include "../Landscape/cropprogs/ITGrassland.h"
#include "../Landscape/cropprogs/ITOrchard.h"
#include "../Landscape/cropprogs/ITOOrchard.h"
#include "../Landscape/cropprogs/DummyCropPestTesting.h"
#include "../Landscape/cropprogs/BEBeet.h"
#include "../Landscape/cropprogs/BECatchPeaCrop.h"
#include "../Landscape/cropprogs/BEGrassGrazed1Spring.h"
#include "../Landscape/cropprogs/BEGrassGrazedLast.h"
#include "../Landscape/cropprogs/BEMaizeSpring.h"
#include "../Landscape/cropprogs/BEPotatoes.h"
#include "../Landscape/cropprogs/BEWinterBarley.h"
#include "../Landscape/cropprogs/BEBeetSpring.h"
#include "../Landscape/cropprogs/BEGrassGrazed1.h"
#include "../Landscape/cropprogs/BEGrassGrazed2.h"
#include "../Landscape/cropprogs/BEMaize.h"
#include "../Landscape/cropprogs/BEOrchardCrop.h"
#include "../Landscape/cropprogs/BEPotatoesSpring.h"
#include "../Landscape/cropprogs/BEWinterWheat.h"
#include "../Landscape/cropprogs/BEWinterWheatCC.h"
#include "../Landscape/cropprogs/BEMaizeCC.h"
#include "../Landscape/cropprogs/BEWinterBarleyCC.h"
#include "../Landscape/cropprogs/IRSpringWheat.h"
#include "../Landscape/cropprogs/IRSpringBarley.h"
#include "../Landscape/cropprogs/IRSpringOats.h"
#include "../Landscape/cropprogs/IRGrassland_no_reseed.h"
#include "../Landscape/cropprogs/IRGrassland_reseed.h"
#include "../Landscape/cropprogs/IRWinterBarley.h"
#include "../Landscape/cropprogs/IRWinterWheat.h"
#include "../Landscape/cropprogs/IRWinterOats.h"
#include "../Landscape/Map_cfg.h"
#include "Farm.h"

Macros

#define _CRT_SECURE_NO_DEPRECATE
 
#define _CRTDBG_MAP_ALLOC
 
#define _CRT_SECURE_NO_DEPRECATE
 

Functions

bool CompPcts (tpct i, tpct j)
 Used for sorting a farmers field size vector. More...
 

Variables

std::mt19937 g_generator
 
Landscapeg_landscape_ptr
 
CfgBool cfg_UseFarmerNetworks ("USE_FARMER_NETWORKS", CFG_CUSTOM, false)
 Used to enable/disable farmer networks. More...
 
CfgBool cfg_UseOnlySpatialNetwork ("USE_ONLY_SPATIAL_NETWORKS", CFG_CUSTOM, true)
 Used to enable/disable others networks than spatial network. More...
 
CfgInt cfg_NumberNeighboursSpatial ("NUMBER_NEIGHBOURS_SPATIAL", CFG_CUSTOM, 5)
 
CfgInt cfg_NumberNeighboursVirtual ("NUMBER_NEIGHBOURS_VIRTUAL", CFG_CUSTOM, 0)
 
CfgInt cfg_NumberNeighboursAssociative ("NUMBER_NEIGHBOURS_ASSOCIATIVE", CFG_CUSTOM, 0)
 
CfgFloat cfg_DKCatchCropPct ("DKCATCHCROPPCT", CFG_CUSTOM, 1.00)
 
CfgFloat cfg_DKCatchCropLegumePct ("DKCATCHCROPLEGUMEPCT", CFG_CUSTOM, 1.00)
 
CfgFloat cfg_NLCatchCropPct ("NLCATCHCROPPCT", CFG_CUSTOM, 1.00)
 
CfgFloat cfg_PTHorticulturePct ("PTHORTICULTUREPCT", CFG_CUSTOM, 1.00)
 
CfgFloat cfg_OliveGroveIntensivePct ("OLIVEGROVEINTENSIVEPCT", CFG_CUSTOM, 1.00)
 Used to define the type of management in olive gorves. By default all are managed intensively. Needs to sup up to 1.00. More...
 
CfgFloat cfg_OliveGroveSuperIntensivePct ("OLIVEGROVESUPERINTENSIVEPCT", CFG_CUSTOM, 0)
 
CfgFloat cfg_OliveGroveTradPct ("OLIVEGROVETRADPCT", CFG_CUSTOM, 0)
 
CfgFloat cfg_OliveGroveTradOrgPct ("OLIVEGROVETRADORGPCT", CFG_CUSTOM, 0)
 
CfgInt cfg_AphidDamageThreshold ("COMMONAPHIDDAMAGETHRESHOLD", CFG_CUSTOM, 1000)
 
CfgBool cfg_UseSocioEconomicFarm ("USE_SOCIO_ECONOMIC_FARMS", CFG_CUSTOM, false)
 Used to socio-economic calculations for farms. More...
 
CfgBool cfg_UseConsumat ("USE_CONSUMAT_APPROACH", CFG_CUSTOM, false)
 
static CfgInt cfg_CropPesticideDateModifier ("CROPPESTICIDEDATEMODIFER", CFG_CUSTOM, 0, -10, 10)
 Used to modify spraying dates of some test pesticides in selected crops - look for use of m_date_modifier. More...
 
CfgBool cfg_organic_extensive ("FARM_ORGANIC_EXTENSIVE", CFG_CUSTOM, false)
 
static CfgBool l_map_read_farmfile ("MAP_READ_FARMFILE", CFG_PRIVATE, true)
 
static CfgStr l_map_farmref_file ("MAP_FARMREF_FILE", CFG_CUSTOM, "farmrefs.txt")
 
static CfgStr l_emaize_price_file ("EMAIZE_PRICE_FILE", CFG_CUSTOM, "EM_price.txt")
 
CfgBool cfg_OptimisingFarms ("OPTIMISING_FARMS", CFG_CUSTOM, false)
 If set to true, the farmer decision making model is active. More...
 
CfgBool cfg_OptimiseBedriftsmodelCrops ("OPTIMISE_BEDRIFTSMODEL_CROPS", CFG_CUSTOM, false)
 If set to true, the original farm optimisation model's crop set is used in the farmer decision making model In this mode the optimisation is carried out only once; it is used for the comparioson of the optimisaiton results with the original model. More...
 
CfgBool cfg_DumpFarmAreas ("DUMP_FARM_AREAS", CFG_CUSTOM, false)
 If set to true, an output file with farm areas is produced. More...
 
CfgBool cfg_UseBedriftsmodelFarmAreas ("USE_BEDRIFTSMODEL_FARM_AREAS", CFG_CUSTOM, false)
 If set to true, the farm areas from the original farm optimisation model are used in the optimisation. If set to false, the farm areas based on a map from 2005 are used. More...
 
CfgBool cfg_OnlyDeliberation ("ONLY_DELIBERATION", CFG_CUSTOM, true)
 If set to yes, the only decision mode/startegy the farmers can use is deliberation (i.e. simplified optimisation). More...
 
CfgFloat cfg_Neighbor_dist ("NEIGHBOR_DIST", CFG_CUSTOM, 1.5)
 A parameter setting the maximum distance from a farm to another farm that can be considred a neighbour [km]. More...
 
CfgFloat cfg_Min_certainty ("MIN_CERTAINTY", CFG_CUSTOM, 0)
 A parameter setting the minimum certainty level. More...
 
CfgFloat cfg_Min_need_satisfaction1 ("MIN_NEED_SATISFACTION_ONE", CFG_CUSTOM, 100)
 A parameter setting the minimum satisfaction level for profit. More...
 
CfgFloat cfg_Min_need_satisfaction2 ("MIN_NEED_SATISFACTION_TWO", CFG_CUSTOM, 100)
 A parameter setting the minimum satisfaction level for yield. More...
 
CfgFloat cfg_Profit_max_proportion ("PROFIT_MAX_PROPORTION", CFG_CUSTOM, 100)
 A parameter setting the proportion of farmers of a type profit maximiser. More...
 
CfgFloat cfg_Yield_max_proportion ("YIELD_MAX_PROPORTION", CFG_CUSTOM, 0)
 A parameter setting the proportion of farmers of a type yield maximiser. More...
 
CfgFloat cfg_Environmentalist_proportion ("ENVIRONMENTALIST_PROPORTION", CFG_CUSTOM, 0)
 A parameter setting the proportion of farmers of a type environmentalist. More...
 
CfgFloat cfg_Yield_max_pest_prob_multiplier ("YIELD_MAX_PEST_PROB_MULITPLIER", CFG_CUSTOM, 1.5)
 A parameter of the yield maximizer farmer type: it increases the chance of necessity of carrying out a pesticide spraying event (i.e. the probability of a pest attack). Used to represent the yield maximiser's higher tendency to spray pesticide to protect crops even at the expense of a profit. More...
 
CfgFloat cfg_Env_pest_multiplier ("ENV_PEST_MULTIPLIER", CFG_CUSTOM, 1.25)
 A parameter of the environmentalist farmer type: increases the chance that environmentalist does not find using pesticides profitable. Used to represent environmentalist's reluctance to use pesticides. More...
 
CfgFloat cfg_Env_fert_multiplier ("ENV_FERT_MULTIPLIER", CFG_CUSTOM, 0.8)
 A parameter of the environmentalist farmer type: reduces environmentalist's use of fertiliser. Used to represent environmentalist's tendency to minimise the usage of fertlizers. More...
 
CfgBool cfg_Sensitivity_analysis ("SENSITIVITY_ANALYSIS", CFG_CUSTOM, false)
 
CfgBool cfg_Areas_Based_on_Distribution ("AREAS_BASED_ON_DISTRIBUTION", CFG_CUSTOM, false)
 If set to true, crops are assigned area based on their gross margin proportion in the total GM for all crops with non-negative GM. More...
 
CfgBool cfg_MaizeEnergy ("MAIZE_ENERGY", CFG_CUSTOM, false)
 If set to true, the energy maize crop is included in the simulation. More...
 
CfgFloat cfg_AnimalsThreshold ("ANIMALS_THRESHOLD", CFG_CUSTOM, 0)
 This parameter specifies the proportion of average number of animals on a farm for previous 3 years, below which a farmer decides not to grow energy maize anymore. More...
 
CfgFloat cfg_PriceChangeThreshold ("PRICE_CHANGE_THRESHOLD", CFG_CUSTOM, 0.2)
 This parameter specifies the relative difference in energy maize price which causes a farmer to deliberate. More...
 
CfgInt cfg_LifeStage ("LIFE_STAGE", CFG_CUSTOM, 0)
 This parameter specifies the life stage of a species whose numbers farmers use during their decision making. More...
 
CfgInt cfg_Animals_number_test_day ("ANIMALS_NUMBER_TEST_DAY", CFG_CUSTOM, 152)
 This parameter specifies the day at which farmers observe the number of animals residing at their farm. More...
 
CfgFloat cfg_Price_FU ("PRICE_FU", CFG_CUSTOM, 1.157)
 Price of a fodder unit. [DKK/FU]. More...
 
CfgFloat cfg_Price_Nt ("PRICE_NT", CFG_CUSTOM, 1.93)
 Price of fertilizer. [DKK/kg]. More...
 
CfgFloat cfg_Price_SBarley ("PRICE_SBARLEY", CFG_CUSTOM, 83)
 
CfgFloat cfg_Price_Oats ("PRICE_OATS", CFG_CUSTOM, 75)
 
CfgFloat cfg_Price_WBarley ("PRICE_WBARLEY", CFG_CUSTOM, 93)
 
CfgFloat cfg_Price_WWheat ("PRICE_WWHEAT", CFG_CUSTOM, 94)
 
CfgFloat cfg_Price_Triticale ("PRICE_TRITICALE", CFG_CUSTOM, 80)
 
CfgFloat cfg_Price_WRape ("PRICE_WRAPE", CFG_CUSTOM, 163)
 
CfgFloat cfg_Price_SRape ("PRICE_SRAPE", CFG_CUSTOM, 163)
 
CfgFloat cfg_Min_fodder_prod_pig ("MIN_FODDER_PROD_PIG", CFG_CUSTOM, 20)
 A parameter setting the minimum proportion of fodder demand that has to be supplied from own fodder production on pig farms. More...
 
CfgFloat cfg_Min_fodder_prod_cattle ("MIN_FODDER_PROD_CATTLE", CFG_CUSTOM, 35)
 A parameter setting the minimum proportion of fodder demand that has to be supplied from own fodder production on cattle farms. Not in use. More...
 
CfgFloat cfg_ClosestFarmProbParam1 ("CLOSESTFARMPROBPARAMONE", CFG_CUSTOM, 0.005)
 A fitting parameter for the probability of hunter acceptance of a farm wiht distance from home - slope. More...
 
CfgFloat cfg_FarmSizeProbParam1 ("FARMSIZEPROBPARAMONE", CFG_CUSTOM, 1.5)
 A fitting parameter for the probability of hunter acceptance of a farm that is smaller. More...
 
CfgFloat cfg_ClosestFarmProbParam2 ("CLOSESTFARMPROBPARAMTWO", CFG_CUSTOM, 1.0)
 A fitting parameter for the probability of hunter acceptance of a farm with distance from home - scaler. More...
 
FarmManagerg_farmmanager
 
CfgFloat cfg_RoostDistProbParam1 ("ROOSTDISTPROBPARAMONE", CFG_CUSTOM, 1.5)
 A fitting parameter for the probability of hunter acceptance of a farm with distance from roost. More...
 
CfgInt cfg_grain_distribution ("GOOSE_GRAIN_DISTRIBUTION", CFG_CUSTOM, 0, 0, 2)
 A switch to fix the grain distribution to a specific year or make a random pick between years. Used for the goose model. 0, = random, 1 = 2013, 2 = 2014. More...
 
CfgStr cfgRotationFileDir ("ROT_FILES_DIR", CFG_CUSTOM, ".")
 

Detailed Description

Farm.cpp This file contains the source for the Farm class

by Frank Nikolaisen & Chris J. Topping
Version of June 2003
All rights reserved.

Doxygen formatted comments in July 2008

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE [1/2]

#define _CRT_SECURE_NO_DEPRECATE

◆ _CRT_SECURE_NO_DEPRECATE [2/2]

#define _CRT_SECURE_NO_DEPRECATE

◆ _CRTDBG_MAP_ALLOC

#define _CRTDBG_MAP_ALLOC

Function Documentation

◆ CompPcts()

bool CompPcts ( tpct  i,
tpct  j 
)

Used for sorting a farmers field size vector.

649 { return (i.pct<j.pct); }

References tpct::pct.

Referenced by Farm::AssignPermanentCrop().

Variable Documentation

◆ cfg_Animals_number_test_day

CfgInt cfg_Animals_number_test_day("ANIMALS_NUMBER_TEST_DAY", CFG_CUSTOM, 152)

This parameter specifies the day at which farmers observe the number of animals residing at their farm.

◆ cfg_AnimalsThreshold

CfgFloat cfg_AnimalsThreshold("ANIMALS_THRESHOLD", CFG_CUSTOM, 0)

This parameter specifies the proportion of average number of animals on a farm for previous 3 years, below which a farmer decides not to grow energy maize anymore.

◆ cfg_AphidDamageThreshold

CfgInt cfg_AphidDamageThreshold("COMMONAPHIDDAMAGETHRESHOLD", CFG_CUSTOM, 1000)

Referenced by Crop::AphidDamage().

◆ cfg_Areas_Based_on_Distribution

CfgBool cfg_Areas_Based_on_Distribution("AREAS_BASED_ON_DISTRIBUTION", CFG_CUSTOM, false)

If set to true, crops are assigned area based on their gross margin proportion in the total GM for all crops with non-negative GM.

◆ cfg_ClosestFarmProbParam1

CfgFloat cfg_ClosestFarmProbParam1("CLOSESTFARMPROBPARAMONE", CFG_CUSTOM, 0.005)

A fitting parameter for the probability of hunter acceptance of a farm wiht distance from home - slope.

Referenced by FarmManager::FindClosestFarmOpennessProb(), FarmManager::FindClosestFarmOpennessProbNearRoostIsBest(), and FarmManager::FindClosestFarmOpennessProbSmallIsBest().

◆ cfg_ClosestFarmProbParam2

CfgFloat cfg_ClosestFarmProbParam2("CLOSESTFARMPROBPARAMTWO", CFG_CUSTOM, 1.0)

A fitting parameter for the probability of hunter acceptance of a farm with distance from home - scaler.

Referenced by FarmManager::FindClosestFarmOpennessProb(), FarmManager::FindClosestFarmOpennessProbNearRoostIsBest(), and FarmManager::FindClosestFarmOpennessProbSmallIsBest().

◆ cfg_CropPesticideDateModifier

CfgInt cfg_CropPesticideDateModifier("CROPPESTICIDEDATEMODIFER", CFG_CUSTOM, 0, -10, 10)
static

Used to modify spraying dates of some test pesticides in selected crops - look for use of m_date_modifier.

Referenced by Crop::Crop().

◆ cfg_DKCatchCropLegumePct

CfgFloat cfg_DKCatchCropLegumePct("DKCATCHCROPLEGUMEPCT", CFG_CUSTOM, 1.00)

◆ cfg_DKCatchCropPct

◆ cfg_DumpFarmAreas

CfgBool cfg_DumpFarmAreas("DUMP_FARM_AREAS", CFG_CUSTOM, false)

If set to true, an output file with farm areas is produced.

Referenced by Landscape::Landscape().

◆ cfg_Env_fert_multiplier

CfgFloat cfg_Env_fert_multiplier("ENV_FERT_MULTIPLIER", CFG_CUSTOM, 0.8)

A parameter of the environmentalist farmer type: reduces environmentalist's use of fertiliser. Used to represent environmentalist's tendency to minimise the usage of fertlizers.

◆ cfg_Env_pest_multiplier

CfgFloat cfg_Env_pest_multiplier("ENV_PEST_MULTIPLIER", CFG_CUSTOM, 1.25)

A parameter of the environmentalist farmer type: increases the chance that environmentalist does not find using pesticides profitable. Used to represent environmentalist's reluctance to use pesticides.

◆ cfg_Environmentalist_proportion

CfgFloat cfg_Environmentalist_proportion("ENVIRONMENTALIST_PROPORTION", CFG_CUSTOM, 0)

A parameter setting the proportion of farmers of a type environmentalist.

◆ cfg_FarmSizeProbParam1

CfgFloat cfg_FarmSizeProbParam1("FARMSIZEPROBPARAMONE", CFG_CUSTOM, 1.5)

A fitting parameter for the probability of hunter acceptance of a farm that is smaller.

Referenced by FarmManager::FindClosestFarmOpennessProbSmallIsBest().

◆ cfg_grain_distribution

CfgInt cfg_grain_distribution("GOOSE_GRAIN_DISTRIBUTION", CFG_CUSTOM, 0, 0, 2)

A switch to fix the grain distribution to a specific year or make a random pick between years. Used for the goose model. 0, = random, 1 = 2013, 2 = 2014.

Referenced by FarmManager::GetSpilledGrain().

◆ cfg_LifeStage

CfgInt cfg_LifeStage("LIFE_STAGE", CFG_CUSTOM, 0)

This parameter specifies the life stage of a species whose numbers farmers use during their decision making.

◆ cfg_MaizeEnergy

CfgBool cfg_MaizeEnergy("MAIZE_ENERGY", CFG_CUSTOM, false)

If set to true, the energy maize crop is included in the simulation.

◆ cfg_Min_certainty

CfgFloat cfg_Min_certainty("MIN_CERTAINTY", CFG_CUSTOM, 0)

A parameter setting the minimum certainty level.

◆ cfg_Min_fodder_prod_cattle

CfgFloat cfg_Min_fodder_prod_cattle("MIN_FODDER_PROD_CATTLE", CFG_CUSTOM, 35)

A parameter setting the minimum proportion of fodder demand that has to be supplied from own fodder production on cattle farms. Not in use.

◆ cfg_Min_fodder_prod_pig

CfgFloat cfg_Min_fodder_prod_pig("MIN_FODDER_PROD_PIG", CFG_CUSTOM, 20)

A parameter setting the minimum proportion of fodder demand that has to be supplied from own fodder production on pig farms.

◆ cfg_Min_need_satisfaction1

CfgFloat cfg_Min_need_satisfaction1("MIN_NEED_SATISFACTION_ONE", CFG_CUSTOM, 100)

A parameter setting the minimum satisfaction level for profit.

◆ cfg_Min_need_satisfaction2

CfgFloat cfg_Min_need_satisfaction2("MIN_NEED_SATISFACTION_TWO", CFG_CUSTOM, 100)

A parameter setting the minimum satisfaction level for yield.

◆ cfg_Neighbor_dist

CfgFloat cfg_Neighbor_dist("NEIGHBOR_DIST", CFG_CUSTOM, 1.5)

A parameter setting the maximum distance from a farm to another farm that can be considred a neighbour [km].

◆ cfg_NLCatchCropPct

CfgFloat cfg_NLCatchCropPct("NLCATCHCROPPCT", CFG_CUSTOM, 1.00)

Referenced by NLMaize::Do(), and NLWinterWheat::Do().

◆ cfg_NumberNeighboursAssociative

CfgInt cfg_NumberNeighboursAssociative("NUMBER_NEIGHBOURS_ASSOCIATIVE", CFG_CUSTOM, 0)

◆ cfg_NumberNeighboursSpatial

CfgInt cfg_NumberNeighboursSpatial("NUMBER_NEIGHBOURS_SPATIAL", CFG_CUSTOM, 5)

◆ cfg_NumberNeighboursVirtual

CfgInt cfg_NumberNeighboursVirtual("NUMBER_NEIGHBOURS_VIRTUAL", CFG_CUSTOM, 0)

◆ cfg_OliveGroveIntensivePct

CfgFloat cfg_OliveGroveIntensivePct("OLIVEGROVEINTENSIVEPCT", CFG_CUSTOM, 1.00)

Used to define the type of management in olive gorves. By default all are managed intensively. Needs to sup up to 1.00.

Referenced by Farm::InitiateManagement().

◆ cfg_OliveGroveSuperIntensivePct

CfgFloat cfg_OliveGroveSuperIntensivePct("OLIVEGROVESUPERINTENSIVEPCT", CFG_CUSTOM, 0)

◆ cfg_OliveGroveTradOrgPct

CfgFloat cfg_OliveGroveTradOrgPct("OLIVEGROVETRADORGPCT", CFG_CUSTOM, 0)

◆ cfg_OliveGroveTradPct

CfgFloat cfg_OliveGroveTradPct("OLIVEGROVETRADPCT", CFG_CUSTOM, 0)

◆ cfg_OnlyDeliberation

CfgBool cfg_OnlyDeliberation("ONLY_DELIBERATION", CFG_CUSTOM, true)

If set to yes, the only decision mode/startegy the farmers can use is deliberation (i.e. simplified optimisation).

◆ cfg_OptimiseBedriftsmodelCrops

CfgBool cfg_OptimiseBedriftsmodelCrops("OPTIMISE_BEDRIFTSMODEL_CROPS", CFG_CUSTOM, false)

If set to true, the original farm optimisation model's crop set is used in the farmer decision making model In this mode the optimisation is carried out only once; it is used for the comparioson of the optimisaiton results with the original model.

◆ cfg_OptimisingFarms

CfgBool cfg_OptimisingFarms("OPTIMISING_FARMS", CFG_CUSTOM, false)

If set to true, the farmer decision making model is active.

◆ cfg_organic_extensive

CfgBool cfg_organic_extensive("FARM_ORGANIC_EXTENSIVE", CFG_CUSTOM, false)

◆ cfg_Price_FU

CfgFloat cfg_Price_FU("PRICE_FU", CFG_CUSTOM, 1.157)

Price of a fodder unit. [DKK/FU].

◆ cfg_Price_Nt

CfgFloat cfg_Price_Nt("PRICE_NT", CFG_CUSTOM, 1.93)

Price of fertilizer. [DKK/kg].

◆ cfg_Price_Oats

CfgFloat cfg_Price_Oats("PRICE_OATS", CFG_CUSTOM, 75)

◆ cfg_Price_SBarley

CfgFloat cfg_Price_SBarley("PRICE_SBARLEY", CFG_CUSTOM, 83)

◆ cfg_Price_SRape

CfgFloat cfg_Price_SRape("PRICE_SRAPE", CFG_CUSTOM, 163)

◆ cfg_Price_Triticale

CfgFloat cfg_Price_Triticale("PRICE_TRITICALE", CFG_CUSTOM, 80)

◆ cfg_Price_WBarley

CfgFloat cfg_Price_WBarley("PRICE_WBARLEY", CFG_CUSTOM, 93)

◆ cfg_Price_WRape

CfgFloat cfg_Price_WRape("PRICE_WRAPE", CFG_CUSTOM, 163)

◆ cfg_Price_WWheat

CfgFloat cfg_Price_WWheat("PRICE_WWHEAT", CFG_CUSTOM, 94)

◆ cfg_PriceChangeThreshold

CfgFloat cfg_PriceChangeThreshold("PRICE_CHANGE_THRESHOLD", CFG_CUSTOM, 0.2)

This parameter specifies the relative difference in energy maize price which causes a farmer to deliberate.

◆ cfg_Profit_max_proportion

CfgFloat cfg_Profit_max_proportion("PROFIT_MAX_PROPORTION", CFG_CUSTOM, 100)

A parameter setting the proportion of farmers of a type profit maximiser.

◆ cfg_PTHorticulturePct

CfgFloat cfg_PTHorticulturePct("PTHORTICULTUREPCT", CFG_CUSTOM, 1.00)

◆ cfg_RoostDistProbParam1

CfgFloat cfg_RoostDistProbParam1("ROOSTDISTPROBPARAMONE", CFG_CUSTOM, 1.5)

A fitting parameter for the probability of hunter acceptance of a farm with distance from roost.

Referenced by FarmManager::FindClosestFarmOpennessProbNearRoostIsBest().

◆ cfg_Sensitivity_analysis

CfgBool cfg_Sensitivity_analysis("SENSITIVITY_ANALYSIS", CFG_CUSTOM, false)

◆ cfg_UseBedriftsmodelFarmAreas

CfgBool cfg_UseBedriftsmodelFarmAreas("USE_BEDRIFTSMODEL_FARM_AREAS", CFG_CUSTOM, false)

If set to true, the farm areas from the original farm optimisation model are used in the optimisation. If set to false, the farm areas based on a map from 2005 are used.

◆ cfg_UseConsumat

CfgBool cfg_UseConsumat("USE_CONSUMAT_APPROACH", CFG_CUSTOM, false)

◆ cfg_UseFarmerNetworks

CfgBool cfg_UseFarmerNetworks("USE_FARMER_NETWORKS", CFG_CUSTOM, false)

Used to enable/disable farmer networks.

Referenced by FarmManager::InitiateManagement().

◆ cfg_UseOnlySpatialNetwork

CfgBool cfg_UseOnlySpatialNetwork("USE_ONLY_SPATIAL_NETWORKS", CFG_CUSTOM, true)

Used to enable/disable others networks than spatial network.

◆ cfg_UseSocioEconomicFarm

CfgBool cfg_UseSocioEconomicFarm("USE_SOCIO_ECONOMIC_FARMS", CFG_CUSTOM, false)

Used to socio-economic calculations for farms.

Referenced by Farm::CalculateTreatmentCosts(), FarmManager::FarmManager(), and Farm::HandleEvents().

◆ cfg_Yield_max_pest_prob_multiplier

CfgFloat cfg_Yield_max_pest_prob_multiplier("YIELD_MAX_PEST_PROB_MULITPLIER", CFG_CUSTOM, 1.5)

A parameter of the yield maximizer farmer type: it increases the chance of necessity of carrying out a pesticide spraying event (i.e. the probability of a pest attack). Used to represent the yield maximiser's higher tendency to spray pesticide to protect crops even at the expense of a profit.

◆ cfg_Yield_max_proportion

CfgFloat cfg_Yield_max_proportion("YIELD_MAX_PROPORTION", CFG_CUSTOM, 0)

A parameter setting the proportion of farmers of a type yield maximiser.

◆ cfgRotationFileDir

CfgStr cfgRotationFileDir("ROT_FILES_DIR", CFG_CUSTOM, ".")

◆ g_farmmanager

◆ g_generator

◆ g_landscape_ptr

◆ l_emaize_price_file

CfgStr l_emaize_price_file("EMAIZE_PRICE_FILE", CFG_CUSTOM, "EM_price.txt")
static

◆ l_map_farmref_file

CfgStr l_map_farmref_file("MAP_FARMREF_FILE", CFG_CUSTOM, "farmrefs.txt")
static

◆ l_map_read_farmfile

CfgBool l_map_read_farmfile("MAP_READ_FARMFILE", CFG_PRIVATE, true)
static
tpct::pct
int pct
Definition: Farm.h:365