-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linear algebra re-write #34
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Remove commented code in HSD algorithm and related files * Remove obsolete functions in LinearAlgebra module * Update tests to reflect new conventions * De-activate multiple-precision tests (temporary) * De-activate UnitBlockAngular tests (temporary)
* Float32 is hardly used anyway * Rational breaks type stability, since `sqrt(::Rational)` returns a `Float64`
* Computation of residuals * Stopping criterion * Computation of h0 in the Newton system solve
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
==========================================
- Coverage 84.91% 77.16% -7.76%
==========================================
Files 20 22 +2
Lines 1472 1673 +201
==========================================
+ Hits 1250 1291 +41
- Misses 222 382 +160
Continue to review full report at Codecov.
|
* Solve proximal problem obtained from the homogeneous self-dual form * Remove unused proximal points * Update code for Newton system * Remove looser criteria for infeasibility detection * Remove log of tau and kappa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The goal of this PR is to make the linear algebra layer considerably more flexible.
Linear algebra layers
AbstractLinearSolver
Prior to this PR, the Newton system is systematically reduced to the normal equations, which are solved using a Cholesky factorization of the PSD matrix
A*D*A'
.In this PR, we introduce the
AbstractLinearSolver
type, which --among others-- makes it easier to choose between:Only the resolution of the augmented system is exposed to the algorithm. The reduction to the normal equations, if applicable, is done within the linear solver object itself. See the docs for more details.
For sparse constraint matrix (and
Float32
/Float64
precision), the default setting is to use an LDL factorization of the (quasi-definite) augmented system. This approach better handles dense columns in the constraint matrix, and tends to be more numerically stable.For dense matrices, the reduction to the normal equations is automatic, and BLAS/LAPACK are used when applicable.
These settings are currently not exposed, i.e., one must modify the source code manually.
Regularizations
The augmented system
is symmetric indefinite, thus its LDL factorization may not exist.
Therefore, we introduce primal and dual regularizations
Rp
andRd
, which make the system quasi-definite:Here,
Rp
andRd
are diagonal matrices with positive diagonals, and any implementation ofAbstractLinearSolver
is expected to be able to handle them explicitly.Future changes
The current interface for
AbstractLinearSolver
is expected to change in the near future, with the introduction of traits and extra parameters to make it more user-friendly and (even more) flexible.Regularized algorithm
Given that we use black-box linear solvers, which does not allow explicit control over the factorization process (when a direct method is employed), the regularizations are handled in the IPM algorithm directly.
The homogeneous self-dual algorithm was modified accordingly, including updated stopping criteria. See paper for details.