UndefVarError: setparams! not defined
AnsweredMy computer is MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports), MacOS Big Sur
Julia : Version 1.7.2
and the following picture is all the packages I used in Julia

While I using setparams! to set up a Gurobi environment, it occurs some problems in the following picture.
How can I fix this?

-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi,
I don't think "setparams!" is part of the JuMP API any more, although I can't figure in which version it was removed. The appropriate functions are "set_optimizer_attribute" (a general JuMP function) or "Gurobi.GRBsetintparam" (part of Gurobi.jl for interacting directly with the solver API).
0 -

After change to Gurobi.GRBsetintparam. It occurs another problem in the following picture.
How could I fix this?
0 -
Did anyone know where my problem is?
I need this bad
0 -
GRBsetintparam is a function, not a macro, so it requires a different syntax. Try the following:
Gurobi.GRBsetintparam(env, "OutputFlag", 0)
0 -
thank you !
It's actually working!!!
thanks a lot
0
Post is closed for comments.

Comments
6 comments