ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
pesticide.cpp File Reference
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <math.h>
#include <fstream>
#include "ls.h"

Go to the source code of this file.

Macros

#define _CRT_SECURE_NO_DEPRECATE
 
#define CFG_CHANNEL_BITS   8
 
#define CFG_CHANNEL_MAXVAL   (2^CFG_CHANNEL_BITS-1)
 
#define SV_UINT32   unsigned int
 
#define SV_INT32   int
 
#define SV_UINT8   unsigned char
 
#define SV_INT8   char
 

Variables

CfgBool l_pest_enable_pesticide_engine ("PEST_ENABLE_PESTICIDE_ENGINE", CFG_CUSTOM, false)
 Used to turn on or off the PPP functionality of ALMaSS. More...
 
CfgInt l_pest_NoPPPs ("PEST_NO_OF_PPPS", CFG_CUSTOM, 1, 1, 10)
 The number of active Plant Protection Products to be tracked - a performance penalty if enabled with more than necessary (memory heavy) More...
 
static CfgFloat l_pest_ai_half_life ("PEST_AI_HALF_LIFE", CFG_CUSTOM, 10.0)
 
static CfgFloat l_pest_ai_half_life_Soil ("PEST_AI_HALF_LIFE_SOIL", CFG_CUSTOM, 10.0)
 
static CfgFloat l_pest_ai_half_life_Veg ("PEST_AI_HALF_LIFE_VEG", CFG_CUSTOM, 10.0)
 
static CfgFloat l_pest_diffusion_slope ("PEST_DRIFT_SLOPE", CFG_CUSTOM, -0.6122)
 
static CfgInt l_pest_diffusion_grid_count ("PEST_DIFFUSION_GRID_COUNT", CFG_CUSTOM, 1)
 
static CfgFloat l_pest_zero_threshold ("PEST_ZERO_THRESHOLD", CFG_CUSTOM, 0.00001)
 
CfgFloat cfg_pest_product_1_amount ("PEST_PRODUCT_ONE_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_2_amount ("PEST_PRODUCT_TWO_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_3_amount ("PEST_PRODUCT_THREE_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_4_amount ("PEST_PRODUCT_FOUR_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_5_amount ("PEST_PRODUCT_FIVE_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_6_amount ("PEST_PRODUCT_SIX_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_7_amount ("PEST_PRODUCT_SEVEN_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_8_amount ("PEST_PRODUCT_EIGHT_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_9_amount ("PEST_PRODUCT_NINE_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgFloat cfg_pest_product_10_amount ("PEST_PRODUCT_TEN_AMOUNT", CFG_CUSTOM, 1.0)
 
CfgBool l_pest_use_application_rate ("PEST_USE_APPLICATIONRATE", CFG_CUSTOM, false)
 
CfgFloat l_pest_daily_mort ("PEST_DAILY_MORTALITY", CFG_CUSTOM, 0.25)
 
CfgFloat l_pest_daily_mort2 ("PEST_DAILY_MORTALITY_TWO", CFG_CUSTOM, 0.25)
 
CfgFloat l_pest_trigger_threshold1 ("PEST_TRIGGER_THRESHOLD_ONE", CFG_CUSTOM, 1.0)
 This is a trigger values that can be used to trigger pesticides effects. Currently only used by the Bembidion model. More...
 
CfgFloat l_pest_trigger_threshold2 ("PEST_TRIGGER_THRESHOLD_TWO", CFG_CUSTOM, 1.0)
 
CfgInt cfg_pest_productapplic_startdate ("PEST_PRODUCTAPPLIC_STARTDATE", CFG_CUSTOM, -1)
 
CfgInt cfg_pest_productapplic_startdate2 ("PEST_PRODUCTAPPLIC_STARTDATE_TWO", CFG_CUSTOM,-1)
 
CfgInt cfg_pest_productapplic_startdate3 ("PEST_PRODUCTAPPLIC_STARTDATE_THREE", CFG_CUSTOM,-1)
 
CfgInt cfg_pest_productapplic_period ("PEST_PRODUCTAPPLIC_PERIOD", CFG_CUSTOM, 1)
 
CfgBool cfg_pest_residue_or_rate ("PEST_RESIDUE_OR_RATE", CFG_CUSTOM, true)
 
CfgBool cfg_pest_springbarley_on ("PEST_SPRINGBARLEY_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_springwheat_on ("PEST_SPRINGWHEAT_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_winterwheat_on ("PEST_WINTERWHEAT_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_winterbarley_on ("PEST_WINTERBARLEY_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_wintertriticale_on ("PEST_WINTERTRITICALE_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_winterrye_on ("PEST_WINTERRYE_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_winterrape_on ("PEST_WINTERRAPE_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_potatoes_on ("PEST_POTATOES_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_beet_on ("PEST_BEET_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_cabbage_on ("PEST_CABBAGE_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_carrots_on ("PEST_CARROTS_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_tulips_on ("PEST_TULIPS_ON", CFG_CUSTOM, false)
 
CfgBool cfg_pest_SBS_ERA ("PEST_SBS_ERA", CFG_CUSTOM, false)
 
class Pesticideg_pest
 
Landscapeg_land
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_DEPRECATE

Definition at line 28 of file pesticide.cpp.

◆ CFG_CHANNEL_BITS

#define CFG_CHANNEL_BITS   8

Definition at line 665 of file pesticide.cpp.

◆ CFG_CHANNEL_MAXVAL

#define CFG_CHANNEL_MAXVAL   (2^CFG_CHANNEL_BITS-1)

Definition at line 666 of file pesticide.cpp.

◆ SV_INT32

#define SV_INT32   int

Definition at line 669 of file pesticide.cpp.

◆ SV_INT8

#define SV_INT8   char

Definition at line 671 of file pesticide.cpp.

◆ SV_UINT32

#define SV_UINT32   unsigned int

Definition at line 668 of file pesticide.cpp.

◆ SV_UINT8

#define SV_UINT8   unsigned char

Definition at line 670 of file pesticide.cpp.

Variable Documentation

◆ cfg_pest_beet_on

CfgBool cfg_pest_beet_on("PEST_BEET_ON", CFG_CUSTOM, false)

◆ cfg_pest_cabbage_on

CfgBool cfg_pest_cabbage_on("PEST_CABBAGE_ON", CFG_CUSTOM, false)

◆ cfg_pest_carrots_on

CfgBool cfg_pest_carrots_on("PEST_CARROTS_ON", CFG_CUSTOM, false)

◆ cfg_pest_potatoes_on

CfgBool cfg_pest_potatoes_on("PEST_POTATOES_ON", CFG_CUSTOM, false)

◆ cfg_pest_product_10_amount

CfgFloat cfg_pest_product_10_amount("PEST_PRODUCT_TEN_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_1_amount

CfgFloat cfg_pest_product_1_amount("PEST_PRODUCT_ONE_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_2_amount

CfgFloat cfg_pest_product_2_amount("PEST_PRODUCT_TWO_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_3_amount

CfgFloat cfg_pest_product_3_amount("PEST_PRODUCT_THREE_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_4_amount

CfgFloat cfg_pest_product_4_amount("PEST_PRODUCT_FOUR_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_5_amount

CfgFloat cfg_pest_product_5_amount("PEST_PRODUCT_FIVE_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_6_amount

CfgFloat cfg_pest_product_6_amount("PEST_PRODUCT_SIX_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_7_amount

CfgFloat cfg_pest_product_7_amount("PEST_PRODUCT_SEVEN_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_8_amount

CfgFloat cfg_pest_product_8_amount("PEST_PRODUCT_EIGHT_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_product_9_amount

CfgFloat cfg_pest_product_9_amount("PEST_PRODUCT_NINE_AMOUNT", CFG_CUSTOM, 1.0)

◆ cfg_pest_productapplic_period

CfgInt cfg_pest_productapplic_period("PEST_PRODUCTAPPLIC_PERIOD", CFG_CUSTOM, 1)

Definition at line 123 of file elements.cpp.

◆ cfg_pest_productapplic_startdate

CfgInt cfg_pest_productapplic_startdate("PEST_PRODUCTAPPLIC_STARTDATE", CFG_CUSTOM, -1)

Definition at line 120 of file elements.cpp.

Referenced by Orchard::DoDevelopment(), and OrchardBand::DoDevelopment().

◆ cfg_pest_productapplic_startdate2

CfgInt cfg_pest_productapplic_startdate2("PEST_PRODUCTAPPLIC_STARTDATE_TWO", CFG_CUSTOM,-1)

◆ cfg_pest_productapplic_startdate3

CfgInt cfg_pest_productapplic_startdate3("PEST_PRODUCTAPPLIC_STARTDATE_THREE", CFG_CUSTOM,-1)

◆ cfg_pest_residue_or_rate

CfgBool cfg_pest_residue_or_rate("PEST_RESIDUE_OR_RATE", CFG_CUSTOM, true)

◆ cfg_pest_SBS_ERA

CfgBool cfg_pest_SBS_ERA("PEST_SBS_ERA", CFG_CUSTOM, false)

◆ cfg_pest_springbarley_on

CfgBool cfg_pest_springbarley_on("PEST_SPRINGBARLEY_ON", CFG_CUSTOM, false)

◆ cfg_pest_springwheat_on

CfgBool cfg_pest_springwheat_on("PEST_SPRINGWHEAT_ON", CFG_CUSTOM, false)

◆ cfg_pest_tulips_on

CfgBool cfg_pest_tulips_on("PEST_TULIPS_ON", CFG_CUSTOM, false)

◆ cfg_pest_winterbarley_on

CfgBool cfg_pest_winterbarley_on("PEST_WINTERBARLEY_ON", CFG_CUSTOM, false)

◆ cfg_pest_winterrape_on

CfgBool cfg_pest_winterrape_on("PEST_WINTERRAPE_ON", CFG_CUSTOM, false)

◆ cfg_pest_winterrye_on

CfgBool cfg_pest_winterrye_on("PEST_WINTERRYE_ON", CFG_CUSTOM, false)

◆ cfg_pest_wintertriticale_on

CfgBool cfg_pest_wintertriticale_on("PEST_WINTERTRITICALE_ON", CFG_CUSTOM, false)

◆ cfg_pest_winterwheat_on

CfgBool cfg_pest_winterwheat_on("PEST_WINTERWHEAT_ON", CFG_CUSTOM, false)

◆ g_land

◆ g_pest

◆ l_pest_ai_half_life

CfgFloat l_pest_ai_half_life("PEST_AI_HALF_LIFE", CFG_CUSTOM, 10.0)
static

◆ l_pest_ai_half_life_Soil

CfgFloat l_pest_ai_half_life_Soil("PEST_AI_HALF_LIFE_SOIL", CFG_CUSTOM, 10.0)
static

Referenced by Pesticide::Pesticide().

◆ l_pest_ai_half_life_Veg

CfgFloat l_pest_ai_half_life_Veg("PEST_AI_HALF_LIFE_VEG", CFG_CUSTOM, 10.0)
static

Referenced by Pesticide::Pesticide().

◆ l_pest_daily_mort

CfgFloat l_pest_daily_mort("PEST_DAILY_MORTALITY", CFG_CUSTOM, 0.25)

◆ l_pest_daily_mort2

CfgFloat l_pest_daily_mort2("PEST_DAILY_MORTALITY_TWO", CFG_CUSTOM, 0.25)

◆ l_pest_diffusion_grid_count

CfgInt l_pest_diffusion_grid_count("PEST_DIFFUSION_GRID_COUNT", CFG_CUSTOM, 1)
static

◆ l_pest_diffusion_slope

CfgFloat l_pest_diffusion_slope("PEST_DRIFT_SLOPE", CFG_CUSTOM, -0.6122)
static

◆ l_pest_enable_pesticide_engine

CfgBool l_pest_enable_pesticide_engine("PEST_ENABLE_PESTICIDE_ENGINE", CFG_CUSTOM, false)

◆ l_pest_NoPPPs

CfgInt l_pest_NoPPPs("PEST_NO_OF_PPPS", CFG_CUSTOM, 1, 1, 10)

The number of active Plant Protection Products to be tracked - a performance penalty if enabled with more than necessary (memory heavy)

Referenced by Pesticide::Pesticide().

◆ l_pest_trigger_threshold1

CfgFloat l_pest_trigger_threshold1("PEST_TRIGGER_THRESHOLD_ONE", CFG_CUSTOM, 1.0)

This is a trigger values that can be used to trigger pesticides effects. Currently only used by the Bembidion model.

◆ l_pest_trigger_threshold2

CfgFloat l_pest_trigger_threshold2("PEST_TRIGGER_THRESHOLD_TWO", CFG_CUSTOM, 1.0)

◆ l_pest_use_application_rate

CfgBool l_pest_use_application_rate("PEST_USE_APPLICATIONRATE", CFG_CUSTOM, false)

◆ l_pest_zero_threshold

CfgFloat l_pest_zero_threshold("PEST_ZERO_THRESHOLD", CFG_CUSTOM, 0.00001)
static