Tests the clRandomBrowse class.
More...
#include <TestRandomBrowse.h>
Tests the clRandomBrowse class.
- Author
- Lora E. Murphy
void clTestRandomBrowse::TestErrorProcessing |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests error processing.
- Parameters
-
p_oSimManager | Sim manager. |
void clTestRandomBrowse::TestNormalRun1 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing run 1.
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.
-
Random browse behavior applied to seedlings and saplings of Species 1, 4 and 5, and seedlings of species 3.
The function does the following:
-
1000 trees are created of each tree species/type combination for seedlings, saplings, and adults.
-
The model is run for 1 timestep.
-
The number browsed are counted.
-
The counts are compared to expected results, give or take 5%.
-
The model is run for another timestep.
-
The number browsed is expected to be roughly the same, but not exactly the same (i.e. a new set of browsed individuals has been chosen).
- Parameters
-
p_oSimManager | Sim manager. |
void clTestRandomBrowse::TestNormalRun2 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing run 2.
WriteXMLFile2() creates the parameter file. The run is exactly the same as run 1except the timestep length is three years, so the browse probabilities are compounded appropriately.
- Parameters
-
p_oSimManager | Sim manager. |
void clTestRandomBrowse::TestNormalRun3 |
( |
clSimManager * |
p_oSimManager | ) |
|
|
protected |
Tests normal processing run 3.
WriteXMLFile3() creates the parameter file. The probabilities are done on a normal random draw. This creates a large number of probabilities to test the draw.
- Parameters
-
p_oSimManager | Sim manager. |
void clTestRandomBrowse::TestRandomBrowse |
( |
| ) |
|
Consolidates the testing into a single function.
const char* clTestRandomBrowse::WriteXMLErrorFile1 |
( |
| ) |
|
|
protected |
Writes a parameter file where the browse probabilities are not all between 0 and 1.
- Returns
- Filename written.
const char* clTestRandomBrowse::WriteXMLFile1 |
( |
| ) |
|
|
protected |
Writes a parameter file with the specifications given for TestRandomBrowse(), run 1.
- Returns
- Filename written.
const char* clTestRandomBrowse::WriteXMLFile2 |
( |
| ) |
|
|
protected |
Writes a parameter file with the specifications given for TestRandomBrowse(), run 2.
- Returns
- Filename written.
const char* clTestRandomBrowse::WriteXMLFile3 |
( |
| ) |
|
|
protected |
Writes a parameter file with the specifications given for TestRandomBrowse(), run 3.
- Returns
- Filename written.
The documentation for this class was generated from the following file: