Previous topic

Model chain

Next topic

Operation model

This Page

Prediction model

The prediction model document contains the definitions for the prediction models used in the simulation. It serves two purposes: as a documentation for the models, and as “glue” between the simulator and the model libraries (Prediction model library).

An example of the document contents is given below, for a comprehensive description of all the possible content options see the schema document. Data continuation and abbreviated content expressed as …:

The root level tag contains a reference to the schema document which is used to validate the content of the XML document:

<modelbase xmlns="http://www.simo-project.org/simo"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.simo-project.org/simo
           ../schemas/prediction_modelbase.xsd">

The models are divided into named model groups, each group containing several model definitions.

The model definition begins with the name of the model. The name must match the name of the function in the model library which implements the model. The implementation details are given after the model name. Possible implementation programming languages (implemented_in) are C and Python:

<model_group name="Distribution models"><model>
         <name>Diameter_distribution_spruce_percent_point_KangasMaltamo
         </name>
         <implemented_at>DistributionModels.dll</implemented_at>
         <implemented_in>C</implemented_in>

The model definition continues with model metadata, which is not used in the actual simulation:

<author>
            <name>Annika Kangas</name>
            <name>Matti Maltamo</name>
         </author>
         <description>Generate trees on mineral soils; stand's
                      basal area weigted median diameter, basal area, age,
                      stems/ha and site class as attributes
         </description>
         <published_in>Kangas, A. and Maltamo, M., 2000.
                       Percentile based basal area diameter distribution
                       models for scots pine, norway spruce and birch
                       species. Silva Fennica 34(4): 371-380.
                       </published_in>
         <species_list>
            <species>2</species>
         </species_list>
         <geographical_coverage>Entire country. Tested with NFI
                                material
         </geographical_coverage>
         <applies_for>Mineral soils. Number of trees measured.
                      BA greater than 0 m2/ha, BA_total greater than 0
                      m2/ha, D_gM greater than 0 cm, Age greater than 0
                      years and N greater than 0 trees per hectare.
         </applies_for>
         <research_material>Values given as (min, mean, max):
                            G (3, 14.8, 34.2), N (75.2, 1062.4, 2944.9),
                            Volume (13.1, 110.2, 282.9),
                            Volume_log (0, 86.1, 282.4),
                            D_gM (6, 19.9, 38), d_min (2, 5.3, 18),
                            d_max (14, 36.6, 66), Age (25, 82.7, 177),
                            total 416 sample plots
         </research_material>

Model definition data used in the simulation begins with the model variable definitions. The variable name and data level definitions here must match those found in the lexicon (Lexicon). They must also match the function input parameter definitions for the model implementation in the model library (Prediction model library). Note that for that the order of the variable definitions is also important. Lower and upper limit values for each variable are optional:

<variables>
            <variable>
               <name>BA</name>
               <level>stratum</level>
               <limits>
                  <lower_limit>0</lower_limit>
               </limits>
            </variable>
            <variable>
               <name>BA</name>
               <level>comp_unit</level>
               <limits>
                  <lower_limit>0</lower_limit>
               </limits>
            </variable><variable>
               <name>MAX_CLASS_COUNT</name>
               <level>simulation</level>
            </variable>
         </variables>

After the input variables, the result attributes of the model are defined. Usually the value of the object-element is self meaning that the result values are stored for the object calling the model. In this example, however, the value is tree which means that the model generates new objects at the tree data level and sets the d and n attribute values for the new objects to the values returned by the model:

<result>
            <object>tree</object>
            <variables>
               <variable>
                  <name>d</name>
               </variable>
               <variable>
                  <name>n</name>
               </variable>
            </variables>
         </result>
      </model>
   </model_group>
</modelbase>