Download GAMS — A User's Guide
Transcript
E
The Option Statement
E.1
Introduction
The option statement is used to set various global system parameters that control output detail, solution process
and the layout of displays. They are processed at execution time unlike the dollar control options discussed in
Appendix D. They are provided to give flexibility to the user who would like to change the way GAMS would
normally do things. GAMS does provide default values that are adequate for the most purposes, but there are
always cases when the user would like to maintain control of aspects of the run.
E.1.1
The Syntax
The general form of an option statement is
option ’keyword1’ [ = ’valuel’] { ,|EOL
’keyword2’ [ = ’value2’] } ;
where the ’keyword1’ and ’keyword2’ are recognized option names (but not reserved words) and the ’value1’
and ’value2’ are valid values for each of the respective options. Note that commas or end-of-line characters are
both legal separators between options.
+ Option names are not reserved words and therefore do not conflict with other uses of their name.
There are five possible formats:
1. a display specifier.
2. a recognized name, number following = sign or value
3. a recognized name, number following an = sign, then an unsigned integer value.
4. a recognized name, number following an = sign, then an unsigned real number.
5. a recognized name, number following an = sign, then either of two recognized words.
+ An option statement is executed by GAMS in sequence with other instructions. Therefore, if an
option statement comes between two solve statements, the new values are assigned between the
solves and thus apply only to the second one.
+ The values associated with an option can be changed as often as necessary, with the new value
replacing the older one each time.
An example of a list of option statements is shown below,