Unable to set parameter for GAMS package

I am having a problem regarding choosing parameters for the solvers KNITRO or CONOPT through the GAMS package. Here is my model. And here are the solvers options for KNITRO and CONOPT.

using GAMS, JuMP
model = Model(GAMS.Optimizer)
set_optimizer_attribute(model, GAMS.Solver(), "KNITRO")
set_optimizer_attribute(model,"algorithm", 0)
set_optimizer_attribute(model,"maxit", 1e4)
set_optimizer_attribute(model,"feastol", 1e-10)
set_optimizer_attribute(model,"infeastol", 1e-10)


model = Model(GAMS.Optimizer)
set_optimizer_attribute(model, GAMS.Solver(), "CONOPT")
set_optimizer_attribute(model,"Tol_Feas_Min", 1E-10)
set_optimizer_attribute(model,"Tol_Feas_Max", 1E-10)

Is this the correct way to set the parameters for these solvers? The solver seems not to be able to read what I add as a parameter.


What’s the error?

cc @renke.kuhlmann

1 Like

There is no error. The solvers just use the default parameters, not the ones that I specified. I am not sure the way I set the parameters is the correct way. I followed the documentation here.

Does setting the solver name change which solver is used? That is, is it just the parameters that are not used? Is it case sensitive? One (random) idea is to give the solver name in lower case: "knitro", not "KNITRO".


@jd-foster Holy Moses problem solved by changing “KNITRO” to “knitro”. Thank you so much. This was frustrating.


Oh gosh… Sorry for this! I’ll make sure this get’s fixed in an upcoming release.