Model Configuration

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
 
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
Die Modellkonfiguration (Dateiendung "jmc") ist ein XML-Dokument, welches zwei Funktionen erfüllt:
+
[[de:Modellkonfiguration]]
# Sie dient als individuelle Konfiguration für ein konkretes Modell, welches in einer [[Modelldefinition|Modelldefinitionsdatei]] abgelegt ist.
+
[[pt:Configuração_do_modelo]]
# Sie definiert für jeden Parameter, der angepasst wird, wie dieser im [[JAMS-Launcher]] dargestellt wird.
+
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.
  
== Format ==
+
== Formatting ==
  
Zu den wichtigsten Informationen in der Modellkonfiguration zählen:
+
The most important information in the model configuration includes:
* der Name der zugehörigen [[Modelldefinition|Modelldefinitionsdatei]], z.B.  
+
* the name of the corresponding [[Model Definition|model definition file]], e.g.  
 
  <config ... modeldefinition="j2k_gehlberg.xml" ...>
 
  <config ... modeldefinition="j2k_gehlberg.xml" ...>
* eine Reihe von group-Elementen, die ein Gruppieren von Editorkomponenten im [[JAMS-Launcher]] in Form von Tabulatoren ermöglicht
+
* 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>
* als Kindelemente der group-Elemente eine Reihe von property-Elementen, die für je ein Attribut einer JAMS-Komponente verschiedene Informationen bereitstellt. Folgende Informationen dienen dabei der Konfiguration der Komponente:
+
* 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:  
*# Attributname (z.B. attribute="snowCritDens")
+
*# Attribute name (e.g. attribute="snowCritDens")
*# Komponentenname (z.B. component="J2KProcessSnow")
+
*# Component name (e.g. component="J2KProcessSnow")
*# Aktueller Wert (z.B. value="0.45")  
+
*# Current value (e.g. value="0.45")  
*# Name in der Oberfläche (z.B. name="J2KProcessSnow.snowCritDens")
+
*# Name in the interface (e.g. name="J2KProcessSnow.snowCritDens")
*# Beschreibung (z.B. description="Snowpack density beyond free water is released [dec%]")
+
*# Description(e.g. description="Snowpack density beyond free water is released [dec%]")
*# Defaultwert (z.B. default="0.7")
+
*# Default value (e.g. default="0.7")
*# Datentyp (z.B. type="float", möglich sind hier float, int, string, boolean, file, dir, date)
+
*# Data type (e.g. type="float", possible types are float, int, string, boolean, file, dir, date)
*# Gültigkeitsintervall (z.B. range="0.1;1.0")
+
*# Range of validity (e.g. range="0.1;1.0")
:Die letzten fünf Informationen werden dabei für die Erzeugung eines graphischen Eingabefeldes verwendet. Wurde die Anzeige des JAMS-Launchers in der [[Systemkonfiguration|Systemkonfigurationsdatei]] abgeschaltet, so haben nur die ersten drei Informationen Bedeutung.
+
: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.
  
== Aktivierung und Deaktivierung von Komponenten ==
+
== Activating and Deactivating Components ==
  
Mit Hilfe eines property-Element mit dem reservierten Attributnamen "%enable%" kann eine Komponente über die Modellkonfiguration ein- oder ausgeschaltet werden. Der Typ dieses Attributes ist dabei boolean. Existiert für eine Komponente ein solcher Eintrag, so wird die Komponente zur Modellausführung nur dann erzeugt, wenn sein Wert "1" ist. Darüber hinaus hat dieses Attribut keinerlei Einfluss auf die Komponente.
+
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.  
  
Ein Beispiel könnte etwa wie folgt aussehen:
+
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"/>
  
== 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