The GAMS C++ Control API provides a C++ programming interface to GAMS. GAMS C++ 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 a more efficient way (GAMSModelInstance).
A GAMS program can include other source files (e.g. $include), load data from GDX files (e.g. $GDXIN or execute_load), and create PUT files. All these files can be specified with a (relative) path and therefore an anchor into the file system is required. The base object GAMSWorkspace
manages the anchor to the file system.
With the exception of GAMSWorkspace
the objects in the gams package cannot be accessed across different threads unless the instance is locked. The classes themselves are thread safe and multiple objects of the class can be used from different threads (see below for restrictions on solvers that are not thread safe within the ModelInstance
class).
GAMSWorkspace
in parallel, you should avoid using the same working directory. Otherwise you may end up with conflicting file names.
Currently only Cplex
, Gurobi
, and SoPlex
fully utilize the power of solving ModelInstances
. Some solvers will not work in a multi-threaded application using ModelInstances
. For some solvers this is unavoidable because the solver library is not thread safe (e.g. MINOS
). Moreover, ModelInstances
are not available for quadratic model types (QCP, MIQCP, RMIQCP).
This version of the GAMS C++ Control API also does not provide support for the following GAMS components: acronyms, GAMS compilation/execution errors, structured access to listing file, and solver options.
Here you can find a list of all classes with descriptions that are available in the C++ Control API. The tutorials provide an overview of the basic functionality of the API and the examples provide a list of examples that are available with the GAMS distribution.
The GAMS C++ Control API works with C++17 or later.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4