User Tools

Site Tools


solver:osicplex_osigurobi_osimosek_osixpress

OSICplex, OSIGurobi, OSIMosek, OSIXpress

GAMS/OSICplex, GAMS/OSIGurobi, GAMS/OSIMosek, GAMS/OSIXpress bring the open source Open Solver Interface (OSI) to the broad audience of GAMS users.

These bare bone solver links 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 OSI/Cplex link has been written primarily by Tobias Achterberg, the OSI/Gurobi link has been written primarily by Stefan Vigerske, the OSI/Mosek link has been written primarily by Bo Jensen, and the OSI/Xpress link has been written primarily by John Doe. Matthew Saltzman is the COIN-OR project leader for OSI.

For more information we refer to the OSI web site https://projects.coin-or.org/Osi and the COIN-OR/GAMS links homepage.

OSI/Gurobi, OSI/Mosek and OSI/Xpress do not require a GAMS license for the specific solver, instead the license authentication can be done by using the authentication procedure by the corresponding standalone solver. In this case you can instruct the authentication procedure to find the standalone license. This may require that you set the environmental path to the bin directory of the standalone solver. A older standalone license than the one used in GAMS might not work properly.Note that GAMS/OSI/Cplex can only be authenticated by extending your GAMS license. To add GAMS/OSI/Cplex to your GAMS license, please write to sales@gams.com to confirm that you are a member of a particular program, that you have a valid license agreement, and that your use of the GAMS solver will comply with the terms of that license agreement. Please reference your License ID, DCxxxx, which you can find in your license file (gamslice.txt).

The OSI links support linear equations and continuous, binary, and integer variables. Semicontinuous and Semiinteger variables, special ordered sets, branching priorities, and indicator constraints are currently not supported by Osi. The links only support the general GAMS options reslim, optca (except for Gurobi), optcr, nodlim, and iterlim. In addition an option file in the format required by the solver can be provided via the GAMS optfile option.

The links are “as is” software. We are aware that many features of the true GAMS/Cplex, Gurobi, Mosek, and Xpress links are missing from the OSI link. If you want to have the full functionality please consider to purchase the GAMS/solver link. The OSI links require an appropriate solver license. Moreover, your license must support the version of the solver that ships with the GAMS system. Please take a look a this table for the versions of the solver included in the current distribution.

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

  Option MIP = OSIGurobi;     { or LP or RMIP }

The above statement should appear before the Solve statement.

Please find below a list of solvers, which will not work with an OSI solver license and require the presence of a GAMS/solver license or a GAMS/solver link license:

  • GAMS/DECIS
  • GAMS/BARON

A Comparison of GAMS/Cplex and GAMS/OsiCplex

GAMS/Cplex is a link specially written for the Cplex library. It offers most of the Cplex features that provide value to a GAMS user. GAMS/OsiCplex is a link that depends on another layer of representing a model namely COIN-OR's OSI (Open Solver Interface). OSI has been developed for LP problems and was somewhat extended to MIP problems. It does not support solver specific features. Here is a list of GAMS/Cplex features that are not available in GAMS/OsiCplex:

  • Model types QCP and MIQCP
  • Variable types SemiInt, SemiCont, SOS1 and SOS2
  • Processing of a GAMS/Cplex option file (see below for details)
  • Options:
    • SolNPool (Solution Pool)
    • FeasOpt
    • IIS
    • ObjRng, RhsRng (Sensitivity Analysis)
    • Indic (Indicator constraints)
    • Tuning (Automatic Option Tuning)
    • BCH (GAMS Branch-And-Cut-And-Heuristic Facility)
    • Quality (Statistics of Solution)
    • WriteXXX (create some Cplex specific model representation on disk, e.g. XXX=sav)
    • TryInt
    • InterActive
    • FixOptFile
    • MipTrace

GAMS/OsiCplex does not follow the option file processing of other GAMS solvers. However, there is a method of supplying some Cplex specific options. Create a file with name 'osicplex.opt' that follows the very strict syntax of a Cplex parameter file. In order to find out how such a file for your current distribution looks like (the header of the file contains the Cplex library version number). Create a regular GAMS/Cplex option file cplex.opt with the options you would like to set in 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.gms out of 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:

CPLEX Parameter File Version 12.2.0.1
CPX_PARAM_ADVIND 0
CPX_PARAM_ITLIM 2000000000
CPX_PARAM_TILIM 1.00000000000000e+03
CPX_PARAM_WORKDIR “C:\tmp\225p\”
CPX_PARAM_THREADS 1
CPX_PARAM_PARALLELMODE 1
CPX_PARAM_TUNINGTILIM 2.00000000000000e+02
CPX_PARAM_EPAGAP 0.00000000000000e+00
CPX_PARAM_EPGAP 0.00000000000000e+00
CPX_PARAM_MIPDISPLAY 4
CPX_PARAM_VARSEL 3

This includes some Cplex options that have been set by the GAMS/Cplex link and can be taken out of this file (e.g. CPX_PARAM_TUNINGTILIM).

solver/osicplex_osigurobi_osimosek_osixpress.txt · Last modified: 2017/09/02 17:33 by support