#include <LinearBiLevelGrowth.h>
Public Member Functions | |
clLinearBiLevelGrowth (clSimManager *p_oSimManager) | |
Constructor. | |
~clLinearBiLevelGrowth () | |
Destructor. | |
float | CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) |
Calculates the amount of diameter growth increase for a particular tree using the linear growth equation. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Does the setup for this behavior. | |
void | SetNameData (char *cNameString) |
Captures the namestring passed to this behavior. | |
Protected Attributes | |
clGridBase * | mp_oStormLight |
"Storm Light" grid object | |
float * | mp_fLoLightSlope |
Slope of growth equation in low light - b - sized number of behavior species. | |
float * | mp_fLoLightIntercept |
Intercept of growth equation in low light - a - sized number of behavior species. | |
float * | mp_fHiLightSlope |
Slope of growth equation in high light - b - sized number of behavior species. | |
float * | mp_fHiLightIntercept |
Intercept of growth equation in high light - a - sized number of behavior species. | |
float * | mp_fHiLightThreshold |
Threshold between low light and high light growth, as a value between 0 and 100 - sized number of behavior species. | |
int * | mp_iIndexes |
To help access the other arrays. | |
float | m_fYearsPerTimestep |
Conversion factor to translate the results of the function to the appropriate units per timestep. | |
int | m_iLightCode |
Code for the "Light" data member of the "Storm Light" grid. |
The two sets of parameters can be used for two different growth rates at high and low light. This behavior can be used to create a growth increment with no automatic height adjustment or a growth increment with automatic height adjustment.
The equation used in this behavior is:
This behavior can also take into account light levels coming from the "Storm Light" grid object produced by clStormLight. This behavior can use two different sets of parameter values - one at low light and one at high light. The user sets the threshold between the two. The equation remains the same.
The name string is "linearbilevelgrowthshell". In the parameter file: For diameter growth with no automatic height adjustment, call "linear bilevel growth diam only". For diameter growth with automatic height adjustment, call "linear bilevel growth".
Copyright 2005 Charles D. Canham.
clLinearBiLevelGrowth::clLinearBiLevelGrowth | ( | clSimManager * | p_oSimManager | ) |
Constructor.
Sets the namestring.
clLinearBiLevelGrowth::~clLinearBiLevelGrowth | ( | ) |
Destructor.
Frees memory.
float clLinearBiLevelGrowth::CalcDiameterGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fHeightGrowth | |||
) | [virtual] |
Calculates the amount of diameter growth increase for a particular tree using the linear growth equation.
If the light grid is present, this retrieves the light level in the tree's grid cell. If it is above the threshold, the high-light parameters are used. If it is below the threshold, the low-light parameters are used. If the light grid is not present, the low-light parameters are used.
p_oTree | Tree for which to calculate growth. | |
p_oPop | Tree population object, just in case it's needed. | |
fHeightGrowth | Amount of height growth, in m (ignored). |
Reimplemented from clGrowthBase.
void clLinearBiLevelGrowth::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does the setup for this behavior.
This reads in the parameters from the parameter file, and retrieves the "Storm Light" grid if present.
p_oDoc | Parsed parameter file. |
modelErr | if the high-light growth threshold is not between 0 and 100. |
Reimplemented from clGrowthBase.
void clLinearBiLevelGrowth::SetNameData | ( | char * | cNameString | ) | [virtual] |
Captures the namestring passed to this behavior.
This is overridden from clBehaviorBase so we can capture the namestring passed. Since this class can create multiple kinds of behaviors that function differently, this will capture what kind of behavior this is supposed to be.
cNameString | Behavior's namestring. |
Reimplemented from clBehaviorBase.
clGridBase* clLinearBiLevelGrowth::mp_oStormLight [protected] |
"Storm Light" grid object
float* clLinearBiLevelGrowth::mp_fLoLightSlope [protected] |
Slope of growth equation in low light - b - sized number of behavior species.
float* clLinearBiLevelGrowth::mp_fLoLightIntercept [protected] |
Intercept of growth equation in low light - a - sized number of behavior species.
float* clLinearBiLevelGrowth::mp_fHiLightSlope [protected] |
Slope of growth equation in high light - b - sized number of behavior species.
float* clLinearBiLevelGrowth::mp_fHiLightIntercept [protected] |
Intercept of growth equation in high light - a - sized number of behavior species.
float* clLinearBiLevelGrowth::mp_fHiLightThreshold [protected] |
Threshold between low light and high light growth, as a value between 0 and 100 - sized number of behavior species.
int* clLinearBiLevelGrowth::mp_iIndexes [protected] |
To help access the other arrays.
float clLinearBiLevelGrowth::m_fYearsPerTimestep [protected] |
Conversion factor to translate the results of the function to the appropriate units per timestep.
int clLinearBiLevelGrowth::m_iLightCode [protected] |
Code for the "Light" data member of the "Storm Light" grid.