1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */ 7 /* fuer Informationstechnik Berlin */ 8 /* */ 9 /* SCIP is distributed under the terms of the ZIB Academic License. */ 10 /* */ 11 /* You should have received a copy of the ZIB Academic License */ 12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */ 13 /* */ 14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 15 16 /**@file scip_param.h 17 * @ingroup PUBLICCOREAPI 18 * @brief public methods for SCIP parameter handling 19 * @author Tobias Achterberg 20 * @author Timo Berthold 21 * @author Thorsten Koch 22 * @author Alexander Martin 23 * @author Marc Pfetsch 24 * @author Kati Wolter 25 * @author Gregor Hendel 26 * @author Leona Gottwald 27 */ 28 29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 30 31 #ifndef __SCIP_SCIP_PARAM_H__ 32 #define __SCIP_SCIP_PARAM_H__ 33 34 35 #include "scip/def.h" 36 #include "scip/type_paramset.h" 37 #include "scip/type_retcode.h" 38 #include "scip/type_scip.h" 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 /**@addtogroup ParameterMethods 45 * 46 * @{ 47 */ 48 49 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set 50 * 51 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 52 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 53 */ 54 SCIP_EXPORT 55 SCIP_RETCODE SCIPaddBoolParam( 56 SCIP* scip, /**< SCIP data structure */ 57 const char* name, /**< name of the parameter */ 58 const char* desc, /**< description of the parameter */ 59 SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */ 60 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 61 SCIP_Bool defaultvalue, /**< default value of the parameter */ 62 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 63 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 64 ); 65 66 /** creates a int parameter, sets it to its default value, and adds it to the parameter set 67 * 68 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 69 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 70 */ 71 SCIP_EXPORT 72 SCIP_RETCODE SCIPaddIntParam( 73 SCIP* scip, /**< SCIP data structure */ 74 const char* name, /**< name of the parameter */ 75 const char* desc, /**< description of the parameter */ 76 int* valueptr, /**< pointer to store the current parameter value, or NULL */ 77 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 78 int defaultvalue, /**< default value of the parameter */ 79 int minvalue, /**< minimum value for parameter */ 80 int maxvalue, /**< maximum value for parameter */ 81 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 82 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 83 ); 84 85 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set 86 * 87 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 88 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 89 */ 90 SCIP_EXPORT 91 SCIP_RETCODE SCIPaddLongintParam( 92 SCIP* scip, /**< SCIP data structure */ 93 const char* name, /**< name of the parameter */ 94 const char* desc, /**< description of the parameter */ 95 SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */ 96 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 97 SCIP_Longint defaultvalue, /**< default value of the parameter */ 98 SCIP_Longint minvalue, /**< minimum value for parameter */ 99 SCIP_Longint maxvalue, /**< maximum value for parameter */ 100 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 101 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 102 ); 103 104 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set 105 * 106 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 107 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 108 */ 109 SCIP_EXPORT 110 SCIP_RETCODE SCIPaddRealParam( 111 SCIP* scip, /**< SCIP data structure */ 112 const char* name, /**< name of the parameter */ 113 const char* desc, /**< description of the parameter */ 114 SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */ 115 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 116 SCIP_Real defaultvalue, /**< default value of the parameter */ 117 SCIP_Real minvalue, /**< minimum value for parameter */ 118 SCIP_Real maxvalue, /**< maximum value for parameter */ 119 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 120 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 121 ); 122 123 /** creates a char parameter, sets it to its default value, and adds it to the parameter set 124 * 125 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 126 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 127 */ 128 SCIP_EXPORT 129 SCIP_RETCODE SCIPaddCharParam( 130 SCIP* scip, /**< SCIP data structure */ 131 const char* name, /**< name of the parameter */ 132 const char* desc, /**< description of the parameter */ 133 char* valueptr, /**< pointer to store the current parameter value, or NULL */ 134 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 135 char defaultvalue, /**< default value of the parameter */ 136 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */ 137 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 138 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 139 ); 140 141 /** creates a string(char*) parameter, sets it to its default value, and adds it to the parameter set 142 * 143 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 144 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 145 */ 146 SCIP_EXPORT 147 SCIP_RETCODE SCIPaddStringParam( 148 SCIP* scip, /**< SCIP data structure */ 149 const char* name, /**< name of the parameter */ 150 const char* desc, /**< description of the parameter */ 151 char** valueptr, /**< pointer to store the current parameter value, or NULL; if not NULL then *valueptr should be NULL */ 152 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */ 153 const char* defaultvalue, /**< default value of the parameter */ 154 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */ 155 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */ 156 ); 157 158 /** gets the fixing status of an existing parameter 159 * 160 * @return TRUE if the parameter is fixed to a value, otherwise FALSE. 161 */ 162 SCIP_EXPORT 163 SCIP_Bool SCIPisParamFixed( 164 SCIP* scip, /**< SCIP data structure */ 165 const char* name /**< name of the parameter */ 166 ); 167 168 /** returns the pointer to the SCIP parameter with the given name 169 * 170 * @return pointer to the parameter with the given name 171 */ 172 SCIP_EXPORT 173 SCIP_PARAM* SCIPgetParam( 174 SCIP* scip, /**< SCIP data structure */ 175 const char* name /**< name of the parameter */ 176 ); 177 178 /** gets the value of an existing SCIP_Bool parameter 179 * 180 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 181 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 182 */ 183 SCIP_EXPORT 184 SCIP_RETCODE SCIPgetBoolParam( 185 SCIP* scip, /**< SCIP data structure */ 186 const char* name, /**< name of the parameter */ 187 SCIP_Bool* value /**< pointer to store the parameter */ 188 ); 189 190 /** gets the value of an existing int parameter 191 * 192 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 193 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 194 */ 195 SCIP_EXPORT 196 SCIP_RETCODE SCIPgetIntParam( 197 SCIP* scip, /**< SCIP data structure */ 198 const char* name, /**< name of the parameter */ 199 int* value /**< pointer to store the parameter */ 200 ); 201 202 /** gets the value of an existing SCIP_Longint parameter 203 * 204 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 205 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 206 */ 207 SCIP_EXPORT 208 SCIP_RETCODE SCIPgetLongintParam( 209 SCIP* scip, /**< SCIP data structure */ 210 const char* name, /**< name of the parameter */ 211 SCIP_Longint* value /**< pointer to store the parameter */ 212 ); 213 214 /** gets the value of an existing SCIP_Real parameter 215 * 216 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 217 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 218 */ 219 SCIP_EXPORT 220 SCIP_RETCODE SCIPgetRealParam( 221 SCIP* scip, /**< SCIP data structure */ 222 const char* name, /**< name of the parameter */ 223 SCIP_Real* value /**< pointer to store the parameter */ 224 ); 225 226 /** gets the value of an existing char parameter 227 * 228 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 229 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 230 */ 231 SCIP_EXPORT 232 SCIP_RETCODE SCIPgetCharParam( 233 SCIP* scip, /**< SCIP data structure */ 234 const char* name, /**< name of the parameter */ 235 char* value /**< pointer to store the parameter */ 236 ); 237 238 /** gets the value of an existing string(char*) parameter 239 * 240 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 241 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 242 */ 243 SCIP_EXPORT 244 SCIP_RETCODE SCIPgetStringParam( 245 SCIP* scip, /**< SCIP data structure */ 246 const char* name, /**< name of the parameter */ 247 char** value /**< pointer to store the parameter */ 248 ); 249 250 /** fixes the value of an existing parameter 251 * 252 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 253 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 254 * 255 * @note: Be careful with this method! Some general settings, e.g., the time or node limit, should not be fixed because 256 * they have to be changed for sub-SCIPs. 257 */ 258 SCIP_EXPORT 259 SCIP_RETCODE SCIPfixParam( 260 SCIP* scip, /**< SCIP data structure */ 261 const char* name /**< name of the parameter */ 262 ); 263 264 /** unfixes the value of an existing parameter 265 * 266 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 267 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 268 */ 269 SCIP_EXPORT 270 SCIP_RETCODE SCIPunfixParam( 271 SCIP* scip, /**< SCIP data structure */ 272 const char* name /**< name of the parameter */ 273 ); 274 275 /** changes the value of an existing parameter 276 * 277 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 278 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 279 * 280 * @attention This function is not working the way one would probably expect. 281 * Even if one finds out how to pass the parameter value via the void* argument, the function will fail 282 * to correctly set negative or fractional parameter values. 283 * 284 * @deprecated Use SCIPsetBoolParam, SCIPsetIntParam, SCIPsetRealParam, etc., instead 285 */ 286 SCIP_DEPRECATED 287 SCIP_EXPORT 288 SCIP_RETCODE SCIPsetParam( 289 SCIP* scip, /**< SCIP data structure */ 290 const char* name, /**< name of the parameter */ 291 void* value /**< new value of the parameter */ 292 ); 293 294 /** changes the value of an existing SCIP_Bool parameter 295 * 296 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 297 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 298 */ 299 SCIP_EXPORT 300 SCIP_RETCODE SCIPchgBoolParam( 301 SCIP* scip, /**< SCIP data structure */ 302 SCIP_PARAM* param, /**< parameter */ 303 SCIP_Bool value /**< new value of the parameter */ 304 ); 305 306 /** changes the value of an existing SCIP_Bool parameter 307 * 308 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 309 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 310 */ 311 SCIP_EXPORT 312 SCIP_RETCODE SCIPsetBoolParam( 313 SCIP* scip, /**< SCIP data structure */ 314 const char* name, /**< name of the parameter */ 315 SCIP_Bool value /**< new value of the parameter */ 316 ); 317 318 /** checks whether the value of an existing SCIP_Bool parameter is valid */ 319 SCIP_EXPORT 320 SCIP_Bool SCIPisBoolParamValid( 321 SCIP* scip, /**< SCIP data structure */ 322 SCIP_PARAM* param, /**< parameter */ 323 SCIP_Bool value /**< value to check */ 324 ); 325 326 /** changes the value of an existing int parameter 327 * 328 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 329 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 330 */ 331 SCIP_EXPORT 332 SCIP_RETCODE SCIPchgIntParam( 333 SCIP* scip, /**< SCIP data structure */ 334 SCIP_PARAM* param, /**< parameter */ 335 int value /**< new value of the parameter */ 336 ); 337 338 /** changes the value of an existing int parameter 339 * 340 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 341 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 342 */ 343 SCIP_EXPORT 344 SCIP_RETCODE SCIPsetIntParam( 345 SCIP* scip, /**< SCIP data structure */ 346 const char* name, /**< name of the parameter */ 347 int value /**< new value of the parameter */ 348 ); 349 350 /** checks whether the value of an existing int parameter is valid */ 351 SCIP_EXPORT 352 SCIP_Bool SCIPisIntParamValid( 353 SCIP* scip, /**< SCIP data structure */ 354 SCIP_PARAM* param, /**< parameter */ 355 int value /**< value to check */ 356 ); 357 358 /** changes the value of an existing SCIP_Longint parameter 359 * 360 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 361 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 362 */ 363 SCIP_EXPORT 364 SCIP_RETCODE SCIPchgLongintParam( 365 SCIP* scip, /**< SCIP data structure */ 366 SCIP_PARAM* param, /**< parameter */ 367 SCIP_Longint value /**< new value of the parameter */ 368 ); 369 370 /** changes the value of an existing SCIP_Longint parameter 371 * 372 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 373 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 374 */ 375 SCIP_EXPORT 376 SCIP_RETCODE SCIPsetLongintParam( 377 SCIP* scip, /**< SCIP data structure */ 378 const char* name, /**< name of the parameter */ 379 SCIP_Longint value /**< new value of the parameter */ 380 ); 381 382 /** checks whether parameter value of an existing SCIP_Longint paramter is valid */ 383 SCIP_EXPORT 384 SCIP_Bool SCIPisLongintParamValid( 385 SCIP* scip, /**< SCIP data structure */ 386 SCIP_PARAM* param, /**< parameter */ 387 SCIP_Longint value /**< value to check */ 388 ); 389 390 /** changes the value of an existing SCIP_Real parameter 391 * 392 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 393 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 394 */ 395 SCIP_EXPORT 396 SCIP_RETCODE SCIPchgRealParam( 397 SCIP* scip, /**< SCIP data structure */ 398 SCIP_PARAM* param, /**< parameter */ 399 SCIP_Real value /**< new value of the parameter */ 400 ); 401 402 /** changes the value of an existing SCIP_Real parameter 403 * 404 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 405 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 406 */ 407 SCIP_EXPORT 408 SCIP_RETCODE SCIPsetRealParam( 409 SCIP* scip, /**< SCIP data structure */ 410 const char* name, /**< name of the parameter */ 411 SCIP_Real value /**< new value of the parameter */ 412 ); 413 414 /** checks whether parameter value of an existing SCIP_Real paramter is valid */ 415 SCIP_EXPORT 416 SCIP_Bool SCIPisRealParamValid( 417 SCIP* scip, /**< SCIP data structure */ 418 SCIP_PARAM* param, /**< parameter */ 419 SCIP_Real value /**< value to check */ 420 ); 421 422 /** changes the value of an existing char parameter 423 * 424 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 425 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 426 */ 427 SCIP_EXPORT 428 SCIP_RETCODE SCIPchgCharParam( 429 SCIP* scip, /**< SCIP data structure */ 430 SCIP_PARAM* param, /**< parameter */ 431 char value /**< new value of the parameter */ 432 ); 433 434 /** changes the value of an existing char parameter 435 * 436 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 437 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 438 */ 439 SCIP_EXPORT 440 SCIP_RETCODE SCIPsetCharParam( 441 SCIP* scip, /**< SCIP data structure */ 442 const char* name, /**< name of the parameter */ 443 char value /**< new value of the parameter */ 444 ); 445 446 /** checks whether parameter value for a given SCIP_Real parameter is valid */ 447 SCIP_EXPORT 448 SCIP_Bool SCIPisCharParamValid( 449 SCIP* scip, /**< SCIP data structure */ 450 SCIP_PARAM* param, /**< parameter */ 451 const char value /**< value to check */ 452 ); 453 454 /** changes the value of an existing string(char*) parameter 455 * 456 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 457 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 458 */ 459 SCIP_EXPORT 460 SCIP_RETCODE SCIPchgStringParam( 461 SCIP* scip, /**< SCIP data structure */ 462 SCIP_PARAM* param, /**< parameter */ 463 const char* value /**< new value of the parameter */ 464 ); 465 466 /** changes the value of an existing string(char*) parameter 467 * 468 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 469 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 470 */ 471 SCIP_EXPORT 472 SCIP_RETCODE SCIPsetStringParam( 473 SCIP* scip, /**< SCIP data structure */ 474 const char* name, /**< name of the parameter */ 475 const char* value /**< new value of the parameter */ 476 ); 477 478 /** checks whether parameter value for a given string parameter is valid */ 479 SCIP_EXPORT 480 SCIP_Bool SCIPisStringParamValid( 481 SCIP* scip, /**< SCIP data structure */ 482 SCIP_PARAM* param, /**< parameter */ 483 const char* value /**< value to check */ 484 ); 485 486 /** reads parameters from a file 487 * 488 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 489 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 490 */ 491 SCIP_EXPORT 492 SCIP_RETCODE SCIPreadParams( 493 SCIP* scip, /**< SCIP data structure */ 494 const char* filename /**< file name */ 495 ); 496 497 /** writes a single parameter to a file 498 * 499 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 500 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 501 */ 502 SCIP_EXPORT 503 SCIP_RETCODE SCIPwriteParam( 504 SCIP* scip, /**< SCIP data structure */ 505 SCIP_PARAM* param, /**< parameter */ 506 const char* filename, /**< file name, or NULL for stdout */ 507 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */ 508 SCIP_Bool onlychanged /**< should only those parameters be written that are changed from their 509 * default value? 510 */ 511 ); 512 513 /** writes all parameters in the parameter set to a file 514 * 515 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 516 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 517 */ 518 SCIP_EXPORT 519 SCIP_RETCODE SCIPwriteParams( 520 SCIP* scip, /**< SCIP data structure */ 521 const char* filename, /**< file name, or NULL for stdout */ 522 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */ 523 SCIP_Bool onlychanged /**< should only those parameters be written that are changed from their 524 * default value? 525 */ 526 ); 527 528 /** resets a single parameter to its default value 529 * 530 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 531 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 532 */ 533 SCIP_EXPORT 534 SCIP_RETCODE SCIPresetParam( 535 SCIP* scip, /**< SCIP data structure */ 536 const char* name /**< name of the parameter */ 537 ); 538 539 /** resets all parameters to their default values 540 * 541 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 542 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 543 */ 544 SCIP_EXPORT 545 SCIP_RETCODE SCIPresetParams( 546 SCIP* scip /**< SCIP data structure */ 547 ); 548 549 /** sets parameters to 550 * 551 * - \ref SCIP_PARAMEMPHASIS_DEFAULT to use default values (see also SCIPresetParams()) 552 * - \ref SCIP_PARAMEMPHASIS_COUNTER to get feasible and "fast" counting process 553 * - \ref SCIP_PARAMEMPHASIS_CPSOLVER to get CP like search (e.g. no LP relaxation) 554 * - \ref SCIP_PARAMEMPHASIS_EASYCIP to solve easy problems fast 555 * - \ref SCIP_PARAMEMPHASIS_FEASIBILITY to detect feasibility fast 556 * - \ref SCIP_PARAMEMPHASIS_HARDLP to be capable to handle hard LPs 557 * - \ref SCIP_PARAMEMPHASIS_OPTIMALITY to prove optimality fast 558 * - \ref SCIP_PARAMEMPHASIS_PHASEFEAS to find feasible solutions during a 3 phase solution process 559 * - \ref SCIP_PARAMEMPHASIS_PHASEIMPROVE to find improved solutions during a 3 phase solution process 560 * - \ref SCIP_PARAMEMPHASIS_PHASEPROOF to proof optimality during a 3 phase solution process 561 * - \ref SCIP_PARAMEMPHASIS_NUMERICS to solve problems which cause numerical issues 562 * 563 * 564 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 565 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 566 */ 567 SCIP_EXPORT 568 SCIP_RETCODE SCIPsetEmphasis( 569 SCIP* scip, /**< SCIP data structure */ 570 SCIP_PARAMEMPHASIS paramemphasis, /**< parameter settings */ 571 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 572 ); 573 574 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for 575 * auxiliary SCIP instances to avoid recursion 576 * 577 * @note only deactivates plugins which could cause recursion, some plugins which use sub-SCIPs stay activated 578 * 579 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 580 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 581 */ 582 SCIP_EXPORT 583 SCIP_RETCODE SCIPsetSubscipsOff( 584 SCIP* scip, /**< (auxiliary) SCIP data structure */ 585 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 586 ); 587 588 /** sets heuristic parameters values to 589 * 590 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters 591 * - SCIP_PARAMSETTING_FAST such that the time spend for heuristic is decreased 592 * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristic are called more aggregative 593 * - SCIP_PARAMSETTING_OFF which turn off all heuristics 594 * 595 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 596 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 597 */ 598 SCIP_EXPORT 599 SCIP_RETCODE SCIPsetHeuristics( 600 SCIP* scip, /**< SCIP data structure */ 601 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 602 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 603 ); 604 605 /** sets presolving parameters to 606 * 607 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters 608 * - SCIP_PARAMSETTING_FAST such that the time spend for presolving is decreased 609 * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggregative 610 * - SCIP_PARAMSETTING_OFF which turn off all presolving 611 * 612 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 613 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 614 */ 615 SCIP_EXPORT 616 SCIP_RETCODE SCIPsetPresolving( 617 SCIP* scip, /**< SCIP data structure */ 618 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 619 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 620 ); 621 622 /** sets separating parameters to 623 * 624 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters 625 * - SCIP_PARAMSETTING_FAST such that the time spend for separating is decreased 626 * - SCIP_PARAMSETTING_AGGRESSIVE such that the separating is done more aggregative 627 * - SCIP_PARAMSETTING_OFF which turn off all separating 628 * 629 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref 630 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes. 631 */ 632 SCIP_EXPORT 633 SCIP_RETCODE SCIPsetSeparating( 634 SCIP* scip, /**< SCIP data structure */ 635 SCIP_PARAMSETTING paramsetting, /**< parameter settings */ 636 SCIP_Bool quiet /**< should the parameter be set quiet (no output) */ 637 ); 638 639 /** returns the array of all available SCIP parameters 640 * 641 * @return SCIP_PARAM* array, containing all SCIP parameters. 642 */ 643 SCIP_EXPORT 644 SCIP_PARAM** SCIPgetParams( 645 SCIP* scip /**< SCIP data structure */ 646 ); 647 648 /** returns the total number of all available SCIP parameters 649 * 650 * @return number of all SCIP parameters. 651 */ 652 SCIP_EXPORT 653 int SCIPgetNParams( 654 SCIP* scip /**< SCIP data structure */ 655 ); 656 657 /** returns whether plugins with sub-SCIPs that could cause recursion have been disabled 658 * 659 * @return the value of the variable set->subscipsoff 660 */ 661 SCIP_EXPORT 662 SCIP_Bool SCIPgetSubscipsOff( 663 SCIP* scip /**< SCIP data structure */ 664 ); 665 666 /**@} */ 667 668 #ifdef __cplusplus 669 } 670 #endif 671 672 #endif 673