QPALM develop
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
scaling.h
Go to the documentation of this file.
1/**
2 * @file scaling.h
3 * @author Ben Hermans
4 * @brief Problem data scaling during setup.
5 * @details This file includes the routine that is called during setup to scale the problem data,
6 * and initial guesses if the problem is warm-started. Scaling the problem is useful to prevent
7 * large changes in the active set and to guard against ill-conditioning in the objective function.
8 *
9 */
10
11#ifndef SCALING_H
12# define SCALING_H
13
14# ifdef __cplusplus
15extern "C" {
16# endif
17
18// Functions to scale problem data
19# include "types.h"
20# include "lin_alg.h"
21# include "constants.h"
22
23
24/**
25 * Scale problem matrices
26 *
27 * Ruiz scaling \cite ruiz2001scaling is applied to the constraint matrix A. This means that the rows and columns of A are
28 * scaled elementwise by the square root of their infinity norm, and this for a number of work->settings->scaling
29 * iterations. The resulting scaling can be written as @f$\bar{A}\leftarrow EAD@f$, where @f$E@f$ and
30 * @f$D@f$ are the row and column scaling diagonal matrices respectively. The upper and lower bounds
31 * are also scaled with @f$E@f$, thus @f$\bar{b}_\textrm{min}, \bar{b}_\textrm{max} \leftarrow
32 * E b_\textrm{min}, E b_\textrm{max}@f$. The primal variables are transformed using @f$D^{-1}@f$,
33 * resulting in @f$\bar{x}\leftarrow D^{-1}x@f$. Therefore, also the cost matrix Q and vector q have
34 * to be scaled with @f$D@f$, @f$\bar{Q}\leftarrow DQD@f$ and @f$\bar{q}\leftarrow Dq@f$. Finally the
35 * objective function is scaled with a scalar @f$c@f$, thus @f$\bar{Q}, \bar{q} \leftarrow c\bar{Q},
36 * c\bar{q} @f$, where @f$c=1/\textrm{max}(1, \nabla f(x_0))@f$. The dual variables in the scaled problem
37 * become @f$\bar{y} \leftarrow c E^{-1} y@f$. The diagonals of @f$D@f$ and @f$E@f$ are stored and used in the
38 * remainder of the problem.
39 *
40 *
41 *
42 * @param work Workspace
43 */
44void scale_data(QPALMWorkspace *work);
45
46/**
47 * Unscale the problem data. See scale_data.
48 *
49 * @param work Workspace
50 */
52
53# ifdef __cplusplus
54}
55# endif
56
57#endif // ifndef SCALING_H
Constants used in QPALM.
Linear algebra with vectors.
void scale_data(QPALMWorkspace *work)
Scale problem matrices.
Definition scaling.c:31
void unscale_data(QPALMWorkspace *work)
Unscale the problem data.
Definition scaling.c:99
QPALM Workspace.
Definition types.h:204
Internal data structures used in QPALM.