Release Notes


  • Fixed a bug in the setup script that prevented files from being installed in the correct location in certain cases.


  • New functions GamsWorkspace.add_job_from_apilib, GamsWorkspace.add_job_from_noalib to create GamsJob from models from the GAMS API Library and the Nonlinear Optimization Applications Library
  • Added a version check for the scripts to avoid unintentional installation of wrong versions


  • Added support for Python 3.6
  • Fixed a bug in that prevented the underlying GAMS model from terminating, if executables spawned by GAMS generate log output that is not captured.


  • The option GamsOptions._errorlog was renamed as GamsOptions.errorlog in order to indicate it as public. The option sets the maximum error message lines written to the log for each error


  • Added support for Python 3.4 on Mac OS X
  • Skip creation of a GDX file in GamsModelInstance.instantiate that was unreachable from within the API.
  • Fixed a problems with Exceptions in GamsWorkspace.


  • Fixed a minor bug regarding the names of GamsJob listing files.


  • Fixed a bug with the property GamsOptions.defines: When too many entries were added, all of them were ignored
  • Fixed a memory leak in GamsDatabase


  • New Python example


  • Fixed a bug that lead to a crash on Linux when the GAMS system directory is a symbolic link. The property GamsWorkspace.system_directory now always returns the canonical path with all symbolic links resolved.


  • Added support for Python 3.4 (Windows and Linux only)
    • The examples have been changed to be compatible with all supported Python versions
  • New Python example
  • New Python example
  • New functions GamsWorkspace.noalib and GamsWorkspace.apilib that can be used to retrieve models from the NOALIB and the APILIB


  • Fixed a bug in the constructor of all subclasses of _GamsSymbol that occurred when the explanatory text was omitted.
  • Disable unwanted debug output from Couenne when running with GamsModelInstance
  • New property _GamsSymbol.domains_as_strings: Domains of Symbol, each element is a string. Note: If the domain is an alias in GAMS, this call will return the name of the alias, not the name of the aliased set
  • Fixed potential problem with GamsModelInstance used with BARON.


  • Fixed a bug in GamsDatabase.merge_record that prevented the function from creating a record if none was found.
  • We changed the handling of GAMS Aliases in the object oriented APIs:
    • If we ask for the number of GamsSymbols in a GamsDatabase, the Aliases will be excluded.
    • If we iterate over all GamsSymbols in a GamsDatabase, Aliases will be skipped.
    • If we ask explicitly for an Alias in a GamsDatabase (GamsDatabase.get_set("a") with a being an Alias) we will get a reference to the GamsSet referenced by the Alias, not the Alias itself.
    • Note: Aliases can appear in a GamsDatabase only, if it was initialized by a GDX file containing an Alias.
    • The new Python example demonstrates this new behavior.


  • Make more GAMS options available through the GamsOptions class (Removed leading underscores of property identifiers):
    • GamsOptions.appendexpand: Expand file append option
    • GamsOptions.appendout: Output file append option
    • GamsOptions.dumpopt: Writes preprocessed input to the file input.dmp
    • GamsOptions.dumpparms: GAMS parameter logging
    • GamsOptions.errmsg: Placing of compilation error messages
    • GamsOptions.expand: Expanded (include) input file name
    • GamsOptions.ferr: Alternative error message file
    • GamsOptions.jobtrace: Job trace string to be written to the trace file at the end of a Gams job
    • GamsOptions.limcol: Maximum number of columns listed in one variable block
    • GamsOptions.limrow: Maximum number of rows listed in one equation block
    • GamsOptions.logline: Amount of line tracing to the log file
    • GamsOptions.on115: Generate errors for unknown unique element in an equation
    • GamsOptions.output: Output file
    • GamsOptions.pagecontr: Output file page control option
    • GamsOptions.pagesize: Output file page size (=0 no paging)
    • GamsOptions.pagewidth: Output file page width
    • GamsOptions.reference: Symbol reference file
    • GamsOptions.scriptexit: Program or script to be executed at the end of a GAMS run
    • GamsOptions.suppress: Compiler listing option
    • GamsOptions.symbol: Symbol table file
    • GamsOptions.tracelevel: Solvestat threshold used in conjunction with a=GT


  • On Linux and OS X: LD_LIBRARY_PATH and DYLD_LIBRARY_PATH do not need to contain a GAMS system directory anymore. Anyway, if no system directory is specified in the GamsWorkspace constructor, PATH and LD_LIBRARY_PATH/DYLD_LIBRARY_PATH is used to find a GAMS system directory. The order is as follows:
    • Linux: If no system directory is specified in the GamsWorkspace constructor, check PATH first. If no system directory was found, check LD_LIBRARY_PATH
    • OS X: If no system directory is specified in the GamsWorkspace constructor, check PATH first. If no system directory was found, check DYLD_LIBRARY_PATH
    • Windows: If no system directory is specified in the GamsWorkspace constructor, check registry.
  • creates out_db now even if it throws a GamsExceptionExecution
  • New example transport14
  • New function _GamsSymbolRecord.key(int index): Retrieve key of GamsSymbolRecord on position index
  • GamsModelInstance.solve now also works for solvers which require a subsolver, e.g. Dicopt


  • Fix memory leak in GamsDatabase


  • Fixed a bug regarding the subtype of equations and their default records, when the equation was added to a GamsDatabase from the API.
  • Fixed a bug in GamsSymbol.delete_record.
  • Fixed GamsExitCode.
  • Make sure that GamsModelInstance.instantiate() does not solve the model, but only prepares everything required for the following solve()


  • Add tutorial (GAMS_python_Tutorial.pdf) to <Path/To/GAMS>/docs/API. From the GAMSIDE this document can be accessed at Help -> Docs -> API
  • New parameter opt_file in function GamsWorkspace.add_options allows to create an instance of GamsOptions that is initialized by an existing option file
  • New function GamsOptions.export: Write GamsOptions into a parameter file
  • New properties: GamsWorkspace.api_version, GamsWorkspace.api_major_rel_number, GamsWorkspace.api_minor_rel_number and GamsWorkspace.api_gold_rel_number
  • New property GamsWorkspace.my_eps: Reset value to be stored in and read from GamsDatabase for Epsilon.
  • New class NoNewVarEqu providing static fields to set option nonewvarequ
  • Renaming of GamsOptions.PoolFree4 to GamsOptions.IntVarUp and property poolfree4 to intvarup
  • Renaming of ModelStat.NonOptimalIntermed to ModelStat.Feasible
  • Fixed a bug in _GamsSymbol.add_record() that occurred when using empty strings as keys
  • Fixed a bug in GamsModelInstance.solve() that affected the logging behavior
  • The following functions throw an exception, when a wrong data type is passed for the keys/slice parameter: delete_record, find_record, add_record, merge_record, first_record, last_record. Valid data types are str, list, tuple and their subclasses


  • New examples:,,,,
  • New facility for GamsSymbols with domain information:
    • GamsDatabase:
      • New functions add_parameter_dc, add_variable_dc, add_equation_dc and add_set_dc: Create GamsSymbols with domain information
      • New function check_domains: Check for all symbols if all records are within the specified domain of the symbol
      • New function get_database_dvs: Return all GamsDatabaseDomainViolations
      • New property suppress_auto_domain_checking: Controls whether domain checking is called in GamsDatabase export
    • _GamsSymbol and its derived classes:
      • New function check_domains: Check if all records are within the specified domain of the symbol
      • New function get_symbol_dvs: Return all GamsDatabaseDomainViolations
      • New property domains: Domains of Symbol, each element is either a GamsSet (real domain) or a string (relaxed domain)
    • New classes GamsDatabaseDomainViolation and GamsSymbolDomainViolation that are returned by GamsDatabase.get_database_dvs and _GamsSymbol.get_symbol_dvs
  • New functions in GamsModelInstance:
    • copy_modelinstance: Copies a GamsModelInstance to a new GamsModelInstance which gets constructed at this call
    • interrupt: Sends interrupt signal to running GamsModelInstance
  • New function in _GamsSymbol and its derived classes: merge_record finds a record if it exists and adds it if not
  • New functions in GamsWorkspace: add_job_from_gamslib, add_job_from_testlib, add_job_from_emplib, add_job_from_datalib and add_job_from_finlib
  • New properties in GamsWorkspace: version, major_rel_number, minor_rel_number, gold_rel_number
  • New optional parameter in_model_name for functions add_database_from_gdx/add_database in GamsWorkspace: GAMS string constant that is used to access this database
  • Changed the debug argument passed to the GamsWorkspace constructor. Use members of class DebugLevel: Off, KeepFiles, ShowLog and Verbose instead of True and False
  • New sub class of GamsException: GamsExceptionExecution, which provides additional info about the reason of the failed execution
  • Allow to define SymbolUpdateType for each GamsModifier seperately
  • Significant performance improvement for function GamsWorkspace.add_database when creating from an already existing database
  • Changed the unicode settings on Linux from UCS2 to UCS4
  • The Debug parameter of GamsWorkspace can be overwritten by the system environment variable "GAMSOOAPIDEBUG" if set to one of the following: Off, KeepFiles, ShowLog, Verbose
  • The compact method of GamsDatabase is obsolete and has no effect anymore. It will be removed in the future.
  • Fixed a bug in GamsModelInstance.solve()
  • Fixed a bug in GamsDatabase, where the special value for undefined was set to 0 instead of 1.0E300 (SV_UNDEF)
  • Fixed a bug when iterating through the records of a GamsSymbol


  • Added new function _GamsSymbol.copy_symbol which copys all records from one to another GamsSymbol
  • Label and symbol lookup is now case insensitve
  • Fixed handling of infinite bounds for GamsModifiers


This release contains a beta version of the object-oriented Python API that can be used to control GAMS from within Python 2.7. It allows the seamless integration of GAMS into Python by providing appropriate classes for the interaction with GAMS. The GamsDatabase class for in-memory representation of data can be used for convenient exchange of input data and model results. Models written in GAMS can be run with the GamsJob class and by using the GamsModelInstance class a sequence of closely related model instances can be solved in an efficient way. To use this API see the Getting started section.