QPALM
1.2.4
Proximal Augmented Lagrangian method for Quadratic Programs
|
Interface and wrapper to matrix/factorization (ladel) functions.
This file includes all calls to ladel functions apart from scaling in scaling.c and memory allocation/deallocation in the main functions in qpalm.c. It includes all matrix operations, such as matrix vector products, row- and columnwise norms, cholesky factorizations, factorization updates and solving the linear system.
Definition in file solver_interface.c.
#include <qpalm/lin_alg.h>
#include <qpalm/solver_interface.h>
#include <stdio.h>
#include <ladel.h>
Go to the source code of this file.
Functions | |
void | qpalm_set_factorization_method (QPALMWorkspace *work, solver_common *c) |
Choose the linear systems solver method based on the problem data sizes. | |
void | mat_vec (solver_sparse *A, solver_dense *x, solver_dense *y, solver_common *c) |
Matrix-vector multiplication. | |
void | mat_tpose_vec (solver_sparse *A, solver_dense *x, solver_dense *y, solver_common *c) |
Matrix-transpose-vector multiplication. | |
void | qpalm_form_kkt (QPALMWorkspace *work) |
Form the KKT system \(\begin{bmatrix}
Q & A^T \\
A & -\Sigma^{-1}
\end{bmatrix} \). | |
void | qpalm_reform_kkt (QPALMWorkspace *work) |
Reform the KKT system (i.e. | |
void | kkt_update_entering_constraints (QPALMWorkspace *work, solver_common *c) |
Perform a factorization update for the entering constraints. | |
void | kkt_update_leaving_constraints (QPALMWorkspace *work, solver_common *c) |
Perform a factorization update for the leaving constraints. | |
void | kkt_solve (QPALMWorkspace *work, solver_common *c) |
Solve the KKT system \(\begin{bmatrix}
Q + \frac{1}{\gamma}I & A^T \\
A & -\Sigma^{-1}
\end{bmatrix} \begin{bmatrix}
d \\
-\lambda
\end{bmatrix} = \begin{bmatrix}
-\nabla \varphi \\
0
\end{bmatrix}
\). | |
void | ldlchol (solver_sparse *M, QPALMWorkspace *work, solver_common *c) |
Calculate \(LDL^T\) factorization of a matrix \(M\). | |
void | ldlcholQAtsigmaA (QPALMWorkspace *work, solver_common *c) |
Calculate \(LDL^T\) factorization of \(Q+A{(a,:)}^T*\Sigma{(a,a)}*A{(a,:)}\), with \(\Sigma=diag(\sigma)\) and \(a\) the set of active constraints. | |
void | ldlupdate_entering_constraints (QPALMWorkspace *work, solver_common *c) |
Update the \(LDL^T\) factorization given a set of entering constraints. | |
void | ldldowndate_leaving_constraints (QPALMWorkspace *work, solver_common *c) |
Downdate the \(LDL^T\) factorization given a set of leaving constraints. | |
void | ldlupdate_sigma_changed (QPALMWorkspace *work, solver_common *c) |
Update the \(LDL^T\) factorization given a set of indexes where \(sigma\) has been updated. | |
void | ldlsolveLD_neg_dphi (QPALMWorkspace *work, solver_common *c) |
Solve the linear system \(LDL^T*d = -\nabla \varphi\). | |
void qpalm_set_factorization_method | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Choose the linear systems solver method based on the problem data sizes.
This chooses between forming and solving the KKT system or the SCHUR complement. The resulting method is in work->solver->factorization_method.
work | Workspace |
c | Linear systems solver environment |
Definition at line 18 of file solver_interface.c.
void mat_vec | ( | solver_sparse * | A, |
solver_dense * | x, | ||
solver_dense * | y, | ||
solver_common * | c | ||
) |
Matrix-vector multiplication.
\(y = A*x\)
A | Sparse matrix |
x | Dense input vector |
y | Dense output vector |
c | Solver environment |
Definition at line 73 of file solver_interface.c.
void mat_tpose_vec | ( | solver_sparse * | A, |
solver_dense * | x, | ||
solver_dense * | y, | ||
solver_common * | c | ||
) |
Matrix-transpose-vector multiplication.
\(y = A^T*x\)
A | Sparse matrix |
x | Dense input vector |
y | Dense output vector |
c | Solver environment |
Definition at line 93 of file solver_interface.c.
void qpalm_form_kkt | ( | QPALMWorkspace * | work | ) |
Form the KKT system \(\begin{bmatrix} Q & A^T \\ A & -\Sigma^{-1} \end{bmatrix} \).
The result is in work->solver->kkt.
work | Workspace |
Definition at line 114 of file solver_interface.c.
void qpalm_reform_kkt | ( | QPALMWorkspace * | work | ) |
Reform the KKT system (i.e.
delete constraints which are no longer active and add those that are now active).
work | Workspace |
Definition at line 172 of file solver_interface.c.
void kkt_update_entering_constraints | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Perform a factorization update for the entering constraints.
work | Workspace |
c | Linear systems solver environment |
Definition at line 197 of file solver_interface.c.
void kkt_update_leaving_constraints | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Perform a factorization update for the leaving constraints.
work | Workspace |
c | Linear systems solver environment |
Definition at line 215 of file solver_interface.c.
void kkt_solve | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Solve the KKT system \(\begin{bmatrix} Q + \frac{1}{\gamma}I & A^T \\ A & -\Sigma^{-1} \end{bmatrix} \begin{bmatrix} d \\ -\lambda \end{bmatrix} = \begin{bmatrix} -\nabla \varphi \\ 0 \end{bmatrix} \).
work | Workspace |
c | Linear systems solver environment |
Definition at line 233 of file solver_interface.c.
void ldlchol | ( | solver_sparse * | M, |
QPALMWorkspace * | work, | ||
solver_common * | c | ||
) |
Calculate \(LDL^T\) factorization of a matrix \(M\).
If work->settings->proximal = true, use \(M+\frac{1}{\gamma}*I\) instead.
M | Matrix to be factorized |
work | Workspace |
c | Solver environment |
Definition at line 246 of file solver_interface.c.
void ldlcholQAtsigmaA | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Calculate \(LDL^T\) factorization of \(Q+A{(a,:)}^T*\Sigma{(a,a)}*A{(a,:)}\), with \(\Sigma=diag(\sigma)\) and \(a\) the set of active constraints.
If work->settings->proximal = true, use \(Q+\frac{1}{\gamma}*I+A{(a,:)}^T*\Sigma{(a,a)}*A{(a,:)}\) instead.
work | Workspace |
c | Solver environment |
Definition at line 274 of file solver_interface.c.
void ldlupdate_entering_constraints | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Update the \(LDL^T\) factorization given a set of entering constraints.
The index set of entering constraints is assumed to be set in work->solver->enter.
work | Workspace |
c | Solver environment |
Definition at line 297 of file solver_interface.c.
void ldldowndate_leaving_constraints | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Downdate the \(LDL^T\) factorization given a set of leaving constraints.
The index set of leaving constraints is assumed to be set in work->solver->leave.
work | Workspace |
c | Solver environment |
Definition at line 306 of file solver_interface.c.
void ldlupdate_sigma_changed | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Update the \(LDL^T\) factorization given a set of indexes where \(sigma\) has been updated.
The index set of changed \(sigma\) is assumed to be set in work->solver->enter.
work | Workspace |
c | Solver environment |
Definition at line 315 of file solver_interface.c.
void ldlsolveLD_neg_dphi | ( | QPALMWorkspace * | work, |
solver_common * | c | ||
) |
Solve the linear system \(LDL^T*d = -\nabla \varphi\).
work | Workspace |
c | Solver environment |
Definition at line 359 of file solver_interface.c.