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=""

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>

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

            <name>Annika Kangas</name>
            <name>Matti Maltamo</name>
         <description>Generate trees on mineral soils; stand's
                      basal area weigted median diameter, basal area, age,
                      stems/ha and site class as attributes
         <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.
         <geographical_coverage>Entire country. Tested with NFI
         <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.
         <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

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:


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: