OSICPLEX, OSIGUROBI, OSIMOSEK, OSIXPRESS

The "bare bone" solver links GAMS/OSICPLEX, GAMS/OSIGUROBI, GAMS/OSIMOSEK, and GAMS/OSIXPRESS allow users to solve their GAMS models with a standalone license of CPLEX, GUROBI, MOSEK, or XPRESS. The links use the COIN-OR Open Solver Interface (OSI) to communicate with these solvers. The OSICPLEX link has been written primarily by Tobias Achterberg, the OSIGUROBI link has been written primarily by Stefan Vigerske, the OSIMOSEK link has been written primarily by Bo Jensen, and the OSIXPRESS link has been written primarily by John Doe. Matthew Saltzman is the COIN-OR project leader for OSI.

The OSI links support linear equations and continuous, binary, and integer variables. The following list provides a brief overview on features available with GAMS/Solver and GAMS/Solver-Link licenses that are not available with the bare bone OSI solver links:

Usage

The following statement can be used inside your GAMS program to specify using OSIGUROBI

Option LP = OSIGUROBI;     { or MIP or RMIP }


Similar statements apply to OSICPLEX, OSIMOSEK, and OSIXPRESS.

The above statement should appear before the Solve statement.

The links support the general GAMS options reslim (time limit), iterlim (iteration limit), nodlim (node limit), optca (absolute gap tolerance), optcr (relative gap tolerance), cheat (cutoff decrement, only Xpress), and threads. An option file in the format required by the solver can be provided via the GAMS optfile option. See Section Option files for details.

If a MIP is solved via one of the OSI links, only primal solution values are reported by default. To receive also the dual values for the LP that is obtained from the MIP by fixing all discrete variables, the GAMS option integer1 must be set to a nonzero value. Note that this may lead to solving another LP after the MIP solve has finished.

Setting the GAMS option integer2 to a nonzero value makes variable and equation names available to the solver. This option may be useful for debugging purposes.

Setting the GAMS option integer3 to a nonzero value leads to writing the model instance to a file in LP or MPS format before starting the solution process (integer3=1 writes an MPS file, integer3=2 writes an LP files, integer3=4 writes a native MPS file; sum these values to write several files). The name of the MPS file is chosen to be the name of the GAMS model file with the extension .gms replaced by .mps. This option may be useful for debugging purposes.

For OSICPLEX, OSIGUROBI, and OSIXPRESS, setting the GAMS option integer4 to a nonzero value leads to passing the variable level values (.l suffix) to the MIP solver as initial solution. This is analog to mipstart option of the full CPLEX and GUROBI links and the loadmipsol option of the full XPRESS link.

Option files

OSICPLEX Options

In an OSICPLEX option file, each line lists one option setting, where the option name and value are separated by space.

Example:

CPX_PARAM_MIPEMPHASIS            2
CPX_PARAM_HEURFREQ               42
CPX_PARAM_MIPDISPLAY             4


Note that GAMS/OSICPLEX will not process a GAMS/CPLEX option file. Instead, native CPLEX options (CPX...) have to be provided through an OSICPLEX option file (e.g. osicplex.opt) that follows the very strict syntax of a CPLEX parameter file. There is a trick to convert GAMS/CPLEX options into native CPLEX options: Create a regular GAMS/CPLEX option file cplex.opt with the options you would like to set for GAMS/OSICPLEX and add the option writeparam osicplex.opt. For example

* Cplex.opt
varsel 3 ! set variable selection to strong branching
writeparam osicplex.opt


Run this on any demo sized MIP problem (e.g. [MAGIC] from the GAMS Model Library) using GAMS/CPLEX. After the run you will find a file that looks as follows and can be supplied to GAMS/OSICPLEX to set the variable selection to strong branching (native CPLEX option CPXPARAM_MIP_Strategy_VariableSelect 3):

CPLEX Parameter File Version 12.10.0.0
CPXPARAM_Parallel                                1
CPXPARAM_MIP_Display                             4
CPXPARAM_MIP_Strategy_VariableSelect             3
CPXPARAM_MIP_Tolerances_AbsMIPGap                0
CPXPARAM_MIP_Tolerances_MIPGap                   0
CPXPARAM_WorkDir                                 "C:\[...]\Documents\GAMS\Studio\workspace\225a\"


This includes some CPLEX options that have been set by the GAMS/CPLEX link and you might want to remove from this file.

Note that several GAMS/CPLEX options have no GAMS/OSICPLEX counterpart:

OSIGUROBI Options

In an OSIGUROBI option file, each line lists one option setting, where the option name and value are separated by space.

Example:

Cuts 2
Heuristics 0.1


OSIMOSEK Options

An OSIMOSEK option file begins with the line BEGIN MOSEK and terminates with END MOSEK. Comments are introduced with an '%', empty lines are ignored. Each other line starts with a MOSEK parameter value, followed by space, and a value for that parameter.

Example:

BEGIN MOSEK
% disable probing and solve the root node by the interior point solver
MSK_IPAR_MIO_PRESOLVE_PROBING MSK_OFF
MSK_IPAR_MIO_ROOT_OPTIMIZER   MSK_OPTIMIZER_INTPNT
END MOSEK


OSIXPRESS Options

In an OSIXPRESS option file, each line lists one option setting, where the option name and value are separated by an equal sign.

Example:

MIPLOG = 3
HEURFREQ = 2


Setup

OSICPLEX Setup

The setup for GAMS/OSICPLEX is identical to the GAMS/CPLEX-Link setup but to use the bare-bone interface GAMS/OSICPLEX, you do not need a GAMS/CPLEX-Link license but instead you have to request a free of charge GAMS/OSICPLEX license from sales.nosp@m.@gam.nosp@m.s.com.

OSIGUROBI Setup

The setup for GAMS/OSIGUROBI is identical to the GAMS/Gurobi-Link setup but to use the bare-bone interface GAMS/OSIGUROBI, you do not need a GAMS/GUROBI-Link license.

OSIMOSEK Setup

The setup for GAMS/OSIMOSEK is identical to the GAMS/MOSEK-Link setup but to use the bare-bone interface GAMS/OSIMOSEK, you do not need a GAMS/MOSEK-Link license.

OSIXPRESS Setup

The setup for GAMS/OSIXPRESS is identical to the GAMS/XPRESS-Link setup but to use the bare-bone interface GAMS/OSIXPRESS, you do not need a GAMS/XPRESS-Link license.