How to use MIPGap in JuMP
AnsweredI'm solving a MILP and I need to fix the GAP using MIPGap by Gurobi
How do I use it?
Thanks in advance
0
-
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 why not try our AI Gurobot?. -
You can set the MIPGap parameter with the set_optimizer_attribute function:
model = Model(Gurobi.Optimizer)
set_optimizer_attribute(model, "MIPGap", 0.01)Use the set_optimizer_attributes function to set multiple parameters at once:
set_optimizer_attributes(model, "MIPGap" => 0.01, "MIPFocus" => 1)You can also set parameters inside of the \( \texttt{Model} \) constructor with the optimizer_with_attributes function:
model = Model(
optimizer_with_attributes(
Gurobi.Optimizer, "MIPGap" => 0.01, "MIPFocus" => 1
)
)0
Post is closed for comments.
Comments
2 comments