clSizeDepLogisticGrowth Class Reference

Increments growth according to a size dependent logistic equation. More...

#include <SizeDepLogisticGrowth.h>

Inheritance diagram for clSizeDepLogisticGrowth:

clGrowthBase clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clSizeDepLogisticGrowth (clSimManager *p_oSimManager)
 Constructor.
 ~clSizeDepLogisticGrowth ()
 Destructor.
float CalcHeightGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fDiameterGrowth)
 Calculates the amount of height growth increase for a particular tree using the size dependent logistic growth equation.
float CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth)
 Calculates the amount of diameter growth increase for a particular tree using the size dependent logistic 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 Member Functions

float CalculateFunctionValue (int iSpecies, float fGLI, float fDiam)
 Calculates the value of the size dependent logistic growth function for one increment.

Protected Attributes

float * mp_fSlope
 Growth slope - b - sized number of behavior species.
float * mp_fIntercept
 Growth intercept - a - sized number of behavior species.
float * mp_fShape1
 Shape parameter 1 - c - sized number of behavior species.
float * mp_fShape2
 Shape parameter 2 - d - sized number of behavior species.
short int * mp_iIndexes
 For accessing the other arrays.
float m_fConversionFactor
 Conversion factor to translate the results of the function to the appropriate units, depending on the type of growth behavior this is.
float m_fNumberOfYearsPerTimestep
 Number of years per timestep.

Detailed Description

Increments growth according to a size dependent logistic equation.

This can be used to create a growth increment with no automatic height adjustment, a growth increment with automatic height adjustment, or a height increment.

The equation used in this behavior is:

Y = (a + b * diam) / (1 + ec - d*GLI)
where

This behavior compounds this result for multi-year timesteps. In the case of diameter growth, a copy of the diameter value is incremented X times (with X being the number of years per timestep) and the final increment is the sum of all the interim increments. In the case of height growth, the amount of diameter growth is divided by X and this value used to increment height X times, with the nth diameter (n = 1 to X) being the original diameter plus (n * diameter growth / X).

The name string is "sizedeplogisticgrowthshell". In the parameter file: For diameter growth with no automatic height adjustment, call "size dependent logistic growth diam only". For diameter growth with automatic height adjustment, call "size dependent logistic growth". For height growth, call "size dependent logistic growth height".

Copyright 2004 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
June 10, 2004 - Created (LEM)


Constructor & Destructor Documentation

clSizeDepLogisticGrowth::clSizeDepLogisticGrowth ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.

clSizeDepLogisticGrowth::~clSizeDepLogisticGrowth (  ) 

Destructor.

Frees memory.


Member Function Documentation

float clSizeDepLogisticGrowth::CalcDiameterGrowthValue ( clTree p_oTree,
clTreePopulation p_oPop,
float  fHeightGrowth 
) [virtual]

Calculates the amount of diameter growth increase for a particular tree using the size dependent logistic growth equation.

The function value is calculated for each year of the timestep by repeatedly incrementing a copy of the diameter (the tree's actual diameter remains untouched, as it is supposed to). The final increment is the sum of all the intermediate increments.

Parameters:
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).
Returns:
Amount, in cm, by which to increase the tree's diameter.

Reimplemented from clGrowthBase.

float clSizeDepLogisticGrowth::CalcHeightGrowthValue ( clTree p_oTree,
clTreePopulation p_oPop,
float  fDiameterGrowth 
) [virtual]

Calculates the amount of height growth increase for a particular tree using the size dependent logistic growth equation.

The function value is calculated for each year of the timestep by using the original diameter plus fDiameterGrowth divided by the years per timestep times the loop counter for the year being compounded. The final increment is the sum of all the intermediate increments.

Parameters:
p_oTree Tree for which to calculate growth.
p_oPop Tree population object, just in case it's needed.
fDiameterGrowth Amount of diameter growth for this tree, in cm.
Returns:
Amount, in m, by which to increase the tree's height.

Reimplemented from clGrowthBase.

float clSizeDepLogisticGrowth::CalculateFunctionValue ( int  iSpecies,
float  fGLI,
float  fDiam 
) [inline, protected]

Calculates the value of the size dependent logistic growth function for one increment.

The meaning of what is returned depends on the type of growth the behavior is doing.

Parameters:
iSpecies Tree species.
fGLI The GLI value.
fDiam The diameter for which to calculate this increment.
Returns:
The value of the size dependent logistic growth function. Units depend on the type of growth that this is.

void clSizeDepLogisticGrowth::DoShellSetup ( xercesc::DOMDocument *  p_oDoc  )  [virtual]

Does the setup for this behavior.

This reads in the parameters from the parameter file, and validates that all species/type combos use light (each must have "Light" registered).

Parameters:
p_oDoc Parsed parameter file.
Exceptions:
modelErr if any species/type combo to which this behavior is applied does not have a light behavior.

Reimplemented from clGrowthBase.

void clSizeDepLogisticGrowth::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.

Parameters:
cNameString Behavior's namestring.

Reimplemented from clBehaviorBase.


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:42:24 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.7