Fix a bug in basis repair. Recover from numerical issues in primal update. #249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes two fixes:
Basis repair was failing due to a bug in the right-looking LU where the column permutation was not fully populated when the basis was rank deficient.
When computing delta x using a hypersparse solve the solution vector sometimes did not contain a nonzero coefficient associated with the basic leaving index. This was an issue, as we divide by that coefficient to compute the primal step length. This coefficient may have been missing due to the numerical drop tolerances. To recover from this we perform a regular solve. If the coefficient is small, but nonzero, we can recover.
In addition this PR adds the option to use threshold rook pivoting inside the right-looking LU factorization. TRP is rank-revealing. However, it produces factors L and U with more fill and is thus about 3% slower. We add TRP in this PR, but keep it disabled behind a flag. A future PR may want to use TRP when basis repair fails.
New or existing tests cover these changes. The documentation is not affected.