#include <AnisotropicDisperse.h>
Inheritance diagram for clAnisotropicDisperse:
Public Member Functions | |
clAnisotropicDisperse (clSimManager *p_oSimManager) | |
Constructor. | |
~clAnisotropicDisperse () | |
Destructor. | |
Protected Member Functions | |
void | DoChildSetup (xercesc::DOMDocument *p_oDoc) |
Performs additional setup by getting values from the parameter file and calculating the probability array. | |
void | GetParameterData (xercesc::DOMDocument *p_oDoc) |
Gets additional data from the parameter file. | |
float | GetFunctionValue (float &fCellX, float &fCellY, float &fTreeX, float &fTreeY, int &iSpecies) |
Gets the value in the mp_fProb array corresponding to the distance and angle between the two points. | |
float | CalculateNormalizer (int iSpecies) |
Calculates the normalizer term. | |
void | CalculateProbs () |
Calculates the normalized probability array. | |
Protected Attributes | |
float *** | mp_fProb |
Normalized probability array for each species. | |
float * | mp_fDirectionMaxDispersal |
Azimuth direction, in radians, of the max dispersal for each species. | |
float * | mp_fAnisotropicAmplitude |
Amplitude of the anisotropic effect for each species. | |
float * | mp_fNormalizer |
For normalizing values. | |
float | m_fAngleIncr |
We're rounding all angles to the nearest of this increment, in radians. | |
int | m_iMaxSearchRadius |
Integer version of max search radius - rounded up to next integer - for sizing mp_fProb array. | |
int | m_iNumAngles |
Number of angles in the mp_fProb array - for the destructor. |
This behavior creates and disperses seeds according to the spatially-explicit model. For each grid cell, the number of seeds is calculated based on the size and distance of parents of that species. The seed distribution is anisotropic (meaning that seeds disperse farther in some directions than others). The direction and magnitude of the maximum disperse distance is controlled on a per-species basis. The shape of the seedling distribution distance in any given direction can be controlled by either a weibull or lognormal probability distribution function.
The "seeds" are actually tallies by species in a grid. This behavior does not produce any seedlings. A separate recruitment behavior must "germinate" the seeds into seedlings according to its own rules.
To call this in the parameter file, use "anisotropic disperse". The namestring for this class is "anisotropic disperse".
Copyright 2003 Charles D. Canham.
clAnisotropicDisperse::clAnisotropicDisperse | ( | clSimManager * | p_oSimManager | ) |
Constructor.
p_oSimManager | Sim Manager object. |
void clAnisotropicDisperse::GetParameterData | ( | xercesc::DOMDocument * | p_oDoc | ) | [protected] |
Gets additional data from the parameter file.
modelErr | if the direction of max dispersal is not a valid angle in radians. |
float clAnisotropicDisperse::GetFunctionValue | ( | float & | fCellX, | |
float & | fCellY, | |||
float & | fTreeX, | |||
float & | fTreeY, | |||
int & | iSpecies | |||
) | [protected, virtual] |
Gets the value in the mp_fProb array corresponding to the distance and angle between the two points.
If the value is beyond the max search radius (and thus beyond the array) 0 is returned. The distance is RandomRound()ed to an integer to get a value from the array.
fCellX | X coordinate of point at center of grid cell into which seeds are being dispersed. | |
fCellY | Y coordinate of point at center of grid cell into which seeds are being dispersed. | |
fTreeX | X coordinate of neighbor parent tree. | |
fTreeY | Y coordinate of neighbor parent tree. | |
iSpecies | Species of neighbor parent tree. |
Implements clGridBasedSpatialDisperse.
float clAnisotropicDisperse::CalculateNormalizer | ( | int | iSpecies | ) | [protected] |
Calculates the normalizer term.
The normalizer is the integration of the exponential portion of either the weibull or lognormal function. The integral is calculated using a brute-force approach by summing the values of the function at successive values out to the maximum disperse distance, and at successive angles around a circle.
iSpecies | Species for which to calculate normalizer. |
float*** clAnisotropicDisperse::mp_fProb [protected] |
Normalized probability array for each species.
Array size is # species by angle in 0.087 rad (5 degree) increments by max search radius. These values are calculated in CalculateProbs().
float* clAnisotropicDisperse::mp_fDirectionMaxDispersal [protected] |
Azimuth direction, in radians, of the max dispersal for each species.
Only used for anisotropic disperse.
float* clAnisotropicDisperse::mp_fAnisotropicAmplitude [protected] |
Amplitude of the anisotropic effect for each species.
Only used for anisotropic disperse.
float* clAnisotropicDisperse::mp_fNormalizer [protected] |
For normalizing values.