clInsectInfestationMortality Class Reference

Insect Infestation Mortality - Version 1.0. More...

#include <InsectInfestationMortality.h>

Inheritance diagram for clInsectInfestationMortality:

clMortalityBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clInsectInfestationMortality (clSimManager *p_oSimManager)
 Constructor.
 ~clInsectInfestationMortality ()
 Destructor.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Reads in values from the parameter file.
deadCode DoMort (clTree *p_oTree, const float &fDbh, const short int &iSpecies)
 Calculates mortality.

Protected Attributes

float ** mp_fMortProbs
 Precalculated mortality probabilities, out to m_iMaxMortTime; any infestation time beyond this can be calculated as a one-off.
float * mp_fIntercept
 Intercept - sized number of species.
float * mp_fMax
 Max mort rate - sized number of species.
float * mp_fX0
 X0 - sized number of species.
float * mp_fXb
 Xb - sized number of species.
short int ** mp_iDataCodes
 Codes for "YearsInfested" data member.
short int m_iNumSpecies
 Number of species.
short int m_iMaxMortTime
 Max number of pre-calculated mortalities.


Detailed Description

Insect Infestation Mortality - Version 1.0.

This evaluates mortality for trees that have an insect infestation.

The probability of death is a function of the number of years infested, as follows:

P = I +((MAX - I)/(1+(T/X0)^Xb))

where P is mortality probability, I is the intercept (mortality at time of infestation), MAX is max mortality probability, T is infestation time in years, X0 is time at which mortality prob = 0.5, and Xb controls steepness of the mortality increase.

A random number determines whether the trees die. Those that die have "insect" passed as the reason code.

Insect infestation is determined by the behavior of class clInsectInfestation. This class expects that behavior to be enabled and the "YearsInfested" int data member to be present for all trees to which this behavior is applied.

This class's namestring is "insect infestation mortshell". The parameter file call string is "Insect Infestation Mortality".

Copyright 2010 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
December 10, 2010 - Created (LEM)

Constructor & Destructor Documentation

clInsectInfestationMortality::clInsectInfestationMortality ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clInsectInfestationMortality::~clInsectInfestationMortality (  ) 

Destructor.


Member Function Documentation

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

Reads in values from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if:
  • "YearsInfested" is not registered for any tree to which this behavior is applied
  • MAX is not between 0 and 1
  • Intercept is not between 0 and 1
  • X0 = 0

Reimplemented from clMortalityBase.

deadCode clInsectInfestationMortality::DoMort ( clTree p_oTree,
const float &  fDbh,
const short int &  iSpecies 
) [virtual]

Calculates mortality.

This retrieves the tree's time of infestation. If it is infested, the mortality probability for that year is compared to a random number to see if the tree lives or dies. If it is uninfested, it does not die.

Parameters:
p_oTree Tree being evaluated
fDbh Tree's DBH
iSpecies Species of the tree being evaluated
Returns:
insects if the tree is to die, notdead if it lives.

Implements clMortalityBase.


Member Data Documentation

Precalculated mortality probabilities, out to m_iMaxMortTime; any infestation time beyond this can be calculated as a one-off.

First index is species, second is time of infestation

Intercept - sized number of species.

Max mort rate - sized number of species.

X0 - sized number of species.

Xb - sized number of species.

Codes for "YearsInfested" data member.

Array size is number of species by number of types.

Number of species.

For destructor.

Max number of pre-calculated mortalities.

This will be the biggest value of 2*X0.


The documentation for this class was generated from the following file:

Generated on Tue Apr 19 13:56:11 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6