QPALM 1.1.2
Proximal Augmented Lagrangian method for Quadratic Programs
constants.h
Go to the documentation of this file.
1/**
2 * @file constants.h
3 * @author Ben Hermans
4 * @brief Constants used in QPALM
5 * @details This file contains the constants that are used as default settings and to set the solver status.
6 */
7#ifndef CONSTANTS_H
8#define CONSTANTS_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/**
15 * @name Booleans
16 * @{
17 */
18#define TRUE 1
19#define FALSE 0
20/**
21 * @}
22 */
23
24
25/**
26 * @name Solver status
27 * @{
28 */
29
30#define QPALM_SOLVED (1) /**< status to indicate the problem is solved to optimality given the specified tolerances */
31#define QPALM_DUAL_TERMINATED (2) /**< status to indicate the problem has a dual objective that is higher than the specified bound */
32#define QPALM_MAX_ITER_REACHED (-2) /**< status to indicate termination due to reaching the maximum number of iterations */
33#define QPALM_PRIMAL_INFEASIBLE (-3) /**< status to indicate the problem is primal infeasible */
34#define QPALM_DUAL_INFEASIBLE (-4) /**< status to indicate the problem is dual infeasible */
35#define QPALM_TIME_LIMIT_REACHED (-5) /**< status to indicate the problem's runtime has exceeded the specified time limit */
36#define QPALM_UNSOLVED (-10) /**< status to indicate the problem is unsolved. Only setup function has been called */
37#define QPALM_ERROR (0) /**< status to indicate an error has occured (this error should automatically be printed) */
38
39/**
40 * @}
41 */
42
43/**
44 * @name Solver parameters and settings
45 * @{
46 */
47
48/**********************************
49* Solver Parameters and Settings *
50**********************************/
51
52#ifndef QPALM_NULL
53 #define QPALM_NULL 0 /**< NULL, if something goes wrong during setup, the workspace pointer is set to this */
54#endif /* ifndef QPALM_NULL */
55
56#ifndef QPALM_NAN
57 #define QPALM_NAN ((c_float)0x7fc00000UL) /**< not a number, used for the solution if the problem is primal or dual infeasible */
58#endif /* ifndef QPALM_NAN */
59
60#ifndef QPALM_INFTY
61 #define QPALM_INFTY ((c_float)1e20) /**< infinity, used to indicate one-sided constraints */
62#endif /* ifndef QPALM_INFTY */
63
64
65#define MAX_ITER (10000) /**< default maximum number of iterations */
66#define INNER_MAX_ITER (100) /**< default maximum number of iterations per subproblem */
67#define EPS_ABS (1e-4) /**< default absolute convergence tolerance */
68#define EPS_REL (1e-4) /**< default relative convergence tolerance */
69#define EPS_ABS_IN (1) /**< default intermediate absolute convergence tolerance */
70#define EPS_REL_IN (1) /**< default intermediate relative convergence tolerance */
71#define RHO (0.1) /**< default tolerance scaling factor */
72#define EPS_PRIM_INF (1e-5) /**< default primal infeasibility tolerance */
73#define EPS_DUAL_INF (1e-5) /**< default dual infeasibility tolerance */
74#define THETA (0.25) /**< default penalty update criterion parameter */
75#define DELTA (100) /**< default penalty update factor */
76#define SIGMA_MAX (1e9) /**< default penalty cap */
77#define SIGMA_INIT (2e1) /**< default initial penalty parameter (guideline) */
78#define PROXIMAL (TRUE) /**< default use of proximal method of multipliers */
79#define GAMMA_INIT (1E7) /**< default initial proximal penalty parameter */
80#define GAMMA_UPD (10) /**< default proximal penalty update factor */
81#define GAMMA_MAX (1E7) /**< default proximal penalty cap */
82
83#define SCALING (10) /**< default number of scaling iterations */
84#define MIN_SCALING (1e-12) /**< minimum scaling value *////< Minimum scaling value
85#define MAX_SCALING (1e+04) /**< maximum scaling value *////< Maximum scaling value
86
87#define NONCONVEX (FALSE) /**< default use of nonconvex adjustments */
88#define WARM_START (FALSE) /**< default warm start setting */
89#define VERBOSE (TRUE) /**< default write out progress setting */
90#define PRINT_ITER (1) /**< default frequency of printing */
91
92#define RESET_NEWTON_ITER (10000) /**< default frequency of performing a full Cholesky factorization */
93
94#define ENABLE_DUAL_TERMINATION (FALSE) /**< enable termination after dual objective > something (useful in branch and bound) */
95#define DUAL_OBJECTIVE_LIMIT (QPALM_INFTY) /**< termination value for the dual objective (useful in branch and bound) */
96#define TIME_LIMIT (QPALM_INFTY) /**< time limit after which the solver aborts */
97
98#define MAX_RANK_UPDATE 160 /**< maximum rank for the sparse factorization update */
99#define MAX_RANK_UPDATE_FRACTION 0.1 /**< maximum rank (relative to n+m) for the factorization update */
100
101#define RELATIVE_REFINEMENT_TOLERANCE 1e-10 /**< relative tolerance on the residual for linear systems solving */
102#define ABSOLUTE_REFINEMENT_TOLERANCE 1e-12 /**< absolute tolerance on the residual for linear systems solving */
103#define MAX_REFINEMENT_ITERATIONS 3 /**< maximum number of refinement iterations */
104
105/* Options for settings->factorization_method */
106#define FACTORIZE_KKT 0 /**< factorize the kkt system */
107#define FACTORIZE_SCHUR 1 /**< factorize the Schur complement */
108#define FACTORIZE_KKT_OR_SCHUR 2 /**< select automatically between kkt system and schur complement */
109
110#define FACTORIZATION_METHOD FACTORIZE_KKT_OR_SCHUR /**< default method for solving the linear system */
111
112#include "ladel.h"
113#define ORDERING AMD /**< ordering in the factorization */
114
115/**
116 * @}
117 */
118
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif // ifndef CONSTANTS_H