#include <TestStochasticBiLevelMortality.h>
Public Member Functions | |
void | TestStochasticBiLevelMortality () |
This puts all mortality tests into a single function. | |
Protected Member Functions | |
void | NormalProcessingRun1 (clSimManager *p_oSimManager) |
Tests normal processing run 1. | |
void | NormalProcessingRun2 (clSimManager *p_oSimManager) |
Tests normal processing run 2. | |
void | NormalProcessingRun3 (clSimManager *p_oSimManager) |
Tests normal processing run 3. | |
void | NormalProcessingRun4 (clSimManager *p_oSimManager) |
Tests normal processing run 4. | |
void | ErrorProcessing (clSimManager *p_oSimManager) |
Tests error processing. | |
char * | WriteXMLFile1 () |
Writes a parameter file for normal processing run 1. | |
char * | WriteXMLFile2 () |
Writes a parameter file for normal processing run 2. | |
char * | WriteXMLFile3 () |
Writes a parameter file for normal processing run 3. | |
char * | WriteXMLFile4 () |
Writes a parameter file for normal processing run 4. | |
char * | WriteXMLErrorFile1 () |
Writes a parameter file where a value for high-light mortality threshold is not between 0 and 100. | |
char * | WriteXMLErrorFile2 () |
Writes a parameter file where a value for low-light mortality probability is not between 0 and 1. | |
char * | WriteXMLErrorFile3 () |
Writes a parameter file where a value for high-light mortality probability is not between 0 and 1. | |
char * | WriteXMLErrorFile4 () |
Writes a parameter file where there is no storm light grid. | |
char * | WriteXMLErrorFile5 () |
Writes a parameter file where this is GLI but there is no light behavior. | |
void | WriteCommonStuff (std::fstream &oOut) |
Writes common portions of the test parameter files. | |
void | WriteMortParameters (std::fstream &oOut) |
Writes mortality parameters for the test parameter files. |
void clTestStochasticBiLevelMortality::TestStochasticBiLevelMortality | ( | ) |
This puts all mortality tests into a single function.
void clTestStochasticBiLevelMortality::NormalProcessingRun1 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing run 1.
WriteXMLFile1() does setup. Timestep length is 1 year and there is a light grid present. 1000 copies of each of 27 trees is created of 3 species and assigned to a mix of light levels. Then mortality is run. We check the number left of each tree type to see if it is approximately the right number.
p_oSimManager | Sim manager object for doing the run. |
void clTestStochasticBiLevelMortality::NormalProcessingRun2 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing run 2.
WriteXMLFile2() does setup. Timestep length is 3 years and there is a light grid present. 1000 copies of each of 27 trees is created of 3 species and assigned to a mix of light levels. Then mortality is run. We check the number left of each tree type to see if it is approximately the right number.
p_oSimManager | Sim manager object for doing the run. |
void clTestStochasticBiLevelMortality::NormalProcessingRun3 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing run 3.
WriteXMLFile3() does setup. Timestep length is 1 year and this is GLI. 1000 copies of each of 27 trees is created of 3 species and assigned to a mix of light levels. Then mortality is run. We check the number left of each tree type to see if it is approximately the right number.
p_oSimManager | Sim manager object for doing the run. |
void clTestStochasticBiLevelMortality::NormalProcessingRun4 | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests normal processing run 4.
WriteXMLFile4() does setup. Timestep length is 1 year and this is GLI. 1000 copies of each of 27 trees is created of 3 species and assigned to a mix of light levels. Then mortality is run. We check the number left of each tree type to see if it is approximately the right number.
p_oSimManager | Sim manager object for doing the run. |
void clTestStochasticBiLevelMortality::ErrorProcessing | ( | clSimManager * | p_oSimManager | ) | [protected] |
Tests error processing.
Inputs error files to make sure the errors are caught.
char* clTestStochasticBiLevelMortality::WriteXMLFile1 | ( | ) | [protected] |
Writes a parameter file for normal processing run 1.
char* clTestStochasticBiLevelMortality::WriteXMLFile2 | ( | ) | [protected] |
Writes a parameter file for normal processing run 2.
char* clTestStochasticBiLevelMortality::WriteXMLFile3 | ( | ) | [protected] |
Writes a parameter file for normal processing run 3.
char* clTestStochasticBiLevelMortality::WriteXMLFile4 | ( | ) | [protected] |
Writes a parameter file for normal processing run 4.
char* clTestStochasticBiLevelMortality::WriteXMLErrorFile1 | ( | ) | [protected] |
Writes a parameter file where a value for high-light mortality threshold is not between 0 and 100.
char* clTestStochasticBiLevelMortality::WriteXMLErrorFile2 | ( | ) | [protected] |
Writes a parameter file where a value for low-light mortality probability is not between 0 and 1.
char* clTestStochasticBiLevelMortality::WriteXMLErrorFile3 | ( | ) | [protected] |
Writes a parameter file where a value for high-light mortality probability is not between 0 and 1.
char* clTestStochasticBiLevelMortality::WriteXMLErrorFile4 | ( | ) | [protected] |
Writes a parameter file where there is no storm light grid.
char* clTestStochasticBiLevelMortality::WriteXMLErrorFile5 | ( | ) | [protected] |
Writes a parameter file where this is GLI but there is no light behavior.
void clTestStochasticBiLevelMortality::WriteCommonStuff | ( | std::fstream & | oOut | ) | [protected] |
Writes common portions of the test parameter files.
This starts with <randomSeed> and ends with </allometry>.
oOut | File stream to write to. |
void clTestStochasticBiLevelMortality::WriteMortParameters | ( | std::fstream & | oOut | ) | [protected] |
Writes mortality parameters for the test parameter files.
oOut | File stream to write to. |