clBrowsedStochasticMortality Class Reference

Browsed Stochastic Mortality - Version 1.0. More...

#include <BrowsedStochasticMortality.h>

Inheritance diagram for clBrowsedStochasticMortality:

clMortalityBase clBehaviorBase clWorkerBase List of all members.

Public Member Functions

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

Protected Attributes

float * mp_fBrowsedMortProb
 Probability of mortality when browsed - sized number of species.
float * mp_fUnbrowsedMortProb
 Probability of mortality when unbrowsed - sized number of species.
short int ** mp_iBrowsedCodes
 Codes for "Browsed" data member.
short int m_iNumSpecies
 Number of species.

Detailed Description

Browsed Stochastic Mortality - Version 1.0.

This evaluates mortality at a constant rate, with a separate rate for browsed and unbrowsed trees. Trees are chosen at random to die.

Browsedness is determined by the Random Browse behavior (class clRandomBrowse). This class expects that behavior to be enabled and the "Browsed" bool data member to be present for all trees to which this behavior is applied.

This class's namestring is "browsed stochastic mortshell". The parameter file call string is "Browsed Stochastic Mortality".

Copyright 2007 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 2, 2007 - Created (LEM)


Constructor & Destructor Documentation

clBrowsedStochasticMortality::clBrowsedStochasticMortality ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.


Member Function Documentation

void clBrowsedStochasticMortality::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 the browsed behavior is missing, or if any mortality rate is not between 0 and 1.

Reimplemented from clMortalityBase.

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

Calculates mortality.

This retrieves the tree's browsed status. If it is browsed, the browsed mortality probability is used. If it is unbrowsed, the unbrowsed probability is used. A random number is compared to the appropriate rate 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:
True if the tree is to die, false if it lives.

Implements clMortalityBase.


Member Data Documentation

float* clBrowsedStochasticMortality::mp_fBrowsedMortProb [protected]

Probability of mortality when browsed - sized number of species.

This value comes from the parameter file as an annual probability, which is transformed in DoShellSetup() to a timestep probability.

float* clBrowsedStochasticMortality::mp_fUnbrowsedMortProb [protected]

Probability of mortality when unbrowsed - sized number of species.

This value comes from the parameter file as an annual probability, which is transformed in DoShellSetup() to a timestep probability.

short int** clBrowsedStochasticMortality::mp_iBrowsedCodes [protected]

Codes for "Browsed" data member.

Array size is number of species by number of types.

short int clBrowsedStochasticMortality::m_iNumSpecies [protected]

Number of species.

For destructor.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:30:42 2007 for SORTIE Core C++ Documentation by  doxygen 1.5.2