QPALM
A proximal augmented Lagrangian method for QPs.
Functions
solver_interface.c File Reference

Interface and wrapper to matrix/factorization (ladel/cholmod) functions. More...

#include "lin_alg.h"
#include "solver_interface.h"
#include <stdio.h>
#include "ladel.h"

Functions

void qpalm_set_factorization_method (QPALMWorkspace *work, solver_common *c)
 Choose the linear systems solver method based on the problem data sizes. More...
 
void mat_vec (solver_sparse *A, solver_dense *x, solver_dense *y, solver_common *c)
 Matrix-vector multiplication. More...
 
void mat_tpose_vec (solver_sparse *A, solver_dense *x, solver_dense *y, solver_common *c)
 Matrix-transpose-vector multiplication. More...
 
void qpalm_form_kkt (QPALMWorkspace *work)
 Form the KKT system $\begin{bmatrix} Q & A^T \\ A & -\Sigma^{-1} \end{bmatrix} $. More...
 
void qpalm_reform_kkt (QPALMWorkspace *work)
 Reform the KKT system (i.e. More...
 
void kkt_update_entering_constraints (QPALMWorkspace *work, solver_common *c)
 Perform a factorization update for the entering constraints. More...
 
void kkt_update_leaving_constraints (QPALMWorkspace *work, solver_common *c)
 Perform a factorization update for the leaving constraints. More...
 
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} $. More...
 
void ldlchol (solver_sparse *M, QPALMWorkspace *work, solver_common *c)
 Calculate $LDL^T$ factorization of a matrix $M$. More...
 
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. More...
 
void ldlupdate_entering_constraints (QPALMWorkspace *work, solver_common *c)
 Update the $LDL^T$ factorization given a set of entering constraints. More...
 
void ldldowndate_leaving_constraints (QPALMWorkspace *work, solver_common *c)
 Downdate the $LDL^T$ factorization given a set of leaving constraints. More...
 
void ldlupdate_sigma_changed (QPALMWorkspace *work, solver_common *c)
 Update the $LDL^T$ factorization given a set of indexes where $sigma$ has been updated. More...
 
void ldlsolveLD_neg_dphi (QPALMWorkspace *work, solver_common *c)
 Solve the linear system $LDL^T*d = -\nabla \varphi$. More...
 

Detailed Description

Interface and wrapper to matrix/factorization (ladel/cholmod) functions.

Author
Ben Hermans

This file includes all calls to cholmod/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. Finally, all the settings relevant to cholmod (and suitesparse) are included in this file as well.

Function Documentation

◆ kkt_solve()

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} $.

Parameters
workWorkspace
cLinear systems solver environment

◆ kkt_update_entering_constraints()

void kkt_update_entering_constraints ( QPALMWorkspace work,
solver_common c 
)

Perform a factorization update for the entering constraints.

Parameters
workWorkspace
cLinear systems solver environment

◆ kkt_update_leaving_constraints()

void kkt_update_leaving_constraints ( QPALMWorkspace work,
solver_common c 
)

Perform a factorization update for the leaving constraints.

Parameters
workWorkspace
cLinear systems solver environment

◆ ldlchol()

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.

Parameters
MMatrix to be factorized
workWorkspace
cSolver environment

◆ ldlcholQAtsigmaA()

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.

Parameters
workWorkspace
cSolver environment

◆ ldldowndate_leaving_constraints()

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.

Parameters
workWorkspace
cSolver environment

◆ ldlsolveLD_neg_dphi()

void ldlsolveLD_neg_dphi ( QPALMWorkspace work,
solver_common c 
)

Solve the linear system $LDL^T*d = -\nabla \varphi$.

Parameters
workWorkspace
cSolver environment

◆ ldlupdate_entering_constraints()

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.

Parameters
workWorkspace
cSolver environment

◆ ldlupdate_sigma_changed()

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.

Parameters
workWorkspace
cSolver environment

◆ mat_tpose_vec()

void mat_tpose_vec ( solver_sparse A,
solver_dense x,
solver_dense y,
solver_common c 
)

Matrix-transpose-vector multiplication.

$y = A^T*x$

Parameters
ASparse matrix
xDense input vector
yDense output vector
cSolver environment

◆ mat_vec()

void mat_vec ( solver_sparse A,
solver_dense x,
solver_dense y,
solver_common c 
)

Matrix-vector multiplication.

$y = A*x$

Parameters
ASparse matrix
xDense input vector
yDense output vector
cSolver environment

◆ qpalm_form_kkt()

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.

Note
Only the rows of A corresponding to active constraints are included in the system above. This routine also saves some structures that are useful in updating the kkt system later.
Parameters
workWorkspace

◆ qpalm_reform_kkt()

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).

Parameters
workWorkspace

◆ qpalm_set_factorization_method()

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.

Parameters
workWorkspace
cLinear systems solver environment