1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB) */ 7 /* */ 8 /* Licensed under the Apache License, Version 2.0 (the "License"); */ 9 /* you may not use this file except in compliance with the License. */ 10 /* You may obtain a copy of the License at */ 11 /* */ 12 /* http://www.apache.org/licenses/LICENSE-2.0 */ 13 /* */ 14 /* Unless required by applicable law or agreed to in writing, software */ 15 /* distributed under the License is distributed on an "AS IS" BASIS, */ 16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 17 /* See the License for the specific language governing permissions and */ 18 /* limitations under the License. */ 19 /* */ 20 /* You should have received a copy of the Apache-2.0 license */ 21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */ 22 /* */ 23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 24 25 /**@file pub_presol.h 26 * @ingroup PUBLICCOREAPI 27 * @brief public methods for presolvers 28 * @author Tobias Achterberg 29 */ 30 31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 32 33 #ifndef __SCIP_PUB_PRESOL_H__ 34 #define __SCIP_PUB_PRESOL_H__ 35 36 #include "scip/def.h" 37 #include "scip/type_misc.h" 38 #include "scip/type_presol.h" 39 #include "scip/type_timing.h" 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 /**@addtogroup PublicPresolverMethods 46 * 47 * @{ 48 */ 49 50 /** compares two presolvers w. r. to their priority */ 51 SCIP_EXPORT 52 SCIP_DECL_SORTPTRCOMP(SCIPpresolComp); 53 54 /** comparison method for sorting presolvers w.r.t. to their name */ 55 SCIP_EXPORT 56 SCIP_DECL_SORTPTRCOMP(SCIPpresolCompName); 57 58 /** gets user data of presolver */ 59 SCIP_EXPORT 60 SCIP_PRESOLDATA* SCIPpresolGetData( 61 SCIP_PRESOL* presol /**< presolver */ 62 ); 63 64 /** sets user data of presolver; user has to free old data in advance! */ 65 SCIP_EXPORT 66 void SCIPpresolSetData( 67 SCIP_PRESOL* presol, /**< presolver */ 68 SCIP_PRESOLDATA* presoldata /**< new presolver user data */ 69 ); 70 71 /** gets name of presolver */ 72 SCIP_EXPORT 73 const char* SCIPpresolGetName( 74 SCIP_PRESOL* presol /**< presolver */ 75 ); 76 77 /** gets description of presolver */ 78 SCIP_EXPORT 79 const char* SCIPpresolGetDesc( 80 SCIP_PRESOL* presol /**< presolver */ 81 ); 82 83 /** gets priority of presolver */ 84 SCIP_EXPORT 85 int SCIPpresolGetPriority( 86 SCIP_PRESOL* presol /**< presolver */ 87 ); 88 89 /** gets round limit of presolver */ 90 SCIP_EXPORT 91 int SCIPpresolGetMaxrounds( 92 SCIP_PRESOL* presol /**< presolver */ 93 ); 94 95 /** gets the timing mask of the presolver */ 96 SCIP_EXPORT 97 SCIP_PRESOLTIMING SCIPpresolGetTiming( 98 SCIP_PRESOL* presol /**< presolver */ 99 ); 100 101 /** sets the timing mask of the presolver */ 102 SCIP_EXPORT 103 void SCIPpresolSetTiming( 104 SCIP_PRESOL* presol, /**< presolver */ 105 SCIP_PRESOLTIMING timing /**< timing mask of the presolver */ 106 ); 107 108 /** is presolver initialized? */ 109 SCIP_EXPORT 110 SCIP_Bool SCIPpresolIsInitialized( 111 SCIP_PRESOL* presol /**< presolver */ 112 ); 113 114 /** gets time in seconds used in this presolver for setting up for next stages */ 115 SCIP_EXPORT 116 SCIP_Real SCIPpresolGetSetupTime( 117 SCIP_PRESOL* presol /**< presolver */ 118 ); 119 120 /** gets time in seconds used in this presolver */ 121 SCIP_EXPORT 122 SCIP_Real SCIPpresolGetTime( 123 SCIP_PRESOL* presol /**< presolver */ 124 ); 125 126 /** gets number of variables fixed in presolver */ 127 SCIP_EXPORT 128 int SCIPpresolGetNFixedVars( 129 SCIP_PRESOL* presol /**< presolver */ 130 ); 131 132 /** gets number of variables aggregated in presolver */ 133 SCIP_EXPORT 134 int SCIPpresolGetNAggrVars( 135 SCIP_PRESOL* presol /**< presolver */ 136 ); 137 138 /** gets number of variable types changed in presolver */ 139 SCIP_EXPORT 140 int SCIPpresolGetNChgVarTypes( 141 SCIP_PRESOL* presol /**< presolver */ 142 ); 143 144 /** gets number of bounds changed in presolver */ 145 SCIP_EXPORT 146 int SCIPpresolGetNChgBds( 147 SCIP_PRESOL* presol /**< presolver */ 148 ); 149 150 /** gets number of holes added to domains of variables in presolver */ 151 SCIP_EXPORT 152 int SCIPpresolGetNAddHoles( 153 SCIP_PRESOL* presol /**< presolver */ 154 ); 155 156 /** gets number of constraints deleted in presolver */ 157 SCIP_EXPORT 158 int SCIPpresolGetNDelConss( 159 SCIP_PRESOL* presol /**< presolver */ 160 ); 161 162 /** gets number of constraints added in presolver */ 163 SCIP_EXPORT 164 int SCIPpresolGetNAddConss( 165 SCIP_PRESOL* presol /**< presolver */ 166 ); 167 168 /** gets number of constraints upgraded in presolver */ 169 SCIP_EXPORT 170 int SCIPpresolGetNUpgdConss( 171 SCIP_PRESOL* presol /**< presolver */ 172 ); 173 174 /** gets number of coefficients changed in presolver */ 175 SCIP_EXPORT 176 int SCIPpresolGetNChgCoefs( 177 SCIP_PRESOL* presol /**< presolver */ 178 ); 179 180 /** gets number of constraint sides changed in presolver */ 181 SCIP_EXPORT 182 int SCIPpresolGetNChgSides( 183 SCIP_PRESOL* presol /**< presolver */ 184 ); 185 186 /** gets number of times the presolver was called and tried to find reductions */ 187 SCIP_EXPORT 188 int SCIPpresolGetNCalls( 189 SCIP_PRESOL* presol /**< presolver */ 190 ); 191 192 /** @} */ 193 194 #ifdef __cplusplus 195 } 196 #endif 197 198 #endif 199