Hello,
I’m trying to run a GAMS model with default options via the Python API.
The file optgams.def defines the default solver for LP models as Gurobi:
- optgams.def
LP string 0 “gurobi” 1 3 Linear Programming - default solver
etc.
However, the solve output starts with:
— Job ModeleGAMS.gms Start 08/04/23 17:44:58 44.1.0 ab065035 WEX-WEI x86 64bit/MS Windows
— Applying:
C:\GAMS\44\gmsprmNT.txt
— GAMS Parameters defined
LP CPLEX
MIP CPLEX
etc.
And indeed, CPlex is used instead of Gurobi:
— Executing CPLEX (Solvelink=5): elapsed 0:01:08.368
IBM ILOG CPLEX 44.1.0 ab065035 Jul 20, 2023 WEI x86 64bit/MS Window
etc.
I know I can change the solver, either in the GAMS code by using option lp=… or in the Python code by using GamsOptions.
My question is: is the above the intended behaviour? Personally I would expect the GAMS Python API to use the default solver specified in optgams.def rather than the “default default solver” (CPlex).
Just to be clear, when I run the same model via the GUI (studio) instead of the Python API, it uses the Gurobi solver as expected.
Best,
Roman