Integer objective function
AnsweredHi All,
I have a maximization model where the objective function is a real variable. But this variable is a sum of binary variables multiplied by integer weights. When solving the formulation with Gurobi, I get an upper bound of say 100.5, the current best solution is 100. Hence, I can guarantee that my solution is optimal already, but Gurobi keep exploring the Branch-and-Bound tree.
Is it possible to say to Gurobi that the objective function should be integer? Just so that it checks if the gap < 1. Currently I'm setting the objective function variable to be integer instead.
Thanks,
Matheus
-
Hi Matheus,
What Gurobi version are you using? If the situation is that easy that Gurobi should be able to figure this out and stop the solving once it reaches the above situation.
Also have you tried to use MIPGapAbs? This should also do what you are looking for.
Best regards,
Sonja
0 -
Hi Sonja,
Thanks for the reply. I'm using Gurobi 8.1. The MIPGapAbs was exactly what I was looking for!
Best,
Matheus
0
Please sign in to leave a comment.
Comments
2 comments