JAMS Start

From ILMS-Wiki
Jump to: navigation, search

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