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 VI_CST_H 20 #define VI_CST_H 21 /*!\file VI_cst.h 22 \brief Enum and constants relative to Variational Inequality problems and solvers. 23 */ 24 25 /** \enum VI_SOLVER 26 Available ids for VI solvers. 27 */ 28 enum VI_SOLVER 29 { 30 SICONOS_VI_EG = 1000, 31 SICONOS_VI_FPP = 1001, 32 SICONOS_VI_HP = 1002, 33 SICONOS_VI_BOX_QI = 1020, 34 SICONOS_VI_BOX_AVI_LSA = 1021, 35 SICONOS_VI_BOX_PATH = 1022 36 }; 37 38 enum SICONOS_VI_IPARAM 39 { 40 SICONOS_VI_IPARAM_DECREASE_RHO = 3, 41 /** index in iparam to store the linesearch method */ 42 SICONOS_VI_IPARAM_LINESEARCH_METHOD = 6, 43 /** index in iparam to store the error evaluation method */ 44 SICONOS_VI_IPARAM_ERROR_EVALUATION = 7, 45 /** index in iparam to store the frequency of error evaluation method */ 46 SICONOS_VI_IPARAM_ERROR_EVALUATION_FREQUENCY = 8, 47 /** index for max number of iterations allowed in line search*/ 48 SICONOS_VI_IPARAM_LS_MAX_ITER = 9, 49 /** activate the update in the loop (0:false default choice) */ 50 SICONOS_VI_IPARAM_ACTIVATE_UPDATE = 10, 51 }; 52 53 /** \enum allowed values for iparam[SICONOS_VI_IPARAM_LINESEARCH_METHOD] 54 */ 55 enum SICONOS_VI_LINESEARCH_METHOD 56 { 57 /** : Armijo rule with Khotbotov ratio (default) */ 58 SICONOS_VI_LS_ARMIJO = 0, 59 /** : Armijo rule with Solodov.Tseng ratio */ 60 SICONOS_VI_LS_SOLODOV = 1, 61 /** Armijo rule with Han.Sun ratio */ 62 SICONOS_VI_LS_HANSUN = 2, 63 }; 64 65 enum SICONOS_VI_DPARAM 66 { 67 /** index in dparam to store the initial value of rho */ 68 SICONOS_VI_DPARAM_RHO = 3, 69 /** index in dparam to store the tau coeff of line-search */ 70 SICONOS_VI_DPARAM_LS_TAU = 4, 71 /** index in dparam to store the tauinv coeff of line-search */ 72 SICONOS_VI_DPARAM_LS_TAUINV = 5, 73 /** index in dparam to store the L coeff of line-search */ 74 SICONOS_VI_DPARAM_LS_L = 6, 75 /** index in dparam to store the LMIN coeff of line-search */ 76 SICONOS_VI_DPARAM_LS_LMIN = 7, 77 /** index in dparam to store the sigma coeff (HP) */ 78 SICONOS_VI_DPARAM_SIGMA = 8, 79 }; 80 81 82 83 /** \enum allowed values for iparam[SICONOS_VI_IPARAM_ERROR_EVALUATION] 84 */ 85 enum SICONOS_VI_ERROR_EVALUATION_ENUM 86 { 87 SICONOS_VI_ERROR_EVALUATION_FULL = 0, 88 SICONOS_VI_ERROR_EVALUATION_LIGHT_WITH_FULL_FINAL = 1, 89 SICONOS_VI_ERROR_EVALUATION_LIGHT = 2, 90 SICONOS_VI_ERROR_EVALUATION_ADAPTIVE =3, 91 }; 92 93 94 95 extern const char* const SICONOS_VI_EG_STR ; 96 extern const char* const SICONOS_VI_FPP_STR ; 97 extern const char* const SICONOS_VI_HP_STR ; 98 extern const char* const SICONOS_VI_BOX_QI_STR ; 99 extern const char* const SICONOS_VI_BOX_AVI_LSA_STR ; 100 extern const char* const SICONOS_VI_BOX_PATH_STR ; 101 102 #endif 103