# Objective\_bound and Gurobi

**URL:** https://discourse.julialang.org/t/objective-bound-and-gurobi/46633
**Category:** Optimization (Mathematical)
**Tags:** question, jump, gurobi
**Created:** [September 15, 2020, 11:22am UTC](https://discourse.julialang.org/t/objective-bound-and-gurobi/46633 "2020-09-15T11:22:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![arkanver](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@arkanver](https://discourse.julialang.org/u/arkanver)
#### Post date: [September 15, 2020, 11:22am UTC](https://discourse.julialang.org/t/objective-bound-and-gurobi/46633/1 "2020-09-15T11:22:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)
#### Post date: [September 15, 2020, 1:14pm UTC](https://discourse.julialang.org/t/objective-bound-and-gurobi/46633/2 "2020-09-15T13:14:49Z")

</div>

The Gurobi ObjBound attribute applies to MIP models only: [https://www.gurobi.com/documentation/9.0/refman/objbound.html](https://www.gurobi.com/documentation/9.0/refman/objbound.html). I’d recommend going through the [Gurobi documentation](https://www.gurobi.com/documentation/9.0/refman/model_attributes.html) or asking Gurobi support to figure out the attribute that you want to query, then follow [these instructions](https://github.com/jump-dev/Gurobi.jl#accessing-gurobi-specific-attributes-via-jump) to query it from JuMP. JuMP can return only the information that the solver itself exposes.

---

<div class="post-metadata">

### Author: ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)
#### Post date: [April 24, 2025, 2:23am UTC](https://discourse.julialang.org/t/objective-bound-and-gurobi/46633/3 "2025-04-24T02:23:14Z")

</div>

Now also available for LP.

> **[Additions, Changes and Removals in Gurobi 12.0 - Gurobi Optimizer Reference...](https://docs.gurobi.com/projects/optimizer/en/12.0/reference/releasenotes/changes.html#new-attributes-for-lp-models)**
