How can I set solPrint from GAMS in JuMP?

I wanna set solPrint. set_optimizer_attribute(model, GAMS.SolPrint(), “0”)
Do anyone know how to fix this?

The available GAMS options are here: GitHub - GAMS-dev/gams.jl: A MathOptInterface Optimizer to solve JuMP models using GAMS.

It doesn’t look like solprint is supported.

cc @renke.kuhlmann

1 Like

How about just this?

set_optimizer_attribute(model, RawOptimizerAttribute("solprint"), 0)

No need to set solprint to 0, as this is the default for GAMS.jl. Due to the calling context, the following options are hardcoded when calling GAMS from GAMS.jl:

limrow = 0
limcol = 0
solprint = off
solvelink = 5

I’ll add some short info to the GAMS.jl README.md.

Changing those options is currently not possible.

2 Likes

This error poped up UndefVarError: RawOptimizerAttribute not defined

When I run the model, the time, node, LP iter, dual bound, primal bound, gap, and compl. show up. I don’t want to have them. Do you know how can I do this?

What do you mean by “[they] show up”? And what’s the problem with them?

You need to add MOI to RawOptimizerAttribute: MOI.RawOptimizerAttribute. Or simply pass the string. Nevertheless, this won’t work for solprint as explained above.

3 Likes

My main problem is I want to solve a larg optimization problem, and when the solving process gets started lots of unnecessary imformation is printed and the error excessive output truncated after 524338 bytes pops up. I thought using the solprint may prevent this.

If you are experiencing errors with GAMS.jl, maybe you can share the model (either the JuMP model or the generated GAMS model) and I’ll have a look.

1 Like

Try set_silent(model).

Cross-posted: Excessive output truncated after 524338 bytes. julia - #7 by odow

2 Likes