JAMS Start

From ILMS-Wiki
(Difference between revisions)
Jump to: navigation, search
(JAMS Command Line Argument)
(Transferring Model Parameters when Starting JAMS-Start)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[de:JAMS_Start]]
 +
[[pt:Iniciando_o_JAMS]]
 
==Starting JAMS==
 
==Starting JAMS==
 
Starting JAMS can be done in two ways:
 
Starting JAMS can be done in two ways:
Line 11: Line 13:
 
# -h/--help : list of all command line arguments  
 
# -h/--help : list of all command line arguments  
 
# -c/--config <config file name> : indicating a [[System Configuration File|system configuration file]]
 
# -c/--config <config file name> : indicating a [[System Configuration File|system configuration file]]
# -m/--model <model file name> : indicating a[[Model Definition|mode definition file]]
+
# -m/--model <model file name> : indicating a [[Model Definition|model definition file]]
 
# -p/--parametervalue <list of parameter values> : indicating a list of parameters, separated by semicolons.
 
# -p/--parametervalue <list of parameter values> : indicating a list of parameters, separated by semicolons.
  
Line 17: Line 19:
 
  java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam
 
  java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam
  
==Modellparameter beim JAMS-Start übergeben==
+
==Transferring Model Parameters when Starting JAMS-Start==
  
Das Kommandozeilenargument -p/--parametervalue erlaubt die Angabe einer Semikolon-separierten Liste von Parameterwerten (z.B. "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"). Die Zuordnung dieser Werte zu Modellparametern in JAMS erfolgt dabei über ihre Position in der Liste. Dazu müssen in der [[Modellkonfiguration|Modellkonfigurationsdatei]] Platzhalter an denjenigen Stellen eingefügt werden, an denen die übergebenen Parameterwerte eingefügt werden sollen. Diese Platzhalter haben die Form "%x", wobei x eine bei 0 startende, fortlaufende natürliche Zahl ist. Im Beispiel
+
The command line argument -p/--parametervalue allows an indication of a semicolon-separated list of parameters values (e.g. "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"). Assigning the values to model parameters in JAMS is done by their positioning in the list. For this purpose, wildcards have to be inserted in the [[Model Configuration|model configuration file]] at those positions where the transferred parameter values are to be inserted. Those wildcards have the form "%x", where x is a natural, consecutive number starting at 0. In the example
 
  java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam -p "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"
 
  java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam -p "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"
würde in j2k_gehlberg/j2k_gehlberg.jam dann der Platzhalter "%0" durch "0.1",  
+
the wildcard "%0%" would be replaced by "0.1", then "%1%" by "7", and "%2%" by "1996-11-01 7:30 2000-10-31 7:30 6 1" in j2k_gehlberg/j2k_gehlberg.jam.  
der Platzhalter "%1" durch "7" und der Platzhalter "%2" durch "1996-11-01 7:30 2000-10-31 7:30 6 1" ersetzt werden.  
+
  
Auf diese Weise ist es leicht möglich, Modellparameter bereits beim JAMS-Start mit vorgegebenen Werten zu versehen, was beispielsweise bei der Batch-Prozessierung von Simulationsläufen erforderlich ist.
+
In this way it is easily possible to assign given values to model parameters when starting JAMS, such as required in the Batch processing of simulation runs.

Latest revision as of 15:08, 19 June 2018

Starting JAMS

Starting JAMS can be done in two ways:

  1. Executing the file jams.exe (jams for Linux) in the JAMS installation directory
  2. Executing JAVA in the JAMS installation directory by indicating the JAMS archive: java -jar lib/JAMS.jar

The second option is suitable if a different file than that in the installation package is to be used or if the file jams.exe does not exist. The direct call of Java also makes it possible to transfer additional parameters to the virtual machine and to show the entire output of JAMS including error messages. An example of indicating additional parameters is presetting the initial and maximum memory space, which is available when executing JAMS. 300MB as initial space and 500MB as maximum can be reserved by using the following call:

java -Xms300m -Xmx500m -jar lib/JAMS.jar

JAMS Command Line Argument

When starting JAMS the following command line arguments can be used:

  1. -h/--help : list of all command line arguments
  2. -c/--config <config file name> : indicating a system configuration file
  3. -m/--model <model file name> : indicating a model definition file
  4. -p/--parametervalue <list of parameter values> : indicating a list of parameters, separated by semicolons.

A typical start of JAMS using a direct indication of a model configuration file could be as follows:

java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam

Transferring Model Parameters when Starting JAMS-Start

The command line argument -p/--parametervalue allows an indication of a semicolon-separated list of parameters values (e.g. "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"). Assigning the values to model parameters in JAMS is done by their positioning in the list. For this purpose, wildcards have to be inserted in the model configuration file at those positions where the transferred parameter values are to be inserted. Those wildcards have the form "%x", where x is a natural, consecutive number starting at 0. In the example

java -jar lib/JAMS.jar -m JAMS-Gehlberg/j2k_gehlberg.jam -p "0.1;7;1996-11-01 7:30 2000-10-31 7:30 6 1"

the wildcard "%0%" would be replaced by "0.1", then "%1%" by "7", and "%2%" by "1996-11-01 7:30 2000-10-31 7:30 6 1" in j2k_gehlberg/j2k_gehlberg.jam.

In this way it is easily possible to assign given values to model parameters when starting JAMS, such as required in the Batch processing of simulation runs.

Personal tools
In other languages