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:

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:

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 Nov 15 11:27:26 2006 for SORTIE C++ Test Documentation by  doxygen 1.4.7