Tests the classes descended from clMortalityBase.
More...
#include <TestMortality.h>
Tests the classes descended from clMortalityBase.
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:
-
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 "Growth" data member.
-
Saplings of Species 1 all get a value of 0.1 in their "Growth" data member.
-
Adults of Species 1 all get a value of 5 in their "Growth" 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.
-
The model is run for 1 timestep.
-
The remaining trees of each tree type and species are counted.
-
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:
-
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 "Growth" data member.
-
Saplings of Species 1 all get a value of 0.5 in their "Growth" data member.
-
Adults of Species 1 all get a value of 5 in their "Growth" data member.
-
Seedlings of species 2 all get a value of 0 in their "Growth" data member.
-
Saplings of Species 2 all get a value of 0.1 in their "Growth" data member.
-
Adults of Species 2 all get a value of 5 in their "Growth" 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.
-
The model is run for 1 timestep.
-
The remaining trees of each tree type and species are counted.
-
The counts are compared to expected results, give or take 5%.
const char* clTestMortality::WriteXMLFile1 |
( |
| ) |
|
|
protected |
Writes a parameter file with the specifications given for TestMortality(), run 1.
- Returns
- Filename written.
const 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: