Objective_bound and Gurobi

Hello ! I have shared some code with a research associate, aiming to compute the solution to a continuous optimization problem. Due to problem size, we use a time limit.

The problem is that I use CPLEX, and my associate uses Gurobi. With CPLEX, I can use objective_bound at time limit to retrieve the current best known bound, but this doesn’t work with Gurobi, as it turns out the corresponding attribute doesn’t exist (ERROR: LoadError: Gurobi.GurobiError(10005, “Unable to retrieve attribute ‘ObjBound’”).

They seem to have everything up to date - Julia 1.5.1, JuMP 0.21.4, Gurobi.jl 0.8.1.

Is there any way to retrieve a bound on the objective with Gurobi ?

Thank you for reading.

The Gurobi ObjBound attribute applies to MIP models only: https://www.gurobi.com/documentation/9.0/refman/objbound.html. I’d recommend going through the Gurobi documentation or asking Gurobi support to figure out the attribute that you want to query, then follow these instructions to query it from JuMP. JuMP can return only the information that the solver itself exposes.

2 Likes