Model Configuration

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
(Aktivierung und Deaktivierung von Komponenten)
(Activating and De-activating Components)
Line 23: Line 23:
 
: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.
  
== Activating and De-activating Components ==
+
== 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.  
 
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.  

Revision as of 10:06, 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.

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

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