SORTIE C++ Test Documentation
Classes | Public Member Functions | Protected Member Functions | List of all members
clTestHarvest Class Reference

Tests the clDisturbance class when it's in Harvest mode. More...

#include <TestHarvest.h>

Inheritance diagram for clTestHarvest:

Classes

struct  tree
 For testing trees. More...
 

Public Member Functions

void TestHarvest ()
 Groups together all the other harvest testing functions into a comprehensive harvest test.
 

Protected Member Functions

void DoHarvestRun1 (clSimManager *p_oSimManager)
 Performs the first harvest run.
 
void DoHarvestRun2 (clSimManager *p_oSimManager)
 Performs the second harvest run.
 
void DoHarvestRun3 (clSimManager *p_oSimManager)
 Performs the third harvest run.
 
void DoHarvestRun4 (clSimManager *p_oSimManager)
 Performs the fourth harvest run.
 
void DoHarvestRun5 (clSimManager *p_oSimManager)
 Performs the fifth harvest run.
 
void DoHarvestRun6 (clSimManager *p_oSimManager)
 Performs the sixth harvest run.
 
void DoHarvestRun8 (clSimManager *p_oSimManager)
 Performs the eighth harvest run.
 
void DoHarvestRun9 (clSimManager *p_oSimManager)
 Performs the ninth harvest run.
 
const char * WriteXMLFile1 ()
 Writes a parameter file to test disturbance for run 1.
 
const char * WriteXMLFile2 ()
 Writes a parameter file to test disturbance for run 2.
 
const char * WriteXMLFile3 ()
 Writes a parameter file to test disturbance for run 3.
 
const char * WriteXMLFile4 ()
 Writes a parameter file to test disturbance for run 4.
 
const char * WriteXMLFile5 ()
 Writes a parameter file to test disturbance for run 5.
 
const char * WriteXMLFile6 ()
 Writes a parameter file to test disturbance for run 6.
 
const char * WriteXMLFile8 ()
 Writes a parameter file to test disturbance for run 8.
 
const char * WriteXMLFile9 ()
 Writes a parameter file to test disturbance for run 9.
 
void WriteTreeMap (std::fstream &oOut)
 Writes the tree map for harvest parameter files.
 
const char * WriteRun9TreeMap ()
 Writes the tree map for run 9 harvest parameter file .
 
void WriteFileBeginning (std::fstream &oOut, int iRandomSeed)
 Writes the tree map for harvest parameter files.
 
void CheckResults (clTreePopulation *p_oPop, int iNumTrees, tree *p_FakeTrees)
 Checks the results of the tree population against the expected results.
 

Detailed Description

Tests the clDisturbance class when it's in Harvest mode.

Member Function Documentation

void clTestHarvest::CheckResults ( clTreePopulation *  p_oPop,
int  iNumTrees,
tree p_FakeTrees 
)
protected

Checks the results of the tree population against the expected results.

void clTestHarvest::DoHarvestRun1 ( clSimManager *  p_oSimManager)
protected

Performs the first harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 1 0 - 300 2, 4 % BA 35 Whole plot 2 3 0-30, 40-80 5 Abs BA 0.2, 0.2 Whole plot 3 3 Min 0 2, 8 Clear 100% Whole plot The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun2 ( clSimManager *  p_oSimManager)
protected

Performs the second harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 1 15-45, 50-80, 0, 1 Dens 50, 40, Whole plot 80-85, 90-99 30, 20 The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun3 ( clSimManager *  p_oSimManager)
protected

Performs the third harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 1 15-45, 50-80, 6, 7 Abs Den 1 Whole plot 80-85, 90-100 The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun4 ( clSimManager *  p_oSimManager)
protected

Performs the fourth harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 2 Min 0 0, 1, 2 Gap 100% Whole plot 2 2 15-45, 50-80, 4, 5 % BA 50, 100, 30, 0 (0,0) - (5,9) 80-85, 90-100 3 3 200-300, 50-80, 4 Abs BA 50, 100, 30, 0 (6,6) - (6-24); (8,6) - (8-24) 80-85, 90-100 4 3 0-10, 10-20, 7 % Dens 50, 100, 30, 0 (0,0) - (5,9) 20-30, 30-40 The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun5 ( clSimManager *  p_oSimManager)
protected

Performs the fifth harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 1 0-10, 10-20, 0-8 Abs Den 5, 100, (6,6) - (6-24); 20-30, 30-40 3, 0 (8,0) - (24-12) The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun6 ( clSimManager *  p_oSimManager)
protected

Performs the sixth harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids 1 1 Min 0 3 Clear 100% (6,6) - (6-24); (8,6) - (8-24) 2 2 Min 0 0 Gap 100% (0,0) - (5,9) 3 3 0 - 300 1 % BA 50 (0,10) 4 3 0 - 300 2 Abs BA 4.5 (5,5) 5 3 0 - 300 4 Dens 50 (10,23) 6 3 0 - 300 5 Abs Den 2 (1,1) 7 3 Min 0 6 Clear 100% (20,0) 8 3 Min 0 7 Gap 100% (1,7) The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun8 ( clSimManager *  p_oSimManager)
protected

Performs the eighth harvest run.

This run has the following characteristics: Harvest # Timestep Cut Ranges Species Cut Type Cut Amt (abs) Grids (Dist) 1 1 Min 0 All Clear 100% (0,0) - (23,39) The harvest will be performed. Then the remaining trees are checked to make sure the proper ones were left alone.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::DoHarvestRun9 ( clSimManager *  p_oSimManager)
protected

Performs the ninth harvest run.

This tests priorities.

Parameters
p_oSimManagerSim Manager.
void clTestHarvest::TestHarvest ( )

Groups together all the other harvest testing functions into a comprehensive harvest test.

void clTestHarvest::WriteFileBeginning ( std::fstream &  oOut,
int  iRandomSeed 
)
protected

Writes the tree map for harvest parameter files.

Parameters
oOutFile stream to write to.
iRandomSeedRandom seed.
const char* clTestHarvest::WriteRun9TreeMap ( )
protected

Writes the tree map for run 9 harvest parameter file .

Returns
Filename written.
void clTestHarvest::WriteTreeMap ( std::fstream &  oOut)
protected

Writes the tree map for harvest parameter files.

Parameters
oOutFile stream to write to.
const char* clTestHarvest::WriteXMLFile1 ( )
protected

Writes a parameter file to test disturbance for run 1.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile2 ( )
protected

Writes a parameter file to test disturbance for run 2.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile3 ( )
protected

Writes a parameter file to test disturbance for run 3.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile4 ( )
protected

Writes a parameter file to test disturbance for run 4.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile5 ( )
protected

Writes a parameter file to test disturbance for run 5.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile6 ( )
protected

Writes a parameter file to test disturbance for run 6.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile8 ( )
protected

Writes a parameter file to test disturbance for run 8.

This has a tree map so an expected tree set is created.

Returns
Filename written.
const char* clTestHarvest::WriteXMLFile9 ( )
protected

Writes a parameter file to test disturbance for run 9.

This has a tree map so an expected tree set is created.

Returns
Filename written.

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