# Adding local lazy constraints in Gurobi with JuMP v0.18

**URL:** <https://discourse.julialang.org/t/adding-local-lazy-constraints-in-gurobi-with-jump-v0-18/21517>\
**Category:** Optimization (Mathematical)\
**Created:** [March 6, 2019, 2:01am UTC](https://discourse.julialang.org/t/adding-local-lazy-constraints-in-gurobi-with-jump-v0-18/21517 "2019-03-06T02:01:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wei\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wei_wang/32/15032_2.png) [@Wei\_Wang](https://discourse.julialang.org/u/Wei_Wang)\
**Post date:** [March 6, 2019, 2:01am UTC](https://discourse.julialang.org/t/adding-local-lazy-constraints-in-gurobi-with-jump-v0-18/21517/1 "2019-03-06T02:01:01Z")

</div>

Hi all,  
I am using JuMP v0.18. I want to locally add lazy constraints but when I setting `localcut` to `true` I get the following error

```julia
MethodError: no method matching cbaddlazylocal!(::Gurobi.GurobiCallbackData, ::Array{Int32,1}, ::Array{Float64,1}, ::Char, ::Float64)

```

Is there any method to fix this?

Thanks so much

---

<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:** [March 6, 2019, 2:20pm UTC](https://discourse.julialang.org/t/adding-local-lazy-constraints-in-gurobi-with-jump-v0-18/21517/2 "2019-03-06T14:20:33Z")

</div>

Local lazy constraints are not supported by the Gurobi.jl wrapper.

Note that in JuMP 0.19, solver-independent callbacks have been removed. We will be discussing a replacement next week at [JuMP-dev III](http://www.juliaopt.org/meetings/santiago2019/).

---

<div class="post-metadata">

**Author:** ![Wei\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wei_wang/32/15032_2.png) [@Wei\_Wang](https://discourse.julialang.org/u/Wei_Wang)\
**Post date:** [March 6, 2019, 3:48pm UTC](https://discourse.julialang.org/t/adding-local-lazy-constraints-in-gurobi-with-jump-v0-18/21517/3 "2019-03-06T15:48:00Z")

</div>

Thank you for your reply. I will try it on Cplex before callbacks are supported by JuMP 0.19.
