GAMS Studio

GAMS Studio is a completely new integrated development environment for GAMS, which is available for Windows, Mac OS X, and Linux. It is based on C++ and Qt.


The classic GAMS IDE has been shipped with the GAMS system for the last 20 years and is still the workhorse for many GAMS programmers. However, the existing IDE does not provide all the features we see in modern development environments. Due to its underlying software technology, implementing new features in the current IDE turned out to be a poor option, so work on a new development environment started from scratch. GAMS Studio is based on C++ and Qt, which makes it fast, reliable, and platform independent (Windows, Mac OS X, and Linux).

Central Widgets

Welcome Page

The Welcome page is the starting point of GAMS Studio. It is designed to give quick access to common actions and to offer helpful information. It is divided into three columns.

On the very left there is a column labeled "Last Files" which lists all files that have been opened recently in Studio with the most recent file on top. A simple left click on an item in this list opens the corresponding file. The middle column named "Getting Started" offers useful actions and links for new users. The upper half contains shortcuts to create new files in user defined locations, open the GAMS Model Library Explorer or load the Transport example. The lower half has a link to the Studio introduction video on YouTube and two further links that open the integrated help view showing either this Studio documentation or the page with the GAMS tutorial overview. The rightmost column "Further Help" contains a link to the latest GAMS release notes, the GAMS World Forum for support and information about how to contact GAMS.

Welcome page

Code Editor

The Code Editor provides common functionality for editing with GAMS specific syntax highlighting. On the left side there is a special area displaying the line numbers and icons for links and errors generated by the compiler.

1. Basic Text Manipulation

Keys Function
Ctrl - C Copy selected text
Ctrl - X Cut selected text
Ctrl - V Paste text from clipboard
Ctrl - A Select whole document
Ctrl - * (Un)Comment all lines in selection
Ctrl - Z Undo
Ctrl - Y or
Ctrl - Shift - Z
Ctrl - Shift - L Duplicate the current line
Shift - Del Remove current line

2. Advanced Text Manipulation

Keys Function
Ctrl - Shift - L Duplicate current line
Alt - Shift - L Toggle selection to lower case
Alt - Shift - U Toggle selection to upper case
Tab or
Ctrl - I
Indent Line
Shift - Tab or
Ctrl - Shift - I
Outdent Line

3. Navigation & Selection

Keys Function
Ctrl - + Zoom in
Ctrl - - Zoom out
Ctrl - 0 Reset zoom
F8 Jump to matching parenthesis
Shift - F8 Select to matching parenthesis
Alt - Left Mouse Button Draw block edit selection
Alt - Shift - Left Mouse Button Span block edit selection from text cursor to mouse click
Alt - Shift - Arrow Key Span block edit selection

4. GAMS Shortcuts

Keys Function
F9 Run main file of current group with GAMS
F10 Run main file of current group with GAMS and create a gdx file
Shift - F9 Compile main file of current group with GAMS without execution
Shift - F10 Compile main file of current group with GAMS and create a gdx file without execution
F12 (Gracefully) Interrupt currently running GAMS job
Shift - F12 Stop currently running GAMS job

5. GAMS Studio Dialogs

Keys Function
F1 Open the GAMS Help. If the word under the cursor is a GAMS keyword a search in the documentation document will be started
F6 Open GAMS Model Library Explorer
F7 Open Studio Settings
Ctrl - G Goto specific line number
Ctrl - F Open search and replace widget

6. Studio Recovery

Keys Function
Ctrl - F2Reset Studio to default visual settings (window postion and -size, widget postion and -visibility)
Useful when a widget got lost or studio started on a disconnected monitor.

The Code Editor looks for parenthesis to the right then to the left of the cursor aund marks valid and invalid nesting. Hitting F8 moves the cursor to the matching parenthesis keeping the state inside/outside. To select the block to the matching parenthesis hit Shift - F8.

Syntax Highlighting

The GAMS Studio syntax highlighter recognizes different kinds of source code like

  • $control option with some special treatments (like $OffText, $OnText, etc.)
  • comments, e.g. line comments and comment block
  • keywords like declarations or loops
  • description as descriptive text for identifiers
  • data statements for identifiers or table data
  • ...

Automatic closing of brackets and quote characters

This feature is meant to improve convenience for users typing source code. In GAMS, as in pretty much every other programming language, opening brackets or quote characters are followed at some point by a closing equivalent. So when a user types one of the following characters the matching closing character will also be inserted after the text cursor. This allows the user to easily type the content in between. When typing the closing character which should be right after the cursor the already existing character will be jumped over. So when a user types the closing character by force of habit the autoclose feature does not interfere or causes syntax errors. Also possible is to make a text selection and then type a bracket or quote character. The selected text will then be surrounded by the chosen character pair. In the GAMS Studio under Settings > Editor > "Auto close opening brackets and quotes" a switch is available to turn this auto-close feature off.

List of characters that trigger insertion of a closing character:

  • (
  • {
  • [
  • "
  • '

Other editors also close the < character but in the GAMS language context it is used in a different way, making it unnecessary to be closed automatically (e.g. as a comparison operator). In some cases user might not like the closing character to be inserted automatically however, this is hard to predict. Other editors - like Qt Creator - check what the next character after the cursor is. Only a limited set of characters allows the automatic insertion of the closing character.

Following characters allow auto closing when being the next char after the text cursor:

  • Whitespaces
  • ,
  • ;
  • )
  • ]
  • {
  • }

All others will prevent the insertion of characters.

File Encoding

When opening a file Studio tries to assume the valid file-encoding. As it is not possible to safely determine the encoding the Edit > Encoding menu assists. A selection of encodings is preselected. This selection can be changed using the Select encoding submenu. To reload a file using another codec the reload with ... submenu can be used. Finally with the convert to ... submenu the current file can be converted to another codec.

Listing Viewer

The Listing Viewer is used for displaying a GAMS output or listing file (*.lst) which is generated when running a GAMS (.gms) file. The Listing Viewer consists of two sides. On the left side, the content of the listing file is presented in a tree structure that allows for convenient navigation within the listing file. The right side shows the listing file itself.

By clicking on a specific item in the tree on the left hand side, the listing file will automatically jump to the corresponding location. Changes of the cursor position in the listing file are dynamically reflected in the tree by selecting the item that belongs to the current section of the listing file.

Listing Viewer showing trnsport.lst generated by running trnsport.gms from the GAMS Model Library

GDX Viewer

The GDX Viewer is used to open and inspect GDX (GAMS Data eXchange) files. A GDX file contains GAMS symbols such as sets, parameters, variables, and equations in a binary format that serves as input and output to GAMS. The GDX Viewer layout consists of two sides. The left side displays the symbol table of the open GDX file in a table format. Every entry represents a symbol and consist of the following information:

  • Entry: The index of the symbol
  • Name: The identifier of the symbol
  • Type: The type of the symbol (Alias, Equation, Parameter, Set, or Variable)
  • Dim: The dimension of the symbol
  • Records: The number of records of the symbol
  • Text: The explanatory text of the symbol
Symbol table showing trnsport.gdx generated by running trnsport.gms from the GAMS Model Library
A specific column can be sorted by clicking on the respective column header. Clicking again toggles the sorting direction. The Symbol Search facility provides dynamic filtering of the list of symbols contained in the GDX file using wildcard syntax. By default, only the Name column is used. By selecting the All Columns check box the search considers all other columns as well. This can be useful if the exact symbol name is not known. The right side of the GDX Viewer displays the actual data of the symbol that is selected in the symbol table. Data can be displayed in either the List View or the Table View which can be toggled using the corresponding button in the lower part of the GDX Viewer.

List View

The List View is the default representation when looking at data using the GDX Viewer. The data is presented in the form of a table in which each row represents a record of the symbol. Each record consists of key columns corresponding to the symbols dimension. Depending on the symbol type, the value columns can vary as the following listing shows:

  • Set/Alias: One value for explanatory text. Y if no explanatory text is available.
  • Parameter: One numerical value.
  • Variable/Equation: Five numerical values: Level, Marginal, Lower bound, Upper bound, Scale
Right side of GDX Viewer showing the parameter d from the trnsport model
The header allows to manipulate the displayed data in several ways. By left clicking on a column header, the corresponding column is sorted using a stable sort mechanism that does not change the order of equal entries. Clicking again changes the sorting direction. Due to the Extended Range Arithmetic used by GAMS, columns containing numerical data can contain special values. Those values are treated in a special way when being sorted:

  • -INF: Smallest numerical value
  • EPS: Treated as value very close but different from 0
  • +INF: Largest numerical value
  • NA: Treated as first non-numerical value (sorted as being greater than +INF)
  • UNDEF: Sorted as being greater than NA
  • ACRONYMS: Sorted as being greater than UNDEF. Relative order of acronyms is by their internal number

The order of columns can be changed by dragging a column header and dropping it at a different position. Dragging the border between column headers allows for resizing the width of the involved columns. Key columns offer a mechanism for applying a filter on the displayed labels. The filter for a key column can be opened either by right clicking on the column header or by left clicking on the filter icon. The Reset button in the lower part can be used to reset the view to defaults. This removes all filters and resets the applied sorting. The Squeeze Defaults checkbox can be used on variables and equations only in order to hide all columns that have the default value of the respective variable or equation type. The Value Columns menu allows to hide certain value columns of variables and equations explicitly. This is especially useful when using theTable View

The filter dialog for a specific column shows all occurring labels of that column in a list. Per default all labels in all columns are visible. Shrinking the displayed data can be achieved by unchecking one or more labels. The filter is applied by clicking the Apply button. Instead of selecting labels manually one can also use the wildcard string filter in the upper part of the filter dialog. The filter is automatically applied to the list of labels. Matching labels will be selected while all others will be deselected. The Hide unselected items checkbox can be used to automatically hide all deselected labels. This is especially useful for larger amounts of labels in combination with the wildcard string filter as only the matching labels will remain in the list while typing. The Select All and Deselect All buttons allow for selecting/deselecting all labels.

Filter dialog on column j for variable x in trnsport.gdx

Table View

Switching to the Table View is possible for symbols that have at least two dimensions. In this representation data is reshaped into a format where the labels of the last dimension are moved into the column header while the remaining dimensions go into the row header. The entries in the table are the numerical values (or explanatory text in case of GAMS sets) of the record with the corresponding labels of the headers. The following image shows the List View of a GAMS Parameter on the left side and its representation in the Table View on the right side:

Two dimensional parameter as <tt>List View</tt> and <tt>Table View</tt>
In case of GAMS variables and equations a virtual dimension for the five numerical values (Level, Marginal, Lower Bound, Upper Bound, Scale) is introduced and displayed in the column header. When looking at the data of variables or equations it is most of the time useful to visualize only a specific attribute like the variable levels. This can be achieved by using the Value Columns menu in the lower part of the GDX Viewer. The menu allows to hide specific attributes explicitly by disabling the corresponding checkboxes.

While filters that have been applied in the List View will also be applied to the Table View, sorting does not have any effect. The labels are sorted using the internal order which can not be changed by the user. For large data it is recommended to reduce the amount of visible records by applying filters in the List View and by disabling certain value columns in case of variables and equations. Once the data has been reduced, switching to the Table View allows to look at the data in a compact format.

Context Menu

Right clicking on a symbols data opens the GDX Viewer context menu which allows to do the following actions:

  • Copy (comma-separated): Copy the current selection to clipboard using comma as separator
  • Copy (tab-separated): Copy the current selection to clipboard using tab as separator. Useful for pasting into spreadsheets
  • Copy (Select All): Select all data

Reference File Viewer

The Reference File Viewer is a useful tool to navigate the source code of GAMS models via a reference file, especially when multiple files are involved. A reference file contains all symbol references of GAMS model and is created using the rf parameter when running the model.

Option to create a symbol reference file when running the model
When the model is compiled, the reference file with ".ref" extension is created and can be opened either using the menu: File > Open or double-clicking the "RefFile" entry in the Output viewer:

Output Viewer showing clickable entry for the reference file
The Reference Viewewr is catagorized by a number of tabs:

Reference File Viewer showing tabs and reference file information
  • All Symbols shows an alphabetical listing of all symbols used in the model.
  • Set, Acronym, Variable, Parameter, Equation, and Model shows an alphabetical listing of symbols of the same type. See Data Types and Definitions for more detatils on GAMS data types.
  • File shows an alphabetical listing of all file statements used in the model.
  • Function shows a list of GAMS built-in functions that has been used in the model.
  • Unused shows an alphabetical listing of all symbols that have been declared in the model but are not used anywhere.
  • File used shows an alphabetical listing of all files used in the model including the full file path. A double-click on an file entry of the table will jump to the beginning of the refernece file.

The number next to the tab name indicates how many symbols in the category, where the number of All Symbols tab sums up the number of symbols in all other tabs except Unused tab and File used tab. A click on a symbol entry of the table in every tab (except File used tab) will show the detailed reference list containing the reference location in the right hand side of the reference viewer. A mouse-over on an entry of the reference list will show the tooltip of file location and position with the file that has been referenced. A double-click on an entry of the reference list will jump to the position in the corresponding file that has been referenced.

The reference list is organized by the following reference types:

Reference Type Description
declared Declaration of the symbol.
defined Defined using a data statement.
assigned When the symbol appears on the left side of an assignment statement.
implicitly assigned Implicit assignment like a variable in a model.
control When the set is used as a control set.
reference Referenced in a statement.

The detailed description of the reference types and their shorthand symbols can be found in Reference Types in GAMS Output.

Sort and Search referenced symbols

  • Sort : A click on a table column header in the reference table will sort the symbol in the table by either Entry, Name, Type, Dim(ension), Domain, or Text.
  • Search : An input in the Symbol Search box will search the symbol in the reference table by name. A search in all columns can be enabled by checking All Columns next to the Symbol Search box.

Tab Browser

The Tab Browser is accessible with a button next to the main tab bar or via the shortcut Ctrl+K. It opens a list of all open files and features a search input field. When opening the tab browser, the search field is already focused. Typing updates the list in real time. The enter key selects the first item in the list and opens it. It is also possible to use arrow up/down to navigate the list and select an item with enter. The filter supports wildcard syntax.

Dock Widgets

Project Explorer

The Project Explorer provides a group organization of files opened in Studio. The Project Explorer lists all files and their corresponding group in a flat hierarchical tree structure with Project Explorer as its root. A group entry is listed with the folder icon and its tooltip tells the location of the group in the file system. The runnable GAMS files (currently supported .gms and .inc) are listed with GAMS icon and the GDX files (.gdx) are given own icon to be identified faster. The tooltip of a file entry tells the location of the file in the file system. The file location and the group location can be explored using the default file system explorer via the context menu "Open location".

Project Explorer and its context menu
A group entry is created automatically when opening a file and a groups name is determined by the name of the opening file. When the group is created, Studio automatically adds certain files (.gdx and .lst with the same name as group name) into the group. By default the first runnable GAMS file in a group is considered the main file, marked with a green arrow over its GAMS icon. The tooltip of a group also tells which the current main file is. One group may contain multiple runnable GAMS files but only one runnable GAMS file is set as the main file. The main file can be changed to other runnable GAMS file in a group via the context menu "Set as main file".

The main file will be executed when pressing F9 or clicking the execute button (see how to set option parameter and execute the main file in Execution and Option Parameter Editor). After executing the main file, the generated listing file (.lst) is added to its group and open the file in the output view. A clickable log line in the output may add the corresponding file into the group and open the file in Central Widgets area. Users can manually add more files to a group by right-clicking and choosing either "Add existing file" or "Add new file" from the context menu.

Files can also be removed from a group and group can be removed from Project Explorer via the two actions "Close group" and "Close file" from the context menu. The action "Close group" closes all files in the group if openend as well as removes all file entries and the group entry from the Project Explorer without actually touching the file on the file system. The action "Close file" closes the file if openend and removes the file entry group from the group. In case the closed file is the only entry in the group, the group is also closed accordingly. In case there are unsaved changes a message popup will appear, asking the user how to proceed.

It is possible to select multiple items in the project explorer. A selection always contains items of one kind, files or groups never both depending on the first selected item. The context menu then addresses all selected items.

Selected files can be dragged to another group. By dropping them they are moved to the destination group. Pressing the CTRL key creates a copy of the file-reference in that group (no file copy). If the group already contains a specific file it is just ignored.

Actions like rename, move, or delete from file system are currently not supported but will be added in the future.

Execution and Option Parameter Editor

Execution and Option Parameter Editor provides a way to control and customize the execution of a GAMS model via a number of command line option parameters (see The GAMS Call and Command Line Parameters). The editor displays the GAMS execution control and option parameters of the group in which one of its files is currently opened in Central Widgets (see also Project Explorer for group and its runnable files). The option parameters can be typed into an option parameter combobox and the execution of a GAMS model can be carried out using the following pre-customized execution commands:

  • Run: Choose Run or press F9 to compile and execute GAMS statements in the main runnable file. This execution command is equivalent to running GAMS with the default option action=CE (Compile and Execution).
  • Run with GDX Creation: Choose Run with GDX Creation or press F10 to compile and execute GAMS statements in the main runnable file and create a GDX file with the name of the main runnable file and a gdx extension. This execution command is equivalent to running GAMS with the combination of the two options action=CE and gdx=default.
  • Compile: Choose Compile or press Shift - F9 to compile GAMS statements in the main runnable file. This execution command is equivalent to running GAMS with the option action=C (CompileOnly).
  • Compile with GDX Creation: Choose Compile with GDX Creation or press Shift - F10 to compile GAMS statements in the main runnable file and create a GDX file with the name of the main runnable file and a gdx extension. This execution command is equivalent to running GAMS with the combination of the two options action=C and gdx=default.

The pre-customized execution command will operate on the main file (marked with a little green arrow over the regular icon) of the currently open group (see how to manage the main file in section Project Explorer). In case option parameter has been set in the option parameter combobox, Studion will apppend the pre-customized command options at the end before execution. In case one of option parameter set via the option parameter combobox is the same as the one in pre-customized command, the pre-customized execution command will override the option parameter when executed.

After execution, the option parameters in the combobox will be added into the group history. Every file in the same group has the same history. The previous option parameters can be recalled from the group history via the drop-down menu of the option parameter combobox. Switching the file opened in Central Widgets will activate the different group history only when the group of the currently opened file is different from the group of the file before switch.

Execution and Option Parameter Editor provides a way to either interrupt or stop the currently running job when an execution of a GAMS model consumes a period of times:

  • Interrupt: Click the Interrupt button or press F12 to send an interrupt request to the running job in order to perform a graceful stop and collect an incumbent result back from the execution if the solver supports this feature. The command is enabled when there is a job that is currently running in the group and disabled when there is no currently running job in the group.
  • Stop: Click the Stop button or press Shift - F12 to send a request to stop the running job immediately. The command is enabled when there is a job that is currently running in the group and disabled when there is no currently running job in the group.

Execution and Option Parameter Editor allows to configure the option parameters via option parameter editor. The option parameter editor is shown when the Shown button next the option parameter combobox is clicked and the button is changed to Hidden icon. The option parameter editor is hidden when the hidden button is clicked and the button is toggled its icon back to Shown icon. When shown, the option parameters from the option parameter combobox will appear as a list of option entries in the left pane of the option parameter editor, each entry contains Option Key and Option Value. Note that the option parameter combobox will be disabled when option parameter editor is shown and all editing activities of option parameters are now available via option parameter editor.

Option Parameter Editor is shown when the button next to option parameter combobox is clicked

The right pane of the option parameter editor displays the list of all valid option definitions, each contains Option Name, Synonym, Default Value, Option Type, and Option Description. The option definition entry with enumeration type (EnumStr or EnumInt) can be expanded to show all enumerated values of the option by clicking the bullet in front of the option entry, clicking the bullet again will hide all enumerated values of the option. Above the list of all valid option definitions is a search box (with placeholder text Search Option...) to allow a simple search through all option definitions. As a search keyword has been typed into the search box the results will be displayed in the list below. The search will perform on all fields of option definitions including enumerated values.

Option Parameter Editor displays potential option parameter errors in red color both in the combobox and in the left pane of the editor. When hovering a mouse over the error option key or value, the option parameter editor pops up a tooltip with more detailed explanation of the error. See edit option key and value on how to edit option key and Value that contains an error.

Option key turns red with pop-up tooltip when there is a potential error
Output reports parameter errors when running the model with an unknown option

The followings describes all editing actions that can be performed via the option parameter editor:

  • Edit option key and value: double click on key cell to edit Option Key and on value cell to edit Option Value of the option entry. A drop-down list will suggest possible option keys and option values when possible. Press Enter to confirm the edit and press Esc to cancel the edit.
Option editor shows a drop-down list of all possible options started with 'o'
Option editor shows a drop-down list of all enumerated values of option 'action'
  • Add new option: there are several ways to add a new option via option parameter editor.

    • right click on the left pane of the option editor and choose add new option from the pop-up context menu
    • right click on the selected option entry of the option table and choose add new option from the pop-up context menu
    • click on the add new option button next to option key table header in the left pane

    A new option entry will be added at the end of option entry table with dummy option key [KEY] and dummy option value [VALUE]. See edit option key and value on how to edit option key and Value.

    It is also possible to add a new option from the right pane of the option editor by double clicking at the option definition entry in the right pane. The selected option definition entry will be added as a new option entry at the end of option table in the left pane. In case of double clicking an enumerated value entry of an option definition the option definition entry will be added as a new option with the selected enumerated value. Otherwise the default value of the option entry will be added.

Option with enumerated value added by double clicking at the selected entry in the right pane
  • Insert new option: right click on the selected option entry and choose insert new option. A new option entry will be inserted before the selected option entry with dummy option key [KEY] and dummy option value [VALUE]. See edit option key and value on how to edit option key and Value.
  • Move selected option up: right click on the selected option entry and choose move selected option up. The selected option entry will be moved one position up the option entry table. This action will change the order of option parameters to be executed.
  • Move selected option down: right click on the selected option entry and choose move selected option down. The selected option entry will be moved one position down the option entry table. This action will change the order of option parameters to be executed.
  • Remove selected option: right click on the selected option entry and choose remove selected option. The selected option entry will be deleted from the option entry table.
  • Remove all options: right click on the left pane of the option parameter editor and choose remove all options. All option entries will be deleted from the option entry table.
A number of actions that can be performed via Option Parameter Editor
Press F1 on an option entry in the option parameter editor will activate the help page The GAMS Call and Command Line Parameters containting the detailed description of the option. A click on the question mark button next to the Show/Hidden button will trigger the help page The GAMS Call and Command Line Parameters. See Integrated Help to see how documentation has been integrated into GAMS Studio.

Integrated Help

The Help View is designed to integrate the navigation of the GAMS documentation into GAMS Studio. Press F1 or choose Help > Documentation menu or check View > Help menu to start the Help View and browse the documentation. The start page of the Help View is the main document page available in the GAMS distribution that has been used to run GAMS Studio. See Home on how to always navigate back to the start page of the document. Click Close button or uncheck View > Help menu to dismiss the Help View. GAMS Studio will remember the last viewed page along with its browsing history until GAMS Studio is restarted.

The Help View starts in docking state for the first time and can be docked around the editor in the central widgets area by either dragging the view to the desired location. Studio will remember last state of the Help View before it was closed.

Help View when docked to the right of editor
The Help View can also be floated by double clicking the title part of the Help View. Dragging or double clicking the title of the Help View again will dock the Help View.

Help View when floated
Note that the Help View does not offer the full browsing features of a web browser. Though the help view offers a Open this page in Default Web Browser button to use the full features of a web browser.

An overview of Help features:

  • Home: Start the start help page [GAMSDir]/docs/index.html
  • Back: Back to previous page
  • Forward: Go to next page
  • Reload: Reload the content of this page
  • Stop: Stop loading the content of this page
  • Bookmarks:
    • Bookmark this page: Store the title of the page as the name of bookmark together with its location. The entry of the bookmark will appear below the Organize Bookmarks section. Click on an entry to jump to the page that has been bookmarked.
    • Organize Bookmarks: Open the bookmark dialog to edit or delete a bookmark entry. Right click on the selected entry in the bookmark table, then either load the selected bookmark in the Help View, or delete the selected bookmark. The selected bookmark Name and Location can be edited from the lower part of the bookmark dialog and press Enter. Press Esc to cancel the edit. Click close button to dismiss the bookmark dialog.
  • Zoom In: Zoom in the page to increase the font size. Press Ctrl - + or choose View > Zoom In menu to zoom in the page.
  • Zoom Out: Zoom out the page to reduce the font size. Press Ctrl- - or choose View > Zoom Out menu to zoom out the page.
  • Reset Zoom: Reset the font size of the page to its original size. Press Ctrl - 0 or choose View > Reset Zoom menu to reset zoom in the page.
  • Help Option :
    • View this page from : Browse the same documentation on GAMS website. This, for example, allows to use more sophisticated search functionalities across all GAMS documentation of version 26.1 or to browse different version of documentation, or to browse the GAMS website from the Help View.
    • Open in Default Web Browser : Browse the same document in default web browser. As the help view does not offer the full features of a web browser, this allows to browse the documentation using the full web browser features in default web browser.
    • Copy page URL to Clipboard : Copy of the current page's URL to the clipboard. This, for example, help to see the URL of the currently viewed page of the document.
  • Find in page... : Press Ctrl - F or choose Edit > Search menu to activate a search at the bottom area of the Help View. Type in a word to be found in the page. The word found in the page will be highlighted as it has been typed in and the number of found occurrences will be highlighted in the scrollbar of the Help View. Click previous button to find the previous occurrence, and click next button or press Enter to find the next occurrence. Check Case Sensitivity box to find a word case sensitively. Highlighting the word stays as the document is navigated from page to page until the keyword is clear or the search is dismissed or the Help View is closed or invisible. Click the close button or press Esc to dismiss the search.

It is also possible to jump directly from Code Editor to the document page that describes Dollar Control Options or to the index page that lists entries related to Data Types and Definitions and Language Items in Code Editor, as well as from option parameter editor to GAMS option parameter described in The GAMS Call and Command Line Parameters :

Help View when press F1 on option entry 'output' in option parameter editor
Help View when press F1 on option table entry 'Save' in option parameter editor


Search and Replace

Pressing the Ctrl - F opens the Search and Replace window. Users can search specific files with it and do text replacement operations in the current file. Depending of which is the main file open in the editor, the search widget changes to visualize which actions are available. Due to technical limitations .gdx files cannot be searched, also replacing in read-only files is not possible.

Search window in its default configuration
In the first row of the search widget from left to right the following items are located: Search field, which takes the search term and saves a list of recent searches. Next to it there is a "Find All" button which starts a search in a user defined scope. In the output pane of studio a table containing all matches will open. Items can be double clicked to perform a jump to the result. Information about the file, the location of the match, plus some context information are also shown. Right of "Find All" there are the find previous occurrence and find next occurrence buttons located, labeled "<" and ">" respectively. These will find and highlight the next word matching the search criteria either before or after the current text cursor position.

The next row houses items related to the replace functionality. Most of these are deactivated for files that are opened in read-only mode (e.g. .lst). First comes the replace input field where users can input the text which replaces the search term. "Replace All" replaces all matches in the currently opened file at once but not before a pop-up is shown asking the user whether the replacement of n occurrences of X with Y is intended. The next button is "Replace" and works similarly to Find Next. On the very first click it selects the next match, without replacing anything. On the next click it replaces the current selection with the replacement term and jumps to the next match, selecting it. Users can use this to click through a file, replacing words while keeping an overview over what is actually changed. Both replacement actions can be undone by pressing either the undo button or hotkey Ctrl - Z. The button "Clear" on the far right clears all highlighted results and both text fields. A shortcut to clear all results is to press the Esc key in the Code Editor.

The last row contains options to narrow down a search. "Whole Words" excludes partial hits from matches. For example, when searching for "in" with the option checked only the word "in" is found but no occurrences in "information". "Case Sensitivity" sets if the case of letters in the search term matters. Reminder: The GAMS language is case insensitive, so this option can actually lead to incomplete results, depending on for what it is used. "Use Regex" actives an advanced search term interpretation mode and stands for Regular Expressions. When activated, instead of a single search term users can specify a pattern that matches an array of different words. Click here for further information about regular expressions.

The "File Pattern" drop-down menu can be used to filter the files to be searched. Using a wildcard syntax patterns of filenames can be specified. The drop-down menu comes with a few default options for GAMS specific file types but can also be used to enter own patterns. Right next to it is another, non-editable drop down menu which works like a simpler filter. The scope of the search can be set here with four options available:

  • "This File" limits the search to the currently active file and is the default. File patterns are ignored for this option.
  • "This Group" searches all files that belong to the same group as the currently opened file. A group of files are all children of the same node in the Project Explorer.
  • "Open Tabs" searches all files currently opened in the Studio editor (except gdx files).
  • "All Files" searches all files that appear in the Project Explorer.

Tooltips are available for most items in the search window and contain further information.

Workflow Tips

  • Edit a file, hit Ctrl - F to open the search widget. The search field is focused automatically so you can start typing your search term. Pressing the Enter-key is a shortcut for Find Next. Press Enter again or F3 to step through all matches. Press Shift - F3 to step backwards. Make changes to you document, press Ctrl - F again to re-focus the search widget without having to pick up the mouse.
  • Enter a search term, press the Tab-key to move the focus to the next interface item which is "Find All". Press the Space-key to press the button and do a full search in the currently set scope. Pressing Enter here would still act as "Find Next" but this might depend on your operating system.
  • The Esc-key will close the search widget. Pressing Esc again will clear all highlighted search results.
  • Use groups or file prefixes when working with projects with many files. Use search filters to only search relevant files.

Model Library Explorer

The Model Library Explorer is used to search the different model libraries provided by GAMS and to retrieve their models in a convenient way. It can be opened either by choosing GAMS > Model Library Explorer from the menu or by hitting F6. Every library is presented in a separate tab.

The search facility in the upper part of the Model Library Explorer allows for dynamically searching all model libraries simultaneously using a wildcard syntax. As the search string is entered the results are applied directly to the tabs representing the different libraries. The parenthesis enclosed numbers indicate the number of models found for this specific library and the current search input. For a more sophisticated search syntax select the Regular Expression checkbox next to the search input.

Searching for trns in the Model Library Explorer
Beside a short description, several models have a longer and more detailed description available. Selecting a model and clicking on the Description button in the lower right corner opens a pop-up dialog showing further information about the model. A model can be opened either by clicking on the Load button, by double clicking or by selecting the model and pressing the Enter key.

User Libraries

Additionally to the model libraries distributed by GAMS, it is possible to access user defined model libraries by providing a GLB file along with the corresponding files belonging to the models in the library. The Model Library Explorer looks into a specific location for user defined model libraries. This location can be accessed by opening the Settings dialog (File > Settings) and switching to the Misc. tab. The Open Location button will show the location where the Model Library Explorer tries to find user defined model libraries. Adding a new library is done by copying the required files into a subdirectory in this location. See Creating a User Library on how to create a custom model library. Newly added libraries require a restart of the Model Library Explorer to become visible.


The GAMS Studio settings dialog can be accessed via the File > Settings menu entry or with the hotkey Ctrl - Comma. Users can change certain aspects of Studio like behavior or appearance. Settings are categorized loosely on three tab pages. On the first tab called "General" users can set the Default GAMS Studio workspace. This path is used as a default location for libraries imported from the Model Library Explorer. Automatically save modified files before GAMS run is an option that saves all modified files in the current group when the user starts a GAMS run. Thereby previously unsaved changes will be incorporated into that GAMS execution without the need for the user to go through all files and make sure that changes were saved manually. Jump to first compilation error is an automatism that aims to make working with Studio a little easier. When compilation errors occur, the editor and the log both jump to the first error detected if this option is activated.

The next tab labeled "Editor" contains many self explanatory appearance options. Most notably font settings which are shared between editor and log. Enable auto-indentation activates smart line break behavior. When pressing the Return-key a line break is inserted and the indentation of the line of origin is copied instead of moving the line to first column. Highlight current word under cursor without selection changes the highlighting behavior of word occurences. While the default behavior highlights other occurences of the same word when double clicking or selecting a word, activating this option changes the behavior so that everytime there is a word under the text cursor, it and it's other occurences will be highlighted. Only full words and no partial matches are highlighted.
GAMS Studio always replaces inserted tabs with spaces. Tab stop size lets the user decide how many tabs will be inserted when pressing the Tab-key. Clear process log before GAMS execution empties the log before running a gms file. If deactivated old log output is kept but colored in a lighter gray so users are still able to identify that they are looking at an old run instead of the most current one.

On the "Misc" tab a shortcut button is located that opens the user library folder. This folder can be used to store user generated model libraries, see User Libraries. There is also an option to set the maximum list size of last files used on the welcome page.

Command Line Options

GAMS Studio can be started with additional command line options that change the behavior or trigger certain functionality at start up time. The syntax for starting GAMS Studio from the command line is

studio [options] [files]

While files is one or more files to be opened by GAMS Studio, the following options can be supplied:

  • -?, -h, --help : Displays the help.
  • -v, --version : Displays version information.
  • --ignore-settings : Ignore settings files. Studio will load with default settings without writing them.
  • --reset-settings : Reset all settings to default. Studio will load with default settings and save them.
  • --reset-view : Reset studio visually without resetting settings. Useful when a widget got lost or studio started on a disconnected monitor.

System Requirements

Compared to most of the GAMS system, GAMS Studio has some additional system requirements, which depend on the platform used. Also, additional information about technical requirements are listed at the GAMS Studio GitHub Wiki.


The Linux version of GAMS Studio is distributed as AppImage and requires glibc 2.14 as well as FUSE to be installed.

The GAMS Studio AppImage was tested and it was verified that it worked for the following Linux distributions (which are all under maintenance):

  • Arch (current version)
  • Debian 9
  • Fedora 29
  • openSUSE Leap 15 (Gnome + Wayland)
  • openSUSE Leap 15 (KDE)
  • openSUSE Tumbleweed
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS

Other flavors might work as well, but were not tested. If you experience problems with a particular Linux distribution, please let us know.

Mac OS

This version of GAMS Studio does not support the Dark Mode of Mac OS Mojave. Please disable this mode, to use GAMS Studio.


The Windows version of GAMS Studio supports Windows 7 and above.

There are dependencies on certain Visual C++ libraries. These are present on most Windows systems but are missing on some. If you get a complaint about missing libraries on startup of GAMS Studio, please run the appropriate installer for these libraries, which can be found in the GAMS installation folder:

  • 32-bit GAMS version: run vcredist_x86.exe, found in [GAMS system]\apifiles\C++\lib\vs2013, followed by vcredist_x86.exe, found in [GAMS system]\apifiles\C++\lib\vs2015
  • 64-bit GAMS version: run vcredist_x64.exe, found in [GAMS system]\apifiles\C++\lib\vs2017

Comparing GAMS Studio and GAMSIDE

As mentioned above, the classic GAMS IDE has been shipped with the GAMS system for many years and is still the workhorse for many GAMS programmers. So it is still around and an alternative to GAMS Studio, especially since it has features, which are not available in GAMS Studio (yet), but it also lacks some features which are available in GAMS Studio. The following table gives a compact overview about most of the differences.

GAMSIDE only GAMS Studio only
Supported Platforms
- Windows - Windows
- Linux
- Mac OS
GDX Viewer
- Table View - Basic table view with static layout
- Creating charts - Filtering
- Writing to Html/Excel - Sorting by numerical value
- Heat-map functionality (aka Data Colors)
- Bookmarks - Block edit
- Spell checker - Help integration (pressing F1 on a keyword opens the relevant index page of the documentation)
- Open same file in different buffers - "Smart typing": Automatic insertion of closing character for brackets and quotes
- Customize syntax coloring - Tool Tips for compilation errors
- Recognize URLs and open them in the browser
- Different set of keyboard shortcuts
- Use different GAMS versions - Interactive editor of GAMS command line parameters
- Use alternative license - Option to jump to first error automatically
- Set default options - Option to not write log to disk
- Execute program based on extension - Option to run with GDX creation automatically (F10 vs F9)
- Solver selection menus
- Solver Option Editor
- GDXDiff - Welcome page
- Text Diff - Project Explorer
- Delete 225a directories - Reference file viewer allows to jump to all references etc and not just the first one
- Script recording - Filtering in Model Library Explorer (all model libraries at the same time)
- "MS DOS" button
- Find in Files (in given folders; independent of open files in the IDE)
- Email file
- Print
- Save test files in UNIX format
- Link to McCarl chm
- Minor options to customize (e.g. eolcom, margins, date format, ...)
- Update license file