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

getbasis specification in MIP case #212

Open
matbesancon opened this issue Jul 5, 2018 · 8 comments
Open

getbasis specification in MIP case #212

matbesancon opened this issue Jul 5, 2018 · 8 comments
Labels

Comments

@matbesancon
Copy link

From the documentation of the SolverInterface.getbasis function, I'm not sure if it is supposed to return the basis of the augmented constraint matrix (with cuts and bounds) at current node or of the initial linear formulation constraint matrix.

@odow
Copy link
Member

odow commented Jul 6, 2018

It is somewhat ill-defined in MPB.

It would be really helpful if you could read http://www.juliaopt.org/MathOptInterface.jl/latest/apireference.html#Basis-Status-1 and http://www.juliaopt.org/MathOptInterface.jl/latest/apireference.html#MathOptInterface.VariableBasisStatus and suggest edits if necessary in order to help clarify things.

@matbesancon
Copy link
Author

I'll check that after this weekend

@mtanneau
Copy link

mtanneau commented Jul 26, 2018

TL;DR: the notion of "basis" is not well-defined for integer solutions, and is not implemented by any major solver.

The notion of basis for a MIP solution is not clearly defined, and thus this is not implemented by any of the major solvers (there is no basis information for a MIP solution in CPLEX/Gurobi/XPress...).
[what follows is for the case of Mixed-Integer Linear Programs]

Let's assume you have an integer solution to a MILP. To get basis information, that integer point has to be an extreme vertex of some (LP) polyhedron.
First, it may be that no basic solution of the LP relaxation is integer, therefore it makes no sense to seek basis information with respect to the initial formulation.
Second, the integer solution may have obtained heuristically, in which case there is definitely no basic information available.

Consequently, the only scenario where "basis information" for a MIP solution may be available, is when a node relaxation yields an integer solution. In this case, you would need access to LP-level information at that node, which would most likely require a solver-specific callback.
Even then, the basis may (and most likely will) include cuts/bounds that were not part of the original formulation, and thus not in the scope of the MPB/MOI layer.

@matbesancon
Copy link
Author

Thank you both for the answers and details I hadn't thought of the heuristic-found solution.

@matbesancon
Copy link
Author

@odow, I don't know if the issue should be closed given that it aims at being fixed in MOI and not MPB. Maybe a wont-fix tag?
For the documentation, one thing I didn't find clear on http://www.juliaopt.org/MathOptInterface.jl/latest/apireference.html#Basis-Status-1 is the last status. SuperBasic corresponds to degeneracy?

@odow
Copy link
Member

odow commented Aug 2, 2018

A degenerate variable is one in the basis with variable value of 0. Superbasic variables are exactly what is written: [edit: not] in the basis but not at a bound. See also: https://groups.google.com/forum/#!topic/ampl/vZEHzbyyhVE

Feel free to open an issue at MOI to discuss further. We definitely need help improving the docs :)

@odow odow added the wontfix label Aug 2, 2018
@matbesancon
Copy link
Author

Oh ok I see this applies only to non-linear problems. I guess this could be good to add it (I was thinking of (MI)LPs and when that's the case, people might forget MOI is meant to be more general

@odow
Copy link
Member

odow commented Aug 2, 2018

Open an issue. I'm not sure how much anyone has actually thought about this part of the API or implemented things.

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

No branches or pull requests

3 participants