Open matbesancon opened 6 years ago
From JuMP or MPB? Which solver?
It's worth having a look at the JuMP implementation.
Remember that solver-independent callbacks will no longer be supported in MOI. Instead, you should use the solver specific functionality - precisely because the specifics of which functions are available and when are not solver specific.
Here is an example of a lazy cut in MOI with Gurobi: https://github.com/JuliaOpt/Gurobi.jl/blob/0d73b3e35b9fac7e25eb0d4f4776a76d53deefd3/test/MOIWrapper.jl#L125-L191
Gurobi defines a new Gurobi.CallbackFunction
attribute here:
https://github.com/JuliaOpt/Gurobi.jl/blob/0d73b3e35b9fac7e25eb0d4f4776a76d53deefd3/src/MOIWrapper.jl#L480-L494
From MPB, solver is CPLEX. Yes I'm checking the solver documentation for this. Thing is, I was wondering how to call it and was looking at the interface for that but it's not going to be an issue after MOI.
In any case, it's worth knowing if querying the information will give the bounds at current node or of the initial formulation
As far as I recall, these methods have no specific use in callbacks, which is why there's no documentation on it. I would expect that they give either the bounds on the initial formulation or they fail if the solver doesn't support querying this information during a callback.
Trying to use the
setvarLB!
,setvarUB!
getvarLB
,getvarUB
functions in a callback but couldn't find a definition in the docs nor in MathProgBase source code. What's the signature, should these be called with the callback object? Do they get updated in the current node of the branch and bound?