clGapLight Class Reference

Gap Light - Version 1.0. More...

#include <GapLight.h>

Inheritance diagram for clGapLight:

clLightBase clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clGapLight (clSimManager *p_oSimManager)
 Constructor.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Sets up the "Gap light" grid.
float CalcLightValue (clTree *p_oTree, clTreePopulation *p_oPop)
 Provides a GLI value for a tree.
void TimestepCleanup ()
 Sets m_bCalcedGaps = false.

Protected Member Functions

void CalculateGapStatus (clTreePopulation *p_oPop)
 Updates the gap status of the "Gap Light" grid.

Protected Attributes

clGridBasemp_oGapGrid
 Grid object which holds the gap values, called "Gap Light".
short int m_iGapCode
 Return code for the "Is Gap" member of the "Gap Light" grid to get and set GLI in the cells.
bool m_bCalcedGaps
 Whether or not the gap status has been calculated for this timestep.

Detailed Description

Gap Light - Version 1.0.

This behavior simplifies GLI calculations by treating GLI as binary: either an area is in gap, and GLI = 100% (full sun), or an area is not in gap, and GLI = 0% (no sun).

This behavior uses a grid object, called "Gap Light", to help it assign GLI values to the trees to which it is assigned. The presence of an adult tree in a cell of "Gap Light" causes that cell's status to be non-gap. The absence of any adult trees in a cell causes it to be gap. For all trees to which this behavior is assigned, if they are in a gap cell, their GLI is set to 100%; otherwise it is 0%.

The namestring is "gaplightshell". The parameter file call string is "Gap Light".

Copyright 2003 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
February 8, 2005 - Created (LEM)


Constructor & Destructor Documentation

clGapLight::clGapLight ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.

Parameters:
p_oSimManager Sim Manager object.


Member Function Documentation

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

Sets up the "Gap light" grid.

Parameters:
p_oDoc DOM tree of parsed input file (not used).
Exceptions:
modelErr if the grid is incorrectly set up in the parameter file.

Reimplemented from clLightBase.

float clGapLight::CalcLightValue ( clTree p_oTree,
clTreePopulation p_oPop 
) [virtual]

Provides a GLI value for a tree.

This starts by determining if the gap status has been updated for the timestep (is m_bCalcedGaps = false); if not, then it calls CalculateGapStatus. If the tree is in a gap cell with no adult trees present, the value is 100; otherwise it is 0.

Parameters:
p_oTree Tree for which to get GLI.
p_oPop Tree population object.
Returns:
GLI as a percentage of full sun, either 0 and 100.

Implements clLightBase.

void clGapLight::CalculateGapStatus ( clTreePopulation p_oPop  )  [protected]

Updates the gap status of the "Gap Light" grid.

It asks the tree population for all parent trees; for each tree, the grid cell in which it is is set to gap.

Parameters:
p_oPop Tree population object.


Member Data Documentation

clGridBase* clGapLight::mp_oGapGrid [protected]

Grid object which holds the gap values, called "Gap Light".

It has one bool data member called "Is Gap" for holding the gap status, either TRUE (if there are adults in that cell) or FALSE (if there are not).

A map in the parameter file can only set cell resolution; any values in the map will be ignored.

short int clGapLight::m_iGapCode [protected]

Return code for the "Is Gap" member of the "Gap Light" grid to get and set GLI in the cells.

bool clGapLight::m_bCalcedGaps [protected]

Whether or not the gap status has been calculated for this timestep.


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