QPALM
main
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
QPALM
include
qpalm
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
11
extern
"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_USER_CANCELLATION (-6)
/**< status to indicate the user has cancelled the solve */
37
#define QPALM_UNSOLVED (-10)
/**< status to indicate the problem is unsolved. Only setup function has been called */
38
#define QPALM_ERROR (0)
/**< status to indicate an error has occured (this error should automatically be printed) */
39
40
/**
41
* @}
42
*/
43
44
/**
45
* @name Solver parameters and settings
46
* @{
47
*/
48
49
/**********************************
50
* Solver Parameters and Settings *
51
**********************************/
52
53
#ifndef QPALM_NULL
54
#define QPALM_NULL 0
/**< NULL, if something goes wrong during setup, the workspace pointer is set to this */
55
#endif
/* ifndef QPALM_NULL */
56
57
#ifndef QPALM_NAN
58
#define QPALM_NAN ((c_float)0x7fc00000UL)
/**< not a number, used for the solution if the problem is primal or dual infeasible */
59
#endif
/* ifndef QPALM_NAN */
60
61
#ifndef QPALM_INFTY
62
#define QPALM_INFTY ((c_float)1e20)
/**< infinity, used to indicate one-sided constraints */
63
#endif
/* ifndef QPALM_INFTY */
64
65
66
#define MAX_ITER (10000)
/**< default maximum number of iterations */
67
#define INNER_MAX_ITER (100)
/**< default maximum number of iterations per subproblem */
68
#define EPS_ABS (1e-4)
/**< default absolute convergence tolerance */
69
#define EPS_REL (1e-4)
/**< default relative convergence tolerance */
70
#define EPS_ABS_IN (1)
/**< default intermediate absolute convergence tolerance */
71
#define EPS_REL_IN (1)
/**< default intermediate relative convergence tolerance */
72
#define RHO (0.1)
/**< default tolerance scaling factor */
73
#define EPS_PRIM_INF (1e-5)
/**< default primal infeasibility tolerance */
74
#define EPS_DUAL_INF (1e-5)
/**< default dual infeasibility tolerance */
75
#define THETA (0.25)
/**< default penalty update criterion parameter */
76
#define DELTA (100)
/**< default penalty update factor */
77
#define SIGMA_MAX (1e9)
/**< default penalty cap */
78
#define SIGMA_INIT (2e1)
/**< default initial penalty parameter (guideline) */
79
#define PROXIMAL (TRUE)
/**< default use of proximal method of multipliers */
80
#define GAMMA_INIT (1E7)
/**< default initial proximal penalty parameter */
81
#define GAMMA_UPD (10)
/**< default proximal penalty update factor */
82
#define GAMMA_MAX (1E7)
/**< default proximal penalty cap */
83
84
#define SCALING (10)
/**< default number of scaling iterations */
85
#define MIN_SCALING (1e-12)
/**< minimum scaling value */
///< Minimum scaling value
86
#define MAX_SCALING (1e+04)
/**< maximum scaling value */
///< Maximum scaling value
87
88
#define NONCONVEX (FALSE)
/**< default use of nonconvex adjustments */
89
#define WARM_START (FALSE)
/**< default warm start setting */
90
#define VERBOSE (TRUE)
/**< default write out progress setting */
91
#define PRINT_ITER (1)
/**< default frequency of printing */
92
93
#define RESET_NEWTON_ITER (10000)
/**< default frequency of performing a full Cholesky factorization */
94
95
#define ENABLE_DUAL_TERMINATION (FALSE)
/**< enable termination after dual objective > something (useful in branch and bound) */
96
#define DUAL_OBJECTIVE_LIMIT (QPALM_INFTY)
/**< termination value for the dual objective (useful in branch and bound) */
97
#define TIME_LIMIT (QPALM_INFTY)
/**< time limit after which the solver aborts */
98
99
#define MAX_RANK_UPDATE 160
/**< maximum rank for the sparse factorization update */
100
#define MAX_RANK_UPDATE_FRACTION 0.1
/**< maximum rank (relative to n+m) for the factorization update */
101
102
#define RELATIVE_REFINEMENT_TOLERANCE 1e-10
/**< relative tolerance on the residual for linear systems solving */
103
#define ABSOLUTE_REFINEMENT_TOLERANCE 1e-12
/**< absolute tolerance on the residual for linear systems solving */
104
#define MAX_REFINEMENT_ITERATIONS 3
/**< maximum number of refinement iterations */
105
106
/* Options for settings->factorization_method */
107
#define FACTORIZE_KKT 0
/**< factorize the kkt system */
108
#define FACTORIZE_SCHUR 1
/**< factorize the Schur complement */
109
#define FACTORIZE_KKT_OR_SCHUR 2
/**< select automatically between kkt system and schur complement */
110
111
#define FACTORIZATION_METHOD FACTORIZE_KKT_OR_SCHUR
/**< default method for solving the linear system */
112
113
#include <ladel.h>
114
#define ORDERING AMD
/**< ordering in the factorization */
115
116
/**
117
* @}
118
*/
119
120
121
#ifdef __cplusplus
122
}
123
#endif
124
125
#endif
// ifndef CONSTANTS_H
Generated by
1.9.8