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