# How to use the solver-dependent callback

**URL:** https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519
**Category:** Optimization (Mathematical)
**Tags:** question
**Created:** [February 16, 2022, 12:17am UTC](https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519 "2022-02-16T00:17:32Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [February 16, 2022, 12:47am UTC](https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519/2 "2022-02-16T00:47:23Z")

</div>

Hi there,

Since this is your first post, take a read of [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757). In general, it’s easier to help if you add more content to your question. You can also put JuMP-related questions in the “Optimization (Mathematical)” section.

You need to use the C API for Gurobi: [GitHub - jump-dev/Gurobi.jl: Julia interface for Gurobi Optimizer](https://github.com/jump-dev/Gurobi.jl#callbacks)

So something like this should get you started

```nohighlight
lb_pointer = Ref{Cdouble}(0.0)
GRBcbget(cb_data, ch_where, CRB_MIPSOL_OBJBND, lb_pointer)
lb = lp_pointer[]

```

There’s a JuMP tutorial for Benders decomposition with the solver-independent API, but it doesn’t use the objective bound:  
[https://jump.dev/JuMP.jl/stable/tutorials/algorithms/benders\_decomposition/#Callback-method](https://jump.dev/JuMP.jl/stable/tutorials/algorithms/benders_decomposition/#Callback-method)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-use-the-solver-dependent-callback/76519)._
