SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
constants.h
Go to the documentation of this file.
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2017 Pantelis Sopasakis (https://alphaville.github.io),
5  * Krina Menounou (https://www.linkedin.com/in/krinamenounou),
6  * Panagiotis Patrinos (http://homes.esat.kuleuven.be/~ppatrino)
7  * Copyright (c) 2012 Brendan O'Donoghue (bodonoghue85@gmail.com)
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy
10  * of this software and associated documentation files (the "Software"), to deal
11  * in the Software without restriction, including without limitation the rights
12  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13  * copies of the Software, and to permit persons to whom the Software is
14  * furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in all
17  * copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  *
27  */
28 #ifndef SCS_CONSTANTS_H_GUARD
29 #define SCS_CONSTANTS_H_GUARD
30 
31 #include "glbopts.h"
32 
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38  /* SCS VERSION NUMBER ---------------------------------------------- */
39  /* string literals automatically null-terminated */
43 #define SCS_VERSION \
44  ("1.3.3")
45 
46 
47  /* SCS returns one of the following integers: */
48 
52 #define SCS_INFEASIBLE_INACCURATE (-7)
53 
56 #define SCS_UNBOUNDED_INACCURATE (-6)
57 
60 #define SCS_SIGINT (-5)
61 
64 #define SCS_FAILED (-4)
65 
68 #define SCS_INDETERMINATE (-3)
69 
72 #define SCS_INFEASIBLE (-2)
73 
76 #define SCS_UNBOUNDED (-1)
77 
80 #define SCS_UNFINISHED (0)
81 
84 #define SCS_SOLVED (1)
85 
88 #define SCS_SOLVED_INACCURATE (2)
89 
90  /* DEFAULT SOLVER PARAMETERS AND SETTINGS -------------------------- */
91 
95 #define SCS_MAX_TIME_MILLISECONDS (300000.)
96 
99 #define SCS_MAX_ITERS_DEFAULT (10000)
100 #define SCS_EPS_DEFAULT (1E-3)
101 #define SCS_ALPHA_DEFAULT (1.5)
102 #define SCS_RHO_X_DEFAULT (0.001)
103 #define SCS_SCALE_DEFAULT (1.0)
104 #define SCS_CG_RATE_DEFAULT (2.0)
105 #define SCS_VERBOSE_DEFAULT (1)
106 #define SCS_NORMALIZE_DEFAULT (1)
107 #define SCS_DO_RECORD_PROGRESS_DEFAULT (0)
108 #define SCS_WARM_START_DEFAULT (0)
109 
110  /* Parameters for Superscs*/
111 #define SCS_DO_SUPERSCS_DEFAULT (1)
112 #define SCS_K0_DEFAULT (0)
113 #define SCS_K1_DEFAULT (1)
114 #define SCS_K2_DEFAULT (1)
115 #define SCS_NOMINAL_DEFAULT (1)
116 #define SCS_C_BL_DEFAULT (0.999)
117 #define SCS_C1_DEFAULT (1.0-1E-4)
118 #define SCS_SSE_DEFAULT (1.0-1E-3)
119 
120  /* Line-search defaults */
121 #define SCS_LS_DEFAULT (10)
122 #define SCS_BETA_DEFAULT (0.5)
123 #define SCS_SIGMA_DEFAULT (1E-2)
124 
125  /* Direction Defaults */
126 #define SCS_DIRECTION_DEFAULT (anderson_acceleration)
127 #define SCS_TRULE_DEFAULT (3)
128 #define SCS_THETABAR_DEFAULT (1E-1)
129 #define SCS_ALPHAC_DEFAULT (1E-2)
130 #define SCS_MEMORY_DEFAULT (5)
131 #define SCS_SC_INIT_DEFAULT (0)
132 #define SCS_BROYDEN_ISCS_SCALE_DEFAULT (1)
133 #define SCS_OVERRIDE_STREAMS_DEFAULT (0)
134 
135  /* Other */
136 #define SCS_OUT_STREAM_DEFAULT (stdout)
137 
140 #define SCS_PMAXITER_DEFAULT (-1)
141 #ifdef __cplusplus
142 }
143 #endif
144 #endif