![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Pesticide.h>
Public Member Functions | |
PesticideMap (int a_startyear, int a_noyears, int a_cellsize, Landscape *a_landscape, RasterMap *a_land, bool a_typeofmap) | |
~PesticideMap () | |
bool | DumpPMap (vector< double > *a_map) |
bool | DumpPMapI () |
bool | DumpPMapH () |
bool | DumpPMapF () |
virtual void | Spray (LE *a_element_sprayed, TTypesOfPesticideCategory a_type) |
![]() | |
PesticideOutput (int a_startyear, int a_noyears, int a_cellsize, Landscape *a_landscape, RasterMap *a_land) | |
~PesticideOutput () | |
Protected Attributes | |
bool | m_typeofmap |
true if using test pesticide, false for general pesticides More... | |
![]() | |
vector< double > * | m_pmap_insecticides |
insecticide map/table data More... | |
vector< double > * | m_pmap_fungicides |
herbicide map/table data More... | |
vector< double > * | m_pmap_herbicides |
fungicide map/table data More... | |
int | m_startyear |
first simultion year to record More... | |
int | m_endyear |
last year of data to record More... | |
int | m_cellsize |
the size of the cell for pesticide data in m More... | |
int | m_pmap_width |
based on cellsize the width of the map More... | |
int | m_pmap_height |
based on cellsize the height of the map More... | |
Landscape * | m_OurLandscape |
pointer to the landscape More... | |
RasterMap * | m_Rastermap |
pointer to the landscape map More... | |
PesticideMap::PesticideMap | ( | int | a_startyear, |
int | a_noyears, | ||
int | a_cellsize, | ||
Landscape * | a_landscape, | ||
RasterMap * | a_land, | ||
bool | a_typeofmap | ||
) |
References PesticideOutput::m_pmap_fungicides, PesticideOutput::m_pmap_height, PesticideOutput::m_pmap_herbicides, PesticideOutput::m_pmap_insecticides, PesticideOutput::m_pmap_width, and m_typeofmap.
PesticideMap::~PesticideMap | ( | ) |
bool PesticideMap::DumpPMap | ( | vector< double > * | a_map | ) |
References g_date, g_msg, Calendar::GetMonth(), Calendar::GetYear(), PesticideOutput::m_pmap_fungicides, PesticideOutput::m_pmap_height, PesticideOutput::m_pmap_insecticides, PesticideOutput::m_pmap_width, MapErrorMsg::Warn(), and WARN_FILE.
Referenced by DumpPMapF(), DumpPMapH(), and DumpPMapI().
|
inline |
References DumpPMap(), and PesticideOutput::m_pmap_fungicides.
|
inline |
References DumpPMap(), and PesticideOutput::m_pmap_herbicides.
|
inline |
References DumpPMap(), and PesticideOutput::m_pmap_insecticides.
|
virtual |
This records a 1 in the map for every m2 where pesticide is applied. This does not record drift.
Going through the whole landscape is very slow and unnecessary for small polygons. Since our polygons do not extend beyond the edge of the map ie do not wrap round, then we only need a measure of minx, maxx, miny, maxy. This is set up at the start of the simulation.
This method first determines what type of pesticide and selects the correct map to record on.
Reimplemented from PesticideOutput.
References fungicide, RasterMap::Get(), LE::GetMapIndex(), LE::GetMaxX(), LE::GetMaxY(), LE::GetMinX(), LE::GetMinY(), herbicide, PesticideOutput::m_cellsize, PesticideOutput::m_pmap_fungicides, PesticideOutput::m_pmap_herbicides, PesticideOutput::m_pmap_insecticides, PesticideOutput::m_pmap_width, and PesticideOutput::m_Rastermap.
|
protected |
true if using test pesticide, false for general pesticides
PesticideMap is a class for handling pesticide mapping output. This can be used to sum up pesticide concentrations over time. It works currently for general pesticides split into insecticides, herbicides, and fungicides, but also for the primary test pesticide if one is being used.
Referenced by PesticideMap(), and ~PesticideMap().