Model Configuration

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
(Formatting)
(Formatting)
Line 21: Line 21:
 
*# Data type (e.g. type="float", possible types are float, int, string, boolean, file, dir, date)
 
*# 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")
 
*# 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.
+
: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 ==
 
== Aktivierung und Deaktivierung von Komponenten ==

Revision as of 10:00, 18 November 2011

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.

Aktivierung und Deaktivierung von Komponenten

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.

Ein Beispiel könnte etwa wie folgt aussehen:

<property attribute="%enable%" component="Map" default="1" description="Map on or off" 
          name="Map enable" range="" type="boolean" value="1"/>

Prozessierung der Modellkonfiguration vor der Modellausführung

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.

Personal tools