XML Questions

1. What's the difference between the 'feature curves' and 'product curves' sections in the XML file? Why repeat them?
2. How does Patchworks know to set the age of stands to 0 after clearcut?
3. How does Patchworks determine 'managed' and 'unmanaged' areas?
4. The Matrix Builder is listing lots of errors for no treatment options, but the polygons are not part of the timber harvesting land base. How can I suppress these messages?
5. How do I eliminate blocks from the analysis?
6. What does an 'Illegal character or entity reference syntax' error message mean?

1.

What's the difference between the 'feature curves' and 'product curves' sections in the XML file? Why repeat them?

'Feature curves' represent the growing stock in a stand, or the habitat condition, or the seral stage, or the percent species composition, etc. 'Product curves' represent what will be extracted by a given treatment type. Extraction attributes might include things like harvest and renewal costs, crown dues, area by treatment type, volume by product type, or value ($) by product.

There is no requirement to harvest the entire amount of growing stock in a stand, so the product volume curves may be different than the feature curves. These curves can be specified for each treatment type, because each treatment might remove different amounts of volume, or have different cost characteristics. It is appropriate to represent costs as curves (rather than constants) because in many cases it is appropriate that they change in value with stand age (e.g. harvest costs are related to piece size and density, which are related to stand age).

If you know that the harvest curves are identical to the growing stock curves, you can enter the curves only once, and use an 'id reference' to reference the single curve from multiple locations.

2.

How does Patchworks know to set the age of stands to 0 after clearcut?

You can specify the age after a treatment on the treatment record. For example, you can add an 'offset="-5"' parameter to add a 5-year regen delay to a given treatment type. The default offset is '0'.

3.

How does Patchworks determine 'managed' and 'unmanaged' areas?

The Matrix Builder divides areas into managed and unmanaged according to the XML recipe. Blocks with no eligible treatments are classified as 'unmanaged'. It is also possible to apply aspatial reductions to managed stands using <retention> tags.

See the ForestModel XML reference section for more details.

4.

The Matrix Builder is listing lots of errors for no treatment options, but the polygons are not part of the timber harvesting land base. How can I suppress these messages?

We often add a <track> statement similar to the one below as the last rule in our XML recipe. In this example the 'statement' in the <select> tag catches every block that is of type 'NTHLB' (meaning not part of the timber harvesting land base). The code has an enclosing <track> specification, but no treatments. This section will prevent the warning message for records that match to it, but since there are no treatments available any stands that match up (i.e. did not get caught by a preceding track) will get classified as unmanaged.

<!--
  Everything else is unmangaged
-->

  <select statement="type='NTHLB'">
    <track>
    </track>
  </select>
	    

5.

How do I eliminate blocks from the analysis?

The XML <input> tag has a clause that can be used to filter out records.

<!-- Exclude blocks that are outside the analysis -->
<input exclude="not (COMPT_NUM = '1' or COMP_NUM = '2')"/>
	    

This example would exclude any polygon that did not have a compartment number of '1' or '2'.

6.

What does an 'Illegal character or entity reference syntax' error message mean?

An error message such as this would result if you tried to use an inappropriate XML character, such as

<define field="2&3" constant="'3,2'" /> 
	    

The model would complain that '&' is a very special reserved XML character. In general, field names are restricted to simple alpha numerics (_, 0-9, a-z, A-Z), and must not start with a number. In this particular case '&' is an entity reference in XML syntax. To correct the error you must change the '&' character to something else (e.g. '2_and_3') in all places in either the original input or the XML recipe.