Current status with callbacks

Hi everyone!

I am using JuMP 0.19 and I tried to set up an information callback to retrieve the relaxation value of the root node. After a lot of searching I think I got the picture with the non solver independent callbacks.
Do you suggest working with 0.18 and MPB or 0.19 MOI and try to set up the callbacks specifically for Gurobi. Is there any drawback if i continue with 0.18?

Thank you in advance,
Lefteris

There was some recent activity related to solver-independent callbacks (in particular GLPK and Gurobi). But I think these were focused on the functionality of lazy constraints, user cuts and heuristics.

So, if you want something else, Iā€™d guess it would have to be solver-specific in JuMP 0.19 (or 0.20).

The drawback for sticking with 0.18 (while starting a new project) is that this version is no longer actively maintained, I guess.

1 Like

You can try Gurobi callbacks with https://github.com/JuliaOpt/Gurobi.jl/pull/258
To use the Gurobi-specific callback with JuMP v0.19 or v0.20, do

using JuMP
model = direct_model(Gurobi.Optimizer())
...
MOI.set(model, Gurobi.CallbackFunction(), (cb_data, cb_where) -> begin
    ...
end)
optimize!(model)
2 Likes

Thank you very much! So, does this mean that we have the complete functionality we had with jump 0.18 for heuristic, user and lazy constraint callbacks?

At a high level: yes. In addition, you will have complete access to the low level solver dependent callback.