Inheritance diagram for javawrapper::DisturbanceBehaviors:
Public Member Functions | |
DisturbanceBehaviors (GUIManager oManager) throws ModelException | |
Constructor. | |
void | ReadOldHarvestRegimeFile (String sFileName, Plot oPlot, TreePopulation oPop) throws ModelException |
Reads in an old tab-delimited harvest regime file. | |
void | ValidateData (TreePopulation oPop) throws ModelException |
Validates the data prior to writing it. | |
void | WriteXML (BufferedWriter jOut, TreePopulation oPop) throws ModelException |
Overridden because disturbance writing is special. | |
void | DoSetup (TreePopulation oPop) throws javawrapper.ModelException |
Sets up the grid objects. | |
void | ReadXMLParentTag (String sXMLTag, Attributes oAttributes) throws ModelException |
Accepts an XML parent tag (empty, no data) from the parser. | |
boolean | SetSingleValueByXMLTag (String sXMLTag, String sXMLParentTag, Attributes oAttributes, Object oData) throws ModelException |
This method looks for the following tags:. | |
void | ChangeOfSpecies (int iOldNumSpecies, int[] p_iIndexer, String[] p_sNewSpecies) throws ModelException |
Checks episodic disturbance settings upon change of species. | |
boolean | SetVectorValueByXMLTag (String sXMLTag, String sXMLParentTag, java.util.Vector p_oData, String[] p_sChildXMLTags, boolean[] p_bAppliesTo, org.xml.sax.Attributes oParentAttributes, org.xml.sax.Attributes[] p_oAttributes) throws ModelException |
Overridden for backwards compatibility after changing XML tag names. | |
Behavior | GetBehaviorByXMLTag (String sXMLTag) |
Overwritten to handle the potentially-funky harvest interface behavior. | |
void | CopySpecies (int iSpeciesCopyFrom, int iSpeciesCopyTo) throws ModelException |
Updates harvest and mortality episodes when species are copied. | |
void | ChangeOfPlotResolution (float fOldX, float fOldY, float fNewX, float fNewY) throws ModelException |
Removes cells from harvest and disturbance events that are outside the plot. | |
Static Public Attributes | |
static final int | PARTIAL_CUT = 1 |
Partial cut. | |
static final int | GAP_CUT = 2 |
Gap cut. | |
static final int | CLEAR_CUT = 3 |
Clear cut. | |
static final int | PERCENTAGE_BASAL_AREA = 2 |
Percentage basal area. | |
static final int | ABSOLUTE_BASAL_AREA = 3 |
Absolute basal area. | |
static final int | PERCENTAGE_DENSITY = 0 |
Percentage density. | |
static final int | ABSOLUTE_DENSITY = 1 |
Absolute density. | |
Protected Member Functions | |
Vector | AddHarvestData (Vector oList, HarvestData oNewHarvest) throws ModelException |
This adds the data contained in a HarvestData object to a list of harvest data. | |
Vector | CompactHarvestList (Vector oList) throws ModelException |
Takes a list of HarvestData objects where each is one single species, and replaces it with a list of HarvestData objects for multiple species for any whose data match. | |
Protected Attributes | |
Vector | mp_oHarvestCuts = new Vector(0) |
Our list of harvest cuts, held as HarvestData objects. | |
Vector | mp_oMortEpisodes = new Vector(0) |
List of episodic mortality events, held as HarvestData objects (ignoring the cut type). | |
ModelVector | mp_fMinStormDamageDBH |
Minimum DBH to which storm damage applies for each species. | |
ModelVector | mp_fStmDmgInterceptMed |
Storm damage intercept for medium damage (a) for each species. | |
ModelVector | mp_fStmDmgInterceptFull |
Storm damage intercept for complete damage (a) for each species. | |
ModelVector | mp_fStmIntensityCoeff |
Storm intensity coefficient (b) for each species. | |
ModelVector | mp_fStmDBHCoeff |
Storm DBH coefficient (d) for each species. | |
ModelVector | mp_fStmMedDmgSurvProbA |
Storm - Medium damage probability of survival "a" - species-specific - 01/09/06 LEM. | |
ModelVector | mp_fStmMedDmgSurvProbB |
Storm - Medium damage probability of survival "b" - species-specific - 01/09/06 LEM. | |
ModelVector | mp_fStmFullDmgSurvProbA |
Storm - Heavy damage probability of survival "a" - species-specific - 01/09/06 LEM. | |
ModelVector | mp_fStmFullDmgSurvProbB |
Storm - Heavy damage probability of survival "b" - species-specific - 01/09/06 LEM. | |
ModelVector | mp_fWindstormMinDBH |
Windstorm - Minimum DBH for windstorm mortality - species-specific - 03/19/06 LEM. | |
ModelVector | mp_fWindstormMortInterceptA |
Windstorm - Mortality probability intercept "a" - species-specific - 03/19/06 LEM. | |
ModelVector | mp_fWindstormStmIntensCoeffC |
Windstorm - Mortality probability storm intensity coefficient "c" - species-specific - 03/19/06 LEM. | |
ModelVector | mp_fWindstormDBHExpB |
Windstorm - DBH exponent "b" - species-specific - 03/19/06 LEM. | |
ModelVector | mp_fStmPropFullTipUp |
Storm - proportion of trees with total damage that die that tip up - 05/01/05 LEM. | |
ModelVector | mp_fRandomBrowseProb |
Random browse - browse probability. | |
ModelFloat | m_fClass1RtrnInt |
Storm return interval for 0-0.1 severity storm. | |
ModelFloat | m_fClass2RtrnInt |
Storm return interval for 0.1-0.2 severity storm. | |
ModelFloat | m_fClass3RtrnInt |
Storm return interval for 0.2-0.3 severity storm. | |
ModelFloat | m_fClass4RtrnInt |
Storm return interval for 0.3-0.4 severity storm. | |
ModelFloat | m_fClass5RtrnInt |
Storm return interval for 0.4-0.5 severity storm. | |
ModelFloat | m_fClass6RtrnInt |
Storm return interval for 0.5-0.6 severity storm. | |
ModelFloat | m_fClass7RtrnInt |
Storm return interval for 0.6-0.7 severity storm. | |
ModelFloat | m_fClass8RtrnInt |
Storm return interval for 0.7-0.8 severity storm. | |
ModelFloat | m_fClass9RtrnInt |
Storm return interval for 0.8-0.9 severity storm. | |
ModelFloat | m_fClass10RtrnInt |
Storm return interval for 0.9-1.0 severity storm. | |
ModelFloat | m_fStormSSTPeriod |
Storm - SST periodicity (Sr). | |
ModelFloat | m_fStormSineD |
Storm - Sine function d. | |
ModelFloat | m_fStormSineF |
Storm - Sine function f. | |
ModelFloat | m_fStormSineG |
Storm - Sine function g. | |
ModelFloat | m_fStormTrendSlopeM |
Storm - Trend function slope (m). | |
ModelFloat | m_fStormTrendInterceptI |
Storm - Trend function intercept (i). | |
ModelFloat | m_fStormCycleStart |
Storm - Cycle starting point KILL ME FOR THE NEXT RELEASE. | |
ModelFloat | m_fWindstormReturnInt1Severity |
Windstorm - Storm intensity for 1 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt5Severity |
Windstorm - Storm intensity for 5 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt10Severity |
Windstorm - Storm intensity for 10 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt20Severity |
Windstorm - Storm intensity for 20 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt40Severity |
Windstorm - Storm intensity for 40 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt80Severity |
Windstorm - Storm intensity for 80 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt160Severity |
Windstorm - Storm intensity for 160 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt320Severity |
Windstorm - Storm intensity for 320 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt640Severity |
Windstorm - Storm intensity for 640 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt1280Severity |
Windstorm - Storm intensity for 1280 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormReturnInt2560Severity |
Windstorm - Storm intensity for 2560 year return interval - LEM 03/19/06. | |
ModelFloat | m_fWindstormSSTPeriod |
Windstorm - SST periodicity (Sr). | |
ModelFloat | m_fWindstormSineD |
Windstorm - Sine function d. | |
ModelFloat | m_fWindstormSineF |
Windstorm - Sine function f. | |
ModelFloat | m_fWindstormSineG |
Windstorm - Sine function g. | |
ModelFloat | m_fWindstormTrendSlopeM |
Windstorm - Trend function slope (m). | |
ModelFloat | m_fWindstormTrendInterceptI |
Windstorm - Trend function intercept (i). | |
ModelFloat | m_fStdDev |
Standard deviation for normal and lognormal stochastic storm damage functions. | |
ModelFloat | m_fCut1LoDBH |
Selection harvest cut range 1 lower DBH - LEM 05/12/05. | |
ModelFloat | m_fCut1HiDBH |
Selection harvest cut range 1 upper DBH - LEM 05/12/05. | |
ModelFloat | m_fCut1BA |
Selection harvest cut range 1 target BA - LEM 05/12/05. | |
ModelFloat | m_fCut2LoDBH |
Selection harvest cut range 2 lower DBH - LEM 05/12/05. | |
ModelFloat | m_fCut2HiDBH |
Selection harvest cut range 2 upper DBH - LEM 05/12/05. | |
ModelFloat | m_fCut2BA |
Selection harvest cut range 2 target BA - LEM 05/12/05. | |
ModelFloat | m_fCut3LoDBH |
Selection harvest cut range 3 lower DBH - LEM 05/12/05. | |
ModelFloat | m_fCut3HiDBH |
Selection harvest cut range 3 upper DBH - LEM 05/12/05. | |
ModelFloat | m_fCut3BA |
Selection harvest cut range 3 target BA - LEM 05/12/05. | |
ModelFloat | m_fCut4LoDBH |
Selection harvest cut range 4 lower DBH - LEM 05/12/05. | |
ModelFloat | m_fCut4HiDBH |
Selection harvest cut range 4 upper DBH - LEM 05/12/05. | |
ModelFloat | m_fCut4BA |
Selection harvest cut range 4 target BA - LEM 05/12/05. | |
ModelInt | m_iInitialAge |
Selection harvest initial age - LEM 05/12/05. | |
ModelInt | m_iWindstormTimestepToStartStorms |
Windstorm - Timestep to start storms - LEM 03/19/06. | |
ModelInt | m_iNumYearsToHeal |
Number of years damaged trees stay damaged. | |
ModelInt | m_iNumSnagYears |
Number of years storm-damaged snags last before being removed - 05/01/05 LEM. | |
ModelEnum | m_iSusceptibility |
Storm susceptibility pattern. | |
ModelEnum | m_iStochasticity |
Storm stochasticity pattern. | |
ModelEnum | m_iProbDistFunc |
Probability distribution function. | |
ModelString | m_sHarvIntExecutable = new ModelString("", "", "hi_executable") |
Path and filename of user executable. | |
ModelString | m_sHarvIntSORTIEOutFile = new ModelString("", "", "hi_harvestableTreesFile") |
Path and filename of file for SORTIE to write with harvestable trees. | |
ModelString | m_sHarvIntExecHarvestOutFile = new ModelString("", "", "hi_treesToHarvestFile") |
Path and filename of file for executable to write with trees to harvest. | |
ModelString | m_sHarvIntExecUpdateOutFile = new ModelString("", "", "hi_treesToUpdateFile") |
Path and filename of file for executable to write with trees to update. | |
ModelString | m_sHarvIntBatchParamsFile = new ModelString("", "", "hi_batchParamsFile") |
Path and filename of batch parameters. | |
ModelString | m_sHarvIntBatchSingleRunParamsFile = new ModelString("", "", "hi_batchSingleRunParamsFile") |
Path and filename of single-run parameters file to write. | |
ModelString | m_sHarvIntExecArgs = new ModelString("", "", "hi_executableArguments") |
Arguments to pass to executable. | |
Vector | mp_sHarvIntNewTreeDataMembers = new Vector(0) |
List of new tree data members to add. | |
ModelVector | mp_sHarvIntFileColumns |
List of file columns. | |
ModelInt | m_iHarvIntHarvestPeriod = new ModelInt(1, "", "hi_harvestPeriod") |
How often harvests occur, in years. | |
float | m_iCutRangeLowerBound = -1 |
Placeholder for reading cut ranges from an XML file. | |
float | m_iCutRangeUpperBound = -1 |
Placeholder for reading cut ranges from an XML file. | |
float | m_iCutRangeAmount = -1 |
Placeholder for reading cut ranges from an XML file. | |
int | m_iSelectionHarvestCutRange = 0 |
Placeholder for reading selection harvest cut ranges from an XML file. | |
Package Functions | |
void | WriteBehaviorNodes (BufferedWriter out, TreePopulation oPop) throws ModelException |
If the harvest interface behavior is being used, this will check to see if it needs to add new data members to the name. |
Planting is not included.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
javawrapper::DisturbanceBehaviors::DisturbanceBehaviors | ( | GUIManager | oManager | ) | throws ModelException [inline] |
Constructor.
oManager | GUIManager object. |
ModelException | if there's a problem. |
void javawrapper::DisturbanceBehaviors::ReadOldHarvestRegimeFile | ( | String | sFileName, | |
Plot | oPlot, | |||
TreePopulation | oPop | |||
) | throws ModelException [inline] |
Reads in an old tab-delimited harvest regime file.
Any existing harvest data will be replaced with what's in the file.
sFileName | Filename of harvest regime file. | |
oPlot | Plot object. | |
oPop | TreePopulation object. |
ModelException | Wrapping an IO exception, or if the harvest parameters do not match the currently loaded parameter file. |
Vector javawrapper::DisturbanceBehaviors::AddHarvestData | ( | Vector | oList, | |
HarvestData | oNewHarvest | |||
) | throws ModelException [inline, protected] |
This adds the data contained in a HarvestData object to a list of harvest data.
A HarvestData object is first checked to make sure there are any cut ranges defined; if not, nothing happens. If there is data to be added, it is compared to existing HarvestData objects on the list. If they match except for the grid cell, then the new object's grid cell is added to the existing object and the new object thrown away. If it is truly new data, it is added to the list.
IMPORTANT: It is assumed that the harvest data list is all single-species cuts. This makes this method not very generalized.
oList | The list of HarvestData objects to add to. | |
oNewHarvest | The HarvestData object to add. |
ModelException | Passing through underlying exceptions. |
Vector javawrapper::DisturbanceBehaviors::CompactHarvestList | ( | Vector | oList | ) | throws ModelException [inline, protected] |
Takes a list of HarvestData objects where each is one single species, and replaces it with a list of HarvestData objects for multiple species for any whose data match.
oList | The list to compact. |
ModelException | Passing through underlying exceptions |
void javawrapper::DisturbanceBehaviors::ValidateData | ( | TreePopulation | oPop | ) | throws ModelException [inline, virtual] |
Validates the data prior to writing it.
What it does:
oPop | TreePopulation object |
ModelException | if one of the data objects is not valid. |
Implements javawrapper::WorkerBase.
void javawrapper::DisturbanceBehaviors::WriteXML | ( | BufferedWriter | jOut, | |
TreePopulation | oPop | |||
) | throws ModelException [inline] |
Overridden because disturbance writing is special.
jOut | File to write to. | |
oPop | TreePopulation object |
javawrapper.ModelException | if there's a problem writing the file. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::DisturbanceBehaviors::DoSetup | ( | TreePopulation | oPop | ) | throws javawrapper.ModelException [inline, virtual] |
Sets up the grid objects.
oPop | TreePopulation object. |
javawrapper.ModelException | passthrough only. |
Implements javawrapper::WorkerBase.
void javawrapper::DisturbanceBehaviors::ReadXMLParentTag | ( | String | sXMLTag, | |
Attributes | oAttributes | |||
) | throws ModelException [inline] |
Accepts an XML parent tag (empty, no data) from the parser.
This method watches for the following tags:
sXMLTag | The XML tag. | |
oAttributes | The attributes of this object. |
ModelException | if there is a problem reading this data. |
Reimplemented from javawrapper::WorkerBase.
boolean javawrapper::DisturbanceBehaviors::SetSingleValueByXMLTag | ( | String | sXMLTag, | |
String | sXMLParentTag, | |||
Attributes | oAttributes, | |||
Object | oData | |||
) | throws ModelException [inline] |
This method looks for the following tags:.
sXMLTag | XML tag of data object whose value is to be set. | |
sXMLParentTag | The immediate parent tag that sXMLTag is within. | |
oAttributes | Attributes of the object. Ignored, but may be needed by overriding objects. | |
oData | Data value appropriate to the data type |
ModelException | if the value could not be assigned to the data object, or if the cut type or cut type amount values are unrecognized. |
Reimplemented from javawrapper::WorkerBase.
void javawrapper::DisturbanceBehaviors::ChangeOfSpecies | ( | int | iOldNumSpecies, | |
int[] | p_iIndexer, | |||
String[] | p_sNewSpecies | |||
) | throws ModelException [inline] |
Checks episodic disturbance settings upon change of species.
This will remove any deleted species.
iOldNumSpecies | says how many species there used to be. | |
p_iIndexer | is an array, sized to the new number of species. For each bucket (representing the index number of a species on the new list), the value is either the index of that same species in the old species list, or -1 if the species is new. | |
p_sNewSpecies | The new species list. |
ModelException | if anything goes wrong. Not thrown by this function. |
Reimplemented from javawrapper::BehaviorTypeBase.
boolean javawrapper::DisturbanceBehaviors::SetVectorValueByXMLTag | ( | String | sXMLTag, | |
String | sXMLParentTag, | |||
java.util.Vector | p_oData, | |||
String[] | p_sChildXMLTags, | |||
boolean[] | p_bAppliesTo, | |||
org.xml.sax.Attributes | oParentAttributes, | |||
org.xml.sax.Attributes[] | p_oAttributes | |||
) | throws ModelException [inline] |
Overridden for backwards compatibility after changing XML tag names.
This was done in version 6.06 and can be removed after one version, since it was done to a behavior not widely in production at the time of release.
sXMLTag | Parent XML tag of data vector whose value is to be set. | |
sXMLParentTag | The immediate parent tag that sXMLTag is within. | |
p_oData | Vector of data values appropriate to the data type | |
p_sChildXMLTags | The XML tags of the child elements | |
p_bAppliesTo | Array of booleans saying which of the vector values should be set. This is important in the case of species-specifics - the vector index is the species number but not all species are set. | |
oParentAttributes | Attributes of parent tag. May be useful when overridding this for unusual tags. | |
p_oAttributes | Attributes passed from parser. This may be needed when overriding this function. Basic species-specific values are already handled by this function. |
ModelException | if the value could not be assigned to the data object. |
void javawrapper::DisturbanceBehaviors::WriteBehaviorNodes | ( | BufferedWriter | out, | |
TreePopulation | oPop | |||
) | throws ModelException [inline, package] |
If the harvest interface behavior is being used, this will check to see if it needs to add new data members to the name.
After changing the name and writing the behaviors, the name will be changed back.
out | BufferedWriter File to write to. | |
oPop | TreePopulation Tree population. |
ModelException | Passing through from called functions. |
Reimplemented from javawrapper::BehaviorTypeBase.
Behavior javawrapper::DisturbanceBehaviors::GetBehaviorByXMLTag | ( | String | sXMLTag | ) | [inline] |
Overwritten to handle the potentially-funky harvest interface behavior.
sXMLTag | String The XML tag for which to find a behavior. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::DisturbanceBehaviors::CopySpecies | ( | int | iSpeciesCopyFrom, | |
int | iSpeciesCopyTo | |||
) | throws ModelException [inline] |
Updates harvest and mortality episodes when species are copied.
iSpeciesCopyFrom | int Species to copy. | |
iSpeciesCopyTo | int Species that is the copy. |
ModelException | if there is a problem. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::DisturbanceBehaviors::ChangeOfPlotResolution | ( | float | fOldX, | |
float | fOldY, | |||
float | fNewX, | |||
float | fNewY | |||
) | throws ModelException [inline] |
Removes cells from harvest and disturbance events that are outside the plot.
fOldX | float Old plot X length. | |
fOldY | float Old plot Y length. | |
fNewX | float New plot X length. | |
fNewY | float New plot Y length. |
ModelException | if anything goes wrong. |
Reimplemented from javawrapper::WorkerBase.
final int javawrapper::DisturbanceBehaviors::PARTIAL_CUT = 1 [static] |
Partial cut.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::GAP_CUT = 2 [static] |
Gap cut.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::CLEAR_CUT = 3 [static] |
Clear cut.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::PERCENTAGE_BASAL_AREA = 2 [static] |
Percentage basal area.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::ABSOLUTE_BASAL_AREA = 3 [static] |
Absolute basal area.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::PERCENTAGE_DENSITY = 0 [static] |
Percentage density.
Matches the old code's enum value - that's important!.
final int javawrapper::DisturbanceBehaviors::ABSOLUTE_DENSITY = 1 [static] |
Absolute density.
Matches the old code's enum value - that's important!.
float javawrapper::DisturbanceBehaviors::m_iCutRangeLowerBound = -1 [protected] |
Placeholder for reading cut ranges from an XML file.
This one is for DBH range lower bound
float javawrapper::DisturbanceBehaviors::m_iCutRangeUpperBound = -1 [protected] |
Placeholder for reading cut ranges from an XML file.
This one is for DBH range upper bound
float javawrapper::DisturbanceBehaviors::m_iCutRangeAmount = -1 [protected] |
Placeholder for reading cut ranges from an XML file.
This one is for range cut amount
int javawrapper::DisturbanceBehaviors::m_iSelectionHarvestCutRange = 0 [protected] |
Placeholder for reading selection harvest cut ranges from an XML file.