Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable bound functions not documented and without no signature #216

Open
matbesancon opened this issue Aug 1, 2018 · 3 comments
Open

Comments

@matbesancon
Copy link

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?

@odow
Copy link
Member

odow commented Aug 2, 2018

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

@matbesancon
Copy link
Author

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

@mlubin
Copy link
Member

mlubin commented Aug 2, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants