clTestFuncResponseSeedPredation Class Reference

Tests seed predation. More...

#include <TestFuncResponseSeedPredation.h>

List of all members.

Public Member Functions

void TestFuncResponseSeedPredation ()
 Rolls up all the seed predation tests.

Protected Member Functions

void TestErrorProcessing (clSimManager *p_oSimManager)
 Tests error processing for bad input.
void TestSeedPredationNormal (clSimManager *p_oSimManager)
 Creates a controlled run.
void TestSetup1 (clSimManager *p_oSimManager)
 Tests setup under normal processing conditions for WriteXMLFile2.
void TestSetup2 (clSimManager *p_oSimManager)
 Tests setup under normal processing conditions for WriteXMLFile3.
void TestSetup3 (clSimManager *p_oSimManager)
 Tests setup under normal processing conditions for WriteXMLFile4.
void TestSetup4 (clSimManager *p_oSimManager)
 Tests setup under normal processing conditions for WriteXMLFile5.
void TestDensities (clSimManager *p_oSimManager)
 This verifies that densities are correctly written each timestep.
void TestSeedOfftake1 (clSimManager *p_oSimManager)
 This verifies that the correct number of seeds is left in the seed grid after the model runs.
void TestSeedOfftake2 (clSimManager *p_oSimManager)
 This tests the combination of regular and linked seed predation.
void TestSeedOfftake3 (clSimManager *p_oSimManager)
 This tests seed pooling across cells and species for linked seed predation.
void TestSeedOfftake4 (clSimManager *p_oSimManager)
 This tests species- and season-specific parameters.
char * WriteXMLFile1 ()
 Writes an XML file that will create the sim manager so we can create a grid through the proper channels.
char * WriteXMLFile2 ()
 Writes an XML file that will create the sim manager so we can create a grid through the proper channels.
char * WriteXMLFile3 ()
 Writes an XML file that will create the sim manager so we can create a grid through the proper channels.
char * WriteXMLFile4 ()
 Writes an XML file that will create the sim manager so we can create a grid through the proper channels.
char * WriteXMLFile6 ()
 Writes a file with two timesteps where predator densities are to be preserved.
char * WriteXMLFile7 ()
 Writes a file with two timesteps where predator densities are not to be preserved.
char * WriteXMLFile8 ()
 Writes a file with multiple species, including one that is not applied to seed predation.
char * WriteXMLOfftakeTestFile2 ()
 Writes a file with multiple species, using both regular and linked seed predation.
char * WriteXMLOfftakeTestFile3 ()
 Writes a file with multiple species, using linked seed predation.
char * WriteXMLOfftakeTestFile4 ()
 Writes a file with multiple species, using species- and season-specific parameters.
char * WriteXMLErrorFile1 ()
 Creates file that has a predator initial density of 0.
char * WriteXMLErrorFile2 ()
 Creates file that has no disperse behaviors.
char * WriteXMLErrorFile3 ()
 Creates file that has maps for seed grid and seed predators, and X resolutions don't match.
char * WriteXMLErrorFile4 ()
 Creates file that has weeks of seedfall = 0.
char * WriteXMLErrorFile5 ()
 Creates file that has weeks of model = 0.
char * WriteXMLErrorFile6 ()
 Creates file that has maps for seed grid and seed predators, and Y resolutions don't match.
char * WriteXMLErrorFile7 ()
 Creates file that has a map for seed predators, but is missing the data member "num preds".
char * WriteXMLErrorFile8 ()
 Creates file where week germination starts is < 0.
char * WriteXMLErrorFile9 ()
 Creates file where week germination starts is > 52.
char * WriteXMLErrorFile10 ()
 Creates file where proportion germinating is < 0.
char * WriteXMLErrorFile11 ()
 Creates file where proportion germinating is > 1.


Detailed Description

Tests seed predation.

This can't do a thorough test - this will test error processing and cause an output file to be printed of seed model results so the output can be checked manually.


Member Function Documentation

void clTestFuncResponseSeedPredation::TestFuncResponseSeedPredation (  ) 

Rolls up all the seed predation tests.

void clTestFuncResponseSeedPredation::TestErrorProcessing ( clSimManager *  p_oSimManager  )  [protected]

Tests error processing for bad input.

void clTestFuncResponseSeedPredation::TestSeedPredationNormal ( clSimManager *  p_oSimManager  )  [protected]

Creates a controlled run.

Writes an XML file (WriteXMLFile1) and runs it one timestep to produce output.

void clTestFuncResponseSeedPredation::TestSetup1 ( clSimManager *  p_oSimManager  )  [protected]

Tests setup under normal processing conditions for WriteXMLFile2.

This makes sure that maps are treated correctly and initial densities set up right.

void clTestFuncResponseSeedPredation::TestSetup2 ( clSimManager *  p_oSimManager  )  [protected]

Tests setup under normal processing conditions for WriteXMLFile3.

This makes sure that maps are treated correctly and initial densities set up right.

void clTestFuncResponseSeedPredation::TestSetup3 ( clSimManager *  p_oSimManager  )  [protected]

Tests setup under normal processing conditions for WriteXMLFile4.

This makes sure that maps are treated correctly and initial densities set up right.

void clTestFuncResponseSeedPredation::TestSetup4 ( clSimManager *  p_oSimManager  )  [protected]

Tests setup under normal processing conditions for WriteXMLFile5.

This makes sure that maps are treated correctly and initial densities set up right.

void clTestFuncResponseSeedPredation::TestDensities ( clSimManager *  p_oSimManager  )  [protected]

This verifies that densities are correctly written each timestep.

If the predator densities are to be preserved, the values in the predator grid will be different after a second timestep; if they are not, it will be the same (assuming the seed grid input is the same). WriteXMLFile6() will create the file with two timesteps where the densities are to be preserved; WriteXMLFile7() is the same but densities are not to be preserved.

void clTestFuncResponseSeedPredation::TestSeedOfftake1 ( clSimManager *  p_oSimManager  )  [protected]

This verifies that the correct number of seeds is left in the seed grid after the model runs.

This is based on Wendy's spreadsheet - how many should be left if you subtract all the offtake from the original number. This will use WriteXMLFile1().

void clTestFuncResponseSeedPredation::TestSeedOfftake2 ( clSimManager *  p_oSimManager  )  [protected]

This tests the combination of regular and linked seed predation.

This will use WriteXMLOfftakeFile2().

void clTestFuncResponseSeedPredation::TestSeedOfftake3 ( clSimManager *  p_oSimManager  )  [protected]

This tests seed pooling across cells and species for linked seed predation.

This will use WriteXMLOfftakeFile3().

void clTestFuncResponseSeedPredation::TestSeedOfftake4 ( clSimManager *  p_oSimManager  )  [protected]

This tests species- and season-specific parameters.

This will use WriteXMLOfftakeFile4().

char* clTestFuncResponseSeedPredation::WriteXMLFile1 (  )  [protected]

Writes an XML file that will create the sim manager so we can create a grid through the proper channels.

Characteristics:

  • Plot size of 160 m by 160 m.
  • One species.
  • Creates the seed grid with 1 grid cell the size of the plot.
  • Predator initial density: 0.00046875
  • Number of seeds: 51200000
  • Max instantaneous decline rate: -0.050622442
  • Demographic efficiency: 0.000154258
  • Density-dependent coefficient: -0.000718667
  • Maximum weekly intake: 7295.4
  • Foraging efficiency: 0.001389
  • Seedfall: 12 weeks.
  • Model run: 52 weeks.
Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile2 (  )  [protected]

Writes an XML file that will create the sim manager so we can create a grid through the proper channels.

Characteristics:

  • Plot size of 160 m by 160 m.
  • One species.
  • Disperse behavior is present.
  • Predator initial density: 0.46875
  • Number of seeds: 51200000
  • Max instantaneous decline rate: -0.050622442
  • Demographic efficiency: 0.000154258
  • Density-dependent coefficient: -0.000718667
  • Maximum weekly intake: 7295.4
  • Foraging efficiency: 0.001389
  • Seedfall: 12 weeks.
  • Model run: 52 weeks.
  • Preserve predator density: true.
Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile3 (  )  [protected]

Writes an XML file that will create the sim manager so we can create a grid through the proper channels.

Characteristics:

  • Plot size of 160 m by 160 m.
  • One species.
  • Disperse behavior is present.
  • Predator initial density: 0.00046875
  • Number of seeds: 51200000
  • Max instantaneous decline rate: -0.050622442
  • Demographic efficiency: 0.000154258
  • Density-dependent coefficient: -0.000718667
  • Maximum weekly intake: 7295.4
  • Foraging efficiency: 0.001389
  • Seedfall: 12 weeks.
  • Model run: 52 weeks.
  • Preserve predator density: false.
Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile4 (  )  [protected]

Writes an XML file that will create the sim manager so we can create a grid through the proper channels.

Characteristics:

  • Plot size of 160 m by 160 m.
  • One species.
  • Disperse behavior is present.
  • Predator initial density: 0.00046875
  • Number of seeds: 51200000
  • Max instantaneous decline rate: -0.050622442
  • Demographic efficiency: 0.000154258
  • Density-dependent coefficient: -0.000718667
  • Maximum weekly intake: 7295.4
  • Foraging efficiency: 0.001389
  • Seedfall: 12 weeks.
  • Model run: 52 weeks.
  • Preserve predator density: true.
  • Seed grid map present, cells are 2 X 4
  • Predator map present, resolution same as seed grid, values in each cell = X + Y
Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile6 (  )  [protected]

Writes a file with two timesteps where predator densities are to be preserved.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile7 (  )  [protected]

Writes a file with two timesteps where predator densities are not to be preserved.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLFile8 (  )  [protected]

Writes a file with multiple species, including one that is not applied to seed predation.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLOfftakeTestFile2 (  )  [protected]

Writes a file with multiple species, using both regular and linked seed predation.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLOfftakeTestFile3 (  )  [protected]

Writes a file with multiple species, using linked seed predation.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLOfftakeTestFile4 (  )  [protected]

Writes a file with multiple species, using species- and season-specific parameters.

Returns:
Filename just written.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile1 (  )  [protected]

Creates file that has a predator initial density of 0.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile2 (  )  [protected]

Creates file that has no disperse behaviors.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile3 (  )  [protected]

Creates file that has maps for seed grid and seed predators, and X resolutions don't match.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile4 (  )  [protected]

Creates file that has weeks of seedfall = 0.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile5 (  )  [protected]

Creates file that has weeks of model = 0.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile6 (  )  [protected]

Creates file that has maps for seed grid and seed predators, and Y resolutions don't match.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile7 (  )  [protected]

Creates file that has a map for seed predators, but is missing the data member "num preds".

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile8 (  )  [protected]

Creates file where week germination starts is < 0.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile9 (  )  [protected]

Creates file where week germination starts is > 52.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile10 (  )  [protected]

Creates file where proportion germinating is < 0.

char* clTestFuncResponseSeedPredation::WriteXMLErrorFile11 (  )  [protected]

Creates file where proportion germinating is > 1.


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

Generated on Tue Apr 19 14:05:59 2011 for SORTIE C++ Test Documentation by  doxygen 1.5.6