You may see a message like this in the Gurobi log:
Warning: 1 variables dropped from basisThe simplex method works with a basis. This is a square submatrix of the constraint matrix that must be nonsingular so it can be factorized and used to compute the next iterate.
This warning means that Gurobi encountered a basis that was numerically singular: some of its columns were so close to being linearly dependent that, with limited-precision computer arithmetic, the basis could not be factorized reliably. To recover, Gurobi drops some variables (columns) from the basis and replaces them with slack variables. It then refactorizes and continues. The same issue can also arise in crossover. It may also switch to more careful numerical computations.
Why it matters
The repaired basis may not be feasible or optimal, so the simplex method may require many additional iterations to recover. This can significantly increase runtime. More importantly, the warning is a symptom of ill-conditioning in the model. It can be accompanied by other numerical warnings or by larger-than-expected violations in the final solution.
What to do
The best remedy is to try to improve the numerical properties of the model:
- Read the Guidelines for Numerical Issues, especially Does my Model have Numerical Issues?
- Rescale or reformulate the model. See What does “Model contains large matrix coefficient range…” mean? and How do I scale my model to improve its numerical properties?
- Adjusting parameters such as NumericFocus can help; see Solver Parameters to Manage Numerical Issues. However, addressing the root cause is preferred, as adjusting these parameter can negatively affect performance.
- The Gurobi Model Analyzer can be a helpful tool for identifying rows or columns responsible for an ill-conditioned basis.