Originally posted by: fbreuer
Hello everyone!
Given an LP in the form Ax >= b that Cplex has solved to optimality, I would like to do find the facets incident to the optimal solution. In other words, if x' is the optimal solution to Ax >= b and some objective function, I'd like to find a linearly independent set B of rows such that the corresponding submatrix A_B satisfies A_B x' = b_B.
What is the best way to achieve this?
I have made some attempts in figuring this out by myself, however I have run into several difficulties. I was hoping that I could simply get the basis of the solution found by Cplex' primal simplex algorithm to find the facet inequalities I am looking for. However, I have a number of questions:
1) Is the basis maintained by Cplex the one obtained after presolving, aggregation, etc? Is there a one-to-one correspondence between rows of the basis and rows of the original basis A anymore? If not, that is fine, I'd be happy to work with the transformed/presolved matrix A'.
2) What is the form of the problem after presolving, etc? A'x = b', x >= 0? If so, where can I access the rest of the matrix A', not just A'_B? And where can I get b'?
In the following cpx is my Cplex instance (in Python) after solving the LP.
3) Does cpx.solution.advanced.binvrow() refer to A' while cpx.solution.basis.get_row_basis() refers to the original A?
4) I noticed that, if cpx is my Cplex instance (in Python), then, after solving, cpx.solution.basis.get_row_basis() throws a TypeError, while cpx.solution.basis.get_col_basis() works fine. (This happens independently of whether I use the primal or dual simplex method.) Why is that? My original problem and the reduced version both have more constraints than variables, so I would expect a basis to be a subset of rows.
5) cpx.solution.advanced.binvrow() is the inverted basis matrix. However, my original matrix has only integer entries, and I'd much prefer to keep it that way, so I'd like to get the basis matrix itself, instead of its inverse, to avoid rounding errors. Is it possible to obtain the basis matrix directly without inverting binvrow()?
Thank you for any guidance!
Best,
Felix
#CPLEXOptimizers#DecisionOptimization