1 /* Siconos is a program dedicated to modeling, simulation and control
2  * of non smooth dynamical systems.
3  *
4  * Copyright 2021 INRIA.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17 */
18 
19 #ifndef LCP_CST_H
20 #define LCP_CST_H
21 /*!\file lcp_cst.h
22   \brief Constants to define the list of available LCP solvers.
23 
24   \rst Check the detailed documentation in :ref:`lcp_solvers`. \endrst
25 */
26 
27 /**\enum LCP_SOLVER
28    Each SICONOS_LCP_XXX refers to number of the solver XXX for LCP.
29  */
30 enum LCP_SOLVER
31 {
32   SICONOS_LCP_LEMKE = 200,
33   SICONOS_LCP_NSGS_SBM = 201,
34   SICONOS_LCP_PGS = 202,
35   SICONOS_LCP_CPG = 203,
36   SICONOS_LCP_LATIN = 204,
37   SICONOS_LCP_LATIN_W = 205,
38   SICONOS_LCP_QP = 206,
39   SICONOS_LCP_NSQP = 207,
40   SICONOS_LCP_NEWTONMIN = 208,
41   SICONOS_LCP_NEWTON_FB_FBLSA = 209,
42   SICONOS_LCP_PSOR = 210,
43   SICONOS_LCP_RPGS = 211,
44   SICONOS_LCP_PATH = 212,
45   SICONOS_LCP_ENUM = 213,
46   SICONOS_LCP_AVI_CAOFERRIS = 214,
47   SICONOS_LCP_PIVOT = 215,
48   SICONOS_LCP_BARD = 216,
49   SICONOS_LCP_MURTY = 217,
50   SICONOS_LCP_NEWTON_MIN_FBLSA = 218,
51   SICONOS_LCP_PATHSEARCH = 219,
52   SICONOS_LCP_PIVOT_LUMOD = 220,
53   SICONOS_LCP_GAMS = 221,
54   SICONOS_LCP_CONVEXQP_PG = 222
55 };
56 
57 
58 enum SICONOS_LCP_IPARAM
59   {
60    /** index in iparam to store the sum of local solver iterations number */
61    SICONOS_LCP_IPARAM_NSGS_ITERATIONS_SUM =4,
62    /** index in iparam to store type of pivoting methods */
63    SICONOS_LCP_IPARAM_PIVOTING_METHOD_TYPE =5,
64    /** index in iparam to skip trivial solution */
65    SICONOS_LCP_IPARAM_SKIP_TRIVIAL =6,
66    /** index in iparam to store the number of solutions */
67    SICONOS_LCP_IPARAM_ENUM_NUMBER_OF_SOLUTIONS =7,
68   /** index in iparam to store  the current enum */
69    SICONOS_LCP_IPARAM_ENUM_CURRENT_ENUM =8,
70    /** index in iparam to store the seed for starting enum*/
71    SICONOS_LCP_IPARAM_ENUM_SEED =9,
72    /** index in iparam to store the first seed for enum */
73    SICONOS_LCP_IPARAM_ENUM_USE_DGELS =10,
74    /** index in iparam to store to activate multiple solutions search */
75    SICONOS_LCP_IPARAM_ENUM_MULTIPLE_SOLUTIONS =11,
76    /** **/
77 
78   };
79 
80 enum SICONOS_LCP_DPARAM
81 {
82   /** index in dparam to store to the relaxation or regularization parameter */
83   SICONOS_LCP_DPARAM_RHO =3,
84   /** index in dparam to store the sum of local error values */
85   SICONOS_LCP_DPARAM_NSGS_LOCAL_ERROR_SUM =4,
86   /** index in dparam to store the latin parameter */
87   SICONOS_LCP_DPARAM_LATIN_PARAMETER =12
88 };
89 
90 enum SICONOS_LCP_SKIP_TRIVIAL
91 {
92   SICONOS_LCP_SKIP_TRIVIAL_NO=0,
93   SICONOS_LCP_SKIP_TRIVIAL_YES=1
94 };
95 
96 
97 /** Allowed values for iparam[SICONOS_LCP_IPARAM_PIVOTING_METHOD_TYPE] */
98 enum SICONOS_LCP_PIVOT_TYPE
99 {
100   SICONOS_LCP_PIVOT_BARD = 1,
101   SICONOS_LCP_PIVOT_LEAST_INDEX = 2,
102   SICONOS_LCP_PIVOT_LEMKE = 3,
103   SICONOS_LCP_PIVOT_PATHSEARCH = 4
104 };
105 
106 extern const char* const   SICONOS_LCP_LEMKE_STR;
107 extern const char* const   SICONOS_LCP_NSGS_SBM_STR;
108 extern const char* const   SICONOS_LCP_PGS_STR;
109 extern const char* const   SICONOS_LCP_CPG_STR;
110 extern const char* const   SICONOS_LCP_LATIN_STR;
111 extern const char* const   SICONOS_LCP_LATIN_W_STR;
112 extern const char* const   SICONOS_LCP_QP_STR;
113 extern const char* const   SICONOS_LCP_NSQP_STR;
114 extern const char* const   SICONOS_LCP_NEWTONMIN_STR;
115 extern const char* const   SICONOS_LCP_NEWTON_FB_FBLSA_STR;
116 extern const char* const   SICONOS_LCP_NEWTON_MIN_FBLSA_STR;
117 extern const char* const   SICONOS_LCP_PSOR_STR;
118 extern const char* const   SICONOS_LCP_RPGS_STR;
119 extern const char* const   SICONOS_LCP_PATH_STR;
120 extern const char* const   SICONOS_LCP_ENUM_STR;
121 extern const char* const   SICONOS_LCP_AVI_CAOFERRIS_STR;
122 extern const char* const   SICONOS_LCP_PIVOT_STR;
123 extern const char* const   SICONOS_LCP_BARD_STR;
124 extern const char* const   SICONOS_LCP_MURTY_STR;
125 extern const char* const   SICONOS_LCP_PATHSEARCH_STR;
126 extern const char* const   SICONOS_LCP_PIVOT_LUMOD_STR;
127 extern const char* const   SICONOS_LCP_GAMS_STR;
128 extern const char* const   SICONOS_LCP_CONVEXQP_PG_STR;
129 #endif
130