ALMaSS Rabbit ODdox
1.1
The rabbit model description following ODdox protocol
|
Go to the documentation of this file.
39 #define PEST_GRIDSIZE_POW2 0
40 #define PEST_GRIDSIZE 1
41 #define PEST_GRIDAREA 1 // i.e. PEST_GRIDSIZE^2
89 Diffusor(
int a_dx,
int a_dy,
double a_fraction ) {
175 #ifdef __DETAILED_PESTICIDE_FATE
176 vector<vector <double> > m_pest_map_vegcanopy;
177 vector<vector <double> > m_pest_map_soil;
209 void TwinMapClear(
int a_minx,
int a_miny,
int a_maxx,
int a_maxy );
210 void TwinMapSpray(
LE* a_element_spryaed,
double a_amount,
int a_minx,
int a_miny,
int a_maxx,
int a_maxy );
213 double a_fractional_amount );
234 #ifdef __DETAILED_PESTICIDE_FATE
251 int a_beginx,
int a_width,
252 int a_beginy,
int a_height,
280 #ifdef __DETAILED_PESTICIDE_FATE
315 return m_pest_map_soil[a_ppp][l_c];
325 return m_pest_map_vegcanopy[a_ppp][l_c];
336 #ifdef PEST_WATER_CHECK
359 double a_fractional_amount)
402 bool DumpPMap(vector<double>* a_map);
409 #endif // PESTICIDE_H
void TwinMapSprayPixel(int a_large_map_x, int a_large_map_y, double a_fractional_amount)
PlantProtectionProducts m_ppp
void DailyQueueClear(PlantProtectionProducts a_ppp)
int m_cellsize
the size of the cell for pesticide data in m
void TwinMapDiffusion(int a_minx, int a_miny, int a_maxx, int a_maxy, double a_cover, PlantProtectionProducts a_ppp)
PesticideEvent(LE *a_sprayed_elem, double a_amount, PlantProtectionProducts a_ppp)
PlantProtectionProducts
A list PPP names for tracking by the Pesticide class.
unsigned m_rainfallcategory
Daily rainfall saved here * 100 to use as an index to the Pesticide::m_RainWashoffFactor array - an o...
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
int m_endyear
last year of data to record
double SupplyPesticide(int a_x, int a_y, PlantProtectionProducts a_ppp)
bool ElementIsWater(int a_x, int a_y)
int m_pmap_width
based on cellsize the width of the map
#define PEST_GRIDSIZE_POW2
Diffusion_mask m_diffusion_mask[4]
Pre-calculated square diffusion map, assuming wind directions (4) Used after spraying an element in...
unsigned int m_pest_map_size
The total size of one map in cellsize resolution.
PesticideMap(int a_startyear, int a_noyears, int a_cellsize, Landscape *a_landscape, RasterMap *a_land, bool a_typeofmap)
void DiffusionSprayPixel(int a_x, int a_limit_x, int a_y, int a_limit_y, double a_amount, double a_cover, PlantProtectionProducts a_ppp)
vector< double > * m_pmap_fungicides
herbicide map data
void Spray(LE *a_element_sprayed, TTypesOfPesticideCategory a_type)
vector< vector< PesticideEvent * > > m_daily_spray_queue
List lists of landscape elements, which was sprayed on a given day. One for each PPP we track.
int m_startyear
first simultion year to record
vector< vector< double > > m_pest_map_main
The landscape class containing all environmental and topographical data.
bool GetAnythingToDecay(PlantProtectionProducts a_ppp)
RasterMap * m_Rastermap
pointer to the landscape map
bool m_something_to_decay[ppp_foobar]
Speed hack. Only actually run the daily decay routine on the pesticide map if and only if we are sure...
void TwinMapClear(int a_minx, int a_miny, int a_maxx, int a_maxy)
void SetFraction(double a_frac)
vector< Diffusor * > Diffusion_mask
The grid of diffusors for each point in a polygon that is sprayed.
int m_NoPPPs
The number of active PPPs to track.
void DiffusionMaskInit(void)
void DailyQueueAdd(LE *a_element_sprayed, double a_amount, PlantProtectionProducts a_ppp)
Landscape * m_OurLandscape
pointer to the landscape
void MainMapDecay(PlantProtectionProducts a_ppp)
TTypesOfPesticideCategory
double m_pest_daily_decay_frac
void DailyQueueProcess(PlantProtectionProducts a_ppp)
vector< double > * m_pmap_insecticides
insecticide map data
double DiffusionFunction(double a_dist_meters)
unsigned int m_pest_map_width
The width of one map in cellsize resolution.
bool m_typeofmap
true if using test pesticide, false for general pesticides
int SupplyPesticideCell(int a_polyref)
Pesticide(RasterMap *a_land, Landscape *a_map)
double m_RainWashoffFactor[10000]
a structure to hold pre-calculated pesticide rain wash off factor (Rw)
double * m_pest_map_twin
The complete pesticide map.
double m_pest_daily_decay_frac_Soil
void TwinMapSprayCorrectBorders(void)
double m_pest_daily_decay_frac_Veg
Diffusor(int a_dx, int a_dy, double a_fraction)
bool DumpPMap(vector< double > *a_map)
void DiffusionMaskInitTest(void)
void CalcRainWashOffFactors()
Pre-calculates the constants required for rain wash off with increasing rainfall and stores this in m...
unsigned int m_pest_map_height
The height of one map in cellsize resolution.
void TwinMapSpray(LE *a_element_spryaed, double a_amount, int a_minx, int a_miny, int a_maxx, int a_maxy)
int m_pmap_height
based on cellsize the height of the map
vector< double > * m_pmap_herbicides
fungicide map data
bool SavePPM(double *a_map, int a_beginx, int a_width, int a_beginy, int a_height, char *a_filename)