The LinearProgramming
function solves a problem using the simplex method (by default). That means it internally selects a set of variables as basic (and the rest as nonbasic) to return the optimal solution (that is, it finds a basic feasible optimal solution). How do I retrieve this set? Please notice that this is not as simple as identifying nonzero variables in the solution, because there are so-called degenerate cases where some basic variables are zero. Also, (if it is not possible to directly retrieve the internally determined basis of LinearProgramming
) please give a polynomial method. The immediately obvious 'trial-and-error' method is exponential.
PS: I saw another question on this site (Linear programming pivot), but that one focuses on how to calculate the values of the variables given a set of variables as basis. This is the inverse problem.