I am using Gurobi to solve a LP and I need access to the basis of the simplex algorithm for some downstream computation. I have specified my model in standard form (i.e. only lower bounds at 0 for all variables, and only equality constraints). After model.optimize(), I therefore call model.vbasis. In VBasis, a 0 indicates a basic variable as described here. Unfortunately, the number of basic variables as indicated by vBasis is sometimes fewer than I would expect (the number of linearly independent equality constraints).
Why is this and how can I get the "full" basis?
My best guess is that this is due to degeneracy, but I don't really understand why.
I am happy to share an instance and a notebook with code for reproduction.
Please sign in to leave a comment.