NCASI Statistics and Model Development Group 1
Date: Version 2 November 15, 2005
NCASI Statistics and Model Development Group 1
Date: Version 2 November 15, 2005
Habgen is set up as a series of tables that the user must operate on in a more or less sequential fashion. A section is dedicated below to describing each of the Habgen tables . This setup is intended to provide a systematic approach to generating input data for Habplan Flow components, Biological type II components, and Block components. Regimes are specified in the ``Regime-Class'' table, and polygon data are input with the ``Poly-Data'' table. The ``Poly-Regime'' table is used to merge the regime and polygon data. Growth and yield models are then selected to produce output from the ``Poly-Regime'' table. Output data from the growth models are stored in the ``Flow'' table(s). Each ``Flow'' table could, for example, represent a different product, e.g. sawtimber, pulpwood and chip 'n saw. Optionally, you can write out the data in the ``Poly-Regime'' table, and run it through an external growth model to produce flow data. This ``Flow'' data is the input data that Habplan requires. It will be a while before Habgen includes growth models for all major species and regions, which is the long term goal. Meanwhile, Habgen provides a means to become familiar with how Habplan input data is generated, even if you aren't willing to use the models it currently includes.
The ``Bio-Output'' table allows the user to rank the regimes to indicate those regimes that are more desirable to Habplan. This ranking can be done in a few different ways. One option would be to rank regimes based on the total harvested timber volume associated with each regime. Another option would be to rank regimes based on Net Present Value (NPV) associated with each regime. The ``Bio-Output'' table creates and stores this ``regime ranking data''.
The ``Block'' table has functionality for creating a neighbor file from an ArcView( TM ) Shapefile. This provides the neighborhood input data that Habplan requires for the Block Component and the Spatial Model Component.
The Tools menu lets you open the ColumnNamesTool and the SelectionTool. As you might expect, you can change the column names with the columnNamesTool. However, for most tables you should use the original Habgen columnnames. Habgen figures out how to find things in tables by looking at the column names. For example, Habgen will find the Regime column in the RegimeClass Table by looking for the column called "Regime". You might want to change names of your data columns in the Polygon Table so that growthmodels can find the variables they need automatically.
The selection tool lets you select rows in the table based on values of variables in the row. This can be indispensable when there are many polygons. The delete button in the selection tool will delete all selected rows, so be careful. If you make a mistake, use undo in the edit menu. Each select application of the selection tool is cumulative. In effect, this lets you implement complex AND/OR type selections.
The buttons at the bottom of the table allow you to add and remove rows and columns to the table. The save button saves the table. Note that this lower tool bar can be torn away from the table, but it may be a bad idea to do so. The torn away toolbar is no longer confined to stay within the same space as its table, and can become hidden behind the Habgen window. Clicking on the arrows in the upper right corner of a Table will either maximize or minimize it. Try experimenting to figure this out. Table columns can be dragged to new positions if you like, but this effect is only visual and doesn't change the data.
Move between tables by clicking on the tabs (Figure 2) at the top of Habgen. The tables and tools that appear under a particular tab are confined to that space, which should limit the confusion associated with working with several tables at once.
Select the upper File menu to save all current Habgen tables to a file. This File menu is global, whereas the other File menus apply only to their table. You can read previous settings too. However, when you exit Habgen, all settings are saved to a default location. When you start Habgen, all settings from your previous session are automatically restored. Therefore, you don't need to worry too much about saving your work.
When you want to start a completely new session - clear a table by either reading in new data, or by selecting all rows and using the delete button on the selection tool.
The Regime-Class Table provides a simple way to specify your management regimes. You can specifiy ranges of years and an increment, or simply give individual years separated by a space or a comma. For example, "1-5" or "1-5,1" or "1 2 3 4 5" or "1,2,3,4,5" all specify the same 5 years. Year 1 is the first year of the planning horizon and year 5 is the fifth year of the planning horizon.
Note that the planning horizon is determined by the regime-classes you create. If the last period of a regime class ends at year 30, then the planning horizon is 30 years. It also is important to have actions occuring in every year of the planning horizon - even flow can't be attained unless there is output from every year.
The Polygon ID can be just about anything - use whatever is in your database. The Size variable is needed to expand the per acre model predictions to per polygon values. Habplan doesn't want per acre values in the flow data.
When it's time to select rows from this table (Figure 4), get the selection tool from the tools menu. It will look something like the example in Figure 5.
Every Column in the table has a row in the Selection Tool. Habgen assumes a variable is numeric unless you uncheck the checkBox. For example, to select all Pine polygons from the above table, enter "Pine" in the GE and LE column, which will select rows where the Type variable is exactly equal to Pine. Not putting "Pine" in the LE column would select rows that are GE "Pine" - but Type is alphanumeric so "SweetGum" would be GE "Pine". That would probably not be the desired result.
At this point, you'll find yourself jumping between the first 3 tables on a regular basis, which might seem confusing at first. In order to associate polygons with regimes take the following steps: (1) select 1 or more regime-classes from the Regime-Class Table, (2) Select 1 or more polygons from the Poly-Data Table, and(3) Push one of the merge buttons on the Poly-Regime Table. This will generate individual regimes by expanding the selected regime-classes and applying them to the selected polygons.
Use the "MergeNew" button to clear the Poly-Regime Table and startover. Use the "MergeAdd" button to add to the Poly-Regime Table. You have to decide what regime-classes should be allowed for each polygon. If you don't want a particular polygon to ever be clearcut, then don't assign it a clearcut (CC) regime-class. If you don't want anything done to a polygon, because it contains an endangered species, then assign only a do-nothing (DN) class. If you are doing uneven-aged management, then assign only thinning (T) or do-nothing regimes. Remember that do-nothings are a good thing, because they allow Habplan greater flexibility as it is searching for solutions. Also, with a short planning horizon, it may be unrealistic to expect all polygons to have management actions.
Habgen gives names to individual regimes (after expanding the regime classes) by appending the action years to the regime-class name. Thus, the name "CC#10" describes the regime that clearcuts at year 10. Likewise "T#10#30" means thin at years 10 and 30. These regime-names will end up in the Habplan input data, so you need to be able to interpret their meaning.
Other models can and will be added. But we have to start somewhere. You can add models too! This option will be discussed later in more detail.
A growth model can be applied to a polygon after it has been assigned some regimes by following these steps:
This is sounding complicated, so let's step through the process. Figure 7 shows the modelTool with models LobEven and LobPlant selected for periods 1 and 2, respectively. You might do this if natural stands were to be clearcut in period 1, replanted and then the resulting plantations would be cut in period 2. The "Setup" buttons were pushed to open the 2 Setup windows.
The Size=1 checkbox (Model Selection Tool) will cause the output to be per acre, whereas the default is the total output per polygon. Looking at the per acre value might help you decide if the growth model is producing reasonable results, but don't feed per acre values to Habplan!
The Scale checkbox (Model Selection Tool) allows you to apply a scaling factor to all output. For example, you might multiply by 31 to convert cubic feet to pounds (dry weight).
The LobEven Setup window shows that the input variables were found as
"BA", "Site" and "Age". The selected output from the model is "CV" for
cubic volume. The "Residual" value is 0, which means that all Basal
Area is removed. A residual of 0.5 means to leave 50% of the
BA. Likewise, a value of 80 means leave 80 square feet of BA.
The "ThresholdVar" is set to none and the Threshold value is 0. You could select BA as the ThresholdVar and 80 as theThreshold value. In this case, Habgen outputs nothing unless the stand has at least this much residual BA. Furthermore, when Threshold is not "none", then the output is the residual currently on the stand, not the amount that was removed. Here's an example of how to make use of "Thresholding". Suppose you select "Size" (acres) as the output and you think that Red Cockaded Woodpeckers (RCW) can't live in the stand with less than a 100 square feet of BA. Setting the Threshold to 100 will cause Habgen to output 0 when the growth model says the stand has less than 100 sq ft of BA, and it will output the size of the stand when it exceeds 100 sq ft of BA. This creates data for a flow component that will allow you to maintain an even flow of RCW acres. If the growth model keeps track of average stand diameter, you could also threshold on diameter. The hope is that thresholding allows you to schedule habitat.
Note that the Period 2 "Setup Window" above has ignore for H, i.e. Height of Dominants. When Habgen can't find the column name it wants, it tries to ignore the variable. You can select the column to use for Habgen - maybe your name was NTREES instead of N. Also, some growth models allow for alternative input. The "Lob Plant" or PMRC models can either predict H from Site Index or use a measured H. If you have H in the data then tell Habgen to ignore Site. WARNING: When variables that the model needs are ignored, Habgen will return negative numbers. If you were applying the same growth model to both Period 1 and Period 2 (e.g. Lob Even), a shortcut would be to configure the Period 1 Setup window, and then press the ``Copy'' button. This would result in the Period 2 model having the exact same configuration as the Period 1 model.
Habgen now has the capability to include bedding, herbicide, and
fertilizer (nitrogen and phosphorus) treatments for the PMRC
models. Habgen also allows the user to specify product classes for the
PMRC models (in terms of a top diameter and dbh range). To access
these features, select the appropriate PMRC model on the ``Model
Selection Tool''. Now click the ``Setup'' button to specify the model
settings. Note the ``Fertilize'' and ``Product'' buttons next to the
``Plant'' button. Assuming you are wanting to plant, fertilize and
specify product classes, click all 3 of these buttons (``Plant'',
``Fertilize'' and ``Product''). Notice the ``Herbicide'' and ``Bedding''
checkboxes under ``Planting'' (Figure 8). Click the
``Herbicide'' checkbox to add complete control of competing vegetation
to site preparation . Click the ``Bedding'' checkbox to add
double-pass bedding to site preparation. Under ``Fertilize'', specify
how many lbs/acre of Nitrogen you want to apply (e.g. 300 lbs/acre),
and click the ``Phosphorous'' checkbox to include Phosphorous with
fertilization. To isolate a particular product class, specify a ``Top
Diameter'', and an upper and lower DBH threshold (``DBH
Range''). Stand level growth and yield responses to both herbicide and
bedding treatments are modelled according to the growth response
models developed by L. V. Pienaar and J. W. Rheney
(
). Growth responses to fertilization are modelled
according to the ``adjusted'' PMRC models (i.e. original models
adapted to include an ``adjustment term'' to account for
fertilization), as presented in:
|
A point of interest is the ``unthinned counterpart'' approach that Habgen uses when modeling thinnings with the PMRC models. This approach is based on the idea, developed by A. J. O'Conner (
), that the basal area of a thinned plantation could be expressed as a proportion of the basal area of an unthinned stand of the same age, dominant height and number of trees per acre (unthinned counterpart). Growth response due to thinning, therefore, can be expressed in terms of a projected competition index, causing the projected basal area of the thinned stand to approach that of the unthinned counterpart. This approach was further developed by L. V. Pienaar (
).
Finally, the "Info" button on the ``Setup'' window will pop up some written information about the selected model.
Select one of the radioButtons on the Model Selection Tool shown above to control the kind of Flow Component. Typically, the "Norm" button is selected to get the so-called normal flow component.
THE HABITAT RADIO BUTTON CAUSES MANY THINGS TO HAPPEN DIFFERENTLY. In particular, it adds an additional Habitat period and causes there to be output for every year of the planning horizon, not just management action years. This is useful for creating habitat Flow components (see the Habgen example ). By selecting the habitat button, setting output to Size, and setting a Threshold variable, you can create a flow component that controls the number of acres of habitat according to your specifications. The "Plant" button on the Setup Forms (Figure 9) allows you to simulate a planting immediately after a clearcut. Here's what you see if both "Habitat" and "Plant" are selected:
Notice that the Model Selection Tool has Habitat selected, which created a third "Habitat" period. Assuming, this is a clearcut regime with only one actual management year, the Period1 form applies to the management year, and the Habitat Setup Form (Period3) applies to all other years. Period1 is setup to do a complete clearcut followed by a planting. The planting will result in 1000 Trees per acre 5 years after the cutting, so if its cut in year 1 then the planting begins to "count" at year 6 with N=1000 and Site having improved by 8% (due to improved stock). The output is set to size and the Threshold is set to cubic volume (CV=1000). Since there will be no residual after a clearcut, there will be no output in the year of clearcutting, i.e. none of this type of habitat at that particular polygon. The Period3 form applies to all the other years (period 3 is the habitat period in this case). It says to leave a residual of N=2000 - in other words you can't cut at all. It says to output the size of the polygon if CV is greater than or equal to 1000. The combination of the Period1 and Period3 (Habitat) setups result in a polygon contributing to habitat before a clearcut and sometime beyond 5 years after a clearcut when the planting has regrown. See the Habgen example for more detail on this.
Do-Nothing Regimes are also impacted when Habitat is checked. This causes a do-Nothing to act like a regime with a management action in year1. Therefore, year1 for a do-Nothing is controlled by the Period1 Setup Form and the other years are controlled by the Habitat period Setup Form. This causes a do-Nothing regime to be able to produce output for each of the planning horizon years. This makes sense in Habitat mode, because doing nothing may allow Habitat to remain on the polygon for use by wildlife. One might say that you're getting something for nothing. See the Habgen example for more detail on this.
THE CLASS RADIO BUTTON lets you create a flow component to control the end of planning period age-class or time-to-last-entry distribution. Figure 10 shows what the Model Selection Tool looks like if you select the CLASS radio button.
Now you need to specify a planting Lag, a Max class value, and whether Age at last entry is added to the time since last entry. The Lag value allows for a planting lag - often planting won't occur until a year or 2 after a clearcut. The Max value causes all classes that are greater than or equal to Max to be thrown into the Max bin. For example, if Max=20 then age class 100 is set to 20 as are any ages greater than 20. If "Age+" is not checked, then the classes are the time since last entry. If "Age+" is checked, then the classes are the time since last entry plus the age at last entry. See example3 or example 4 for an application of these different flow types.
After the Flow Output Table is complete, select the"writeData" option under the File menu to output the data in the format that Habplan wants. When prompted, choose to NOT ``Put column names in row 1''. At this point, you have an input datafile for a Habplan Flow component. You can do further editing of the flow Table after it is complete. However, if you delete some rows and try to apply more models at the Poly-Regime Table, Habgen will become angry when it sees that the N of Rows has been altered. It will insist on reinitializing the Flow Table and you'd have to start over.
Notice the ``Decay'', ``Add'' and ``Copy'' buttons on the bottom of the Flow table (Figure 11). The ``Decay'' feature allows you to apply a decay function to existing Flow data. This is particularly useful when the Flow data represents carbon outputs. In such a case, the decay function would compute the cumulative remaining carbon for the rest of the planning horizon. All you have to do is press the ``Decay'' button, and specify the carbon half life in the window that pops up (Figure 12). Now press the ``Decay Flow'' button on the Decay FlowTool, and Habgen will compute the new input data, based on the decay funtion: (1/(1+log(2)/h)), where ``h'' is the half life, and ``n'' is the number of years since the harvest.
The ``Add'' feature allows you to sum Flow outputs (e.g. Flow 1 + Flow
2). Press the ``Add'' button on the Flow Table. This will pop up the
Add FlowTools window (Figure 13). Now specify which Flow
component (e.g. Flow 2) you wish to add to the current Flow component
(e.g. Flow 1), and specify what weight you want to apply to the
selected Flow (e.g. a weight of 1 would equate to Flow 1 + Flow 2,
whereas a weight of 2 would equate to Flow1 + 2 x Flow 2). Next press
``Add'' on the FlowTools window, and the resulting data will be output
in the current Flow table. For example if Flow 1 is decayed product carbon
and Flow 2 is residual carbon, then adding them results in total
carbon on the land and in products. You can also add the current Flow
to itself, multiplied by a weight. For example, suppose the current
Flow is Flow 1, and you select Flow 1 on the FlowTools
window. Specifying a weight of 0.2, would result in Flow 1 being
increased by 20%. This ``Add'' feature can be used in many ways, and
adds flexibility to Habgen.
The ``Copy'' feature allows you to copy output data from one Flow table into another Flow table. For example, assume you are currently working on the Flow 2 table, and you want to copy the Flow 1 output data into Flow 2. Press the ``Copy'' button on the Flow Table. This will pop up the Copy FlowTools window (Figure 14). Now specify which Flow component (e.g. Flow 1) you wish to copy to the current Flow component (e.g. Flow 2), and press ``Copy'' on the FlowTools button. The output data from Flow 1 should now appear in the Flow 2 table.
Remember that you can write out the data from the Poly-Regime Table to a file and run it through your own growth routines if Habgen doesn't contain the growth models you need. It should be relatively easy to batch process the Polygon-Regime data and turn it into flow data without using Habgen.
To create this ``ranking data'', use the ``NPV'' feature on the Bio-Output Table (Figure 15). Access this feature by pressing the ``NPV'' button on the Bio-Output Table. Before proceeding, initialize the Bio-Output Table by pressing the ``Init'' button on the bottom of the table. This initialization process creates a placeholder in the Bio-Output Table for every polygon-regime combination, which now allows you the option of using the ``Row Selection Tool'' (under ``Tools'') to select specific rows when computing NPV or LEV. This enables you to change the value or cost settings for different regimes, e.g. land sale regimes might have a negative cost, representing land sale revenue, which is specific only to the land sale regime. Also note that the user can select (Value Setup Form) between calculating Net Present Values (NPV) and Land Expectation Values (LEV). LEV is essentially the NPV for an infinite time horizon (i.e. multiple rotations).
Now, to rank regimes by NPV, enter per unit product prices for the respective Flow components in the Value Setup Form (for example, assume Flow 1 = pulpwood, Flow 2 = chip-n-saw andFlow 3 = sawtimber). Also enter an interest rate.
If there are costs associated with various regimes, press the ``Cost'' button on the NPV Setup Form to open the Costs Table (Figure 15). Notice that the Costs Table has the same rows and columns as the Regime Class Table. Costs can vary by regime and action period, and are entered into the Cost Table. Costs are per acre and you must specify the name of the acreage column at the bottom of the costs table unless the name is "Size". The acreages come from the Poly-Regime Table, which must have the same number of rows as the Flow tables or you will get an error message. Now, once the NPV and Costs Tables are filled out, press the ``Calculate'' button on the NPV Setup Form to compute the value column in the Bio-Output Table (Figure 15). Note that if you have not selected specific rows from the Bio-Output Table to which the NPV computations should apply, upon pressing ``Calculate'', a window will pop up confirming that you want to apply the NPV computations to all rows in the Bio-Output Table. If this is the case, click ``OK''. Otherwise, click ``Cancel'' and select the rows of interest. The costs are discounted and then substracted from the discounted revenues for each polygon and regime. This assumes that the 3 Flow tables are compatible, i.e. they contain the same regimes and output years. If a table is not compatible, it is skipped. To rank the regimes by total output volume, ignore the Costs Table, and simply set all the Flow Values on the NPV Setup Form to 1, and the interest rate to 0 (Figure 16). Now, upon pressing the ``Calculate'' button, the Flow outputs are summed for each polygon-regime combination (i.e. Flow 1 + Flow 2 + Flow 3). If, for some reason, you wanted to put more weight on the Flow 3 outputs, you could, for example, give Flow 1 and 2 a value of 1, and Flow 3 a value of 2 (i.e. twice as much weight as Flows 1 & 2). As long as you set the interest rate to 0, the NPV function becomes a simple summing function (Figure 17).
The Biological Output Table can now be written to a file (commonly named Bio2.data) and read by Habplan (use the Table's File menu).
Remember that allowed regimes in Habplan are determined by finding the intersection of a polygon's allowed regimes for each Flow and Biological Type II component. The default Biological Output Table will have all regimes found in the Flow Output Table. However, you can delete Biological Output rows if you want to eliminate some regimes from consideration for particular polygons.
Press the "FindFile" button to locate your ArcView Shapefile. Then press the "ReadPolys" button to read the shapefile. You will receive a report about how many Polygons were read. Note that only a shapefile containing polygons will work here. ShapeFiles can contain various other entities, but Habgen only needs to know about polygons.
Now you've read the shapefile and also have read the polygon data into the Poly-Data Table. The next move will be to press the "Apply" button to start one of the neighbor finding algorithms. However, the NabeTool will need to locate 2 columns in the Poly-Data Table: 1) A column called "Polygon" that gives the polygon ID, and 2) A column called "Size" that gives the size of the polygon in acres, hectares or whatever. If NabeTool doesn't find columns with these exact names, it will ask you what they are called. So to avoid this additional request for input, you might want to name those 2 columns in the Poly-Data Table as follows: "Polygon" and "Size".
There are 2 basic neighbor finding methods available in the NabeTool:
The neighbor-finding algorithm is reasonably efficient, but it may still take several minutes to finish when thousands of polygons are involved. At the end, the Block Output Table contains the data that Habplan needs for a blocksize objective function component. Save this data by selecting "WriteData" from the "File" menu on the Block Table.
Step 1 is to look at the javadoc output for other models. YieldModel1.java and YieldModel2.java are the Brender and Clutter,and Burkhart et al models. The PMRC models are in PmrcLCP.java and PmrcUCP.java. You will need to create a class similar to these for the model you wish to add. Your class must extend AbstractYieldModel and implement each of its methods. The most important method is grow(), which grows all of the required variables according to your model. You can add new methods to do things internally for your model, but you must extend AbstractYieldModel and implement the methods that it contains.
All of the growth model related classes are part of the growthmodel
package within Habgen. You can compile your new growthmodel class
which you might name BestModel.java from the Habgen1 directory as
follows:
javac growthmodel/BestModel.java
Don't try to compile from the "growthmodel" directory or java gets confused about where to find the growthmodel package. You'll need the complete java software development kit installed to do this, but you probably have that if you are running Habgen. You'll also need a text or program editor.
Now you have to let Habgen know about your new model. You can add
BestModel to Habgen by editing the buildModels() method in
ModelConfigurator.java. Then compile this as follows:
javac growthmodel/ModelConfigurator.java