In addition to the high-level GAMS APIs, there exist core (formerly known as expert-level) APIs to some component libraries of the GAMS system. These APIs are used internally in GAMS for a long time and help in the deployment of GAMS models. While they offer high performance and flexibility, they also require advanced knowledge and it is recommended that other APIs are used if possible. The core APIs are offered for C, C#, Delphi, Fortran, Java, Python, and Visual Basic.
The DCT, GEV, and GMO components are mainly used to build solver links to GAMS (see, e.g., the GAMSLinks project. In fact, all professional GAMS solver links are based on these components. They provide access to an instance of a model generated by a solve
statement. If you plan to build advanced algorithms for models or need to solve a sequence of very similar models these components might represent an alternative to an implementing using the GAMS language.
Although we strive for backward compatibility with our component libraries, programming interfaces often change. As a result, programs that rely on these APIs may require adjustments when upgrading to a new GAMS version. The release notes have a section on these API changes.
Overviews of the exported function in pseudo code are available in the following summary pages:
- CFG API (GAMS Configuration Object)
- DCT API (GAMS Dictionary Object)
- GDX API (GAMS Data Exchange Object) which is also available as open source project on GitHub. The official documentation can be found here.
- GEV API (GAMS Environment Object) with additional GAMS Environment Object Options.
- GMO API (GAMS Modeling Object) with additional information on philosophy and design.
- IDX API (GAMS IDX Object)
- OPT API (GAMS Option Object)
- PAL API (GAMS Auditing and Licensing Object)
- Note
- Without having a GAMS system directory in the
PATH
environment variable, thexyzCreateD
functions (e.g.gdxCreateD
,optCreateD
, ...) might cause some issues finding libraries that are only in the GAMS system directory on Windows.
Supported Platforms
x86 64bit MS Windows | x86 64bit Linux | arm 64bit Linux | x86 64bit macOS | arm 64bit macOS | |
---|---|---|---|---|---|
C | ✔ | ✔ | ✔ | ✔ | ✔ |
C# | ✔ | ||||
Delphi | ✔ | ||||
Fortran* | ✔ | ✔ | ✔ | ✔ | ✔ |
Java | ✔ | ✔ | ✔ | ✔ | ✔ |
Python | ✔ | ✔ | ✔ | ✔ | ✔ |
VBA | ✔ | ||||
VB.NET | ✔ |
*
Fortran API files are based on C code to load dynamic libraries. For Windows pure Fortran API files for Intel and Lahey Fortran compilers are included