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

Problem data scaling during setup. More...

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

Functions

void limit_scaling (c_float *D, size_t n)
 
void scale_data (QPALMWorkspace *work)
 Scale problem matrices. More...
 

Detailed Description

Problem data scaling during setup.

Author
Ben Hermans

This file includes the routine that is called during setup to scale the problem data, and initial guesses if the problem is warm-started. Scaling the problem is useful to prevent large changes in the active set and to guard against ill-conditioning in the objective function.

Note
The function in this file makes use of the cholmod scale routines.

Function Documentation

◆ limit_scaling()

void limit_scaling ( c_float D,
size_t  n 
)

◆ scale_data()

void scale_data ( QPALMWorkspace work)

Scale problem matrices.

Ruiz scaling [4] is applied to the constraint matrix A. This means that the rows and columns of A are scaled elementwise by the square root of their infinity norm, and this for a number of work->settings->scaling iterations. The resulting scaling can be written as $\bar{A}\leftarrow EAD$, where $E$ and $D$ are the row and column scaling diagonal matrices respectively. The upper and lower bounds are also scaled with $E$, thus $\bar{b}_\textrm{min}, \bar{b}_\textrm{max} \leftarrow E b_\textrm{min}, E b_\textrm{max}$. The primal variables are transformed using $D^{-1}$, resulting in $\bar{x}\leftarrow D^{-1}x$. Therefore, also the cost matrix Q and vector q have to be scaled with $D$, $\bar{Q}\leftarrow DQD$ and $\bar{q}\leftarrow Dq$. Finally the objective function is scaled with a scalar $c$, thus $\bar{Q}, \bar{q} \leftarrow c\bar{Q}, c\bar{q} $, where $c=1/\textrm{max}(1, \nabla f(x_0))$. The dual variables in the scaled problem become $\bar{y} \leftarrow c E^{-1} y$. The diagonals of $D$ and $E$ are stored and used in the remainder of the problem.

Note
This function makes use of the cholmod scale routines.
Parameters
workWorkspace