Model Configuration
(11 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | [[de:Modellkonfiguration]] | |
− | # | + | [[pt:Configuração_do_modelo]] |
− | # | + | The model configuration (file ending in "jmc") as an xml document which has two functions: |
+ | # It is an individual configuration for a concrete model which is stored in the [[Model Definition|model definition file]]. | ||
+ | # It defines the visualization in the [[JAMS-Launcher|JAMS Launcher]] for each parameter which is adjusted. | ||
− | == | + | == Formatting == |
− | + | The most important information in the model configuration includes: | |
− | * | + | * the name of the corresponding [[Model Definition|model definition file]], e.g. |
<config ... modeldefinition="j2k_gehlberg.xml" ...> | <config ... modeldefinition="j2k_gehlberg.xml" ...> | ||
− | * | + | * various group elements which allow grouping editor components in the [[JAMS-Launcher|JAMS Launcher]] in the form of indent keys |
<group description="Common model parameters" name="Main"> | <group description="Common model parameters" name="Main"> | ||
... | ... | ||
</group> | </group> | ||
− | * | + | * some property elements as child elements of the group elements; the component provides information for one attribute of a JAMS component each. The following information serves as configuration of the component: |
− | *# | + | *# Attribute name (e.g. attribute="snowCritDens") |
− | *# | + | *# Component name (e.g. component="J2KProcessSnow") |
− | *# | + | *# Current value (e.g. value="0.45") |
− | *# Name in | + | *# Name in the interface (e.g. name="J2KProcessSnow.snowCritDens") |
− | *# | + | *# Description(e.g. description="Snowpack density beyond free water is released [dec%]") |
− | *# | + | *# Default value (e.g. default="0.7") |
− | *# | + | *# Data type (e.g. type="float", possible types are float, int, string, boolean, file, dir, date) |
− | *# | + | *# Range of validity (e.g. range="0.1;1.0") |
− | : | + | :The five last pieces of information are used to create a graphical input field. If the prompt of the JAMS Launcher is switched off in the [[System Configuration File|system configuration file]], only the first three pieces of information are relevant. |
− | == | + | == Activating and Deactivating Components == |
− | + | By using a property element with the reserved attribute name "%enable%" a component can be switched on or off in the model configuration. The attribute type is boolean. If such an entry exists for a component, the component will only be generated for model execution if its value is "1". Apart from that, this attribute does not have any influence on the component. | |
− | + | An example could go as follows: | |
<property attribute="%enable%" component="Map" default="1" description="Map on or off" | <property attribute="%enable%" component="Map" default="1" description="Map on or off" | ||
name="Map enable" range="" type="boolean" value="1"/> | name="Map enable" range="" type="boolean" value="1"/> | ||
− | == | + | == Processing the Model Configuration before the Model Execution == |
− | + | When the JAMS model is started, the model is generated on the basis of the [[Model Definition|model definition]] and the attributes are initialized using the values from the model configuration, provided they have been indicated. This also holds true if the JAMS Launcher is not used. In this way, the model configuration can also be used to manage different configurations for a single model. For all attributes which are not listed in the model configuration those values from the model definition remain valid. |
Latest revision as of 21:47, 5 June 2013
The model configuration (file ending in "jmc") as an xml document which has two functions:
- It is an individual configuration for a concrete model which is stored in the model definition file.
- It defines the visualization in the JAMS Launcher for each parameter which is adjusted.
Formatting
The most important information in the model configuration includes:
- the name of the corresponding model definition file, e.g.
<config ... modeldefinition="j2k_gehlberg.xml" ...>
- various group elements which allow grouping editor components in the JAMS Launcher in the form of indent keys
<group description="Common model parameters" name="Main"> ... </group>
- some property elements as child elements of the group elements; the component provides information for one attribute of a JAMS component each. The following information serves as configuration of the component:
- Attribute name (e.g. attribute="snowCritDens")
- Component name (e.g. component="J2KProcessSnow")
- Current value (e.g. value="0.45")
- Name in the interface (e.g. name="J2KProcessSnow.snowCritDens")
- Description(e.g. description="Snowpack density beyond free water is released [dec%]")
- Default value (e.g. default="0.7")
- Data type (e.g. type="float", possible types are float, int, string, boolean, file, dir, date)
- Range of validity (e.g. range="0.1;1.0")
- The five last pieces of information are used to create a graphical input field. If the prompt of the JAMS Launcher is switched off in the system configuration file, only the first three pieces of information are relevant.
Activating and Deactivating Components
By using a property element with the reserved attribute name "%enable%" a component can be switched on or off in the model configuration. The attribute type is boolean. If such an entry exists for a component, the component will only be generated for model execution if its value is "1". Apart from that, this attribute does not have any influence on the component.
An example could go as follows:
<property attribute="%enable%" component="Map" default="1" description="Map on or off" name="Map enable" range="" type="boolean" value="1"/>
Processing the Model Configuration before the Model Execution
When the JAMS model is started, the model is generated on the basis of the model definition and the attributes are initialized using the values from the model configuration, provided they have been indicated. This also holds true if the JAMS Launcher is not used. In this way, the model configuration can also be used to manage different configurations for a single model. For all attributes which are not listed in the model configuration those values from the model definition remain valid.