clSuppressionDurationMort Class Reference

Suppression duration mortality - Version 1.0. More...

#include <SuppressionDurationMort.h>

Inheritance diagram for clSuppressionDurationMort:

clMortalityBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clSuppressionDurationMort (clSimManager *p_oSimManager)
 Constructor.
 ~clSuppressionDurationMort ()
 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 age beyond this can be calculated as a one-off.
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 "Tree Age" data member.
short int m_iNumSpecies
 Number of species.
short int m_iMaxMortTime
 Max number of pre-calculated mortalities.


Detailed Description

Suppression duration mortality - Version 1.0.

This causes mortality as a function of tree age. Age is tracked by the class clTreeAgeCalculator.

Probability of mortality is p = max/(1+(age/X0)^Xb). If tree age is 10000, mortality probability = 0 because that is an initial conditions tree.

Dead reason code is natural.

This class's namestring is "suppressiondurationmortshell". The parameter file call string is "Suppression Duration Mortality".

Copyright 2011 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
February 14, 2011 - Created (LEM)

Constructor & Destructor Documentation

clSuppressionDurationMort::clSuppressionDurationMort ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clSuppressionDurationMort::~clSuppressionDurationMort (  ) 

Destructor.


Member Function Documentation

void clSuppressionDurationMort::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:
  • "Age" is not registered for any tree to which this behavior is applied
  • max is not between 0 and 1
  • X0 = 0

Reimplemented from clMortalityBase.

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

Calculates mortality.

This retrieves the tree's age. The mortality probability for that year is compared to a random number to see if the tree lives or dies.

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 age beyond this can be calculated as a one-off.

First index is species, second is age

Max mort rate - sized number of species.

X0 - sized number of species.

Xb - sized number of species.

Codes for "Tree Age" 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:18 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6