GAMS-dev/gams.jl

JuMP.direct_model does not work with GAMS.Optimizer()

MartinBonde opened this issue · 3 comments

Using direct_model with GAMS.Optimizer as shown in the README throws an error:

using JuMP
using GAMS
model = direct_model(GAMS.Optimizer())
Error showing value of type Model:
ERROR: ArgumentError: GAMS.Optimizer does not support getting the attribute MathOptInterface.Name().

I am running the latest versions of both JuMP and GAMS:
GAMS v0.3.2
JuMP v0.22.3

This is because it's trying to print the model, try ending the line with a semicolon:

using JuMP
using GAMS
model = direct_model(GAMS.Optimizer());

Thanks! That works.

I added the Name attribute along with ListOfConstraintTypesPresent. This will be available with v0.3.3 and fixes this issue. Thanks for reporting!