SORTIE Core C++ Documentation
Public Member Functions | Protected Attributes | List of all members
clNCITermWithNeighborDamage Class Reference

Calculates NCI according to a function that takes into account neighbors damaged by storms (class clStormDamageApplier). More...

#include <NCITermWithNeighborDamage.h>

Inheritance diagram for clNCITermWithNeighborDamage:
clNCITermBase

Public Member Functions

 clNCITermWithNeighborDamage ()
 Constructor. More...
 
 ~clNCITermWithNeighborDamage ()
 Destructor. More...
 
ncivals CalculateNCITerm (clTree *p_oTree, clTreePopulation *p_oPop, clPlot *p_oPlot, const float &fX, const float &fY, const int &iSpecies)
 Calculates NCI according to above equation. More...
 
void DoSetup (clTreePopulation *p_oPop, clBehaviorBase *p_oNCI, xercesc::DOMElement *p_oElement)
 Does setup. More...
 
- Public Member Functions inherited from clNCITermBase
 clNCITermBase ()
 Constructor. More...
 
int GetNumberNCIs ()
 
virtual void PreCalcs (clTreePopulation *p_oPop)
 Performs calculations like either clGrowthBase::PreGrowthCalcs or clMortalityBase::PreMortCalcs. More...
 
virtual ~clNCITermBase ()
 Destructor. More...
 
bool DoesRequireTargetDiam ()
 

Protected Attributes

double ** mp_fLambda
 Lamba for NCI. More...
 
short int ** mp_iDamageCodes
 Holds return data codes for the "stm_dmg" tree data member. More...
 
double * mp_fMaxCrowdingRadius
 Maximum search radius, in meters, in which to look for crowding neighbors. More...
 
double * mp_fAlpha
 Neighbor DBH effect. More...
 
double * mp_fBeta
 Neighbor distance effect. More...
 
double * mp_fMedDamageEta
 NCI neighbor storm medium damage parameter. More...
 
double * mp_fFullDamageEta
 NCI neighbor storm full damage parameter. More...
 
double * mp_fMinimumNeighborDBH
 The minimum DBH, in cm, of neighbors to be included in NCI calculations. More...
 
double m_fDbhDivisor
 The value to divide DBH by in NCI. More...
 
float m_fMinSaplingHeight
 Minimum sapling height. More...
 
bool m_bIncludeSnags
 Whether or not to include snags in NCI. More...
 
int m_iNumTotalSpecies
 Number of total species. More...
 
- Protected Attributes inherited from clNCITermBase
bool bRequiresTargetDiam
 Whether or not this effect depends on a target diameter being available. More...
 
int iNumNCIs
 Number of NCI values calculated and populated into ncivals. More...
 

Detailed Description

Calculates NCI according to a function that takes into account neighbors damaged by storms (class clStormDamageApplier).

NCIi is calculated as follows (simplifying the notation):

NCIi = Σ η λk((DBHk/q)α/distanceβ)
where:
Note that eta is per target species, not per neighbor (like lambda).

NCI ignores neighbors with disturbance and harvest death codes. Natural deaths are NOT ignored, because it presumes that those deaths occurred in the current timestep and they should still be considered as live neighbors.

Seedlings do not compete.

This returns 1 value for NCI.

Constructor & Destructor Documentation

◆ clNCITermWithNeighborDamage()

clNCITermWithNeighborDamage::clNCITermWithNeighborDamage ( )

Constructor.

◆ ~clNCITermWithNeighborDamage()

clNCITermWithNeighborDamage::~clNCITermWithNeighborDamage ( )

Destructor.

Member Function Documentation

◆ CalculateNCITerm()

ncivals clNCITermWithNeighborDamage::CalculateNCITerm ( clTree p_oTree,
clTreePopulation p_oPop,
clPlot p_oPlot,
const float &  fX,
const float &  fY,
const int &  iSpecies 
)
virtual

Calculates NCI according to above equation.

Parameters
p_oTreeTree for which to calculate NCI.
p_oPopTree population.
p_oPlotPlot object.
fXX coordinate for which to calculate NCI.
fYY coordinate for which to calculate NCI.
iSpeciesSpecies for which to calculate NCI.

Implements clNCITermBase.

◆ DoSetup()

void clNCITermWithNeighborDamage::DoSetup ( clTreePopulation p_oPop,
clBehaviorBase p_oNCI,
xercesc::DOMElement *  p_oElement 
)
virtual

Does setup.

Parameters
p_oPopTree population.
p_oNCINCI behavior object.
p_oElementRoot element of the behavior.
Exceptions
ModelExceptionif:
  • the max radius of neighbor effects is < 0
  • eta for either damage category is not between 0 and 1
  • DBH divisor is <= 0

Implements clNCITermBase.

Member Data Documentation

◆ m_bIncludeSnags

bool clNCITermWithNeighborDamage::m_bIncludeSnags
protected

Whether or not to include snags in NCI.

◆ m_fDbhDivisor

double clNCITermWithNeighborDamage::m_fDbhDivisor
protected

The value to divide DBH by in NCI.

q in the NCI equation above. May be set to 1.

◆ m_fMinSaplingHeight

float clNCITermWithNeighborDamage::m_fMinSaplingHeight
protected

Minimum sapling height.

For doing neighbor searches.

◆ m_iNumTotalSpecies

int clNCITermWithNeighborDamage::m_iNumTotalSpecies
protected

Number of total species.

For the destructor.

◆ mp_fAlpha

double* clNCITermWithNeighborDamage::mp_fAlpha
protected

Neighbor DBH effect.

α variable in equation above. Array sized number of species.

◆ mp_fBeta

double* clNCITermWithNeighborDamage::mp_fBeta
protected

Neighbor distance effect.

β variable in equation above. Array sized number of species.

◆ mp_fFullDamageEta

double* clNCITermWithNeighborDamage::mp_fFullDamageEta
protected

NCI neighbor storm full damage parameter.

ηk in NCI equation above. This is omitted or set to 1 if not used. Array sized number of species.

◆ mp_fLambda

double** clNCITermWithNeighborDamage::mp_fLambda
protected

Lamba for NCI.

Array sized number of total species by number of total species.

◆ mp_fMaxCrowdingRadius

double* clNCITermWithNeighborDamage::mp_fMaxCrowdingRadius
protected

Maximum search radius, in meters, in which to look for crowding neighbors.

Array sized number of species.

◆ mp_fMedDamageEta

double* clNCITermWithNeighborDamage::mp_fMedDamageEta
protected

NCI neighbor storm medium damage parameter.

ηk in NCI equation above. This is omitted or set to 1 if not used. Array sized number of species.

◆ mp_fMinimumNeighborDBH

double* clNCITermWithNeighborDamage::mp_fMinimumNeighborDBH
protected

The minimum DBH, in cm, of neighbors to be included in NCI calculations.

Array assumed to be sized total number of species.

◆ mp_iDamageCodes

short int** clNCITermWithNeighborDamage::mp_iDamageCodes
protected

Holds return data codes for the "stm_dmg" tree data member.

Array size is number of total species by number of types.


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