clTestMortality Class Reference

Tests the classes descended from clMortalityBase. More...

#include <TestMortality.h>

List of all members.

Public Member Functions

void TestMortality ()
 Tests the mortality classes.

Protected Member Functions

char * WriteXMLFile1 ()
 Writes a parameter file with the specifications given for TestMortality(), run 1.
char * WriteXMLFile2 ()
 Writes a parameter file with the specifications given for TestMortality(), run 2.


Detailed Description

Tests the classes descended from clMortalityBase.

Author:
Lora E. Murphy

Member Function Documentation

void clTestMortality::TestMortality (  ) 

Tests the mortality classes.

First run: WriteXMLFile1() creates the parameter file. The file has the following characteristics:

  • Timestep length of 1 year.
  • 5 species: Species 1, Species 2, Species 3, Species 4, Species 5.
  • BC mortality behavior, applied to seedlings, saplings, and adults of Species 1.
  • Juvenile stochastic mortality behavior, applied to seedlings of Species 3 and Species 4.
  • Adult stochastic mortality behavior, applied to adults of Species 3.
  • Senescence mortality behavior, applied to adults of Species 4.
  • Adult self-thinning behavior, applied to adults of Species 5.
  • Juvenile self-thinning behavior, applied to saplings of Species 4.
The function does the following:
  1. 1000 trees are created of each tree species/type combination that has been applied to a behavior.
    • Seedlings of species 1 all get a value of 0 in their "lgm" data member.
    • Saplings of Species 1 all get a value of 0.1 in their "lgm" data member.
    • Adults of Species 1 all get a value of 5 in their "lgm" data member.
    • Adults of Species 4 all get a DBH of 100.
    • Adults of Species 5 all get a DBH 20.
    • Saplings of Species 4 all get a DBH of 8.
  2. The model is run for 1 timestep.
  3. The remaining trees of each tree type and species are counted.
  4. The counts are compared to expected results, give or take 5%.

Second run: WriteXMLFile2() creates the parameter file. The file has the following characteristics:

  • Timestep length of 5 years.
  • BC mortality behavior, applied to seedlings, saplings, and adults of Species 1.
  • GMF mortality behavior, applied to seedlings, saplings, and adults of Species 2.
  • Juvenile stochastic mortality behavior, applied to seedlings and saplings of Species 3.
  • Adult stochastic mortality behavior, applied to adults of Species 3.
  • Senescence mortality behavior, applied to adults of Species 4.
  • Adult self-thinning behavior, applied to adults of Species 5.
  • Juvenile self-thinning behavior, applied to saplings of Species 4.
The function does the following:
  1. 1000 trees are created of each tree species/type combination that has been applied to a behavior.
    • Seedlings of species 1 all get a value of 0 in their "lgm" data member.
    • Saplings of Species 1 all get a value of 0.5 in their "lgm" data member.
    • Adults of Species 1 all get a value of 5 in their "lgm" data member.
    • Seedlings of species 2 all get a value of 0 in their "lgm" data member.
    • Saplings of Species 2 all get a value of 0.1 in their "lgm" data member.
    • Adults of Species 2 all get a value of 5 in their "lgm" data member.
    • Adults of Species 4 all get a DBH of 100.
    • Adults of Species 5 all get a DBH 20.
    • Saplings of Species 4 all get a DBH of 8.
  2. The model is run for 1 timestep.
  3. The remaining trees of each tree type and species are counted.
  4. The counts are compared to expected results, give or take 5%.

char* clTestMortality::WriteXMLFile1 (  )  [protected]

Writes a parameter file with the specifications given for TestMortality(), run 1.

Returns:
Filename written.

char* clTestMortality::WriteXMLFile2 (  )  [protected]

Writes a parameter file with the specifications given for TestMortality(), run 2.

Returns:
Filename written.


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

Generated on Wed Oct 28 14:03:22 2009 for SORTIE C++ Test Documentation by  doxygen 1.5.6