clRandomBrowse Class Reference

Random Browse Version 1.0. More...

#include <RandomBrowse.h>

Inheritance diagram for clRandomBrowse:

clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clRandomBrowse (clSimManager *p_oSimManager)
 Constructor.
 ~clRandomBrowse ()
 Destructor.
void Action ()
 Decides who is browsed.
void GetData (xercesc::DOMDocument *p_oDoc)
 Does setup for this behavior.
void RegisterTreeDataMembers ()
 Registers the "Browsed" bool data member.

Protected Attributes

float * mp_fBrowseProb
 Probability of browse (or mean prob).
float * mp_fBrowseStdDev
 Standard deviation of browse probability, if using a normal draw each timestep.
char * m_cQuery
 String to pass to clTreePopulation::Find() in order to get the trees for which to calculate volume.
short int ** mp_iBrowsedCodes
 Holds data member codes for "Browsed" bool data member.
short int m_iNumSpecies
 For the destructor.
pdf m_iPDF
 What distribution function to use to randomize the probabilities each timestep - currently only deterministic and normal supported.


Detailed Description

Random Browse Version 1.0.

This class randomly chooses trees to be browsed according to a species specific probability of browse. The same browse probability can be used every time, or it can be the mean in a normal draw each timestep for each species.

This behavior adds a bool data member called "Browsed" to trees that holds whether (true) or not (false) the tree has been browsed.

This class's namestring and parameter call string are both "random browse".

Copyright 2007 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
March 12, 2007 - Created (LEM)
January 30, 2008 - Added normal draw to probability (LEM)

Constructor & Destructor Documentation

clRandomBrowse::clRandomBrowse ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager clSimManager object.

clRandomBrowse::~clRandomBrowse (  ) 

Destructor.

Deletes arrays.


Member Function Documentation

void clRandomBrowse::Action (  )  [virtual]

Decides who is browsed.

A query is sent to the tree population to get all trees to which this behavior is applied. For each, a random number is compared to that species' browse probability. The result is placed in the "Browsed" bool tree data member.

Reimplemented from clBehaviorBase.

void clRandomBrowse::GetData ( xercesc::DOMDocument *  p_oDoc  )  [virtual]

Does setup for this behavior.

This gets parameters and formats the query string for getting trees from the tree population.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if any probability is not between 0 and 1.

Implements clWorkerBase.

void clRandomBrowse::RegisterTreeDataMembers (  )  [virtual]

Registers the "Browsed" bool data member.

The return codes are captured in the mp_iBrowsedCodes array.

Reimplemented from clBehaviorBase.


Member Data Documentation

float* clRandomBrowse::mp_fBrowseProb [protected]

Probability of browse (or mean prob).

Array size is total number of species.

Standard deviation of browse probability, if using a normal draw each timestep.

Array size is total number of species.

char* clRandomBrowse::m_cQuery [protected]

String to pass to clTreePopulation::Find() in order to get the trees for which to calculate volume.

This will instigate a species/type search for all the species and types to which this behavior applies.

short int** clRandomBrowse::mp_iBrowsedCodes [protected]

Holds data member codes for "Browsed" bool data member.

First array index is # species, second is number types.

short int clRandomBrowse::m_iNumSpecies [protected]

For the destructor.

What distribution function to use to randomize the probabilities each timestep - currently only deterministic and normal supported.


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

Generated on Wed Oct 28 13:58:48 2009 for SORTIE Core C++ Documentation by  doxygen 1.5.6