OPTION

<< Click to Display Table of Contents >>

Navigation:  Gekko commands >

OPTION

Previous pageReturn to chapter overviewNext page

The command sets various global option values, in a hierarcical tree of possibilities. "OPTION ?" gives an overview regarding different options and their current values. Below, the different options are described (with their default values indicated).

 

Note that Gekko provides suggestions (a small popup-window) for the OPTION command (see "OPTION  interface suggestions = option"), to aid the user navigate the option tree.

 


 

Syntax

 

OPTION type = value;

 

type

One or more space-delimited options

value

Boolean (e.g.: yes|no)

Integer (e.g.: 200)

Floating point number (e.g.: 0.45)

String (eg.: newton)

 

Note: the '=' may be omitted: OPTION freq q; and OPTION freq = q; are equivalent.

 

Below the full list of options are provided, with their default values. You may set temporary options via the BLOCK structure.

 

 


 

Options

 

OPTION databank create auto = true; [yes|no]

If yes, timeseries will be auto-created. For instance, SERIES y1 = 100; will be possible without CREATE y1;, even if y1 does not exist in the first-position databank.  Setting OPTION databank create auto = yes; and OPTION databank search = yes; can be practical in data revision programs. See also the MODE command.

 

OPTION databank file copylocal = yes;

If yes, when reading (READ/IMPORT) or opening (OPEN) a databank, the file will first be copied into a temporary file on the user's hard drive. This will often speed up reading/opening files on network drives.

 

OPTION databank file gbk compress = yes;

OPTION databank file gbk internal = 'databank.data';

OPTION databank file gbk version = 1.2; [1.0|1.1|1.2]

Some options regarding the .gbk format, applying only to writing or closing databanks (WRITE/CLOSE). Without compression there are some speed gains while writing and reading, but in most cases the speed gains do not outweigh having to deal with much larger databank files. The internal name for the data file inside the zipped .gbk file is normally databank.data, but can be changed here. The version decides what version of datafile is written (1.2 is the most modern).

 

OPTION databank search = no;

If yes, variables will be searched for in all open databanks except the Reference databank (cf. the F2 window). Setting OPTION databank create auto = yes; and OPTION databank search = yes; can be practical in data revision programs.  See also the MODE command, and the databank searching page. Note that the Local or Global databanks are always searchable, independent on MODE etc.

 


 

OPTION decomp maxlag = 10;

OPTION decomp maxlead = 10;

When decomposing, effects via lags are restricted within these values (larger values = slower decomp).

 


 

OPTION folder = yes; [yes|no]

If yes, Gekko will look for files in predefined folders (is switched on per default).

 

OPTION folder bank = [empty];

OPTION folder bank1 = [empty];

OPTION folder bank2 = [empty];

While reading, importing or opening databanks (READ/IMPORT/OPEN), Gekko will first look for databanks in the working folder, and then in the bank, bank1 and bank2 folders (in that order). If the folder contains blanks, single quotes should be used (for instance OPTION folder bank = 'c:\my banks'). Relative paths may be used: OPTION folder bank = \databanks. In that case, Gekko will look for a sub-folder databanks in the working folder. If bank is set, databanks are written to that folder (WRITE).

 

OPTION folder command = [empty];

OPTION folder command1 = [empty];

OPTION folder command2 = [empty];

While looking for command files (see RUN),  Gekko will first look for .gcm files in the working folder, and then in the command, command1, command2 folders (in that order).

 

OPTION folder help = [empty];

Folder where Gekko looks for the help system (gekko.chm file). Normally this file is located where Gekko is installed (and comes bundled with the installer files).

 

OPTION folder menu = [empty];

Folder where Gekko looks for menu files (.html files).

 

OPTION folder model = [empty];

Folder where Gekko looks for model files (.frm files).

 

OPTION folder pipe = [empty];

Folder where Gekko pipes out text output files (see the PIPE command). If no folder is indicated, piped files will end up in the working folder.

 

OPTION folder table = [empty];

OPTION folder table1 = [empty];

OPTION folder table2 = [empty];

Folders where Gekko looks for table files (.gtb files). Gekko will first look in table, then table1, and last table2 folders.

 

OPTION folder working = [empty];

This changes the Gekko working folder. (For advanced users: note that you can also use the parameter '-folder' with the gekko.exe file, for instance: gekko.exe -folder:c:\mygekkofiles).

 


 

OPTION freq = a; [a|q|m|d|u]

Sets frequency of timeseries to a (annual), q (quarterly), m (monthly), d (daily) or u (undated). You may use a string inside {}-bracket, for instance %= 'q'; OPTION freq = {%f};

 


 

OPTION gams exe folder = [empty];

This option starts out empty, and if so, GAMS will try to auto-detect the location of the executable for GAMS (gams.exe). Instead of this auto-detection, you may try to set the folder name manually, for instance OPTION gams exe folder = 'c:\GAMS\win32\24.1';. Note that only the path is indicated, excluding the file name. Please use quotes if the folder contains dots (.).

 

OPTION gams fast = yes;

Default GAMS read is using a fast reader (so-called low-level API). If this poses problems, try the more robust normal API by setting OPTION gams fast = no;.

 

OPTION gams time detect auto = no;

OPTION gams time freq = 'a'; [a, q, m, d, u]

OPTION gams time offset = 0;

OPTION gams time prefix = '';

OPTION gams time set = 't';

These options describe how the time dimension is obtained from the GAMS variables and parameters. The default values correspond to the time being the GAMS set name 't', with natural annual values like 2020, 2021, 2022, etc. If the time values are instead, for instance, t0, t1, t2, you may use OPTION gams time prefix = 't'; 
OPTION gams time offset = 2020;. In that case, t0 will be understood as 2020, t1 as 2021, etc. In this case, you may also set OPTION gams time detect auto = yes;. If so, any dimension element with the pattern 't' + integer will be understood as a time period. This may happen if a variable/parameter does not use a strict set (name 't' in this case, cf. OPTION gams time set) for the time dimension, and Gekko may in that case create a lot of timeless timeseries with dimensions like x['2020'], x['2021'], etc.

 


 

OPTION interface alias = no; [yes|no]

When this option is set, Gekko will look for at list with the name #alias to perform alias substitution of names. For instance, global:#alias = (('a', 'x'), ('b', 'y[z]')); will mean that PRT a, b; is interpreted as PRT x, y[z];. So the #alias list is a list of lists, where the inner lists contain the source name and the destination name. Among other things, #alias can be convenient as a bridge between the naming conventions of two different models. You can switch on and off the use of alias with this option, but if you need to use another #alias list, you have to first perform a RESET/RESTART.

 

OPTION interface clipboard decimalseparator = period; [period|comma]

The option is used in three places: (1) in the CLIP command, (2) regarding the 'Copy'-button on the user interface (copying cells from the last print to the clipboard), and (3) regarding copy-pasting cells from the DECOMP window. The setting is not relevant for SHEET which does not use the clipboard.

 

OPTION interface csv decimalseparator = period; [period|comma]

Used with IMPORT<csv> and EXPORT<csv>, where the databank is a csv (comma separated) file.

 

OPTION interface csv delimiter = semicolon; [semicolon|comma]

Used with IMPORT<csv> and EXPORT<csv>. The field delimiter is ; per default, but can be set to , instead. This symbol delimits the columns of data. Regarding EXPORT<csv>, combining OPTION interface csv delimiter = comma; with OPTION interface csv decimalseparator = comma; will issue a warning. [New in 3.0.5].

 

OPTION interface csv ndec = 100;

Number of decimals when writing levels in a .csv file. A value > 20 is interpreted as "full machine precision". See also OPTION interface csv pdec. The option also applies to .prn files. [New in 3.1.2].

 

OPTION interface csv pdec = 100;

Number of decimals when writing percentages in a .csv file. A value > 20 is interpreted as "full machine precision". See also OPTION interface csv ndec. The option also applies to .prn files. [New in 3.1.2].

 

OPTION interface debug = dialog; [dialog|none]

Choose between dialog or none. If dialog, the user may rerun a file on syntax errors, or skip lines on runtime errors.

 

OPTION interface edit style = gekko; [gekko | gekko2 | rstudio | rstudio2]

The default style is gekko. With gekko2, an [Enter] will execute the line AND move the cursor to the next line. Therefore, with gekko2, multiple lines can be executed with [Enter] [Enter] ... [Enter] instead of [Enter] [downarrow] [Enter] [downarrow] ... [Enter]. With gekko and gekko2, [CTRL+Enter] issues a new line without executing anything (like a newline in Notepad). The rstudio style emulates RStudio, where [Enter] works like a newline in Notepad, and [Ctrl+Enter] executes the line. With rstudio style, an issued command moves the cursor to the next line (similar to gekko2). With rstudio2 style, [Ctrl+Enter] does not move to the next line (similar to gekko).

 

OPTION interface excel language = danish; [danish|english]

If set to danish, CLIP, SHEET and the 'Copy' button will use the Excel code "ikke.tilgængelig()" instead of "na()" to indicate missing values. Also, if set to danish, EXPORT<csv> will use '#NAVN?' for missing values (instead of '#NAME?').

 

OPTION interface excel modernlook = yes; [yes|no]

Turns on modern looking blue colors in SHEET.

 

OPTION interface help copylocal = yes;

If this option is active, Gekko will copy the file gekko.chm into a local folder on the user's hard disk, before it is opened (for instance with F1, or the HELP command). In Windows 7 and 8, problems will arise when trying to open up a .chm files from a network drive, so keeping the option active should eliminate such problems.

 

OPTION interface mode = data; [sim|data|mixed]

Sets some interface messages/warnings etc. regarding different modes (see the MODE command). This option is not intended for direct use: please use the MODE command that changes the mode explicitly.

 

OPTION interface mute = no; [yes|no]

When this option is set to yes, all screen output (or pipe file output) is suppressed. If errors occur, this option is automatically set to no. Alternatively, PIPE can also be used to suppress screen output and direct it to a file instead. The option is is primarily set in command files/procedures/functions to avoid voluminous screen output blocking and slowing the user interface. [New in 3.0.6].

 

OPTION interface remote = no; [yes|no]

OPTION interface remote file = [empty];

If the first option is set to 'yes', Gekko will look for a file named remote.gcm (the default file name) in the current working folder. If that file is changed (Gekko looks at Windows time stamps), the whole file is run (corresponding to RUN remote.gcm;). This makes remote controlling of a Gekko instance possible from, for instance, an external text editor. For instance, typing Alt+Enter or something similar in the editor might be set up so that a remote.gcm file containing the contents of the text line (or block of lines) is created. See also a Gekko-specific add-in for the Sublime text editor here.

 

OPTION interface sound = no; [yes|no]

OPTION interface sound type = bowl; [bowl|ding|notify|ring]

OPTION interface sound wait = 60;

If active, Gekko will play a sound when a command file finishes (or has an error). The sound type can be bowl, ding, notify, ring. The last option is the minimum duration of the job (in seconds), before for Gekko plays a sound.

 

OPTION interface suggestions = option; [none|option]

If set to option, small popup with suggestions will appear when entering options.

 

OPTION interface table operators = yes;

If yes, html tables will include radio buttons to select operators by point-and-click, for instance percentage growth, or multiplier differences. Note: 'operators' was called 'printcodes' in Gekko 2.4 and earlier.

 

OPTION interface zoom = 100;

The zoom level (default = 100%) regarding font sizes in the user interface (the three tabs in the main window). May be increased on high-res monitors, or for educational purposes (projector).

 


 

OPTION menu startfile = menu.html;

The filename for the html menu file shown in the 'Menu' tab (see MENU).

 


 

OPTION model cache = yes; [yes|no]

Whether or not a model cache is used.

 

OPTION model cache max = 20;

The maximum number of compiled models kept in RAM (cached), during a Gekko session. Reduce the number if you for instance are doing a lot of ENDO/EXO simulations and run into memory issues.

 

OPTION model gams dep current = no;  [yes|no]

When reading a GAMS model with MODEL<gms>, Gekko will try to identify the dependent variable in each GAMS equation. If OPTION model gams dep method = lhs (default), Gekko will try to find the first variable on the left-hand side that is not inside a []-bracket or a $-condition. WIth current = no, Gekko will identify the variable as dependent, even if it contains a lag or lead. With current = yes, Gekko will only look for variables that have no lags and no leads. See also the MODEL <dep = ...> local option under MODEL. [New in 3.0.2].

 

OPTION model gams dep method = lhs;  [lhs|eqname]

When reading a GAMS model with MODEL<gms>, Gekko will try to identify the dependent variable in each GAMS equation. With option lhs, Gekko will try to find the first variable on the left-hand side that is not inside a []-bracket or a $-condition. With option eqname, Gekko uses the equation name instead, for instance the equationname e_pc_tot is understood as identifying the variable pc as dependent variable. In both these cases, such identification can be overruled with a list identifying these relationships, cf. the MODEL <dep = ...> local option under MODEL. [New in 3.0.3].

 

OPTION model infofile = yes; [yes|no]

If no, Gekko will not produce a modelname__info.zip file after a MODEL statement (with default model type).

 

OPTION model type = default; [default|gams]

If type = gams, Gekko will handle ENDO, EXO, UNFIX and DISP differently to ease the interaction with GAMS.

 


 

OPTION plot decimalseparator = period; [comma|period]

The type of decimal separator used for tic labels.

 

OPTION plot elements max = 200;

Limits the number of curves in a graph, so that PLOT does not crash or stall when accidently feeding with too many elements. See PLOT<nomax>.

 

OPTION plot lines points = yes; [yes|no]

Whether or not the PLOT graph has individual points indicated with markers. This can also be controlled for each varible via <type = lines> vs. <type=linespoints>.

 

OPTION plot using = [empty];

With this option, a global .gpt PLOT template file can be set, for instance OPTION plot using = m:\common\gekko.gpt;. Subsequent PLOT commands will then use that template (unless the PLOT command itself has a using argument).

 

OPTION plot xlabels annual = at; [at|between]

OPTION plot xlabels nonannual = between; [at|between]

Whether or not the data points are at x-tics, or between them. For quarterly and monthly data, the latter is often the most logical.

 

OPTION plot xlabels digits = 4; [2|4]

Number of digits in the year (at the x-labels). The option only applies to labels between tics, not labels at tics (see the preceeding options). With two digits, we get 15, 16, 17, instead of 2015, 2016, 2017.

 


 

OPTION print collapse = none; [avg|total|none]

If this option is set to avg or total, Gekko will print averages or totals for timeseries of frequencies quarterly or monthly. Cf. also the COLLAPSE command. Only applies to OPTION print freq = pretty;. [Not working presently].

 

OPTION print disp maxlines = 3;

The number of lines of data shown per default in the DISP command. You may choose -1 for infinite, 0 means that no data are shown.

 

OPTION print elements max = 400;

Limits the number of elements in a print, so that PRT does not crash or stall when accidently feeding with too many elements. See PRT<nomax>.

 

OPTION print fields ndec = 4;

OPTION print fields nwidth = 13;

OPTION print fields pdec = 2;

OPTION print fields pwidth = 8;

These options set the default decimals and width of number fields when printing with PRT or MULPRT. The first two sets decimals and width for for non-percent fields, and the two last for percent fields. The ndec and nwidth settings also affect printing of matrices.

 

OPTION print filewidth = 130;

Line width (number of characters) when printing to a file

 

OPTION print freq = pretty; [pretty|simple]

If this option is set to pretty, timeseries of frequencies are printed with separation, blank lines, etc., for better readability. If the option is set to simple, the dates are shown without such separation.

 

OPTION print mulprt abs = yes; [yes|no]

OPTION print mulprt gdif = no; [yes|no]

OPTION print mulprt lev = no; [yes|no]

OPTION print mulprt pch = yes; [yes|no]

OPTION print mulprt v = no; [yes|no]

These options set the default way of printing with the MULPRT command. Per default, abs and pch are chosen, so MULPRT shows absolute multiplier difference (abs), and relative difference (pch). These can be overridden via the option fields in the MULPRT command.

 

OPTION print prt abs = yes; [yes|no]

OPTION print prt dif = no; [yes|no]

OPTION print prt gdif = no; [yes|no]

OPTION print prt pch = yes; [yes|no]

These options set the default way of printing with the PRT command. Per default, abs and pch are chosen, so PRT shows the absolute level (abs), and the growth rate (pch). These can be overridden via the option fields in the PRT command.

 

OPTION print split = no; [yes|no]

If set, the variables or expressions delimited by comma are shown separately, cf. also the local option PRT<split>. With the global optoin set, PRT x, y; is shown as if it had been PRT x; PRT y;. This may be practical for comparisons of data with similar columns, for instance PRT x[#i], @x[#i];. In that case, you may prefer to use for instance the <missing = m> option, so that all columns (#i) are shown (and are hence aligned), regardless of whether the subseries exist or not.

 

OPTION print width = 100;

Line width (number of characters) when printing to screen

 


 

OPTION r exe folder = [empty];

This option starts out empty, and if so, Gekko will try to auto-detect the location of the executable folder for R (R.exe). If this auto-detection fails, you may try to set the folder name manually, for instance OPTION r exe folder = 'c:\Program Files\R\R-3.0.0\bin\R.exe';. Note the single quotes because of the blank in 'Program Files'. You should state the path to an executable file (R.exe), but if you omit a trailing 'R.exe' or '\R.exe', Gekko will fill these in for you. So in the above example, OPTION r exe folder = 'c:\Program Files\R\R-3.0.0\bin'; would have been equivalent.

 


 

OPTION series array calc missing = error; [error|m|zero]

With option error (default), a missing #i element in x in an expression like for instance sum(#i, x[#i]) will halt with an error. With option m, Gekko will not halt, but will use missing values instead of x[#i] -- so the sum will return a missing value. With zero, zeroes are used instead of missing elements in x[#i], so the sum is calculated as if the missing elements were skipped.

 

OPTION series array print missing = error; [error|m|zero|skip]

With option error (default), a missing #i element in x in PRT x[#i]; will halt with an error. With option m, missing values will be printed (typically as 'N' instead of 'M' to indicate that it is a non-existing subseries). With zero, zeroes are printed instead, and with skip, the missing #i's are skipped (not shown). See also the local option <missing = ...> for PRT. As mentioned, with option missing = m, the raw PRT x[#i]; will show missing #i elements as 'N' because they are non-existing, whereas an expression like PRT x[#i] + 1; will show them as 'M', since they are now a result of a mathematical expression.

 

OPTION series data missing = m; [m|zero]

With option m (default), missing data/observations in a normal series or array-series are propagated normally, so that an expression containing a missing value will always result in a missing value. With option zero, a missing value in an observation will be treated as if the value was 0. The four options above that also handle missings deal with the question of what to do if a normal series or array-subseries does not exist at all. In contrast, this option solely affects the time domain: what to do if an observation inside a series is missing. In some cases, for instance when importing data from GAMS, such a missing observation could sensibly be interpreted as the value 0. See more on this, including examples, on this page, and cf. also the <missing = ignore> local option for SERIES and PRT/PLOT/SHEET. [New in 3.0.3].

 

OPTION series dyn = no; [yes|no]

With this option, lagged endogenous variables like in the expression x = x[-1] + 1; accumulate over time, because the expression is run 'dynamically', one period at a time consecutively. The option will only be active, if the right-hand side of the expression is of series type. Because the use of this option entails a speed penalty, the option can only be activated via BLOCK; ... ; END; (see BLOCK).

 

OPTION series failsafe = no; [yes|no]

When this option is set, Gekko will abort with an error message, when a series statement like for instance = x; or y[2020] = %v; tries to insert an observation containing a missing value into the left-hand series. The option can be practical for debugging Gekko command files (.gcm), if the source of a missing value is hard to track. The option is only intended for debugging purposes. See also OPTION solve failsafe. [New in 3.0.2].

 

OPTION series normal calc missing = error; [error|m|zero]

With option error (default), a missing series x in a calculation will will halt with an error. With option m, missing values will be used instead of x, and with zero, zeroes are used instead of the missing x.

 

OPTION series normal print missing = error; [error|m|zero|skip]

With option error (default), a missing series x in PRT x; will halt with an error. With option m, missing values will be printed (typically as 'N' instead of 'M' to indicate that it is a non-existing series). With zero, zeroes are printed instead, and with skip the missing x series is skipped (not shown). See also the local option <missing = ...> for PRT. As mentioned, with option missing = m, the raw PRT x; will show N's because the series is non-existing, whereas an expression like PRT x + 1; will show the missings as 'M', since they are now a result of a mathematical expression.

 


 

OPTION sheet collapse = none; [avg|total|none]

If this option is set to avg or total, Gekko will show averages or totals for timeseries of frequencies quarterly or monthly. Cf. also the COLLAPSE command. Only applies to OPTION sheet freq = pretty;. [Not working presently].

 

OPTION sheet engine = internal; [internal|excel]

For reading and writing Excel spreadsheet files, Gekko will normally use an internal engine to do this. This engine is independent upon Excel being installed on the user's pc. The internal engine only supports .xlsx files, not the older .xls files. If you need to access the older .xls files, you may set the option to excel which reads and writes both the old and new format. Beware however, that the excel option demands Excel being installed on the pc. It is also a bit slow and unstable, and may leave Excel processes behind, eating up memory.

 

OPTION sheet freq = simple; [pretty|simple]

If this option is set to pretty, timeseries of frequencies are printed with separation, blank lines, etc., for better readability. If the option is set to simple, the dates are shown without such separation.

 

OPTION sheet mulprt abs = yes; [yes|no]

OPTION sheet mulprt gdif = no; [yes|no]

OPTION sheet mulprt lev = no; [yes|no]

OPTION sheet mulprt pch = no; [yes|no]

OPTION sheet mulprt v = no; [yes|no]

[NOT USED YET]. These options set the default way of printing with the SHEET<mul> (not implemented yet) command. Per default, only 'abs' is chosen, so SHEET<mul> shows absolute multiplier difference ('abs'). These can be overridden via the option fields in the SHEET command.

 

OPTION sheet prt abs = yes; [yes|no]

OPTION sheet prt dif = no; [yes|no]

OPTION sheet prt gdif = no; [yes|no]

OPTION sheet prt pch = no; [yes|no]

These options set the default way of printing with the SHEET command. Per default, abs is chosen, so SHEET shows the absolute level (abs). These can be overridden via the option fields in the SHEET command.

 

OPTION sheet cols = no; [yes|no]

OPTION sheet rows = yes; [yes|no]

Per defaut, the SHEET command prints timeseries row-wise, that is, with variable names in the first column, and time periods in the first row. These options may change the orientation, or you can use SHEET<rows> or SHEET<cols>.

 


 

OPTION solve data create auto = yes; [yes|no]

If yes, when a databank is read by means of the general READ command (that is, excluding READ<first> or READ<ref>, but including READ<merge>), all model variables not present in the file are auto-created (and filled with missing values). See also the MODE command.

 

OPTION solve data ignoremissing = no; [yes|no]

If yes, if a variable has a missing value when Gekko tries to simulate (SIM), the number zero will be used instead. Warning: this may get the model to simulate, but the result may be incorrect!

 

OPTION solve data init = yes; [yes|no]

If yes, when simulating lagged values are used as starting values for endogenous variables (this is default and typically the most robust). If no, the current period values are used as starting values for endogenous variables.

 

OPTION solve data init growth = yes; [yes|no]

OPTION solve data init growth min = -0.02;

OPTION solve data init growth max = 0.06;

If set yes, Gekko will look at the historical growth rate of endogenous variables, in order to come up with good initial values. With the sub-options min and max, you may indicate a range. Per default, the range is set to -2% up to 6%, meaning that only historical growth rates within that range will be used to initialize endogenous variables. The 'growth' option typically speeds up SIM convergence, provided resonable min/max limits are used.

 

OPTION solve failsafe = no; [yes|no]

If yes, the Gauss algorithm will stop at the exact time when any equation produces a missing value. The option slows the simulations down a bit (which is why it is not set per default). When the option is on, variables from the above-mentioned problematic equation will be printed out on screen automatically (using DISP<info>). See also OPTION solve newton robust. and OPTION series failsafe.

 

OPTION solve forward dump = no; [yes|no]

If yes, information regarding the Fair-Taylor iterations is kept. With one lead-variable, you can see the iterations by means of printing the variables ftabs1_1, ftabs1_2, ftabs1_3, etc., where the last number is the FT-iteration (try PLOT {'ftabs1_*'};). If Newton-Fair-Taylor ('nfair') is used, there will also be matrices #ft_1, #ft_2, etc., containing the Jacobi interaction between leaded variables.

 

OPTION solve forward fair conv = conv1; [conv1|conv2]

Set Fair-Taylor convergence type to conv1 (default) or conv2. This corresponds to the criteria used in the OPTION solve gauss conv ... options.

 

OPTION solve forward fair conv1 abs = 0.001;

OPTION solve forward fair conv1 rel = 0.001;

Relative criterion for the (default) conv1-type convergence check, and absolute criterion for the (default) conv1-type convergence check. Note that the criteria are less strict than the corresponding Gauss criteria.

 

OPTION solve forward fair conv2 tabs = 1.0;

OPTION solve forward fair conv2 trel = 0.001;

Relative criterion for the PCIM-like conv2-type convergence check, and absolute criterion for the PCIM-like conv2-type convergence check. Note that the criteria are less strict than the corresponding Gauss criteria.

 

OPTION solve forward fair damp = 0.0;

Damping used regarding leaded endogenous variables in the Fair-Taylor algorithm. The larger the factor is, the harder the damping. Setting the factor to 0.0 means no damping at all, whereas setting it to 1.0 means the equations cannot progress.

 

OPTION solve forward fair itermax = 200;

OPTION solve forward fair itermin = 0;

The maximum and minimum number of iterations done in the Fair-Taylor algorithm.

 

OPTION solve forward nfair conv = conv1; [conv1|conv2]

Set Newton-Fair-Taylor convergence type to cnv1 (default) or conv2'. This corresponds to the criteria used in the OPTION solve gauss conv ... options.

 

OPTION solve forward method = fair; [fair|nfair|none]

The method used regarding leaded endogenous variables. If set to fair, the Fair-Taylor algorithm is used, and if set to nair, the Newton-Fair-Taylor method us used. If set to none, no forward-looking method is used. In that case, the leaded endogenous variables are just taken exogenously as their databank values.

 

OPTION solve forward nfair conv1 abs = 0.001;

OPTION solve forward nfair conv1 rel = 0.001;

Relative criterion for the (default) conv1-type convergence check, and absolute criterion for the (default) conv1-type convergence check. Note that the criteria are less strict than the corresponding Gauss criteria.

 

OPTION solve forward nfair conv2 tabs = 1.0;

OPTION solve forward nfair conv2 trel = 0.001;

Relative criterion for the PCIM-like conv2-type convergence check, and absolute criterion for the PCIM-like conv2-type convergence check. Note that the criteria are less strict than the corresponding Gauss criteria.

 

OPTION solve forward nfair damp = 0.0;

Damping used regarding leaded endogenous variables in the Newton-Fair-Taylor algorithm. The smaller the factor is, the harder the damping. Setting the factor to 1.0 means no damping at all, whereas setting it to 0.0 means the equations cannot progress.

 

OPTION solve forward nfair itermax = 200;

OPTION solve forward nfair itermin = 0;

The maximum and minimum number of iterations done in the Newton-Fair-Taylor algorithm. Usually this algorithm need far fewer iterations than standard Fair-Taylor.

 

OPTION solve forward nfair updatefreq = 100;

How often the Jacobi matrix is updated in the Newton-Fair-Taylor algorithm. For hard problems, you may set updatefreq = 1.

 

OPTION solve forward terminal = const; [const|growth|exo]

This sets terminal conditions regarding leaded endogenous variables. If the simulation period ends in 2100, y[+1] in that period will be set to the value y is solved for in 2100 (and not the databank value for y in 2101). With growth, y[+1] in 2100 will use the growth rate instead of the level for the solved y in 2100. If the option is set to none, y[+1] in 2100 will be taken as the databank value of y in 2101 (this is often not a good choice).

 

OPTION solve forward terminal feed = internal; [internal|external]

This is a technical option that decides wheather the terminal values are used inside one Fair-Taylor iteration, or only between them.

 

OPTION solve gauss conv = conv1;

Set Gauss convergence type to conv1 (default) or conv2. Read more about convergence criteria in the help file related to the command ITERSHOW.

 

OPTION solve gauss conv1 abs = 0.0001;

OPTION solve gauss conv1 rel = 0.0001;

Relative criterion for the (default) conv1-type convergence check, and absolute criterion for the (default) conv1-type convergence check.

 

OPTION solve gauss conv2 tabs = 1.0;

OPTION solve gauss conv2 trel = 0.0001;

Relative criterion for the PCIM-like conv2-type convergence check, and absolute criterion for the PCIM-like conv2-type convergence check.

 

OPTION solve gauss conv ignorevars = yes; [yes|no]

If active, variables indicated by means of the CHECKOFF command will be ignored regarding convergence check.

 

OPTION solve gauss damp = 0.5;

In the Gauss algorithm, this damps any equations with damping set with the given factor. The larger the factor is, the harder the damping. Setting the factor to 0.0 means no damping at all, whereas setting it to 1.0 means the equations cannot progress. The damped equations have a 'Z' in their formula codes.

 

OPTION solve gauss dump = no; [yes|no]

This option activates recording of Gauss iterations, for later inspection by means of the ITERSHOW command. Beware that the option may use a lot of RAM, and that it slows down simulations considerably.

 

OPTION solve gauss itermax = 200;

OPTION solve gauss itermin = 10;

The maximum and minimum number of iterations done in the Gauss algorithm.

 

OPTION solve gauss reorder = no; [yes|no]

When active, this option reorders equations in the simultaneous block of the model. This should normally reduce the number of required Gauss iterations for solving the model, but it may sometimes induce starting value problems (therefore the option is set to no as default). The option should be issued before a MODEL statement to take effect.

 

OPTION solve method = gauss; [gauss|newton]

Choose between gauss or newton

 

OPTION solve newton backtrack = yes; [yes|no]

If yes, the Newton algorithm tries to backtrack if an iteration step seems too large.

 

OPTION solve newton conv abs = 0.0001;

Sets the absolute Newton convergence criterion. This is the value that the square root of the sum of squared residuals in all the equations may not exceed. So any residual will be (numerically) lower than this value, and usually a lot lower (since there are many equations).

 

OPTION solve newton invert = lu; [lu|iter]

The algorithm used to invert the Jacobian matrix. The lu option is usually the most robust.

 

OPTION solve newton itermax = 200;

The maximum number of iterations done in the Newton algorithm, before exiting.

 

OPTION solve newton robust = yes; [yes|no]

With this option set, the Newton method will be more robust regarding starting values that normally would result in a crash due to illegal values, such as, for instance, the logarithm of a negative number etc. The robust mode is experimental, but if the starting values are legal, robust = yes will perform exactly the same iterations as robust = no. See also OPTION solve failsafe.

 

OPTION solve newton updatefreq = 15;

This options indicates how often the Newton algorithm should update the Jacobi matrix, when doing fast steps.

 

OPTION solve print details = no; [yes|no]

If yes, the Newton algorithm will produce quite a lot of extra information regarding the iterations.

 

OPTION solve print iter = no; [yes|no]

If yes, the individual periods are printed out while simulating. Set to no as default.

 

OPTION solve static = no; [yes|no]

If yes, all lagged endogenous values are taken as their databank values (i.e. not their simulated values). See also SIM<static> local option.

 


 

OPTION string interpolate format val = ''; [string]

When insterting values inside a strings, Gekko can format the values in different ways. Use '0.000' for 3 decimals, '12:0.000' for 3 decimals inside a 12 chars wide field, '12:F3' for the same, '-12:0.000' left-aligned. Instead of 0's, #'s can be used, too. See also the STRING help page, and the format() in-built function.

 


 

OPTION system code split = 20; [0 or positive integer]

This is a very technical option related to how Gekko compiles command files. If > 0, long non-looping command files are internally chopped up in smaller chunks which are put into their own C#-methods. This eases the life of the C# compiler, especially for large/long files. The option tells how many lines of .gcm code are bundled into sub-methods at a time. A value of 20 seems good regarding speed, but the special value 0 switches this splitting off altogether. So you may try the value 0, if Gekko breaks down for mysterious reasons.

 

OPTION system clone = yes; [yes|no]

This is a very technical option related to how user-defined functions and procedures behave. If set active (default), when calling a function like %= f(#x);, Gekko will clone the function arguments, so that there can be no side-effects on the function arguments after the function call is done. The option may cost some performance/speed if a function is called with very large objects, like very large matrices etc. Setting the option = no only applies to the types series, list, map and matrix (scalars never have side-effects).

 


 

OPTION table decimalseparator = period; [comma|period]

The type of decimal separator used.

 

OPTION table html datawidth = 5.5;

For html tables, this is the minimum width of data columns, in so-called 'em' units (in CSS: "width: 5.5em"). The 'em' units are independent of font size.

 

OPTION table html firstcolwidth = 5.5;

For html tables, this is the minimum width of the first column, in so-called 'em' units (in CSS: "width: 5.5em"). The 'em' units are independent of font size.

 

OPTION table html font = Arial;

OPTION table html fontsize = 72;

You may choose the font and fontsize for html tables. The fontsize is in percent, so 72 corresponds to 72% (in CSS: "font-size: 72%").

 

OPTION table html secondcolwidth = 5.5;

For html tables, this is the minimum width of the second column (sometimes containing variable names), in so-called 'em' units (in CSS: "width: 5.5em"). The 'em' units are independent of font size.

 

OPTION table html specialminus = no; [yes|no]

If yes, a non-breaking hyphen is insert instead of the normal minus character. This may avoid some breaking of numbers, but that hyphen is not good for copy-pasting to Excel via right-clicking the table. (But please use the copy-button in the user interface to copy a table to Excel).

 

OPTION table ignoremissingvars = yes; [yes|no]

If yes, missing variables will be shown as 'M', just like missing values for existing variables.

 

OPTION table mdateformat = ''; [string in quotes]

This option will change for instance "2020m1" to "Jan. 2020" regarding monthly table dates. Options are: 'english-short', 'english-long', 'danish-short', 'danish-long'. These can have a '-lower' appended, for instance 'english-short-lower' (lower first letter of the month). The option must be stated within single quotes.

 

OPTION table stamp = yes; [yes|no]

If yes, a date and time stamp is added to tables.

 

OPTION table thousandsseparator = no; [yes|no]

Can activate thousandsseparator (either period or comma, depending upon OPTION table decimalseparator). Note that you can now use negative decimals places. For instance, using varformat="f9.-2" in the gtb file, numbers are rounded to nearest hundreds. Combining these two, a number like 12345 would be printed as "12.300" or "12,300" depending on the decimalseparator.

 

OPTION table type = html; [txt|html]

If set to txt, tables will be shown in text format in the Main tab. If set to html, .html format will be used (shown in the Menu tab). There are some options to control the html layout: see OPTION table html ....

 


 

OPTION timefilter = no; [yes|no]

Switches the timerfilter on or off (provided a timerfilter has been defined). See TIMEFILTER.

 

OPTION timefilter type = hide; [hide|avg]

If set to hide, applying a timefilter will just hide the out-filtered periods (i.e., they are not shown). If avg is used instead, the non-shown periods will be aggregated into the shown periods (as averages). See TIMEFILTER.

 

 


 

Note

 

As stated above, you may omit the '=' in option commands, but it may be a good idea to keep it in programs for readability.

 

Setting OPTION  interface suggestions = option (which is default) will help the user navigate the option tree.

 

For setting temporary options, see the BLOCK structure.