MathProgBase.jl icon indicating copy to clipboard operation
MathProgBase.jl copied to clipboard

variable bound functions not documented and without no signature

Open matbesancon opened this issue 7 years ago • 3 comments

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?

matbesancon avatar Aug 01 '18 16:08 matbesancon

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

odow avatar Aug 02 '18 09:08 odow

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

matbesancon avatar Aug 02 '18 10:08 matbesancon

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.

mlubin avatar Aug 02 '18 23:08 mlubin