34 Distribution

34.1.0 Major release (January 29, 2021)


We would like to thank all of our users who have reported problems and made suggestions for improving this release. In particular, we thank Marcel Adenauer, Wolfgang Britz, Michael Ferris, Erwin Kalvelagen, Antti Lehtila, Bruce McCarl, Scott McDonald, Cornelius RĂ¼ther, Shima Sasanpour, Kaushik Sinha, Elizabeth Wong, and Qi Yuan.


  • The minimal required GLIBC version of the distribution for GNU/Linux is now 2.17.
  • macOS 10.13 (High Sierra) is no longer supported.

GAMS System


  • Improved performance of dense operations with out-of-order index positions, as in the following code snippet, where the assignment to d1 was significantly slower than the one to d2 in the past:
    d1(j,i) = sum(ij(i,j), exp(pij(i,j)));
    d2(j,i) = sum(ij(i,j), abs(pij(i,j)));
  • Added new debugging option dmpUserSym, to print all symbols defined by the user.
  • Added new variants $showFiles, $showMacros, and $showVariables of $show for shorter reports.
  • Print an extra log line for compile time GDX operations $gdxIn and $gdxOut. When running GAMS from one of the GAMS IDEs, these log line can be clicked to open the file referenced.
  • Add anchors to the log that can be clicked when running GAMS from one of the GAMS IDEs for each mention of an input/include file.
  • Added extra info to the log in case of an unmatched $ifThen and its variants, that can be clicked when a GAMS IDE is used to jump to the initial dollar control option.
  • Added more details about the problem to the log in case of an error analyzing the solve statement.
  • Added new variants for the command line parameter fileCase which allow to use upper or lower case for referenced filenames only and not for the path to the files.
  • Fixed a bug where certain checks for errors in the model structure were skipped, if upper and lower bound of a variable are the same. While the selected solver would already have rejected the problem most likely, now GAMS generates an execution error also if lower and upper bounds are the same and
    • the bounds of discrete variables do not have integer values,
    • the lower and upper bounds of binary variables are not equal to 0 or 1, or,
    • the lower bounds of semiCont/semiInt variables are smaller than 0.
  • Altered the behavior of execute.checkErrorLevel, put_utility exec.checkErrorLevel, and put_utility shell.checkErrorLevel so the execution would stop right away also within a Flow Control structure, like a loop, if an error is encountered. In the past, it would just stop after executing the flow control structure completely.
  • Changed the behavior for unloading symbols with $unload. In previous versions the writing of the symbols happened while the compiler processed the $unload instructions. With this version forward the writing of the symbols and data to GDX is delayed until the GDX file is about to be closed. This has several advantages, e.g. writing of aliases and full domain information, but it can result in different content of the GDX file in some corner cases. Please check for details in the documentation.
  • Avoid export of predefined symbols diag and sameAs to GDX. When all symbols should be exported, these are skipped. When they are tried to be exported explicitly, there will be a compilation error.
  • Allow to use Put_Utility save to write a save file of the current state of execution inside loops and other flow control structures as well.
  • Fixed a wrongly raised compilation error which could happen when an implicit set definition was used with a table statement without data.
  • Fixed a problem where dumpOpt in combination with $onVerbatim skipped parts of an $ifThen block.


  • Added the packages pyexcelerate, pyyaml, xlsxwriter, and their dependencies.



  • As announced, dropped the meta-solver AMPL.


  • New libraries 21.1.13.
    • Improved interface to IPOPT for local search.
    • Changed default for option LPSol to new value -1, which makes BARON use CPLEX for LP or MIP relaxations, if licensed, and CLP/CBC otherwise.
    • Further performance improvements and bugfixes.
  • Added option BarName to specify name of file into which to write problem in BARON format.




  • New library 4.22.
    • Some improvements for models with external equations.


  • The two solver links CONVERT and CONVERTD were merged under the name CONVERT. Features that were formerly available in only one of the two solver links are now all usable with the new CONVERT link (except for the dropped features, see below). CONVERTD is an alias for CONVERT now.
  • JuMP format:
    • Added constraint names.
    • Using @NLconstraint and @NLobjective instead of add_NL_constraint and set_NL_objective, respectively.
    • Changed default of option JuMP to jump.jl.
  • Pyomo format:
    • Fix export of SOS1 and SOS2 variable types.
    • Changed default of option Pyomo to pyomo.py.
  • DumpGDX format (formerly Hessian or Jacobian):
    • The current behaviour of disabling variable and equation names or UELs when setting the option to "NOVENAMES.gdx" or "NOUELS.gdx" has no special effect anymore. Use GDXNames and GDXUELs instead.
  • New options:
    • Width
    • DumpGDX (replaces options Hessian and Jacobian)
    • GDXNames (instead of setting the former options Hessian or Jacobian to "NOVENAMES.gdx")
    • GDXUELs (instead of setting the former options Hessian or Jacobian to "NOUELS.gdx")
    • GDXHessian (enables hessian information for DumpGDX)
    • GDXQuadratic (enables quadratic information for DumpGDX)
  • Options PermuteEqus and PermuteVars are now available for all target languages.
  • Removed the following formats:
    • AlphaECP
    • AmplNLC
    • Analyze
    • AnalyzeS
    • Baron (GAMS/Baron link provides the option BarName to export this format)
    • Lgo
    • LindoMPI (GAMS/Lindo link provides the option WRITEMPI to export this format)
    • LocalSolver (GAMS/Localsolver link provides the option writelsp to export this format)
    • LSPSol
    • Memo
    • Minopt
    • SFS
    • ViennaDag
  • Removed the following experimental formats:
    • AmplNLCG
    • CHull
    • CppAD
    • Lago
    • NLP2MCPE
    • PDCO
    • Qmaker (use DumpGDX with GDXQuadratic enabled instead)
    • UnitBC
  • The following formats are deprecated and may be removed in an upcoming release:
  • The following options don't have any effect anymore and will be removed in an upcoming release:
    • ConeReform
    • IntervalEvalDebug
    • Match
    • Terminate


  • New libraries 20.1.0.
    • Conflict Analysis (iis) now supports SOS variables and indicator constraints.
    • Added options:
      • prereform: allows to set presolve reformulations
      • conflictalg: algorithm CPLEX uses in the conflict refiner to discover a minimal set of conflicting constraints in an infeasible model
      • nodecuts: allows to decide whether or not cutting planes are separated at the nodes of the branch-and-bound tree
      • sos1reform: automatic logarithmic reformulation of special ordered sets of type 1 (SOS1)
      • sos2reform: automatic logarithmic reformulation of special ordered sets of type 2 (SOS2)
      • Value 5 to mipemphasis: finding high quality feasible solutions as early as possible
    • Deprecated options:
    • Deprecated features (will be removed in a future CPLEX release):
      • Remote Object functionality.
      • Distributed parallel optimization of mixed integer programming models (MIP).
  • Fixed error messages for CPLEX error 5002 (CPXERR_Q_NOT_POS_DEF).
  • Fixed an error that caused a crash for special option file input.
  • Fixed an error that wrote additional quotes in GDX files of ranging and column generation information.
  • Fixed miptrace timing info.



  • Updated MUMPS to version 5.3.5.


  • The environment variable NEOS_EMAIL can now be used to provide an e-mail address when submitting a job to NEOS.
  • Fixed unintentional reading from option file.


  • New libraries 12.3.0.
    • Improvements in performance, memory usage, numerical stability, and overall stability.


  • As announced, dropped the meta-solver LINGO.


As announced, dropped the tool LS.

One possibility to adapt existing GAMS code is to use the Python function numpy.linalg.lstsq via the GAMS embedded code facility.

For example, the GAMS code

Set i;
Parameter x(i), y(i);
Variables b0, b1, sse;
Equations sumsq, fit(i);
sumsq..   sse =n= 0;
fit(i)..  y(i) =e= b0 + b1*x(i);
option lp = ls;
model leastsq /fit,sumsq/;
solve leastsq using lp minimizing sse;

to compute a linear regression for (x,y) can be replaced by

Set i;
Parameter x(i), y(i);
Scalars b0, b1, sse;
embeddedCode Python:
  import numpy as np
  x = np.array(gams.get('x', keyFormat=KeyFormat.SKIP))
  y = np.array(gams.get('y', keyFormat=KeyFormat.SKIP))
  A = np.vstack([np.ones(len(x)), x,]).T
  res = np.linalg.lstsq(A, y, rcond=None)
  gams.set('b0', [res[0][0]])
  gams.set('b1', [res[0][1]])
  gams.set('sse', [res[1][0]])
endEmbeddedCode b0 b1 sse

For a more detailed example, see the new LeastSquares.gms model from the GAMS Data Library.


  • New libraries 9.2.35.



  • Set the (hidden) GAMS option relPath to 1 for the execution of the scalar GAMS model. This fixes a problem when running NLPEC under KESTREL on NEOS.


  • New libraries 5.31.
  • Fixed missing output of final CPLEX solve for fixed model.
  • Fixed possible values of option odhpresolve to 1 and 2.


  • As announced, dropped the meta-solver PYOMO.


  • New libraries 7.0 (9a11615b47).


  • New libraries 5.0.2.


  • Non-convex QCPs don't have to be solved as NLP anymore, but are solved by XPRESS Nonlinear if a XPRESS-NLP or XPRESS-MINLP license is used (XPRESS-MINLP for MIQCPs).
  • Fixed an issue that prevented the use of XPRESS Knitro with a XPRESS link license.
  • Fixed a bug that prevented to solve (MI)QCP models with an XPRESS-MIP license.



  • Report the line/field records to the log that lead to UNDF conversion for trace level 1 or bigger.

GAMS Studio

  • New version 1.5.2.
    • New feature: Allow to edit and store custom color themes in the settings dialog.
    • New feature: Allow to define custom sections in the code, that can be folded using $onFold / $offFold.
    • Improved MIRO deploy dialog.
    • Added e-mail field for NEOS submissions in NEOS dialog. This can also be initialized from environment variable NEOS_EMAIL (which can be set permanently in gamsconfig.yaml).
    • Changed "Autosave on Run" setting to save ALL modified files, not just files of the current group.
    • Changed default light theme comment color to grey for better distinction from declarations.
    • Disabled GAMS syntax highlighting between $onPut/$offPut and $onEcho/$offEcho.
    • Added "select entry" on clicking timestamp in log.
    • Pressing Enter in the LXI tree scrolls to the corresponding position in the LST view.
    • Adjusted list of files in Reference File Viewer to be sorted by order in which they have been used.
    • Stability improvements and minor bug fixes, e.g.:
      • Fixed rare problem with undetected external file changes.
      • Fixed broken include file links in combination with end of line comments.
      • Fixed missing request for new search cache after switching file.
      • Fixed rare crash related to LOG output.
      • Fixed endlessly recurring message box for invalid GDX file.
      • Fixed missing update of parameter history for a file assigned to more than one group.
      • Fixed search results not being highlighted in .log files.
      • Fixed search performance problem after reset search parameters.
      • Fixed behavior of ESC key when current widget has a selection.
      • Fixed syntax highlighting of table statements not detecting row headers.
      • Fixed print dialog shortcut not working directly after Studio launch.


  • Increase the maximum length of symbol names in the Veda definition file from 31 to 63.


  • When using the option noData, empty symbols were still written with a data statement. Now empty symbols are also loaded from GDX.


  • Switch from C to C++ as the compiler for these utilities.
  • An unordered_map container is now used to address a performance issue with rgdx and filtered reads.



  • We plan to drop support for Microsoft Visual Studio 2015 for the C++ API with the next major release.


  • Added support for Python 3.9.
  • gams2numpy:
    • New functions gdxGetUelList and gmdGetUelList allow to retrieve the list of UELs.
    • gdxReadSymbolRaw and gmdReadSymbolRaw do not return the list of UELs anymore.
    • gdxReadSymbolStr and gmdReadSymbolStr have a new optional input parameter uelList.
    • Fixed a bug that prevented loading of required shared objects in certain cases.


  • New GAMS Matlab API
    • The API is distributed as package GAMS located in apifiles/Matlab/api.
    • Examples can be found in apifiles/Matlab/examples.


  • Fixed the functions gmoGetObjSparse, gmoGetRowSparse, gmoGetColSparse, gmoHessLoad, gmoHessLagStruct, and gmoHessLagVal: they now work properly when forceLinear is set, e.g., when using GUSS.

Model Libraries

GAMS API Library

GAMS Data Library

New models:

GAMS Test Library

New models:

Removed models:

  • LS01 (394)
  • LS02 (395)
  • LS03 (397)
  • LS04 (398)

Solver/Platform availability matrix

x86 64bit
MS Windows
x86 64bit
x86 64bit
CBC 2.10
CPLEX 20.1
IPOPT 3.13
LINDO 12.0
SCIP 7.0
SHOT 1.0
XPRESS 36.01

34.2.0 Minor release (February 05, 2021)


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 and Bruce McCarl.



  • New libraries 4.23.
    • Improvements for models with external equations, models with very large objective terms, and models with variables that only appear in the objective function.
  • Fix parallel function evaluation.


  • Fix variable coefficients in JuMP format.



  • The output formatting for the BLOCKPIC and MATCHIT procedures was adjusted to better handle very small or large values.

34.3.0 Minor release (February 25, 2021)


We would like to thank all of our users who have reported problems and made suggestions for improving this release. In particular, we thank Luis Alberto Herrero Rozas, Robert Howlett, Erwin Kalvelagen, Antti Lehtila, Bruce McCarl, and Shima Sasanpour.

GAMS System


  • Fixed a problem with embedded Python code and directory names longer than 128 characters.
  • Fixed embedded Python code exceptions not handled correctly in case the exception message is empty.
  • Fixed a problem where dumpOpt in combination with $onVerbatim produced wrong dollar conditions in an $ifThen block.
  • Fixed an abnormal termination issue that occurred on Windows with pathologically-structured large QP models and solvers that use QP structure explicitly.
  • Fixed a potentially broken work file written with previousWork. There was a problem introduced with GAMS 34.1 for models written to the work file.
  • Fixed wrong behavior of break in certain loops over a set with a single element.



  • New libraries 4.24:
    • The pre-processor has been updated so it will always return a solution.
  • Fixed incorrect reference of row / column in error message.


  • Fixed possibly incorrect sign of objective function in formats with explicit objective function (e.g., Ampl or JuMP).
  • Fixed missing objective constant in formats with explicit objective function (e.g., Ampl or JuMP).
  • Fixed possibly missing variable / equation in formats GAMS, DictMap and DumpGDX when converting multiple formats at a time.
  • Fixed possibly missing parenthesis when dealing with minus zero.


  • An error in the POSTOPT procedure that could lead to a segmentation fault or undefined behavior was fixed.
  • The output formatting in the BLOCKLIST procedure was improved.


  • New libraries 9.2.38.


  • Fixed issue of possibly incorrect objective bound reported by GAMS.


  • Fixed reported dual bound (ObjEst) and model status if solved without having closed the optimality gap.


GAMS Studio

  • New version 1.5.4. with various bug fixes, stability improvements and minor enhancements, e.g.:
    • Added support for ports in GAMS Engine URL.
    • Improved visibility of current word and parentheses highlighting.
    • Fixed wrong color initialization for dark theme.
    • Fixed unwanted cursor jump when searching listing files without results.
    • Fixed MIRO execution issue if model filenames contain spaces.
    • Fixed GDX file reloading while being rewritten.
    • Fixed file links in log not handling relative paths on Windows.


  • With option noData the empty symbols are marked with an end of line comment !!empty.
  • The dollar control options are written in a consistent camel-case style if the output is in GAMS syntax.


  • Fixed a crash which happened when the rng was defined multiple times for a text by accident.


Expert Level APIs

  • When introducing gdxStoreDomainSets with GAMS 33 the default was accidentally set to 0 (don't enable use of one dimensional sets as domain sets). This has been corrected with this version. Setting gdxStoreDomainSets to 0 is for real experts only, since it can cause inconsistent GDX files when used in combination with gdxSymbolSetDomain.


  • Fixed Java class attribute access to support Matlab versions down to 2017b.