40 Distribution

40.1.0 Major release (August 01, 2022)


We would like to thank all of our users who have reported problems and made suggestions for improving this release. In particular, we thank Wolfgang Britz, Daniel Dias, and Scott McDonald.

GAMS System


  • Added two new indexed operators sAnd and sOr.
  • The file containing the collection of legacy default values has been renamed from gams31config.yaml to gamsLegacyConfig.yaml, as legacy behavior is not entirely identical to GAMS 31.
  • Changed default of command line parameter digit to off. As a result, extremely large or small constants in the GAMS source will not result in compilation errors but rather in special values (e.g. 1e300 becomes UNDF, 1e-300 becomes EPS). The old default digit=on has been added to gamsLegacyConfig.yaml.
  • Changed default of model attribute tolProj to 0. This means that GAMS no longer by default modifies solution values returned by the solver that are close to variable bounds or equation sides.
  • Throw a compilation error consistently, when one tries to load data into an Alias. In the past, this was just ignored in some cases. It appears that when writing to an alias in embedded code an exception is made and GAMS implicitly imports into a set, not an alias. Details about this subtlety can be found in the embedded code chapter.
  • Made command line parameter IDCProtect available as runtime option as well (the runtime option gets initialized by the command line parameter).
  • Do not allow to load a symbol implicitly from $offEmbeddedCode under $onExternalInput, when it was not declared as external input symbol (the same check was so far done for explicit loading only).
  • Changed the interaction of external input and $gdxIn to allow the continued use of a $gdxIn file over multiple external input sections. So, the following code works now, but threw an error in the past:
    $gdxIn trnsport.gdx
    Set i(*) canning plants ;
    $load i
    * Do something but not opening another GDX file
    Set j(*) markets ;
    $load j
  • Changed the behavior when encountering a symbol with unknown dimension with an execution time load or embedded code statement. In the past, this resulted in an error, now the dimension of that symbol is set to 0 (or 1, if it is a set) implicitly. As a result, the following code runs without error now:
    $call gams trnsport gdx=default
    Variable z;
    execute_load 'trnsport.gdx', z;
    display z.l;
  • Also changed the behavior when encountering a symbol with unknown dimension with a compile time embedded code statement. In the past, this resulted in an error, now the dimension of that symbol is set to the dimension defined in the embedded code block.
  • Make sure that we do not change the loop control index by implicit loading from endEmbeddedCode (the same check was so far done for explicit loading only).
  • Added an explicit error check to ensure that the command line parameter restartNamed is used together with the command line parameter restart only.
  • Changed the put utility facility to ignore the extra double quotes added when the print control is set to 4, 5, or 6. In the past that lead to an error since the commands were not recognized when they are quoted.
  • We plan to remove language elements to access some commercial and licensing information with the next major release:
    • System suffixes: components, clipCodes, clipComponentMap, componentSolverMap, gamsLicenses, gamsLicenseTypes, lice1, lice2, licenseDateEvalN, licenseDateEvalS, licenseDateMaintN, licenseDateMaintS, licenseDateN, licenseDateS, licenseDateSysN, licenseDateSysS, licenseDaysEval, licenseDaysMaint, licenseDC, licenseEval, licenseID, licenseInstitution, licenseLevel, licenseLevelText, licenseLicensee, licenseMudText, licensePlatform, licensePlatformText, licenseStatus, licenseStatusText, licenseType, licenseVendor, and vendors.
    • Predefined sets componentEDate, componentMDate, and componentLicenseOptions.
    • Many of these are used in the GAMS Model Library model licememo, which we also plan to remove.
  • Fixed that exceeding the internal limit of 2.1 billion instructions did not raise an error.
  • Fixed a rare problem which stopped GAMS from terminating if a solver invoked in an asynchronous thread did not return.
  • Fixed an error causing missing domain information, when implicit sets are used while creating a dump file.


  • Added the packages sqlalchemy and greenlet to GMSPython. On Windows, also added the packages sqlalchemy-access, pyodbc, and pywintypes.


  • Domain information is copied into the Connect database when using agents GAMSReader and GDXReader. Agent GDXWriter exports the domain information to the GDX file.
  • Added attribute duplicateRecords to GAMSWriter and GDXWriter to control the way to deal with duplicate records in a Connect container symbol when writing to GAMS or GDX. Note that both agents currently deal with duplicate records in a case sensitive way.
  • Added new DomainWriter agent to modify domain information of Connect symbols.
  • Added new PandasSQLReader and PandasSQLWriter agents to read from and write to SQL databases.
  • Updated Projection agent:
    • Changed boolean attribute dropText to a string attribute text.
    • Added boolean attribute asParameter to turn variables into parameters with an extra index to store the suffixes.
    • Allow a list of symbol names for attribute name to combine multiple scalar symbols into a single one-dimensional symbol.
  • Symbol names in Connect are now case sensitive by default. So casing in the YAML file is important and needs to match e.g. when reading from GDX or GAMS (which use case in-sensitive symbol name lookup) or across agents. There is now a global attribute caseSensitiveLookup in agent Options to control the case-(in)sensitive symbol lookup.
  • Added new attribute debug in agent Options to provide traceback information in case of an exception.
  • Dropped support for writing variables and equations with CSVWriter and PandasExcelWriter. Variables and equations can be turned into parameters using the Projection agent.
  • Added attribute trace to GAMSReader, GAMSWriter, GDXReader, and GDXWriter.
  • Fixed bug where PandasExcelWriter failed when writing no data.

Embedded Python Code Facility

  • Allow to specify source code encoding by providing a comment of format # coding=<encoding name> as first line in an embedded Python code section.
  • If gams._debug is set to an integer greater than 0 a traceback is printed to stdout in case of an exception.


  • For Windows, updated the text in the file association dialog to make clear that the GAMS IDE is deprecated.



  • New libraries 22.7.23.
    • Improved presolve.

Bonmin and BonminH

  • As announced, the solvers Bonmin and BonminH have been removed. For the time being, libraries of GAMS/Bonmin are available at the COIN-OR GAMSlinks project. Note, that GAMS does not test or offer support for these libraries.


  • New libraries Cbc 2.10.8, Cgl 0.60.0, Clp 1.17.7, Osi 0.108.7, CoinUtils 2.11.6, nauty 2.7r3.


  • Export prettier formulas (x for x**1, power(x,1), vcpower(x,1) or rpower(x,1)).


  • New libraries 5.0.2.
    • Added possibility to compute feasible relaxation for infeasible problem. New options FeasRelax and FeasRelaxMode to enable this feature and set relaxation mode, respectively. New dot option .feaspref to specify preferences on relaxation of variable bounds and linear constraint sides.
    • Added options MipStartMode and MipStartNodeLimit to adjust handling of complete and partial MIP starts.
    • Added option ReqFarkasRay.
    • Option crossover has been made available.
  • Changed handling of MIP starting point:
    • GAMS/COPT will pass on a partial instead of a full MIP start also if MipStartMode = 2 is selected.
    • When setting the value for a discrete variable in a partial MIP start (tryint > 0), it will be rounded to an integer value.
  • For an unbounded LP, a primal ray is now returned in the variables level values and UNBND markers are set in the solution listing.
  • For an infeasible LP, a Farkas proof is now returned in the equations marginal values and INFES markers are set in the solution listing.


  • As announced, dropped GLOMIQO. The use of ANTIGONE is equivalent.


  • New libraries 9.5.2.
    • Changed aggregate option type from bool to int. Allowed values are 0 (off), 1 (moderate) and 2 (aggressive).
  • Added support of certain nonlinear constraints: max, min, smax, smin, and, or, sand, sor, abs, exp, **, log, log2, log10, sin, cos, tan, edist, poly.
    To make these accessible, Gurobi can now be used for model types (D)NLP and (R)MINLP as well, but equations need to follow a special form.
  • Added option multimipstart: Use multiple (partial) mipstarts provided via GDX files.


  • New LP/MIP solver HiGHS 1.2.2 developed by the Edinburgh Research Group in Optimization. HiGHS is included in the GAMS base system for users with an academic GAMS license. Users with a commercial GAMS license need to contact sales.nosp@m.@gam.nosp@m.s.com to enable the use of HiGHS.



  • New libraries 13.1.0.
    • Significant performance improvements when using the BFGS/LBFGS Hessian approximation.
    • New options:



  • Increased the internal MAXFUN limit (from 10000 to 50000) on the number of components (inputs, outputs, taxes, etc.) in any MPSGE row.
  • Print info about the size of the largest MPSGE function (i.e. the one with the most input/output/tax/etc coefficients) to the sysout file.



  • The GAMS/Octeract link has been rewritten.
  • New libraries 4.4.1.


  • Added support for logical functions bool_and, bool_eqv, bool_imp, bool_not, bool_or, bool_xor. Only constants, binary variable, and logical functions are allowed as arguments for these operators. The GAMS/SCIP link introduces additional variables and constraints of types and, or, and xor to handle these functions.
  • New libraries SCIP 8.0 (504f5f2749).
  • New libraries PaPILO 2.1 (79da073).


  • New libraries 40.01.01.
    • MIP performance improvements:
      • Improved separation of Mixed Integer Rounding (MIR) cuts in the tree.
      • Improved selection of cutting planes based on orthogonality measures.
      • Some subMIP heuristics at the root node now solve the subMIPs using multiple threads.
      • More advanced MIP presolve operations.
    • Improved crash heuristic for dual simplex.
    • Improved parallel performance of the crossover algorithm.
    • Improved sparse matrix-vector multiplication selection method in dual crossover.
    • New option numericalEmphasis: specify emphasis to place on numerical stability over solving time.
    • Changed default of treeCutSelect to -1.
    • Changed default of treeCutSelect_mirRowAggregation to 1.
  • Support mipCleanup also for nonlinear models.



  • Added a startup message to announce the drop of the classic GAMS IDE.

GAMS Studio

  • New version 1.11.1.
    • New feature: Allow to open a directory to add all files in that directory to a project.
    • New feature: Added HTML format when copying text to clipboard.
    • GDX Viewer improvements:
      • Saves/restore state (e.g. filters, sorting, ...) when data has to be reloaded from file.
      • Added invert selection for column filter and for the attribute selection.
      • Fixed that auto resize of columns was not triggered for 1-dimensional symbols when the table view has been selected as default view.
    • Added zoom for editors/viewers with proportional fonts (GDX Viewer and Option Editor).
    • Added editor to edit efi files for GAMS Engine.
    • Improved and unified filter line edits for tables and trees to support regular expressions and exact matches.
    • Stability improvements, bug fixes, and minor enhancements, e.g.:
      • Moved result files from an GAMS Engine run to the working directory.
      • Added link to MIRO output that opens the directory in the file explorer.
      • Improved trimming behavior of search results.
      • Adjusted wording in search results table header.
      • Fixed focus and auto-fill when re-triggering search dialog while it is already open.
      • Fixed "All Files" filter not showing files without extension on Linux and macOS.
      • Fixed error in restoring selection of MIRO deployment dialog.



  • We will remove the tool gdx2sqlite together with the tool sqlite3 in a future GAMS release. GAMS Connect agent PandasSQLWriter should be used instead.


  • For the interactive mode added a startup message to announce the drop of the GDXVIEWER.


  • We will remove the tool mdb2gms in a future GAMS release. GAMS Connect agent PandasSQLReader should be used instead.


  • Fixed that non-continuous variables in cones (CSECTION) were missing in =c= equations in written GAMS file.
  • Polished written GAMS file, in particular eliminate use of $batinclude.
  • Quadratic cones (CSECTION) are now reformulated into quadratic equations. New option CEQUATIONS can be used to enable previous behavior of writing =c= equations.
  • Input files that were compressed with gzip (.gz) can now be handled.
  • Added support for input in LP format.
  • Updated MPS reader to HiGHS 892691737.


  • We will remove the tool sql2gms in a future GAMS release. GAMS Connect agent PandasSQLReader should be used instead.


GAMS Transfer Python

  • Modified behavior of registering UELs: Previously, GAMS Transfer generated UELs from data in record order (i.e., all UELs from the first data row are registered, then all UELs from the next row are registered, etc.). GAMS Transfer now registers UELs columnwise (i.e., all UELs from the first domain column are registered, then all UELs from the next domain column are registered, etc.). This behavior change will impact symbols written over "*" or with relaxed domains.
  • New Symbol methods hasDuplicateRecords, countDuplicateRecords, findDuplicateRecords, and dropDuplicateRecords to help debug and resolve errors with duplicate records.
  • New Container methods hasDuplicateRecords, countDuplicateRecords, and dropDuplicateRecords to help find symbols that contain duplicate records that cause the Symbol to be invalid.
  • New Symbol methods hasDomainViolations, countDomainViolations, and dropDomainViolations to help debug and resolve errors with domain violations.
  • New Container methods hasDomainViolations, countDomainViolations, and dropDomainViolations to help debug and resolve errors with domain violations.
  • Fixed that the column headings of the records DataFrame were not updated when a domain set/alias was renamed or the .domain attribute of a symbol was updated directly.
  • Fixed read of equation with unknown subtype (recast as =E=/eq).

GAMS Transfer R


  • As announced, dropped support for Python 3.6.

Model Libraries

GAMS Data Library

GAMS Test Library

40.1.1 Maintenance release (August 16, 2022)


We would like to thank all of our users who have reported problems and made suggestions for improving this release.

GAMS System


  • Fixed a bug that cause restart files containing sums that add set elements to execute incorrectly. Restart files created with GAMS 40.1.0 carry this bug and should not be used but recreated.



  • New libraries 5.0.3.


  • New libraries 9.3.21.



40.2.0 Minor release (September 01, 2022)


We would like to thank all of our users who have reported problems and made suggestions for improving this release.

GAMS System




  • New libraries 5.0.4.


  • New libraries MUMPS 5.5.1.


  • New libraries 8.0 (f0a1490e3b).
  • Added parameter gams/infbound to instruct the GAMS/SCIP link to replace all missing variable bounds by a given value (off by default).


  • Fixed use of Gurobi for solving relaxations.



  • Fixed setup.py not copying schema files for Connect agents.

GAMS Transfer Matlab

  • New version 0.2.2:
    • Fixed read of equation with unknown subtype (recast as =e=).
    • Fixed partial read of symbols in indexed container.
    • Fixed equals method in indexed container.
    • Fixed possible segfault when reading a subset of symbols as dense matrix with at least one scalar symbol.

40.3.0 Minor release (September 16, 2022)


We would like to thank all of our users who have reported problems and made suggestions for improving this release. In particular, we thank Wolfgang Britz.

GAMS System

  • Fixed an error with command line parameter dumpOpt, that ignored the SemiInt modifier for a variable.



  • Fixed reporting of final (fixed) solve objective value instead of MIP solve objective value if final solve is enabled.



GAMS Studio

  • New version 1.11.2 with some bug fixes, for example:
    • Updated tooltip of a tab after filename changed with "save as...".
    • Removed link to outdated introduction video.
    • Fixed occasional crash when opening search dialog after closing all files.
    • Fixed drag'n'drop creating group with invalid working directory.
    • Fixed GDX Viewer showing wrong data in table view because of a falsely restored symbol which dimension or type has changed.
    • Fixed GDX Viewer crash occurring when a file is reloaded during a drag'n'drop operation in table view mode.
    • Fixed disabled "Create" button in MIRO dialog on missing assembly file.