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 set.h 26 * @ingroup INTERNALAPI 27 * @brief internal methods for global SCIP settings 28 * @author Tobias Achterberg 29 * @author Timo Berthold 30 */ 31 32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 33 34 #ifndef __SCIP_SET_H__ 35 #define __SCIP_SET_H__ 36 37 38 #include "scip/def.h" 39 #include "blockmemshell/memory.h" 40 #include "scip/type_bandit.h" 41 #include "scip/type_set.h" 42 #include "scip/type_stat.h" 43 #include "scip/type_clock.h" 44 #include "scip/type_paramset.h" 45 #include "scip/type_event.h" 46 #include "scip/type_scip.h" 47 #include "scip/type_branch.h" 48 #include "scip/type_conflict.h" 49 #include "scip/type_cons.h" 50 #include "scip/type_disp.h" 51 #include "scip/type_heur.h" 52 #include "scip/type_compr.h" 53 #include "scip/type_nodesel.h" 54 #include "scip/type_presol.h" 55 #include "scip/type_pricer.h" 56 #include "scip/type_reader.h" 57 #include "scip/type_relax.h" 58 #include "scip/type_sepa.h" 59 #include "scip/type_table.h" 60 #include "scip/type_prop.h" 61 #include "scip/type_benders.h" 62 #include "scip/struct_set.h" 63 64 65 #ifdef NDEBUG 66 #include "scip/pub_misc.h" 67 #endif 68 69 #ifdef __cplusplus 70 extern "C" { 71 #endif 72 73 /** copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints 74 * cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the 75 * copied SCIP instance might not represent the same problem semantics as the original. 76 * Note that in this case dual reductions might be invalid. */ 77 SCIP_RETCODE SCIPsetCopyPlugins( 78 SCIP_SET* sourceset, /**< source SCIP_SET data structure */ 79 SCIP_SET* targetset, /**< target SCIP_SET data structure */ 80 SCIP_Bool copyreaders, /**< should the file readers be copied */ 81 SCIP_Bool copypricers, /**< should the variable pricers be copied */ 82 SCIP_Bool copyconshdlrs, /**< should the constraint handlers be copied */ 83 SCIP_Bool copyconflicthdlrs, /**< should the conflict handlers be copied */ 84 SCIP_Bool copypresolvers, /**< should the presolvers be copied */ 85 SCIP_Bool copyrelaxators, /**< should the relaxators be copied */ 86 SCIP_Bool copyseparators, /**< should the separators be copied */ 87 SCIP_Bool copycutselectors, /**< should the cut selectors be copied */ 88 SCIP_Bool copypropagators, /**< should the propagators be copied */ 89 SCIP_Bool copyheuristics, /**< should the heuristics be copied */ 90 SCIP_Bool copyeventhdlrs, /**< should the event handlers be copied */ 91 SCIP_Bool copynodeselectors, /**< should the node selectors be copied */ 92 SCIP_Bool copybranchrules, /**< should the branchrules be copied */ 93 SCIP_Bool copydisplays, /**< should the display columns be copied */ 94 SCIP_Bool copydialogs, /**< should the dialogs be copied */ 95 SCIP_Bool copytables, /**< should the statistics tables be copied */ 96 SCIP_Bool copyexprhdlrs, /**< should the expression handlers be copied */ 97 SCIP_Bool copynlpis, /**< should the NLP interfaces be copied */ 98 SCIP_Bool* allvalid /**< pointer to store whether all plugins were validly copied */ 99 ); 100 101 /** copies parameters from sourcescip to targetscip */ 102 SCIP_RETCODE SCIPsetCopyParams( 103 SCIP_SET* sourceset, /**< source SCIP_SET data structure */ 104 SCIP_SET* targetset, /**< target SCIP_SET data structure */ 105 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */ 106 ); 107 108 /** creates global SCIP settings */ 109 SCIP_RETCODE SCIPsetCreate( 110 SCIP_SET** set, /**< pointer to SCIP settings */ 111 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 112 BMS_BLKMEM* blkmem, /**< block memory */ 113 SCIP* scip /**< SCIP data structure */ 114 ); 115 116 /** frees global SCIP settings */ 117 SCIP_RETCODE SCIPsetFree( 118 SCIP_SET** set, /**< pointer to SCIP settings */ 119 BMS_BLKMEM* blkmem /**< block memory */ 120 ); 121 122 /** returns current stage of SCIP */ 123 SCIP_STAGE SCIPsetGetStage( 124 SCIP_SET* set /**< pointer to SCIP settings */ 125 ); 126 127 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */ 128 SCIP_RETCODE SCIPsetAddBoolParam( 129 SCIP_SET* set, /**< global SCIP settings */ 130 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 131 BMS_BLKMEM* blkmem, /**< block memory */ 132 const char* name, /**< name of the parameter */ 133 const char* desc, /**< description of the parameter */ 134 SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */ 135 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 136 SCIP_Bool defaultvalue, /**< default value of the parameter */ 137 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 138 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 139 ); 140 141 /** creates a int parameter, sets it to its default value, and adds it to the parameter set */ 142 SCIP_RETCODE SCIPsetAddIntParam( 143 SCIP_SET* set, /**< global SCIP settings */ 144 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 145 BMS_BLKMEM* blkmem, /**< block memory */ 146 const char* name, /**< name of the parameter */ 147 const char* desc, /**< description of the parameter */ 148 int* valueptr, /**< pointer to store the current parameter value, or NULL */ 149 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 150 int defaultvalue, /**< default value of the parameter */ 151 int minvalue, /**< minimum value for parameter */ 152 int maxvalue, /**< maximum value for parameter */ 153 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 154 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 155 ); 156 157 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */ 158 SCIP_RETCODE SCIPsetAddLongintParam( 159 SCIP_SET* set, /**< global SCIP settings */ 160 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 161 BMS_BLKMEM* blkmem, /**< block memory */ 162 const char* name, /**< name of the parameter */ 163 const char* desc, /**< description of the parameter */ 164 SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */ 165 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 166 SCIP_Longint defaultvalue, /**< default value of the parameter */ 167 SCIP_Longint minvalue, /**< minimum value for parameter */ 168 SCIP_Longint maxvalue, /**< maximum value for parameter */ 169 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 170 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 171 ); 172 173 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */ 174 SCIP_RETCODE SCIPsetAddRealParam( 175 SCIP_SET* set, /**< global SCIP settings */ 176 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 177 BMS_BLKMEM* blkmem, /**< block memory */ 178 const char* name, /**< name of the parameter */ 179 const char* desc, /**< description of the parameter */ 180 SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */ 181 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 182 SCIP_Real defaultvalue, /**< default value of the parameter */ 183 SCIP_Real minvalue, /**< minimum value for parameter */ 184 SCIP_Real maxvalue, /**< maximum value for parameter */ 185 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 186 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 187 ); 188 189 /** creates a char parameter, sets it to its default value, and adds it to the parameter set */ 190 SCIP_RETCODE SCIPsetAddCharParam( 191 SCIP_SET* set, /**< global SCIP settings */ 192 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 193 BMS_BLKMEM* blkmem, /**< block memory */ 194 const char* name, /**< name of the parameter */ 195 const char* desc, /**< description of the parameter */ 196 char* valueptr, /**< pointer to store the current parameter value, or NULL */ 197 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 198 char defaultvalue, /**< default value of the parameter */ 199 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */ 200 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 201 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 202 ); 203 204 /** creates a string parameter, sets it to its default value, and adds it to the parameter set */ 205 SCIP_RETCODE SCIPsetAddStringParam( 206 SCIP_SET* set, /**< global SCIP settings */ 207 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 208 BMS_BLKMEM* blkmem, /**< block memory */ 209 const char* name, /**< name of the parameter */ 210 const char* desc, /**< description of the parameter */ 211 char** valueptr, /**< pointer to store the current parameter value, or NULL */ 212 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 213 const char* defaultvalue, /**< default value of the parameter */ 214 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 215 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 216 ); 217 218 /** gets the fixing status value of an existing parameter */ 219 SCIP_Bool SCIPsetIsParamFixed( 220 SCIP_SET* set, /**< global SCIP settings */ 221 const char* name /**< name of the parameter */ 222 ); 223 224 /** returns the pointer to the SCIP parameter with the given name */ 225 SCIP_PARAM* SCIPsetGetParam( 226 SCIP_SET* set, /**< global SCIP settings */ 227 const char* name /**< name of the parameter */ 228 ); 229 230 /** gets the value of an existing SCIP_Bool parameter */ 231 SCIP_RETCODE SCIPsetGetBoolParam( 232 SCIP_SET* set, /**< global SCIP settings */ 233 const char* name, /**< name of the parameter */ 234 SCIP_Bool* value /**< pointer to store the parameter */ 235 ); 236 237 /** gets the value of an existing Int parameter */ 238 SCIP_RETCODE SCIPsetGetIntParam( 239 SCIP_SET* set, /**< global SCIP settings */ 240 const char* name, /**< name of the parameter */ 241 int* value /**< pointer to store the parameter */ 242 ); 243 244 /** gets the value of an existing SCIP_Longint parameter */ 245 SCIP_RETCODE SCIPsetGetLongintParam( 246 SCIP_SET* set, /**< global SCIP settings */ 247 const char* name, /**< name of the parameter */ 248 SCIP_Longint* value /**< pointer to store the parameter */ 249 ); 250 251 /** gets the value of an existing SCIP_Real parameter */ 252 SCIP_RETCODE SCIPsetGetRealParam( 253 SCIP_SET* set, /**< global SCIP settings */ 254 const char* name, /**< name of the parameter */ 255 SCIP_Real* value /**< pointer to store the parameter */ 256 ); 257 258 /** gets the value of an existing Char parameter */ 259 SCIP_RETCODE SCIPsetGetCharParam( 260 SCIP_SET* set, /**< global SCIP settings */ 261 const char* name, /**< name of the parameter */ 262 char* value /**< pointer to store the parameter */ 263 ); 264 265 /** gets the value of an existing String parameter */ 266 SCIP_RETCODE SCIPsetGetStringParam( 267 SCIP_SET* set, /**< global SCIP settings */ 268 const char* name, /**< name of the parameter */ 269 char** value /**< pointer to store the parameter */ 270 ); 271 272 /** changes the fixing status of an existing parameter */ 273 SCIP_RETCODE SCIPsetChgParamFixed( 274 SCIP_SET* set, /**< global SCIP settings */ 275 const char* name, /**< name of the parameter */ 276 SCIP_Bool fixed /**< new fixing status of the parameter */ 277 ); 278 279 /** changes the value of an existing SCIP_Bool parameter */ 280 SCIP_RETCODE SCIPsetChgBoolParam( 281 SCIP_SET* set, /**< global SCIP settings */ 282 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 283 SCIP_PARAM* param, /**< parameter */ 284 SCIP_Bool value /**< new value of the parameter */ 285 ); 286 287 /** changes the value of an existing SCIP_Bool parameter */ 288 SCIP_RETCODE SCIPsetSetBoolParam( 289 SCIP_SET* set, /**< global SCIP settings */ 290 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 291 const char* name, /**< name of the parameter */ 292 SCIP_Bool value /**< new value of the parameter */ 293 ); 294 295 /** changes the default value of an existing SCIP_Bool parameter */ 296 SCIP_RETCODE SCIPsetSetDefaultBoolParam( 297 SCIP_SET* set, /**< global SCIP settings */ 298 const char* name, /**< name of the parameter */ 299 SCIP_Bool defaultvalue /**< new default value of the parameter */ 300 ); 301 302 /** changes the value of an existing Int parameter */ 303 SCIP_RETCODE SCIPsetChgIntParam( 304 SCIP_SET* set, /**< global SCIP settings */ 305 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 306 SCIP_PARAM* param, /**< parameter */ 307 int value /**< new value of the parameter */ 308 ); 309 310 /** changes the value of an existing Int parameter */ 311 SCIP_RETCODE SCIPsetSetIntParam( 312 SCIP_SET* set, /**< global SCIP settings */ 313 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 314 const char* name, /**< name of the parameter */ 315 int value /**< new value of the parameter */ 316 ); 317 318 /** changes the default value of an existing Int parameter */ 319 SCIP_RETCODE SCIPsetSetDefaultIntParam( 320 SCIP_SET* set, /**< global SCIP settings */ 321 const char* name, /**< name of the parameter */ 322 int defaultvalue /**< new default value of the parameter */ 323 ); 324 325 /** changes the value of an existing SCIP_Longint parameter */ 326 SCIP_RETCODE SCIPsetChgLongintParam( 327 SCIP_SET* set, /**< global SCIP settings */ 328 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 329 SCIP_PARAM* param, /**< parameter */ 330 SCIP_Longint value /**< new value of the parameter */ 331 ); 332 333 /** changes the value of an existing SCIP_Longint parameter */ 334 SCIP_RETCODE SCIPsetSetLongintParam( 335 SCIP_SET* set, /**< global SCIP settings */ 336 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 337 const char* name, /**< name of the parameter */ 338 SCIP_Longint value /**< new value of the parameter */ 339 ); 340 341 /** changes the value of an existing SCIP_Real parameter */ 342 SCIP_RETCODE SCIPsetChgRealParam( 343 SCIP_SET* set, /**< global SCIP settings */ 344 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 345 SCIP_PARAM* param, /**< parameter */ 346 SCIP_Real value /**< new value of the parameter */ 347 ); 348 349 /** changes the value of an existing SCIP_Real parameter */ 350 SCIP_RETCODE SCIPsetSetRealParam( 351 SCIP_SET* set, /**< global SCIP settings */ 352 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 353 const char* name, /**< name of the parameter */ 354 SCIP_Real value /**< new value of the parameter */ 355 ); 356 357 /** changes the value of an existing Char parameter */ 358 SCIP_RETCODE SCIPsetChgCharParam( 359 SCIP_SET* set, /**< global SCIP settings */ 360 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 361 SCIP_PARAM* param, /**< parameter */ 362 char value /**< new value of the parameter */ 363 ); 364 365 /** changes the value of an existing Char parameter */ 366 SCIP_RETCODE SCIPsetSetCharParam( 367 SCIP_SET* set, /**< global SCIP settings */ 368 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 369 const char* name, /**< name of the parameter */ 370 char value /**< new value of the parameter */ 371 ); 372 373 /** changes the value of an existing String parameter */ 374 SCIP_RETCODE SCIPsetChgStringParam( 375 SCIP_SET* set, /**< global SCIP settings */ 376 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 377 SCIP_PARAM* param, /**< parameter */ 378 const char* value /**< new value of the parameter */ 379 ); 380 381 /** changes the value of an existing String parameter */ 382 SCIP_RETCODE SCIPsetSetStringParam( 383 SCIP_SET* set, /**< global SCIP settings */ 384 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 385 const char* name, /**< name of the parameter */ 386 const char* value /**< new value of the parameter */ 387 ); 388 389 /** changes the value of an existing parameter */ 390 SCIP_RETCODE SCIPsetSetParam( 391 SCIP_SET* set, /**< global SCIP settings */ 392 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 393 const char* name, /**< name of the parameter */ 394 const char* value /**< new value of the parameter as string */ 395 ); 396 397 /** reads parameters from a file */ 398 SCIP_RETCODE SCIPsetReadParams( 399 SCIP_SET* set, /**< global SCIP settings */ 400 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 401 const char* filename /**< file name */ 402 ); 403 404 /** writes all parameters in the parameter set to a file */ 405 SCIP_RETCODE SCIPsetWriteParams( 406 SCIP_SET* set, /**< global SCIP settings */ 407 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 408 const char* filename, /**< file name, or NULL for stdout */ 409 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */ 410 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */ 411 ); 412 413 /** resets a single parameters to its default value */ 414 SCIP_RETCODE SCIPsetResetParam( 415 SCIP_SET* set, /**< global SCIP settings */ 416 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 417 const char* name /**< name of the parameter */ 418 ); 419 420 /** resets all parameters to their default values */ 421 SCIP_RETCODE SCIPsetResetParams( 422 SCIP_SET* set, /**< global SCIP settings */ 423 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */ 424 ); 425 426 /** sets parameters to 427 * 428 * - \ref SCIP_PARAMEMPHASIS_DEFAULT to use default values (see also SCIPsetResetParams()) 429 * - \ref SCIP_PARAMEMPHASIS_COUNTER to get feasible and "fast" counting process 430 * - \ref SCIP_PARAMEMPHASIS_CPSOLVER to get CP like search (e.g. no LP relaxation) 431 * - \ref SCIP_PARAMEMPHASIS_EASYCIP to solve easy problems fast 432 * - \ref SCIP_PARAMEMPHASIS_FEASIBILITY to detect feasibility fast 433 * - \ref SCIP_PARAMEMPHASIS_HARDLP to be capable to handle hard LPs 434 * - \ref SCIP_PARAMEMPHASIS_OPTIMALITY to prove optimality fast 435 * - \ref SCIP_PARAMEMPHASIS_PHASEFEAS to find feasible solutions during a 3 phase solution process 436 * - \ref SCIP_PARAMEMPHASIS_PHASEIMPROVE to find improved solutions during a 3 phase solution process 437 * - \ref SCIP_PARAMEMPHASIS_PHASEPROOF to proof optimality during a 3 phase solution process 438 */ 439 SCIP_RETCODE SCIPsetSetEmphasis( 440 SCIP_SET* set, /**< global SCIP settings */ 441 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 442 SCIP_PARAMEMPHASIS paramemphasis, /**< parameter settings */ 443 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 444 ); 445 446 /** set parameters for reoptimization */ 447 SCIP_RETCODE SCIPsetSetReoptimizationParams( 448 SCIP_SET* set, /**< SCIP data structure */ 449 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */ 450 ); 451 452 /** enable or disable all plugin timers depending on the value of the flag \p enabled */ 453 void SCIPsetEnableOrDisablePluginClocks( 454 SCIP_SET* set, /**< SCIP settings */ 455 SCIP_Bool enabled /**< should plugin clocks be enabled? */ 456 ); 457 458 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for 459 * auxiliary SCIP instances to avoid recursion 460 */ 461 SCIP_RETCODE SCIPsetSetSubscipsOff( 462 SCIP_SET* set, /**< global SCIP settings */ 463 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 464 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 465 ); 466 467 /** sets heuristic parameters values to 468 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters 469 * - SCIP_PARAMSETTING_FAST such that the time spend for heuristic is decreased 470 * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristic are called more aggregative 471 * - SCIP_PARAMSETTING_OFF which turn off all heuristics 472 */ 473 SCIP_RETCODE SCIPsetSetHeuristics( 474 SCIP_SET* set, /**< global SCIP settings */ 475 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 476 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 477 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 478 ); 479 480 /** sets presolving parameters to 481 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters 482 * - SCIP_PARAMSETTING_FAST such that the time spend for presolving is decreased 483 * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggregative 484 * - SCIP_PARAMSETTING_OFF which turn off all presolving 485 */ 486 SCIP_RETCODE SCIPsetSetPresolving( 487 SCIP_SET* set, /**< global SCIP settings */ 488 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 489 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 490 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 491 ); 492 493 /** sets separating parameters to 494 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters 495 * - SCIP_PARAMSETTING_FAST such that the time spend for separating is decreased 496 * - SCIP_PARAMSETTING_AGGRESSIVE such that the separating is done more aggregative 497 * - SCIP_PARAMSETTING_OFF which turn off all separating 498 */ 499 SCIP_RETCODE SCIPsetSetSeparating( 500 SCIP_SET* set, /**< global SCIP settings */ 501 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */ 502 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 503 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 504 ); 505 506 /** returns the array of all available SCIP parameters */ 507 SCIP_PARAM** SCIPsetGetParams( 508 SCIP_SET* set /**< global SCIP settings */ 509 ); 510 511 /** returns the total number of all available SCIP parameters */ 512 int SCIPsetGetNParams( 513 SCIP_SET* set /**< global SCIP settings */ 514 ); 515 516 /** inserts file reader in file reader list */ 517 SCIP_RETCODE SCIPsetIncludeReader( 518 SCIP_SET* set, /**< global SCIP settings */ 519 SCIP_READER* reader /**< file reader */ 520 ); 521 522 /** returns the file reader of the given name, or NULL if not existing */ 523 SCIP_READER* SCIPsetFindReader( 524 SCIP_SET* set, /**< global SCIP settings */ 525 const char* name /**< name of file reader */ 526 ); 527 528 /** inserts variable pricer in variable pricer list */ 529 SCIP_RETCODE SCIPsetIncludePricer( 530 SCIP_SET* set, /**< global SCIP settings */ 531 SCIP_PRICER* pricer /**< variable pricer */ 532 ); 533 534 /** returns the variable pricer of the given name, or NULL if not existing */ 535 SCIP_PRICER* SCIPsetFindPricer( 536 SCIP_SET* set, /**< global SCIP settings */ 537 const char* name /**< name of variable pricer */ 538 ); 539 540 /** sorts pricers by priorities */ 541 void SCIPsetSortPricers( 542 SCIP_SET* set /**< global SCIP settings */ 543 ); 544 545 /** sorts pricers by name */ 546 void SCIPsetSortPricersName( 547 SCIP_SET* set /**< global SCIP settings */ 548 ); 549 550 /** inserts Benders' decomposition into the Benders' decomposition list */ 551 SCIP_RETCODE SCIPsetIncludeBenders( 552 SCIP_SET* set, /**< global SCIP settings */ 553 SCIP_BENDERS* benders /**< Benders' decomposition */ 554 ); 555 556 /** returns the Benders' decomposition of the given name, or NULL if not existing */ 557 SCIP_BENDERS* SCIPsetFindBenders( 558 SCIP_SET* set, /**< global SCIP settings */ 559 const char* name /**< name of Benders' decomposition */ 560 ); 561 562 /** sorts Benders' decomposition by priorities */ 563 void SCIPsetSortBenders( 564 SCIP_SET* set /**< global SCIP settings */ 565 ); 566 567 /** sorts Benders' decomposition by name */ 568 void SCIPsetSortBendersName( 569 SCIP_SET* set /**< global SCIP settings */ 570 ); 571 572 /** inserts constraint handler in constraint handler list */ 573 SCIP_RETCODE SCIPsetIncludeConshdlr( 574 SCIP_SET* set, /**< global SCIP settings */ 575 SCIP_CONSHDLR* conshdlr /**< constraint handler */ 576 ); 577 578 /** reinserts a constraint handler with modified sepa priority into the sepa priority sorted array */ 579 void SCIPsetReinsertConshdlrSepaPrio( 580 SCIP_SET* set, /**< global SCIP settings */ 581 SCIP_CONSHDLR* conshdlr, /**< constraint handler to be reinserted */ 582 int oldpriority /**< the old separation priority of constraint handler */ 583 ); 584 585 /** returns the constraint handler of the given name, or NULL if not existing */ 586 SCIP_CONSHDLR* SCIPsetFindConshdlr( 587 SCIP_SET* set, /**< global SCIP settings */ 588 const char* name /**< name of constraint handler */ 589 ); 590 591 /** inserts conflict handler in conflict handler list */ 592 SCIP_RETCODE SCIPsetIncludeConflicthdlr( 593 SCIP_SET* set, /**< global SCIP settings */ 594 SCIP_CONFLICTHDLR* conflicthdlr /**< conflict handler */ 595 ); 596 597 /** returns the conflict handler of the given name, or NULL if not existing */ 598 SCIP_CONFLICTHDLR* SCIPsetFindConflicthdlr( 599 SCIP_SET* set, /**< global SCIP settings */ 600 const char* name /**< name of conflict handler */ 601 ); 602 603 /** sorts conflict handlers by priorities */ 604 void SCIPsetSortConflicthdlrs( 605 SCIP_SET* set /**< global SCIP settings */ 606 ); 607 608 /** sorts conflict handlers by name */ 609 void SCIPsetSortConflicthdlrsName( 610 SCIP_SET* set /**< global SCIP settings */ 611 ); 612 613 /** inserts presolver in presolver list */ 614 SCIP_RETCODE SCIPsetIncludePresol( 615 SCIP_SET* set, /**< global SCIP settings */ 616 SCIP_PRESOL* presol /**< presolver */ 617 ); 618 619 /** returns the presolver of the given name, or NULL if not existing */ 620 SCIP_PRESOL* SCIPsetFindPresol( 621 SCIP_SET* set, /**< global SCIP settings */ 622 const char* name /**< name of presolver */ 623 ); 624 625 /** sorts presolvers by priorities */ 626 void SCIPsetSortPresols( 627 SCIP_SET* set /**< global SCIP settings */ 628 ); 629 630 /** sorts presolvers by name */ 631 void SCIPsetSortPresolsName( 632 SCIP_SET* set /**< global SCIP settings */ 633 ); 634 635 /** inserts relaxator in relaxator list */ 636 SCIP_RETCODE SCIPsetIncludeRelax( 637 SCIP_SET* set, /**< global SCIP settings */ 638 SCIP_RELAX* relax /**< relaxator */ 639 ); 640 641 /** returns the relaxator of the given name, or NULL if not existing */ 642 SCIP_RELAX* SCIPsetFindRelax( 643 SCIP_SET* set, /**< global SCIP settings */ 644 const char* name /**< name of relaxator */ 645 ); 646 647 /** sorts relaxators by priorities */ 648 void SCIPsetSortRelaxs( 649 SCIP_SET* set /**< global SCIP settings */ 650 ); 651 652 /** sorts relaxators by name */ 653 void SCIPsetSortRelaxsName( 654 SCIP_SET* set /**< global SCIP settings */ 655 ); 656 657 /** inserts separator in separator list */ 658 SCIP_RETCODE SCIPsetIncludeSepa( 659 SCIP_SET* set, /**< global SCIP settings */ 660 SCIP_SEPA* sepa /**< separator */ 661 ); 662 663 /** returns the separator of the given name, or NULL if not existing */ 664 SCIP_SEPA* SCIPsetFindSepa( 665 SCIP_SET* set, /**< global SCIP settings */ 666 const char* name /**< name of separator */ 667 ); 668 669 /** sorts separators by priorities */ 670 void SCIPsetSortSepas( 671 SCIP_SET* set /**< global SCIP settings */ 672 ); 673 674 /** sorts separators by name */ 675 void SCIPsetSortSepasName( 676 SCIP_SET* set /**< global SCIP settings */ 677 ); 678 679 /** inserts cut selector in cut selector list */ 680 SCIP_RETCODE SCIPsetIncludeCutsel( 681 SCIP_SET* set, /**< global SCIP settings */ 682 SCIP_CUTSEL* cutsel /**< cut selector */ 683 ); 684 685 /** returns the cut selector of the given name, or NULL if not existing */ 686 SCIP_CUTSEL* SCIPsetFindCutsel( 687 SCIP_SET* set, /**< global SCIP settings */ 688 const char* name /**< name of separator */ 689 ); 690 691 /** sorts cut selectors by priorities */ 692 void SCIPsetSortCutsels( 693 SCIP_SET* set /**< global SCIP settings */ 694 ); 695 696 /** inserts propagator in propagator list */ 697 SCIP_RETCODE SCIPsetIncludeProp( 698 SCIP_SET* set, /**< global SCIP settings */ 699 SCIP_PROP* prop /**< propagator */ 700 ); 701 702 /** returns the propagator of the given name, or NULL if not existing */ 703 SCIP_PROP* SCIPsetFindProp( 704 SCIP_SET* set, /**< global SCIP settings */ 705 const char* name /**< name of propagator */ 706 ); 707 708 /** sorts propagators by priorities */ 709 void SCIPsetSortProps( 710 SCIP_SET* set /**< global SCIP settings */ 711 ); 712 713 /** sorts propagators by priorities for presolving */ 714 void SCIPsetSortPropsPresol( 715 SCIP_SET* set /**< global SCIP settings */ 716 ); 717 718 /** sorts propagators w.r.t. names */ 719 void SCIPsetSortPropsName( 720 SCIP_SET* set /**< global SCIP settings */ 721 ); 722 723 /** inserts concurrent solver type into the concurrent solver type list */ 724 SCIP_RETCODE SCIPsetIncludeConcsolverType( 725 SCIP_SET* set, /**< global SCIP settings */ 726 SCIP_CONCSOLVERTYPE* concsolvertype /**< concurrent solver type */ 727 ); 728 729 /** returns the concurrent solver type with the given name, or NULL if not existing */ 730 SCIP_CONCSOLVERTYPE* SCIPsetFindConcsolverType( 731 SCIP_SET* set, /**< global SCIP settings */ 732 const char* name /**< name of concurrent solver type */ 733 ); 734 735 /** inserts concurrent solver into the concurrent solver list */ 736 SCIP_RETCODE SCIPsetIncludeConcsolver( 737 SCIP_SET* set, /**< global SCIP settings */ 738 SCIP_CONCSOLVER* concsolver /**< concurrent solver */ 739 ); 740 741 /** frees all concurrent solvers in the concurrent solver list */ 742 SCIP_RETCODE SCIPsetFreeConcsolvers( 743 SCIP_SET* set /**< global SCIP settings */ 744 ); 745 746 /** inserts primal heuristic in primal heuristic list */ 747 SCIP_RETCODE SCIPsetIncludeHeur( 748 SCIP_SET* set, /**< global SCIP settings */ 749 SCIP_HEUR* heur /**< primal heuristic */ 750 ); 751 752 /** returns the primal heuristic of the given name, or NULL if not existing */ 753 SCIP_HEUR* SCIPsetFindHeur( 754 SCIP_SET* set, /**< global SCIP settings */ 755 const char* name /**< name of primal heuristic */ 756 ); 757 758 /** sorts heuristics by priorities */ 759 void SCIPsetSortHeurs( 760 SCIP_SET* set /**< global SCIP settings */ 761 ); 762 763 /** sorts heuristics by name */ 764 void SCIPsetSortHeursName( 765 SCIP_SET* set /**< global SCIP settings */ 766 ); 767 768 /** inserts tree compression in tree compression list */ 769 SCIP_RETCODE SCIPsetIncludeCompr( 770 SCIP_SET* set, /**< global SCIP settings */ 771 SCIP_COMPR* compr /**< tree compression */ 772 ); 773 774 /** returns the tree compression of the given name, or NULL if not existing */ 775 SCIP_COMPR* SCIPsetFindCompr( 776 SCIP_SET* set, /**< global SCIP settings */ 777 const char* name /**< name of tree compression */ 778 ); 779 780 /** sorts compressions by priorities */ 781 void SCIPsetSortComprs( 782 SCIP_SET* set /**< global SCIP settings */ 783 ); 784 785 /** sorts heuristics by names */ 786 void SCIPsetSortComprsName( 787 SCIP_SET* set /**< global SCIP settings */ 788 ); 789 790 /** inserts event handler in event handler list */ 791 SCIP_RETCODE SCIPsetIncludeEventhdlr( 792 SCIP_SET* set, /**< global SCIP settings */ 793 SCIP_EVENTHDLR* eventhdlr /**< event handler */ 794 ); 795 796 /** returns the event handler of the given name, or NULL if not existing */ 797 SCIP_EVENTHDLR* SCIPsetFindEventhdlr( 798 SCIP_SET* set, /**< global SCIP settings */ 799 const char* name /**< name of event handler */ 800 ); 801 802 /** inserts node selector in node selector list */ 803 SCIP_RETCODE SCIPsetIncludeNodesel( 804 SCIP_SET* set, /**< global SCIP settings */ 805 SCIP_NODESEL* nodesel /**< node selector */ 806 ); 807 808 /** returns the node selector of the given name, or NULL if not existing */ 809 SCIP_NODESEL* SCIPsetFindNodesel( 810 SCIP_SET* set, /**< global SCIP settings */ 811 const char* name /**< name of event handler */ 812 ); 813 814 /** returns node selector with highest priority in the current mode */ 815 SCIP_NODESEL* SCIPsetGetNodesel( 816 SCIP_SET* set, /**< global SCIP settings */ 817 SCIP_STAT* stat /**< dynamic problem statistics */ 818 ); 819 820 /** inserts branching rule in branching rule list */ 821 SCIP_RETCODE SCIPsetIncludeBranchrule( 822 SCIP_SET* set, /**< global SCIP settings */ 823 SCIP_BRANCHRULE* branchrule /**< branching rule */ 824 ); 825 826 /** returns the branching rule of the given name, or NULL if not existing */ 827 SCIP_BRANCHRULE* SCIPsetFindBranchrule( 828 SCIP_SET* set, /**< global SCIP settings */ 829 const char* name /**< name of event handler */ 830 ); 831 832 /** sorts branching rules by priorities */ 833 void SCIPsetSortBranchrules( 834 SCIP_SET* set /**< global SCIP settings */ 835 ); 836 837 /** sorts branching rules by name */ 838 void SCIPsetSortBranchrulesName( 839 SCIP_SET* set /**< global SCIP settings */ 840 ); 841 842 /** inserts display column in display column list */ 843 SCIP_RETCODE SCIPsetIncludeDisp( 844 SCIP_SET* set, /**< global SCIP settings */ 845 SCIP_DISP* disp /**< display column */ 846 ); 847 848 /** returns the display column of the given name, or NULL if not existing */ 849 SCIP_DISP* SCIPsetFindDisp( 850 SCIP_SET* set, /**< global SCIP settings */ 851 const char* name /**< name of display */ 852 ); 853 854 /** inserts statistics table in statistics table list */ 855 SCIP_RETCODE SCIPsetIncludeTable( 856 SCIP_SET* set, /**< global SCIP settings */ 857 SCIP_TABLE* table /**< statistics table */ 858 ); 859 860 /** returns the statistics table of the given name, or NULL if not existing */ 861 SCIP_TABLE* SCIPsetFindTable( 862 SCIP_SET* set, /**< global SCIP settings */ 863 const char* name /**< name of statistics table */ 864 ); 865 866 /** inserts dialog in dialog list */ 867 SCIP_RETCODE SCIPsetIncludeDialog( 868 SCIP_SET* set, /**< global SCIP settings */ 869 SCIP_DIALOG* dialog /**< dialog */ 870 ); 871 872 /** returns if the dialog already exists */ 873 SCIP_Bool SCIPsetExistsDialog( 874 SCIP_SET* set, /**< global SCIP settings */ 875 SCIP_DIALOG* dialog /**< dialog */ 876 ); 877 878 /** inserts expression handler in expression handler list */ 879 SCIP_RETCODE SCIPsetIncludeExprhdlr( 880 SCIP_SET* set, /**< global SCIP settings */ 881 SCIP_EXPRHDLR* exprhdlr /**< expression handler */ 882 ); 883 884 /** returns the expression handler of the given name, or NULL if not existing */ 885 SCIP_EXPORT /* need SCIP_EXPORT here, because func is exposed in API via SCIPfindExprhdlr() macro */ 886 SCIP_EXPRHDLR* SCIPsetFindExprhdlr( 887 SCIP_SET* set, /**< global SCIP settings */ 888 const char* name /**< name of expression handler */ 889 ); 890 891 /** sorts expression handlers by name */ 892 void SCIPsetSortExprhdlrs( 893 SCIP_SET* set /**< global SCIP settings */ 894 ); 895 896 /** inserts NLPI in NLPI list */ 897 SCIP_RETCODE SCIPsetIncludeNlpi( 898 SCIP_SET* set, /**< global SCIP settings */ 899 SCIP_NLPI* nlpi /**< NLPI */ 900 ); 901 902 /** returns the NLPI of the given name, or NULL if not existing */ 903 SCIP_NLPI* SCIPsetFindNlpi( 904 SCIP_SET* set, /**< global SCIP settings */ 905 const char* name /**< name of NLPI */ 906 ); 907 908 /** sorts NLPIs by priorities */ 909 void SCIPsetSortNlpis( 910 SCIP_SET* set /**< global SCIP settings */ 911 ); 912 913 /** set priority of an NLPI */ 914 void SCIPsetSetPriorityNlpi( 915 SCIP_SET* set, /**< global SCIP settings */ 916 SCIP_NLPI* nlpi, /**< NLPI */ 917 int priority /**< new priority of NLPI */ 918 ); 919 920 /** inserts information about an external code in external codes list */ 921 SCIP_RETCODE SCIPsetIncludeExternalCode( 922 SCIP_SET* set, /**< global SCIP settings */ 923 const char* name, /**< name of external code */ 924 const char* description /**< description of external code, can be NULL */ 925 ); 926 927 /** inserts bandit virtual function table into set */ 928 SCIP_RETCODE SCIPsetIncludeBanditvtable( 929 SCIP_SET* set, /**< global SCIP settings */ 930 SCIP_BANDITVTABLE* banditvtable /**< bandit algorithm virtual function table */ 931 ); 932 933 /** returns the bandit virtual function table of the given name, or NULL if not existing */ 934 SCIP_BANDITVTABLE* SCIPsetFindBanditvtable( 935 SCIP_SET* set, /**< global SCIP settings */ 936 const char* name /**< name of bandit algorithm virtual function table */ 937 ); 938 939 /** calls init methods of all plugins */ 940 SCIP_RETCODE SCIPsetInitPlugins( 941 SCIP_SET* set, /**< global SCIP settings */ 942 BMS_BLKMEM* blkmem, /**< block memory */ 943 SCIP_STAT* stat /**< dynamic problem statistics */ 944 ); 945 946 /** calls exit methods of all plugins */ 947 SCIP_RETCODE SCIPsetExitPlugins( 948 SCIP_SET* set, /**< global SCIP settings */ 949 BMS_BLKMEM* blkmem, /**< block memory */ 950 SCIP_STAT* stat /**< dynamic problem statistics */ 951 ); 952 953 /** calls initpre methods of all plugins */ 954 SCIP_RETCODE SCIPsetInitprePlugins( 955 SCIP_SET* set, /**< global SCIP settings */ 956 BMS_BLKMEM* blkmem, /**< block memory */ 957 SCIP_STAT* stat /**< dynamic problem statistics */ 958 ); 959 960 /** calls exitpre methods of all plugins */ 961 SCIP_RETCODE SCIPsetExitprePlugins( 962 SCIP_SET* set, /**< global SCIP settings */ 963 BMS_BLKMEM* blkmem, /**< block memory */ 964 SCIP_STAT* stat /**< dynamic problem statistics */ 965 ); 966 967 /** calls initsol methods of all plugins */ 968 SCIP_RETCODE SCIPsetInitsolPlugins( 969 SCIP_SET* set, /**< global SCIP settings */ 970 BMS_BLKMEM* blkmem, /**< block memory */ 971 SCIP_STAT* stat /**< dynamic problem statistics */ 972 ); 973 974 /** calls exitsol methods of all plugins */ 975 SCIP_RETCODE SCIPsetExitsolPlugins( 976 SCIP_SET* set, /**< global SCIP settings */ 977 BMS_BLKMEM* blkmem, /**< block memory */ 978 SCIP_STAT* stat, /**< dynamic problem statistics */ 979 SCIP_Bool restart /**< was this exit solve call triggered by a restart? */ 980 ); 981 982 /** calculate memory size for dynamically allocated arrays */ 983 int SCIPsetCalcMemGrowSize( 984 SCIP_SET* set, /**< global SCIP settings */ 985 int num /**< minimum number of entries to store */ 986 ); 987 988 /** calculate memory size for tree array */ 989 int SCIPsetCalcTreeGrowSize( 990 SCIP_SET* set, /**< global SCIP settings */ 991 int num /**< minimum number of entries to store */ 992 ); 993 994 /** calculate memory size for path array */ 995 int SCIPsetCalcPathGrowSize( 996 SCIP_SET* set, /**< global SCIP settings */ 997 int num /**< minimum number of entries to store */ 998 ); 999 1000 /** sets verbosity level for message output */ 1001 SCIP_RETCODE SCIPsetSetVerbLevel( 1002 SCIP_SET* set, /**< global SCIP settings */ 1003 SCIP_VERBLEVEL verblevel /**< verbosity level for message output */ 1004 ); 1005 1006 /** sets feasibility tolerance */ 1007 SCIP_RETCODE SCIPsetSetFeastol( 1008 SCIP_SET* set, /**< global SCIP settings */ 1009 SCIP_LP* lp, /**< LP data, or NULL */ 1010 SCIP_Real feastol /**< new feasibility tolerance */ 1011 ); 1012 1013 /** sets feasibility tolerance for reduced costs in LP solution */ 1014 SCIP_RETCODE SCIPsetSetDualfeastol( 1015 SCIP_SET* set, /**< global SCIP settings */ 1016 SCIP_Real dualfeastol /**< new reduced costs feasibility tolerance */ 1017 ); 1018 1019 /** sets LP convergence tolerance used in barrier algorithm */ 1020 SCIP_RETCODE SCIPsetSetBarrierconvtol( 1021 SCIP_SET* set, /**< global SCIP settings */ 1022 SCIP_Real barrierconvtol /**< new convergence tolerance used in barrier algorithm */ 1023 ); 1024 1025 /** sets primal feasibility tolerance for relaxations (relaxfeastol) 1026 * 1027 * @note Set to SCIP_INVALID to apply relaxation-specific feasibility tolerance only. 1028 * 1029 * @return Previous value of relaxfeastol. 1030 */ 1031 SCIP_Real SCIPsetSetRelaxfeastol( 1032 SCIP_SET* set, /**< global SCIP settings */ 1033 SCIP_Real relaxfeastol /**< new primal feasibility tolerance for relaxations, or SCIP_INVALID */ 1034 ); 1035 1036 /** marks that some limit parameter was changed */ 1037 void SCIPsetSetLimitChanged( 1038 SCIP_SET* set /**< global SCIP settings */ 1039 ); 1040 1041 /** returns the maximal number of variables priced into the LP per round */ 1042 int SCIPsetGetPriceMaxvars( 1043 SCIP_SET* set, /**< global SCIP settings */ 1044 SCIP_Bool root /**< are we at the root node? */ 1045 ); 1046 1047 /** returns factor for the maximal number of cuts generated per round */ 1048 SCIP_Real SCIPsetGetSepaMaxcutsGenFactor( 1049 SCIP_SET* set, /**< global SCIP settings */ 1050 SCIP_Bool root /**< are we at the root node? */ 1051 ); 1052 1053 /** returns the maximal number of cuts separated per round */ 1054 int SCIPsetGetSepaMaxcuts( 1055 SCIP_SET* set, /**< global SCIP settings */ 1056 SCIP_Bool root /**< are we at the root node? */ 1057 ); 1058 1059 /** returns the maximal ratio between coefficients to ensure in rowprep cleanup */ 1060 SCIP_Real SCIPsetGetSepaMaxCoefRatioRowprep( 1061 SCIP_SET* set /**< global SCIP settings */ 1062 ); 1063 1064 /** returns user defined objective value (in original space) for reference purposes */ 1065 SCIP_Real SCIPsetGetReferencevalue( 1066 SCIP_SET* set /**< global SCIP settings */ 1067 ); 1068 1069 /** returns debug solution data */ 1070 SCIP_DEBUGSOLDATA* SCIPsetGetDebugSolData( 1071 SCIP_SET* set /**< global SCIP settings */ 1072 ); 1073 1074 /** Checks, if an iteratively updated value is reliable or should be recomputed from scratch. 1075 * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high 1076 * absolute value during the optimization process which is later reduced significantly. In this case, the last digits 1077 * were cancelled out when increasing the value and are random after decreasing it. 1078 * We dot not consider the cancellations which can occur during increasing the absolute value because they just cannot 1079 * be expressed using fixed precision floating point arithmetic, anymore. 1080 * The idea to get more reliable values is to always store the last reliable value, where increasing the absolute of 1081 * the value is viewed as preserving reliability. Then, after each update, the new absolute value can be compared 1082 * against the last reliable one with this method, checking whether it was decreased by a factor of at least 1083 * "lp/recompfac" and should be recomputed. 1084 */ 1085 SCIP_Bool SCIPsetIsUpdateUnreliable( 1086 SCIP_SET* set, /**< global SCIP settings */ 1087 SCIP_Real newvalue, /**< new value after update */ 1088 SCIP_Real oldvalue /**< old value, i.e., last reliable value */ 1089 ); 1090 1091 /** modifies an initial seed value with the global shift of random seeds */ 1092 unsigned int SCIPsetInitializeRandomSeed( 1093 SCIP_SET* set, /**< global SCIP settings */ 1094 unsigned int initialseedvalue /**< initial seed value to be modified */ 1095 ); 1096 1097 /** returns value treated as infinity */ 1098 SCIP_Real SCIPsetInfinity( 1099 SCIP_SET* set /**< global SCIP settings */ 1100 ); 1101 1102 /** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity 1103 * computation) 1104 */ 1105 SCIP_Real SCIPsetGetHugeValue( 1106 SCIP_SET* set /**< global SCIP settings */ 1107 ); 1108 1109 /** returns value treated as zero */ 1110 SCIP_Real SCIPsetEpsilon( 1111 SCIP_SET* set /**< global SCIP settings */ 1112 ); 1113 1114 /** returns value treated as zero for sums of floating point values */ 1115 SCIP_Real SCIPsetSumepsilon( 1116 SCIP_SET* set /**< global SCIP settings */ 1117 ); 1118 1119 /** returns feasibility tolerance for constraints */ 1120 #ifdef __GNUC__ 1121 __attribute__ ((pure)) 1122 #endif 1123 SCIP_Real SCIPsetFeastol( 1124 SCIP_SET* set /**< global SCIP settings */ 1125 ); 1126 1127 /** returns factor w.r.t. primal feasibility tolerance that determines default (and maximal) feasibility tolerance */ 1128 SCIP_Real SCIPsetLPFeastolFactor( 1129 SCIP_SET* set /**< global SCIP settings */ 1130 ); 1131 1132 /** returns feasibility tolerance for reduced costs */ 1133 #ifdef __GNUC__ 1134 __attribute__ ((pure)) 1135 #endif 1136 SCIP_Real SCIPsetDualfeastol( 1137 SCIP_SET* set /**< global SCIP settings */ 1138 ); 1139 1140 /** returns convergence tolerance used in barrier algorithm */ 1141 SCIP_Real SCIPsetBarrierconvtol( 1142 SCIP_SET* set /**< global SCIP settings */ 1143 ); 1144 1145 /** returns minimal variable distance value to use for pseudo cost updates */ 1146 SCIP_Real SCIPsetPseudocosteps( 1147 SCIP_SET* set /**< global SCIP settings */ 1148 ); 1149 1150 /** returns minimal minimal objective distance value to use for pseudo cost updates */ 1151 SCIP_Real SCIPsetPseudocostdelta( 1152 SCIP_SET* set /**< global SCIP settings */ 1153 ); 1154 1155 /** return the delta to use for computing the cutoff bound for integral objectives */ 1156 SCIP_Real SCIPsetCutoffbounddelta( 1157 SCIP_SET* set /**< global SCIP settings */ 1158 ); 1159 1160 /** return the primal feasibility tolerance for relaxations */ 1161 SCIP_Real SCIPsetRelaxfeastol( 1162 SCIP_SET* set /**< global SCIP settings */ 1163 ); 1164 1165 /** returns minimal decrease factor that causes the recomputation of a value 1166 * (e.g., pseudo objective) instead of an update */ 1167 SCIP_Real SCIPsetRecompfac( 1168 SCIP_SET* set /**< global SCIP settings */ 1169 ); 1170 1171 /** checks, if values are in range of epsilon */ 1172 SCIP_Bool SCIPsetIsEQ( 1173 SCIP_SET* set, /**< global SCIP settings */ 1174 SCIP_Real val1, /**< first value to be compared */ 1175 SCIP_Real val2 /**< second value to be compared */ 1176 ); 1177 1178 /** checks, if val1 is (more than epsilon) lower than val2 */ 1179 SCIP_Bool SCIPsetIsLT( 1180 SCIP_SET* set, /**< global SCIP settings */ 1181 SCIP_Real val1, /**< first value to be compared */ 1182 SCIP_Real val2 /**< second value to be compared */ 1183 ); 1184 1185 /** checks, if val1 is not (more than epsilon) greater than val2 */ 1186 SCIP_Bool SCIPsetIsLE( 1187 SCIP_SET* set, /**< global SCIP settings */ 1188 SCIP_Real val1, /**< first value to be compared */ 1189 SCIP_Real val2 /**< second value to be compared */ 1190 ); 1191 1192 /** checks, if val1 is (more than epsilon) greater than val2 */ 1193 SCIP_Bool SCIPsetIsGT( 1194 SCIP_SET* set, /**< global SCIP settings */ 1195 SCIP_Real val1, /**< first value to be compared */ 1196 SCIP_Real val2 /**< second value to be compared */ 1197 ); 1198 1199 /** checks, if val1 is not (more than epsilon) lower than val2 */ 1200 SCIP_Bool SCIPsetIsGE( 1201 SCIP_SET* set, /**< global SCIP settings */ 1202 SCIP_Real val1, /**< first value to be compared */ 1203 SCIP_Real val2 /**< second value to be compared */ 1204 ); 1205 1206 /** checks, if value is (positive) infinite */ 1207 SCIP_Bool SCIPsetIsInfinity( 1208 SCIP_SET* set, /**< global SCIP settings */ 1209 SCIP_Real val /**< value to be compared against infinity */ 1210 ); 1211 1212 /** checks, if value is huge and should be handled separately (e.g., in activity computation) */ 1213 SCIP_Bool SCIPsetIsHugeValue( 1214 SCIP_SET* set, /**< global SCIP settings */ 1215 SCIP_Real val /**< value to be checked whether it is huge */ 1216 ); 1217 1218 /** checks, if value is in range epsilon of 0.0 */ 1219 SCIP_Bool SCIPsetIsZero( 1220 SCIP_SET* set, /**< global SCIP settings */ 1221 SCIP_Real val /**< value to be compared against zero */ 1222 ); 1223 1224 /** checks, if value is greater than epsilon */ 1225 SCIP_Bool SCIPsetIsPositive( 1226 SCIP_SET* set, /**< global SCIP settings */ 1227 SCIP_Real val /**< value to be compared against zero */ 1228 ); 1229 1230 /** checks, if value is lower than -epsilon */ 1231 SCIP_Bool SCIPsetIsNegative( 1232 SCIP_SET* set, /**< global SCIP settings */ 1233 SCIP_Real val /**< value to be compared against zero */ 1234 ); 1235 1236 /** checks, if value is integral within epsilon */ 1237 SCIP_Bool SCIPsetIsIntegral( 1238 SCIP_SET* set, /**< global SCIP settings */ 1239 SCIP_Real val /**< value to be compared against zero */ 1240 ); 1241 1242 /** checks whether the product val * scalar is integral in epsilon scaled by scalar */ 1243 SCIP_Bool SCIPsetIsScalingIntegral( 1244 SCIP_SET* set, /**< global SCIP settings */ 1245 SCIP_Real val, /**< unscaled value to check for scaled integrality */ 1246 SCIP_Real scalar /**< value to scale val with for checking for integrality */ 1247 ); 1248 1249 /** checks, if given fractional part is smaller than epsilon */ 1250 SCIP_Bool SCIPsetIsFracIntegral( 1251 SCIP_SET* set, /**< global SCIP settings */ 1252 SCIP_Real val /**< value to be compared against zero */ 1253 ); 1254 1255 /** rounds value + feasibility tolerance down to the next integer in epsilon tolerance */ 1256 SCIP_Real SCIPsetFloor( 1257 SCIP_SET* set, /**< global SCIP settings */ 1258 SCIP_Real val /**< value to be compared against zero */ 1259 ); 1260 1261 /** rounds value - feasibility tolerance up to the next integer in epsilon tolerance */ 1262 SCIP_Real SCIPsetCeil( 1263 SCIP_SET* set, /**< global SCIP settings */ 1264 SCIP_Real val /**< value to be compared against zero */ 1265 ); 1266 1267 /** rounds value to the nearest integer in epsilon tolerance */ 1268 SCIP_Real SCIPsetRound( 1269 SCIP_SET* set, /**< global SCIP settings */ 1270 SCIP_Real val /**< value to be compared against zero */ 1271 ); 1272 1273 /** returns fractional part of value, i.e. x - floor(x) in epsilon tolerance */ 1274 SCIP_Real SCIPsetFrac( 1275 SCIP_SET* set, /**< global SCIP settings */ 1276 SCIP_Real val /**< value to return fractional part for */ 1277 ); 1278 1279 /** checks, if values are in range of sumepsilon */ 1280 SCIP_Bool SCIPsetIsSumEQ( 1281 SCIP_SET* set, /**< global SCIP settings */ 1282 SCIP_Real val1, /**< first value to be compared */ 1283 SCIP_Real val2 /**< second value to be compared */ 1284 ); 1285 1286 /** checks, if val1 is (more than sumepsilon) lower than val2 */ 1287 SCIP_Bool SCIPsetIsSumLT( 1288 SCIP_SET* set, /**< global SCIP settings */ 1289 SCIP_Real val1, /**< first value to be compared */ 1290 SCIP_Real val2 /**< second value to be compared */ 1291 ); 1292 1293 /** checks, if val1 is not (more than sumepsilon) greater than val2 */ 1294 SCIP_Bool SCIPsetIsSumLE( 1295 SCIP_SET* set, /**< global SCIP settings */ 1296 SCIP_Real val1, /**< first value to be compared */ 1297 SCIP_Real val2 /**< second value to be compared */ 1298 ); 1299 1300 /** checks, if val1 is (more than sumepsilon) greater than val2 */ 1301 SCIP_Bool SCIPsetIsSumGT( 1302 SCIP_SET* set, /**< global SCIP settings */ 1303 SCIP_Real val1, /**< first value to be compared */ 1304 SCIP_Real val2 /**< second value to be compared */ 1305 ); 1306 1307 /** checks, if val1 is not (more than sumepsilon) lower than val2 */ 1308 SCIP_Bool SCIPsetIsSumGE( 1309 SCIP_SET* set, /**< global SCIP settings */ 1310 SCIP_Real val1, /**< first value to be compared */ 1311 SCIP_Real val2 /**< second value to be compared */ 1312 ); 1313 1314 /** checks, if value is in range sumepsilon of 0.0 */ 1315 SCIP_Bool SCIPsetIsSumZero( 1316 SCIP_SET* set, /**< global SCIP settings */ 1317 SCIP_Real val /**< value to be compared against zero */ 1318 ); 1319 1320 /** checks, if value is greater than sumepsilon */ 1321 SCIP_Bool SCIPsetIsSumPositive( 1322 SCIP_SET* set, /**< global SCIP settings */ 1323 SCIP_Real val /**< value to be compared against zero */ 1324 ); 1325 1326 /** checks, if value is lower than -sumepsilon */ 1327 SCIP_Bool SCIPsetIsSumNegative( 1328 SCIP_SET* set, /**< global SCIP settings */ 1329 SCIP_Real val /**< value to be compared against zero */ 1330 ); 1331 1332 /** rounds value + sumepsilon tolerance down to the next integer */ 1333 SCIP_Real SCIPsetSumFloor( 1334 SCIP_SET* set, /**< global SCIP settings */ 1335 SCIP_Real val /**< value to process */ 1336 ); 1337 1338 /** rounds value - sumepsilon tolerance up to the next integer */ 1339 SCIP_Real SCIPsetSumCeil( 1340 SCIP_SET* set, /**< global SCIP settings */ 1341 SCIP_Real val /**< value to process */ 1342 ); 1343 1344 /** rounds value to the nearest integer in sumepsilon tolerance */ 1345 SCIP_Real SCIPsetSumRound( 1346 SCIP_SET* set, /**< global SCIP settings */ 1347 SCIP_Real val /**< value to process */ 1348 ); 1349 1350 /** returns fractional part of value, i.e. x - floor(x) in sumepsilon tolerance */ 1351 SCIP_Real SCIPsetSumFrac( 1352 SCIP_SET* set, /**< global SCIP settings */ 1353 SCIP_Real val /**< value to process */ 1354 ); 1355 1356 /** checks, if relative difference of values is in range of feastol */ 1357 SCIP_Bool SCIPsetIsFeasEQ( 1358 SCIP_SET* set, /**< global SCIP settings */ 1359 SCIP_Real val1, /**< first value to be compared */ 1360 SCIP_Real val2 /**< second value to be compared */ 1361 ); 1362 1363 /** checks, if relative difference of val1 and val2 is lower than feastol */ 1364 SCIP_Bool SCIPsetIsFeasLT( 1365 SCIP_SET* set, /**< global SCIP settings */ 1366 SCIP_Real val1, /**< first value to be compared */ 1367 SCIP_Real val2 /**< second value to be compared */ 1368 ); 1369 1370 /** checks, if relative difference of val1 and val2 is not greater than feastol */ 1371 SCIP_Bool SCIPsetIsFeasLE( 1372 SCIP_SET* set, /**< global SCIP settings */ 1373 SCIP_Real val1, /**< first value to be compared */ 1374 SCIP_Real val2 /**< second value to be compared */ 1375 ); 1376 1377 /** checks, if relative difference of val1 and val2 is greater than feastol */ 1378 SCIP_Bool SCIPsetIsFeasGT( 1379 SCIP_SET* set, /**< global SCIP settings */ 1380 SCIP_Real val1, /**< first value to be compared */ 1381 SCIP_Real val2 /**< second value to be compared */ 1382 ); 1383 1384 /** checks, if relative difference of val1 and val2 is not lower than -feastol */ 1385 SCIP_Bool SCIPsetIsFeasGE( 1386 SCIP_SET* set, /**< global SCIP settings */ 1387 SCIP_Real val1, /**< first value to be compared */ 1388 SCIP_Real val2 /**< second value to be compared */ 1389 ); 1390 1391 /** checks, if value is in range feasibility tolerance of 0.0 */ 1392 SCIP_Bool SCIPsetIsFeasZero( 1393 SCIP_SET* set, /**< global SCIP settings */ 1394 SCIP_Real val /**< value to be compared against zero */ 1395 ); 1396 1397 /** checks, if value is greater than feasibility tolerance */ 1398 SCIP_Bool SCIPsetIsFeasPositive( 1399 SCIP_SET* set, /**< global SCIP settings */ 1400 SCIP_Real val /**< value to be compared against zero */ 1401 ); 1402 1403 /** checks, if value is lower than -feasibility tolerance */ 1404 SCIP_Bool SCIPsetIsFeasNegative( 1405 SCIP_SET* set, /**< global SCIP settings */ 1406 SCIP_Real val /**< value to be compared against zero */ 1407 ); 1408 1409 /** checks, if value is integral within the feasibility bounds */ 1410 SCIP_Bool SCIPsetIsFeasIntegral( 1411 SCIP_SET* set, /**< global SCIP settings */ 1412 SCIP_Real val /**< value to be compared against zero */ 1413 ); 1414 1415 /** checks, if given fractional part is smaller than feastol */ 1416 SCIP_Bool SCIPsetIsFeasFracIntegral( 1417 SCIP_SET* set, /**< global SCIP settings */ 1418 SCIP_Real val /**< value to be compared against zero */ 1419 ); 1420 1421 /** rounds value + feasibility tolerance down to the next integer */ 1422 SCIP_Real SCIPsetFeasFloor( 1423 SCIP_SET* set, /**< global SCIP settings */ 1424 SCIP_Real val /**< value to be compared against zero */ 1425 ); 1426 1427 /** rounds value - feasibility tolerance up to the next integer */ 1428 SCIP_Real SCIPsetFeasCeil( 1429 SCIP_SET* set, /**< global SCIP settings */ 1430 SCIP_Real val /**< value to be compared against zero */ 1431 ); 1432 1433 /** rounds value to the nearest integer in feasibility tolerance */ 1434 SCIP_Real SCIPsetFeasRound( 1435 SCIP_SET* set, /**< global SCIP settings */ 1436 SCIP_Real val /**< value to be compared against zero */ 1437 ); 1438 1439 /** returns fractional part of value, i.e. x - floor(x) in feasibility tolerance */ 1440 SCIP_Real SCIPsetFeasFrac( 1441 SCIP_SET* set, /**< global SCIP settings */ 1442 SCIP_Real val /**< value to return fractional part for */ 1443 ); 1444 1445 /** checks, if relative difference of values is in range of dual feasibility tolerance */ 1446 SCIP_Bool SCIPsetIsDualfeasEQ( 1447 SCIP_SET* set, /**< global SCIP settings */ 1448 SCIP_Real val1, /**< first value to be compared */ 1449 SCIP_Real val2 /**< second value to be compared */ 1450 ); 1451 1452 /** checks, if relative difference of val1 and val2 is lower than dual feasibility tolerance */ 1453 SCIP_Bool SCIPsetIsDualfeasLT( 1454 SCIP_SET* set, /**< global SCIP settings */ 1455 SCIP_Real val1, /**< first value to be compared */ 1456 SCIP_Real val2 /**< second value to be compared */ 1457 ); 1458 1459 /** checks, if relative difference of val1 and val2 is not greater than dual feasibility tolerance */ 1460 SCIP_Bool SCIPsetIsDualfeasLE( 1461 SCIP_SET* set, /**< global SCIP settings */ 1462 SCIP_Real val1, /**< first value to be compared */ 1463 SCIP_Real val2 /**< second value to be compared */ 1464 ); 1465 1466 /** checks, if relative difference of val1 and val2 is greater than dual feasibility tolerance */ 1467 SCIP_Bool SCIPsetIsDualfeasGT( 1468 SCIP_SET* set, /**< global SCIP settings */ 1469 SCIP_Real val1, /**< first value to be compared */ 1470 SCIP_Real val2 /**< second value to be compared */ 1471 ); 1472 1473 /** checks, if relative difference of val1 and val2 is not lower than -dual feasibility tolerance */ 1474 SCIP_Bool SCIPsetIsDualfeasGE( 1475 SCIP_SET* set, /**< global SCIP settings */ 1476 SCIP_Real val1, /**< first value to be compared */ 1477 SCIP_Real val2 /**< second value to be compared */ 1478 ); 1479 1480 /** checks, if value is in range dual feasibility tolerance of 0.0 */ 1481 SCIP_Bool SCIPsetIsDualfeasZero( 1482 SCIP_SET* set, /**< global SCIP settings */ 1483 SCIP_Real val /**< value to be compared against zero */ 1484 ); 1485 1486 /** checks, if value is greater than dual feasibility tolerance */ 1487 SCIP_Bool SCIPsetIsDualfeasPositive( 1488 SCIP_SET* set, /**< global SCIP settings */ 1489 SCIP_Real val /**< value to be compared against zero */ 1490 ); 1491 1492 /** checks, if value is lower than -dual feasibility tolerance */ 1493 SCIP_Bool SCIPsetIsDualfeasNegative( 1494 SCIP_SET* set, /**< global SCIP settings */ 1495 SCIP_Real val /**< value to be compared against zero */ 1496 ); 1497 1498 /** checks, if value is integral within the dual feasibility bounds */ 1499 SCIP_Bool SCIPsetIsDualfeasIntegral( 1500 SCIP_SET* set, /**< global SCIP settings */ 1501 SCIP_Real val /**< value to be compared against zero */ 1502 ); 1503 1504 /** checks, if given fractional part is smaller than dual feasibility tolerance */ 1505 SCIP_Bool SCIPsetIsDualfeasFracIntegral( 1506 SCIP_SET* set, /**< global SCIP settings */ 1507 SCIP_Real val /**< value to be compared against zero */ 1508 ); 1509 1510 /** rounds value + dual feasibility tolerance down to the next integer */ 1511 SCIP_Real SCIPsetDualfeasFloor( 1512 SCIP_SET* set, /**< global SCIP settings */ 1513 SCIP_Real val /**< value to be compared against zero */ 1514 ); 1515 1516 /** rounds value - dual feasibility tolerance up to the next integer */ 1517 SCIP_Real SCIPsetDualfeasCeil( 1518 SCIP_SET* set, /**< global SCIP settings */ 1519 SCIP_Real val /**< value to be compared against zero */ 1520 ); 1521 1522 /** rounds value to the nearest integer in dual feasibility tolerance */ 1523 SCIP_Real SCIPsetDualfeasRound( 1524 SCIP_SET* set, /**< global SCIP settings */ 1525 SCIP_Real val /**< value to be compared against zero */ 1526 ); 1527 1528 /** returns fractional part of value, i.e. x - floor(x) in dual feasibility tolerance */ 1529 SCIP_Real SCIPsetDualfeasFrac( 1530 SCIP_SET* set, /**< global SCIP settings */ 1531 SCIP_Real val /**< value to return fractional part for */ 1532 ); 1533 1534 /** checks, if the given new lower bound is at least min(oldub - oldlb, |oldlb|) times the bound 1535 * strengthening epsilon better than the old one or the change in the lower bound would fix the 1536 * sign of the variable 1537 */ 1538 SCIP_Bool SCIPsetIsLbBetter( 1539 SCIP_SET* set, /**< global SCIP settings */ 1540 SCIP_Real newlb, /**< new lower bound */ 1541 SCIP_Real oldlb, /**< old lower bound */ 1542 SCIP_Real oldub /**< old upper bound */ 1543 ); 1544 1545 /** checks, if the given new upper bound is at least min(oldub - oldlb, |oldub|) times the bound 1546 * strengthening epsilon better than the old one or the change in the upper bound would fix the 1547 * sign of the variable 1548 */ 1549 SCIP_Bool SCIPsetIsUbBetter( 1550 SCIP_SET* set, /**< global SCIP settings */ 1551 SCIP_Real newub, /**< new upper bound */ 1552 SCIP_Real oldlb, /**< old lower bound */ 1553 SCIP_Real oldub /**< old upper bound */ 1554 ); 1555 1556 /** checks, if the given cut's efficacy is larger than the minimal cut efficacy */ 1557 SCIP_Bool SCIPsetIsEfficacious( 1558 SCIP_SET* set, /**< global SCIP settings */ 1559 SCIP_Bool root, /**< should the root's minimal cut efficacy be used? */ 1560 SCIP_Real efficacy /**< efficacy of the cut */ 1561 ); 1562 1563 /** checks, if relative difference of values is in range of epsilon */ 1564 SCIP_Bool SCIPsetIsRelEQ( 1565 SCIP_SET* set, /**< global SCIP settings */ 1566 SCIP_Real val1, /**< first value to be compared */ 1567 SCIP_Real val2 /**< second value to be compared */ 1568 ); 1569 1570 /** checks, if relative difference of val1 and val2 is lower than epsilon */ 1571 SCIP_Bool SCIPsetIsRelLT( 1572 SCIP_SET* set, /**< global SCIP settings */ 1573 SCIP_Real val1, /**< first value to be compared */ 1574 SCIP_Real val2 /**< second value to be compared */ 1575 ); 1576 1577 /** checks, if relative difference of val1 and val2 is not greater than epsilon */ 1578 SCIP_Bool SCIPsetIsRelLE( 1579 SCIP_SET* set, /**< global SCIP settings */ 1580 SCIP_Real val1, /**< first value to be compared */ 1581 SCIP_Real val2 /**< second value to be compared */ 1582 ); 1583 1584 /** checks, if relative difference of val1 and val2 is greater than epsilon */ 1585 SCIP_Bool SCIPsetIsRelGT( 1586 SCIP_SET* set, /**< global SCIP settings */ 1587 SCIP_Real val1, /**< first value to be compared */ 1588 SCIP_Real val2 /**< second value to be compared */ 1589 ); 1590 1591 /** checks, if relative difference of val1 and val2 is not lower than -epsilon */ 1592 SCIP_Bool SCIPsetIsRelGE( 1593 SCIP_SET* set, /**< global SCIP settings */ 1594 SCIP_Real val1, /**< first value to be compared */ 1595 SCIP_Real val2 /**< second value to be compared */ 1596 ); 1597 1598 /** checks, if relative difference of values is in range of sumepsilon */ 1599 SCIP_Bool SCIPsetIsSumRelEQ( 1600 SCIP_SET* set, /**< global SCIP settings */ 1601 SCIP_Real val1, /**< first value to be compared */ 1602 SCIP_Real val2 /**< second value to be compared */ 1603 ); 1604 1605 /** checks, if relative difference of val1 and val2 is lower than sumepsilon */ 1606 SCIP_Bool SCIPsetIsSumRelLT( 1607 SCIP_SET* set, /**< global SCIP settings */ 1608 SCIP_Real val1, /**< first value to be compared */ 1609 SCIP_Real val2 /**< second value to be compared */ 1610 ); 1611 1612 /** checks, if relative difference of val1 and val2 is not greater than sumepsilon */ 1613 SCIP_Bool SCIPsetIsSumRelLE( 1614 SCIP_SET* set, /**< global SCIP settings */ 1615 SCIP_Real val1, /**< first value to be compared */ 1616 SCIP_Real val2 /**< second value to be compared */ 1617 ); 1618 1619 /** checks, if relative difference of val1 and val2 is greater than sumepsilon */ 1620 SCIP_Bool SCIPsetIsSumRelGT( 1621 SCIP_SET* set, /**< global SCIP settings */ 1622 SCIP_Real val1, /**< first value to be compared */ 1623 SCIP_Real val2 /**< second value to be compared */ 1624 ); 1625 1626 /** checks, if relative difference of val1 and val2 is not lower than -sumepsilon */ 1627 SCIP_Bool SCIPsetIsSumRelGE( 1628 SCIP_SET* set, /**< global SCIP settings */ 1629 SCIP_Real val1, /**< first value to be compared */ 1630 SCIP_Real val2 /**< second value to be compared */ 1631 ); 1632 1633 /** returns the flag indicating whether sub-SCIPs that could cause recursion have been deactivated */ 1634 SCIP_Bool SCIPsetGetSubscipsOff( 1635 SCIP_SET* set /**< global SCIP settings */ 1636 ); 1637 1638 1639 #ifdef NDEBUG 1640 1641 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and 1642 * speed up the algorithms. 1643 */ 1644 1645 #define SCIPsetInfinity(set) ( (set)->num_infinity ) 1646 #define SCIPsetGetHugeValue(set) ( (set)->num_hugeval ) 1647 #define SCIPsetEpsilon(set) ( (set)->num_epsilon ) 1648 #define SCIPsetSumepsilon(set) ( (set)->num_sumepsilon ) 1649 #define SCIPsetFeastol(set) ( (set)->num_feastol ) 1650 #define SCIPsetLPFeastolFactor(set) ( (set)->num_lpfeastolfactor ) 1651 #define SCIPsetDualfeastol(set) ( (set)->num_dualfeastol ) 1652 #define SCIPsetBarrierconvtol(set) ( (set)->num_barrierconvtol ) 1653 #define SCIPsetPseudocosteps(set) ( (set)->num_pseudocosteps ) 1654 #define SCIPsetPseudocostdelta(set) ( (set)->num_pseudocostdelta ) 1655 #define SCIPsetRelaxfeastol(set) ( (set)->num_relaxfeastol ) 1656 #define SCIPsetCutoffbounddelta(set) ( MIN(100.0 * SCIPsetFeastol(set), 0.0001) ) 1657 #define SCIPsetRecompfac(set) ( (set)->num_recompfac ) 1658 #define SCIPsetIsEQ(set, val1, val2) ( EPSEQ(val1, val2, (set)->num_epsilon) ) 1659 #define SCIPsetIsLT(set, val1, val2) ( EPSLT(val1, val2, (set)->num_epsilon) ) 1660 #define SCIPsetIsLE(set, val1, val2) ( EPSLE(val1, val2, (set)->num_epsilon) ) 1661 #define SCIPsetIsGT(set, val1, val2) ( EPSGT(val1, val2, (set)->num_epsilon) ) 1662 #define SCIPsetIsGE(set, val1, val2) ( EPSGE(val1, val2, (set)->num_epsilon) ) 1663 #define SCIPsetIsInfinity(set, val) ( (val) >= (set)->num_infinity ) 1664 #define SCIPsetIsHugeValue(set, val) ( (val) >= (set)->num_hugeval ) 1665 #define SCIPsetIsZero(set, val) ( EPSZ(val, (set)->num_epsilon) ) 1666 #define SCIPsetIsPositive(set, val) ( EPSP(val, (set)->num_epsilon) ) 1667 #define SCIPsetIsNegative(set, val) ( EPSN(val, (set)->num_epsilon) ) 1668 #define SCIPsetIsIntegral(set, val) ( EPSISINT(val, (set)->num_epsilon) ) 1669 #define SCIPsetIsScalingIntegral(set, val, scalar) \ 1670 ( EPSISINT((scalar)*(val), MAX(REALABS(scalar), 1.0)*(set)->num_epsilon) ) 1671 #define SCIPsetIsFracIntegral(set, val) ( !EPSP(val, (set)->num_epsilon) ) 1672 #define SCIPsetFloor(set, val) ( EPSFLOOR(val, (set)->num_epsilon) ) 1673 #define SCIPsetCeil(set, val) ( EPSCEIL(val, (set)->num_epsilon) ) 1674 #define SCIPsetRound(set, val) ( EPSROUND(val, (set)->num_epsilon) ) 1675 #define SCIPsetFrac(set, val) ( EPSFRAC(val, (set)->num_epsilon) ) 1676 1677 #define SCIPsetIsSumEQ(set, val1, val2) ( EPSEQ(val1, val2, (set)->num_sumepsilon) ) 1678 #define SCIPsetIsSumLT(set, val1, val2) ( EPSLT(val1, val2, (set)->num_sumepsilon) ) 1679 #define SCIPsetIsSumLE(set, val1, val2) ( EPSLE(val1, val2, (set)->num_sumepsilon) ) 1680 #define SCIPsetIsSumGT(set, val1, val2) ( EPSGT(val1, val2, (set)->num_sumepsilon) ) 1681 #define SCIPsetIsSumGE(set, val1, val2) ( EPSGE(val1, val2, (set)->num_sumepsilon) ) 1682 #define SCIPsetIsSumZero(set, val) ( EPSZ(val, (set)->num_sumepsilon) ) 1683 #define SCIPsetIsSumPositive(set, val) ( EPSP(val, (set)->num_sumepsilon) ) 1684 #define SCIPsetIsSumNegative(set, val) ( EPSN(val, (set)->num_sumepsilon) ) 1685 #define SCIPsetSumFloor(set, val) ( EPSFLOOR(val, (set)->num_sumepsilon) ) 1686 #define SCIPsetSumCeil(set, val) ( EPSCEIL(val, (set)->num_sumepsilon) ) 1687 #define SCIPsetSumRound(set, val) ( EPSROUND(val, (set)->num_sumepsilon) ) 1688 #define SCIPsetSumFrac(set, val) ( EPSFRAC(val, (set)->num_sumepsilon) ) 1689 1690 #define SCIPsetIsFeasEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_feastol) ) 1691 #define SCIPsetIsFeasLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_feastol) ) 1692 #define SCIPsetIsFeasLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_feastol) ) 1693 #define SCIPsetIsFeasGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_feastol) ) 1694 #define SCIPsetIsFeasGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_feastol) ) 1695 #define SCIPsetIsFeasZero(set, val) ( EPSZ(val, (set)->num_feastol) ) 1696 #define SCIPsetIsFeasPositive(set, val) ( EPSP(val, (set)->num_feastol) ) 1697 #define SCIPsetIsFeasNegative(set, val) ( EPSN(val, (set)->num_feastol) ) 1698 #define SCIPsetIsFeasIntegral(set, val) ( EPSISINT(val, (set)->num_feastol) ) 1699 #define SCIPsetIsFeasFracIntegral(set, val) ( !EPSP(val, (set)->num_feastol) ) 1700 #define SCIPsetFeasFloor(set, val) ( EPSFLOOR(val, (set)->num_feastol) ) 1701 #define SCIPsetFeasCeil(set, val) ( EPSCEIL(val, (set)->num_feastol) ) 1702 #define SCIPsetFeasRound(set, val) ( EPSROUND(val, (set)->num_feastol) ) 1703 #define SCIPsetFeasFrac(set, val) ( EPSFRAC(val, (set)->num_feastol) ) 1704 1705 #define SCIPsetIsDualfeasEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_dualfeastol) ) 1706 #define SCIPsetIsDualfeasLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_dualfeastol) ) 1707 #define SCIPsetIsDualfeasLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_dualfeastol) ) 1708 #define SCIPsetIsDualfeasGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_dualfeastol) ) 1709 #define SCIPsetIsDualfeasGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_dualfeastol) ) 1710 #define SCIPsetIsDualfeasZero(set, val) ( EPSZ(val, (set)->num_dualfeastol) ) 1711 #define SCIPsetIsDualfeasPositive(set, val) ( EPSP(val, (set)->num_dualfeastol) ) 1712 #define SCIPsetIsDualfeasNegative(set, val) ( EPSN(val, (set)->num_dualfeastol) ) 1713 #define SCIPsetIsDualfeasIntegral(set, val) ( EPSISINT(val, (set)->num_dualfeastol) ) 1714 #define SCIPsetIsDualfeasFracIntegral(set, val) ( !EPSP(val, (set)->num_dualfeastol) ) 1715 #define SCIPsetDualfeasFloor(set, val) ( EPSFLOOR(val, (set)->num_dualfeastol) ) 1716 #define SCIPsetDualfeasCeil(set, val) ( EPSCEIL(val, (set)->num_dualfeastol) ) 1717 #define SCIPsetDualfeasRound(set, val) ( EPSROUND(val, (set)->num_dualfeastol) ) 1718 #define SCIPsetDualfeasFrac(set, val) ( EPSFRAC(val, (set)->num_dualfeastol) ) 1719 1720 #define SCIPsetIsLbBetter(set, newlb, oldlb, oldub) ( ((oldlb) < 0.0 && (newlb) >= 0.0) || EPSGT(newlb, oldlb, \ 1721 set->num_boundstreps * MAX(MIN((oldub) - (oldlb), REALABS(oldlb)), 1e-3)) ) 1722 #define SCIPsetIsUbBetter(set, newub, oldlb, oldub) ( ((oldub) > 0.0 && (newub) <= 0.0) || EPSLT(newub, oldub, \ 1723 set->num_boundstreps * MAX(MIN((oldub) - (oldlb), REALABS(oldub)), 1e-3)) ) 1724 #define SCIPsetIsEfficacious(set, root, efficacy) \ 1725 ( root ? EPSP(efficacy, (set)->sepa_minefficacyroot) : EPSP(efficacy, (set)->sepa_minefficacy) ) 1726 1727 #define SCIPsetIsRelEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_epsilon) ) 1728 #define SCIPsetIsRelLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_epsilon) ) 1729 #define SCIPsetIsRelLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_epsilon) ) 1730 #define SCIPsetIsRelGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_epsilon) ) 1731 #define SCIPsetIsRelGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_epsilon) ) 1732 1733 #define SCIPsetIsSumRelEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) ) 1734 #define SCIPsetIsSumRelLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) ) 1735 #define SCIPsetIsSumRelLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) ) 1736 #define SCIPsetIsSumRelGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) ) 1737 #define SCIPsetIsSumRelGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) ) 1738 #define SCIPsetIsUpdateUnreliable(set, newvalue, oldvalue) \ 1739 ( (ABS(oldvalue) / MAX(ABS(newvalue), set->num_epsilon)) >= set->num_recompfac ) 1740 #define SCIPsetInitializeRandomSeed(set, val) ( (val + (set)->random_randomseedshift) ) 1741 1742 #define SCIPsetGetSubscipsOff(set) ( (set)->subscipsoff ) 1743 1744 #endif 1745 1746 #define SCIPsetAllocBuffer(set,ptr) ( (BMSallocBufferMemory((set)->buffer, (ptr)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1747 #define SCIPsetAllocBufferSize(set,ptr,size) ( (BMSallocBufferMemorySize((set)->buffer, (ptr), (size)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1748 #define SCIPsetAllocBufferArray(set,ptr,num) ( (BMSallocBufferMemoryArray((set)->buffer, (ptr), (num)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1749 #define SCIPsetDuplicateBufferSize(set,ptr,source,size) ( (BMSduplicateBufferMemory((set)->buffer, (ptr), (source), (size)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1750 #define SCIPsetDuplicateBufferArray(set,ptr,source,num) ( (BMSduplicateBufferMemoryArray((set)->buffer, (ptr), (source), (num)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1751 #define SCIPsetReallocBufferSize(set,ptr,size) ( (BMSreallocBufferMemorySize((set)->buffer, (ptr), (size)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1752 #define SCIPsetReallocBufferArray(set,ptr,num) ( (BMSreallocBufferMemoryArray((set)->buffer, (ptr), (num)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1753 #define SCIPsetFreeBuffer(set,ptr) BMSfreeBufferMemory((set)->buffer, (ptr)) 1754 #define SCIPsetFreeBufferSize(set,ptr) BMSfreeBufferMemorySize((set)->buffer, (ptr)) 1755 #define SCIPsetFreeBufferArray(set,ptr) BMSfreeBufferMemoryArray((set)->buffer, (ptr)) 1756 1757 #define SCIPsetAllocCleanBuffer(set,ptr) ( (BMSallocBufferMemory((set)->cleanbuffer, (ptr)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1758 #define SCIPsetAllocCleanBufferSize(set,ptr,size) ( (BMSallocBufferMemorySize((set)->cleanbuffer, (ptr), (size)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1759 #define SCIPsetAllocCleanBufferArray(set,ptr,num) ( (BMSallocBufferMemoryArray((set)->cleanbuffer, (ptr), (num)) == NULL) ? SCIP_NOMEMORY : SCIP_OKAY ) 1760 #define SCIPsetFreeCleanBuffer(set,ptr) BMSfreeBufferMemory((set)->cleanbuffer, (ptr)) 1761 #define SCIPsetFreeCleanBufferSize(set,ptr) BMSfreeBufferMemorySize((set)->cleanbuffer, (ptr)) 1762 #define SCIPsetFreeCleanBufferArray(set,ptr) BMSfreeBufferMemoryArray((set)->cleanbuffer, (ptr)) 1763 1764 /* if we have a C99 compiler */ 1765 #ifdef SCIP_HAVE_VARIADIC_MACROS 1766 1767 /** prints a debugging message if SCIP_DEBUG flag is set */ 1768 #ifdef SCIP_DEBUG 1769 #define SCIPsetDebugMsg(set, ...) SCIPsetPrintDebugMessage(set, __FILE__, __LINE__, __VA_ARGS__) 1770 #define SCIPsetDebugMsgPrint(set, ...) SCIPsetDebugMessagePrint(set, __VA_ARGS__) 1771 #else 1772 #define SCIPsetDebugMsg(set, ...) while ( FALSE ) SCIPsetPrintDebugMessage(set, __FILE__, __LINE__, __VA_ARGS__) 1773 #define SCIPsetDebugMsgPrint(set, ...) while ( FALSE ) SCIPsetDebugMessagePrint(set, __VA_ARGS__) 1774 #endif 1775 1776 #else 1777 /* if we do not have a C99 compiler, use a workaround that prints a message, but not the file and linenumber */ 1778 1779 /** prints a debugging message if SCIP_DEBUG flag is set */ 1780 #ifdef SCIP_DEBUG 1781 #define SCIPsetDebugMsg printf("debug: "), SCIPsetDebugMessagePrint 1782 #define SCIPsetDebugMsgPrint printf("debug: "), SCIPsetDebugMessagePrint 1783 #else 1784 #define SCIPsetDebugMsg while ( FALSE ) SCIPsetDebugMsgPrint 1785 #define SCIPsetDebugMsgPrint while ( FALSE ) SCIPsetDebugMessagePrint 1786 #endif 1787 1788 #endif 1789 1790 1791 /** prints a debug message */ 1792 #ifdef __GNUC__ 1793 __attribute__((format(printf, 4, 5))) 1794 #endif 1795 SCIP_EXPORT 1796 void SCIPsetPrintDebugMessage( 1797 SCIP_SET* set, /**< global SCIP settings */ 1798 const char* sourcefile, /**< name of the source file that called the function */ 1799 int sourceline, /**< line in the source file where the function was called */ 1800 const char* formatstr, /**< format string like in printf() function */ 1801 ... /**< format arguments line in printf() function */ 1802 ); 1803 1804 /** prints a debug message without precode */ 1805 #ifdef __GNUC__ 1806 __attribute__((format(printf, 2, 3))) 1807 #endif 1808 SCIP_EXPORT 1809 void SCIPsetDebugMessagePrint( 1810 SCIP_SET* set, /**< global SCIP settings */ 1811 const char* formatstr, /**< format string like in printf() function */ 1812 ... /**< format arguments line in printf() function */ 1813 ); 1814 1815 1816 #ifdef __cplusplus 1817 } 1818 #endif 1819 1820 #endif 1821