Model Configuration

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
(Activating and De-activating Components)
 
(3 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:
 
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 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_en|JAMS Launcher]] for each parameter which is adjusted.
+
# It defines the visualization in the [[JAMS-Launcher|JAMS Launcher]] for each parameter which is adjusted.
  
 
== Formatting ==
 
== Formatting ==
Line 8: Line 10:
 
* the name of the corresponding [[Model Definition|model definition file]], e.g.  
 
* 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_en|JAMS Launcher]] in the form of indent keys  
+
* 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">
 
  ...
 
  ...
Line 31: Line 33:
 
           name="Map enable" range="" type="boolean" value="1"/>
 
           name="Map enable" range="" type="boolean" value="1"/>
  
== Prozessierung der Modellkonfiguration vor der Modellausführung ==
+
== Processing the Model Configuration before the Model Execution ==
  
Wird das JAMSModell gestartet, so wird auf der Grundlage der [[Modelldefinition]] das Modell zunächst erzeugt und die dort definierten Attribute mit den Werten aus der Modellkonfiguration initialisiert, sofern diese angegeben wurden. Dies gilt auch dann, wenn der JAMS-Launcher nicht verwendet wird. Die Modellkonfiguration kann somit auch verwendet werden, um unterschiedliche Konfigurationen für ein einziges Modell zu verwalten. Für alle Attribute, die in der Modellkonfiguration nicht aufgeführt sind, behalten die Werte aus der Modelldefinition ihre Gültigkeit.
+
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:

  1. It is an individual configuration for a concrete model which is stored in the model definition file.
  2. It defines the visualization in the JAMS Launcher for each parameter which is adjusted.

Formatting

The most important information in the model configuration includes:

<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:
    1. Attribute name (e.g. attribute="snowCritDens")
    2. Component name (e.g. component="J2KProcessSnow")
    3. Current value (e.g. value="0.45")
    4. Name in the interface (e.g. name="J2KProcessSnow.snowCritDens")
    5. Description(e.g. description="Snowpack density beyond free water is released [dec%]")
    6. Default value (e.g. default="0.7")
    7. Data type (e.g. type="float", possible types are float, int, string, boolean, file, dir, date)
    8. 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.

Personal tools
In other languages