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

Density-Dependent Seed Survival - version 2.0. More...

#include <DensitySeedSurvival.h>

Inheritance diagram for clDensitySeedSurvival:
clBehaviorBase clWorkerBase

Public Member Functions

 clDensitySeedSurvival (clSimManager *p_oSimManager)
 Constructor. More...
 
 ~clDensitySeedSurvival ()
 Destructor. More...
 
void GetData (xercesc::DOMDocument *p_oDoc)
 Reads in values from the parameter file. More...
 
void SetNameData (std::string sNameString)
 Captures the namestring passed to this behavior. More...
 
void Action ()
 Performs density-dependent seed survival by calling either ActionUseSeeds or ActionUseTrees. More...
 
- Public Member Functions inherited from clBehaviorBase
virtual float GetBehaviorVersion ()
 Gets the behavior version number. More...
 
 clBehaviorBase (clSimManager *p_oSimManager)
 Constructor. More...
 
virtual ~clBehaviorBase ()
 Destructor. More...
 
virtual short int ValidateVersionNumber (float fTestVersion)
 Makes sure that the version number of a file passed is between the minimum and current version numbers. More...
 
virtual void RegisterTreeDataMembers ()
 Registers tree data members. More...
 
virtual void SetSpeciesTypeCombos (short int iNumCombos, stcSpeciesTypeCombo *p_whatCombos)
 Sets the species/type combos for a behavior. More...
 
virtual short int GetNewTreeInts ()
 Gets the number of new tree integer data members this behavior wants to register. More...
 
virtual short int GetNewTreeFloats ()
 Gets the number of new tree float data members this behavior wants to register. More...
 
virtual short int GetNewTreeChars ()
 Gets the number of new tree character data members this behavior wants to register. More...
 
virtual short int GetNewTreeBools ()
 Gets the number of new tree bool data members this behavior wants to register. More...
 
virtual short int GetNumSpeciesTypeCombos ()
 Gets the number of species/type combos to which this behavior applies. More...
 
virtual short int GetNumBehaviorSpecies ()
 Gets the number of unique tree species to which this behavior applies. More...
 
struct stcSpeciesTypeCombo GetSpeciesTypeCombo (short int iIndex)
 Gets one of this behavior's type/species combos. More...
 
virtual short int GetBehaviorSpecies (short int iIndex)
 Gets one of the behavior's species. More...
 
short int GetBehaviorListNumber ()
 Gets the behavior list number for this behavior, which differentiates between multiple copies of the behavior in the behavior list. More...
 
void SetBehaviorListNumber (short int iNumber)
 Sets the behavior list number for this behavior, which differentiates between multiple copies of the behavior in the behavior list. More...
 
std::string FormatSpeciesTypeQueryString ()
 Formats the string for species/types query. More...
 
virtual DOMElement * GetParentParametersElement (xercesc::DOMDocument *p_oDoc)
 This will get the correct set of parameters for this behavior based on the behavior list position number. More...
 
- Public Member Functions inherited from clWorkerBase
 clWorkerBase (clSimManager *p_oSimManager)
 Constructor. More...
 
virtual ~clWorkerBase ()
 Destructor. More...
 
std::string GetName ()
 Gets the object's namestring. More...
 
clSimManagerGetSimManager ()
 
void DoObjectSetup (xercesc::DOMDocument *p_oDoc, fileType iFileType)
 Triggers the setup process. More...
 
virtual void TimestepCleanup ()
 Performs any necessary cleanup operations at the end of a timestep. More...
 
virtual void EndOfRunCleanup ()
 Performs any necessary cleanup operations at the end of a run. More...
 

Protected Member Functions

void ActionUseSeeds ()
 Performs density-dependent seed survival when m_bSeeds = TRUE. More...
 
void ActionUseTrees ()
 Performs density-dependent seed survival when m_bSeeds = FALSE. More...
 
- Protected Member Functions inherited from clWorkerBase
void AssembleFileCode (int iFileType, int iFileVersion, char *cCode)
 Creates the proper identifying filecode for an XML file. More...
 

Protected Attributes

clGridmp_oSeedGrid
 Pointer to the "Dispersed Seeds" grid created by disperse behaviors. More...
 
double * mp_fDensDepSteepness
 Density-dependence steepness parameter. More...
 
double * mp_fDensDepSlope
 Density-dependence slope parameter. More...
 
double * mp_fMinHeight
 Minimum height for neighbor trees. More...
 
short int * mp_iSeedGridCode
 Data member codes for seed grid for number of seeds. More...
 
float m_fNormalSearchArea
 Area normally searched. More...
 
float m_fXEdgeCellArea
 Area of the last row of "Dispersed Seeds" grid cells in the X direction, in square meters. More...
 
float m_fYEdgeCellArea
 Area of the last row of "Dispersed Seeds" grid cells in the Y direction, in square meters. More...
 
float m_fXYEdgeCellArea
 Area of the last cell of "Dispersed Seeds" grid cell in both the X and Y direction, in square meters. More...
 
double m_fSearchRadius
 Radius, in meters, for which to search for conspecific trees, starting at the center of a grid cell. More...
 
bool m_bSeeds
 If true, we are using the density of conspecific seeds; if false, we are using conspecific trees. More...
 
- Protected Attributes inherited from clBehaviorBase
short int m_iNumSpeciesTypeCombos
 How many type/species combos a behavior will act on. More...
 
short int m_iNumBehaviorSpecies
 How many distinct species are in the combo list - important for filling species-specific values from parameter file. More...
 
short int * mp_iWhatSpecies
 List of distinct species - for filling species-specific values from parameter file. More...
 
stcSpeciesTypeCombomp_whatSpeciesTypeCombos
 Array of species/type combos that the behavior will act on. More...
 
short int m_iNewTreeInts
 The number of new tree integer data members this behavior wants to add. More...
 
short int m_iNewTreeFloats
 The number of new tree float data members this behavior wants to add. More...
 
short int m_iNewTreeChars
 The number of new tree character data members this behavior wants to add. More...
 
short int m_iNewTreeBools
 The number of new tree boolean data members this behavior wants to add. More...
 
short int m_iBehaviorListNumber
 The number of this behavior in the behavior list, to differentiate between possible multiple copies of this behavior. More...
 
float m_fVersionNumber
 Version number - this will be rounded to 2 digits after the decimal place. More...
 
std::string m_sXMLRoot
 XML root that encloses the parameters for this behavior. More...
 
float m_fMinimumVersionNumber
 Minimum version number - this behavior will run parameter data for a file marked between this number and the current version number, inclusive. More...
 
- Protected Attributes inherited from clWorkerBase
std::string m_sNameString
 If a behavior has registered a command line command with the sim manager, this allows it to be called. More...
 
clSimManagermp_oSimManager
 Pointer to the simulation manager object. More...
 
int * mp_iAllowedFileTypes
 List of the input file types this object can handle. More...
 
int m_iNumAllowedTypes
 Number of input file types this object can handle. More...
 

Detailed Description

Density-Dependent Seed Survival - version 2.0.

This behavior reduces the number of seeds due to conspecific density-dependent effects. The "density" in question can be either other seeds, or trees in the neighborhood.

The number of seeds this behavior leaves of a given species in a particular "Dispersed Seeds" grid cell is:

Rsp = Ssp*exp(-c*Denspδ)

where:

Single seeds always survive, if using seeds-only density dependence.

A fatal error is thrown if a disperse behavior is not also defined for the run.

This class's namestring is "DensityDependentSeedSurvival". In the case of conspecific seed density, the parameter file call string is also "DensityDependentSeedSurvival"; in the case of conspecific tree neighbors, it's "ConspecificTreeDensityDependentSeedSurvival".

Copyright 2011 Charles D. Canham.

Author
Lora E. Murphy


Edit history:
--------------—
October 20, 2011 - Wiped the slate clean for SORTIE 7.0 (LEM)

Constructor & Destructor Documentation

◆ clDensitySeedSurvival()

clDensitySeedSurvival::clDensitySeedSurvival ( clSimManager p_oSimManager)

Constructor.

Parameters
p_oSimManagerSim Manager object.

◆ ~clDensitySeedSurvival()

clDensitySeedSurvival::~clDensitySeedSurvival ( )

Destructor.

Member Function Documentation

◆ Action()

void clDensitySeedSurvival::Action ( )
virtual

Performs density-dependent seed survival by calling either ActionUseSeeds or ActionUseTrees.

Reimplemented from clBehaviorBase.

◆ ActionUseSeeds()

void clDensitySeedSurvival::ActionUseSeeds ( )
protected

Performs density-dependent seed survival when m_bSeeds = TRUE.

For each grid cell in the seed grid, for each species to which this behavior applies, the number of seeds left is calculated by assessing the equation above. A random round is used to take care of fractional parts of seeds.

◆ ActionUseTrees()

void clDensitySeedSurvival::ActionUseTrees ( )
protected

Performs density-dependent seed survival when m_bSeeds = FALSE.

◆ GetData()

void clDensitySeedSurvival::GetData ( xercesc::DOMDocument *  p_oDoc)
virtual

Reads in values from the parameter file.

Parameters
p_oDocDOM tree of parsed input file.

Implements clWorkerBase.

◆ SetNameData()

void clDensitySeedSurvival::SetNameData ( std::string  sNameString)
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
sNameStringBehavior's namestring.

Reimplemented from clBehaviorBase.

Member Data Documentation

◆ m_bSeeds

bool clDensitySeedSurvival::m_bSeeds
protected

If true, we are using the density of conspecific seeds; if false, we are using conspecific trees.

◆ m_fNormalSearchArea

float clDensitySeedSurvival::m_fNormalSearchArea
protected

Area normally searched.

If m_bSeeds = TRUE, this is the area of interior cells of the "Dispersed Seeds" grid, in square meters. If m_bSeeds = FALSE, this is the area of the circle with radius m_fSearchRadius.

◆ m_fSearchRadius

double clDensitySeedSurvival::m_fSearchRadius
protected

Radius, in meters, for which to search for conspecific trees, starting at the center of a grid cell.

Only used if m_bSeeds = FALSE.

◆ m_fXEdgeCellArea

float clDensitySeedSurvival::m_fXEdgeCellArea
protected

Area of the last row of "Dispersed Seeds" grid cells in the X direction, in square meters.

This allows for grid cells that don't divide evenly into plot lengths. Only used if m_bSeeds = TRUE.

◆ m_fXYEdgeCellArea

float clDensitySeedSurvival::m_fXYEdgeCellArea
protected

Area of the last cell of "Dispersed Seeds" grid cell in both the X and Y direction, in square meters.

This allows for grid cells that don't divide evenly into plot lengths. Only used if m_bSeeds = TRUE.

◆ m_fYEdgeCellArea

float clDensitySeedSurvival::m_fYEdgeCellArea
protected

Area of the last row of "Dispersed Seeds" grid cells in the Y direction, in square meters.

This allows for grid cells that don't divide evenly into plot lengths. Only used if m_bSeeds = TRUE.

◆ mp_fDensDepSlope

double* clDensitySeedSurvival::mp_fDensDepSlope
protected

Density-dependence slope parameter.

Array size is total number of species.

◆ mp_fDensDepSteepness

double* clDensitySeedSurvival::mp_fDensDepSteepness
protected

Density-dependence steepness parameter.

Array size is total number of species.

◆ mp_fMinHeight

double* clDensitySeedSurvival::mp_fMinHeight
protected

Minimum height for neighbor trees.

Only used if m_bSeeds = FALSE. Array size is total number of species.

◆ mp_iSeedGridCode

short int* clDensitySeedSurvival::mp_iSeedGridCode
protected

Data member codes for seed grid for number of seeds.

Array size is # total species.

◆ mp_oSeedGrid

clGrid* clDensitySeedSurvival::mp_oSeedGrid
protected

Pointer to the "Dispersed Seeds" grid created by disperse behaviors.


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