Release Notes

47.1.0 (June 2024)

44.1.0 (July 2023)

  • Added method runEngine to GAMSJob class to run jobs on GAMS Engine, only for classes that work with Java SE 11 or later.
  • since GAMS 44.1.0
    • all classes in GAMSJavaAPI.jar require Java SE 11 or later to run. GAMSJavaAPI.jar has additional dependency on json-simple-1.1.1.jar. GAMSJavaAPI.jar and json-simple-1.1.1.jar are required to be in the same directory to run.
    • all classes that work with Java SE 8 are in GAMSJavaAPI-8.jar but without updated functionalities that are released after GAMS 43. Only corrective maintenance support will be provided for this version in the future.
    • all jar files are located under the [Path/To/GAMS]/apifiles/Java/api/ directory.

43.1.0 (April 2023)

39.1.0 (April 2022)

  • Added GAMSSet.getSetType returning property to distinguish between multi and singleton sets.
  • Added GAMSDatabase.addSet allowing to set type of Set.
  • Fixed defined enumerated value for options FDOpt and DumpOpt.

35.1.0 (April 2021)

  • Fixed GAMSOptions.setOutput parameter being ignored in GAMSJob.run().

32.1.0 (July 2020)

  • On windows platform, change of window registry configuration used for finding the installed GAMS directory from: [HKEY_CURRENT_USER|HKEY_CLASSES_ROOT]\gams.location to: [HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE]\Software\Classes\gams.location, effective only when the installed GAMS directory is not found from "PATH" environment variable.

29.1.0 (November 2019)

  • Increase the minimum version requirement of the Java Runtime Environment to Java SE 8.
  • The remove operation GAMSDatabaseIterator.remove is no longer supported. The method now throws an instance of java.lang.UnsupportedOperationException and performs no other actions. (To remove all records of the current iterating symbol, use the method GAMSSymbol.clear instead.)
  • Fixed the behavior of the remove operation GAMSSymbolIterator.remove. The method now removes all records of the last GAMSSymbol element returned by an instance of GAMSSymbolIterator and can be called only once per call to GAMSSymbolIterator.next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling the method.

28.2.0 (August 2019)

28.1.0 (August 2019)

  • Announced a plan to increase the minimum version requirement of the Java Runtime Environment to Java SE 8 with the next major release.

25.1.1 (May 2018)

  • Changed the naming scheme of a temporary working directory to be created from yyyyMMdd_HHmmss to the prefixed gams_ (defined by GAMSGlobals.workingDirectoryPrefix), in case no working directory has been specified.
  • Fixed the behavior when GAMSDatabase is added with the name that already exists, now GAMSException will be raised. (see GAMSWorkspace.addDatabase(String databaseName) and GAMSWorkspace.addDatabaseFromGDX(String gdxFileName, String databaseName))
  • Calls on GAMSWorkspace.finalize and GAMSSymbolIterator.finalize are no longer available. As calling a finalizer method can arbitrarily delay the reclamation of object instances and potentially create unpredictable outcome. Whenever the object is no longer needed it is recommened to explicitly dispose the object rather than to rely on the Java garbage collector to do the job. See GAMSDatabase.dispose, GAMSModelInstance.dispose, and GAMSOptions.dispose.
  • All Java native interfaces to Expert-Level APIs are now included in the distributed GAMSJavaAPI.jar, located under the [Path/To/GAMS]/apifiles/Java/api/ directory.

25.0.1 (January 2018)

  • The minimum version requirement of Java Runtime Environment for using with GAMS Java API is now Java SE 7.
  • New TransportGDX example to demonstrate how to import and export GDX files.
  • Removed GAMSSymbol.compact, deprecated since 24.8.1 (December 2016).
  • Changed equivalence behavior of GAMSSymbol and GAMSSymbolRecord objects. As a result, two symbol objects with the same internal reference are now equivalent, similar to symbol record objects:

    • Two symbols are equivalent if and only if they have the same internal reference.
    • Two symbol records are equivalent if and only if they have the same internal reference.

    The behavior of operator == remains unchanged. The following exmaple illustrates the new equivalence behavior:

    GAMSVariable x1 = db.getVariable("x");
    GAMSVariable x2 = db.getVariable("x");
    GAMSVariable x3 = x1;
    assertTrue(x1.equals(x2)); // true, previously false
    assertFalse(x1 == x2); // false, previously false
    assertTrue(x1.equals(x3)); // true, previously true
    assertTrue(x1 == x3); // true, previously true
    GamsWorkspace db

24.8.1 (December 2016)

  • Deprecated GAMSSymbol.compact and the method will be removed in the next major release
  • an exception or an error thrown by GAMSWorkspace.finalize and GAMSSymbolIterator.finalize now must be caught or declared to be thrown. Note that an explicit call on one of these two methods is not recommended unless it is necessary to do so.

24.7.4 (September 2016)

24.7.1 (March 2016)

  • Fixed a bug with the property GAMSOptions.defines : When too many entries were added, all of them were ignored.

24.5.1 (August 2015)

24.4.2 (March 2015)

  • New property GAMSSymbol.getDomainsAsStrings: get 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.
  • Disable unwanted debug output from Couenne when running with GAMSModelInstance
  • Change naming scheme of gdx oputput scratch file to sequence number.

24.4.1 (December 2014)

  • Modify the handling of GAMS Aliases in the object oriented APIs:
    • If we ask for the number of GAMSSymbol in a GAMSDatabase, the Aliases will be excluded.
    • If we iterate over all GAMSSymbol in a GAMSDatabase, Aliases will be skipped.
    • If we ask explicitly for an Alias in a GAMSDatabase (GAMSDatabase.getSet("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 example Alias at [Path/To/GAMS]/apifiles/Java/alias/Alias.java demonstrates this new behavior.

24.3.3 (September 2014)

Fixed

  • a location of listing file when creating a job from (full-path) file without giving a job name

24.3.2 (August 2014)

  • Make more GAMS options available through the GAMSOptions class:
    • GAMSOptions.EAppendExpand (enum, getter, and setter): Expand file append option
    • GAMSOptions.EAppendOut (enum, getter, and setter): Output file append option
    • GAMSOptions.EDumpOpt (enum, getter, and setter): Writes preprocessed input to the file input.dmp
    • GAMSOptions.EDumpParms (enum, getter, and setter): GAMS parameter logging
    • GAMSOptions.EErrMsg (enum, getter, and setter): Placing of compilation error messages
    • GAMSOptions.EAppendExpand (getter, and setter): Expanded (include) input file name
    • GAMSOptions.FErr (getter, and setter): Alternative error message file
    • GAMSOptions.JobTrace (getter, and sette): Job trace string to be written to the trace file at the end of a Gams job
    • GAMSOptions.LimCol (getter, and setter): Maximum number of columns listed in one variable block
    • GAMSOptions.LimRow (getter, and setter): Maximum number of rows listed in one equation block
    • GAMSOptions.ELogLine (enum, getter, and setter): Amount of line tracing to the log file
    • GAMSOptions.EOn115 (enum, getter, and setter): Generate errors for unknown unique element in an equation
    • GAMSOptions.Output (getter, and setter): Output file
    • GAMSOptions.EPageContr (enum, getter, and setter): Output file page control option
    • GAMSOptions.PageSize (getter, and setter): Output file page size (=0 no paging)
    • GAMSOptions.PageWidth (getter, and setter): Output file page width
    • GAMSOptions.Reference (getter, and setter): Symbol reference file
    • GAMSOptions.ScriptExit (getter, and setter): Program or script to be executed at the end of a GAMS run
    • GAMSOptions.ESuppress (enum, getter, and setter): Compiler listing option
    • GAMSOptions.Symbol (getter, and setter): Symbol table file
    • GAMSOptions.TraceLevel (getter, and setter): Solvestat threshold used in conjunction with a=GT

24.3.1 (July 2014)

New

Changed

  • no longer necessary to set up environment variable before running a program
  • no longer necessary to specify -Djava.library.path when running a program
    • if java.library.path is specified, the shared libraries will be loaded from java.library.path
    • otherwise the shared libraries will be loaded from the class path that contains GAMSJavaAPI.jar.
  • when exporting a database to GDX: a symbol with real domains from now on will be registered
  • in GAMSJob.run : always creates output database OutDB even if GAMSExecutionException has been raised.
  • in GAMSSymbol.copySymbol when copy into the Universe symbol (GAMSDatabase.getSet("*")) of a GAMSDatabase : merge operation will be performed.
  • in GAMSWorkspace default constructor: API will apply the default setting, that is, finding GAMS system directory from environment variable in the following order (depends on the target platform):
    • Windows: first from PATH environment variable. If not found, from the platform windows registry gams.location,
    • macOS: first from PATH environment variable. If not found, from DYLD_LIBRARY_PATH,
    • Unix: from PATH environment variable. If not found, from LD_LIBRARY_PATH.
  • in non-default GAMSWorkspace constructor:
    • user can specify a GAMS system directory during run time, API will not search for a GAMS system directory from an environment variable.
    • in case the specified system directory is null or user speicify other workspace attributes but a system directory, API will apply the default setting (see changed in GAMSWorkspace default constructor above).

Fixed

  • API memory leak issue in GAMSDatabaseIterator.
  • a bug when reading an option file on Unix platform with non-standard locale

Removed

  • all deprecated classes and methods since 24.1.

24.2.3 (May 2014)

Fixed

24.2.2 (March 2014)

Changed

  • null string is treated as an invalid key for all record operations of GAMSSymbol.

Fixed

24.2.1 (December 2013)

New

Changed

Fixed

  • a bug when running a job with an input directory IDir added into GAMSOptions object.

24.1.3 (July 2013)

Improve data iterator

Update example:

  • Transport12 at [Path/To/GAMS]/apifiles/Java/transport/Transport12.java

24.1.1 (May 2013)

Changes in GAMSDatabase:

  • deprecates the compact method, as it has no effect anymore.

Changes in GAMSGlobals:

  • the default value of working directory has been changed from System.getProperty("user.dir") to System.getProperty("java.io.tmpdir").

Changes in GAMSModelInstance :

  • deprecates the instantiate(GAMSOptions options), instantiate(GAMSModifier[]), and instantiate(GAMSOptions, GAMSModifier[]) methods and replaced by instantiate(String, GAMSModifier ...) and instantiate(String, GAMSOptions, GAMSModifier ...) methods

Changes in GAMSWorkspace and GAMSWorkspaceInfo:

  • deprecates boolean debug flag and replaced by a debug level flag (type of a new class GAMSGlobals.DebugLevel).
  • allows an override of debug level flag from an environment variable GAMSOOAPIDEBUG

New methods in GAMSDatabase:

New class GAMSDatabaseDomainViolation:

New enumeration class GAMSGlobals.DebugLevel:

  • defines values of different GAMS Debug Levels.

New methods in GAMSModelInstance:

New enumerated value of GAMSModelInstance.SymbolUpdateType:

New methods in GAMSModifier:

New methods in GAMSSymbol:

New class GAMSSymbolDomainViolation:

New methods in GAMSWorkspace

Fixed a bug when iterating through the records of a GAMSSymbol

Changes of location of examples:

  • Bender Examples: from [Path/To/GAMS]/apifiles/Java/Benders*.java to [Path/To/GAMS]/apifiles/Java/benders/Benders*.java
  • Cutstock: from [Path/To/GAMS]/apifiles/Java/Custock.java to [Path/To/GAMS]/apifiles/Java/cutstock/Cutstock.java
  • ConsoleInterrupt: from [Path/To/GAMS]/apifiles/Java/ConsoleInterrupt.java to [Path/To/GAMS]/apifiles/Java/interrupt/ConsoleInterrupt.java
  • Transport Examples: from [Path/To/GAMS]/apifiles/Java/Transport*.java to [Path/To/GAMS]/apifiles/Java/transport/Transport*.java
  • Warehouse: from [Path/To/GAMS]/apifiles/Java/Warehouse.java to [Path/To/GAMS]/apifiles/Java/warehouse/Warehouse.java

New examples :

  • SimpleCutstock at [Path/To/GAMS]/apifiles/Java/cutstock/SimpleCutstock.java
  • DomainCheck at [Path/To/GAMS]/apifiles/Java/domain/DomainCheck.java
  • Transport13 at `[Path/To/GAMS]/apifiles/Java/transport/Transport13.java
  • Tsp at [Path/To/GAMS]/apifiles/Java/tsp/Tsp.java

24.0.2 (February 2013)

New method in GAMSSymbol

24.0.1 (December 2012)

This release contains a beta version of the object-oriented Java API that can be used to control GAMS from a Java program. It allows the seamless integration of GAMS into Java by providing appropriate classes for the interaction with GAMS. GAMS Java API objects allow a convenient way to exchange input data and model results with in-memory representation of data (GAMSDatabase), and to create and run GAMS models (GAMSJob) that can be customized by GAMS options (GAMSOptions). Furthermore, they introduce a way to solve a sequence of closely related model instances in the more efficient way (GAMSModelInstance).

  • A Java program that uses object-oriented Java API requires at least Java SE 5 to compile and run.
  • All classes are distributed within one single jar file GAMSJavaAPI.jar with a namespace com.gams.api, located under the [Path/To/GAMS]/apifiles/Java/api/ directory.
  • Java program examples are distributed with namespace com.gams.examples, located under [Path/To/GAMS]/apifiles/Java/ directory.
  • Installation and detailed documents can be found in [Path/To/GAMS]/apifiles/readme.txt and [Path/To/GAMS]/docs/API/GAMS_java.pdf.
  • Javadoc for GAMSJavaAPI.jar can be found under [Path/To/GAMS]/apifiles/java/api/javadoc directory.