Scippy

    SCIP

    Solving Constraint Integer Programs

    paramset.c
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 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 paramset.c
    26 * @ingroup OTHER_CFILES
    27 * @brief methods for handling parameter settings
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Stefan Heinz
    31 * @author Gerald Gamrath
    32 * @author Marc Pfetsch
    33 */
    34
    35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    36
    37#include <assert.h>
    38#include <string.h>
    39#ifndef _WIN32
    40#include <strings.h> /*lint --e{766}*/
    41#endif
    42
    43#include "scip/scip.h"
    44#include "scip/set.h"
    45#include "scip/paramset.h"
    46
    48
    49
    50
    51/*
    52 * Parameter methods
    53 */
    54
    55/** hash key retrieval function for parameters */
    56static
    57SCIP_DECL_HASHGETKEY(hashGetKeyParam)
    58{ /*lint --e{715}*/
    59 SCIP_PARAM* param;
    60
    61 param = (SCIP_PARAM*)elem;
    62 assert(param != NULL);
    63
    64 return param->name;
    65}
    66
    67/** tests whether parameter can be changed and issues an error message if it is fixed */
    68static
    70 SCIP_PARAM* param, /**< parameter */
    71 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
    72 )
    73{ /*lint --e{715}*/
    74 assert(param != NULL);
    75 assert(messagehdlr != NULL);
    76
    77 if( param->isfixed )
    78 {
    79 SCIPerrorMessage("parameter <%s> is fixed and cannot be changed. Unfix it to allow changing the value.\n", param->name);
    81 }
    82
    83 return SCIP_OKAY;
    84}
    85
    86/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    87static
    89 SCIP_PARAM* param, /**< parameter */
    90 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    91 SCIP_Bool value /**< value to test */
    92 )
    93{ /*lint --e{715}*/
    94 assert(param != NULL);
    95 assert(param->paramtype == SCIP_PARAMTYPE_BOOL);
    96 assert(messagehdlr != NULL);
    97
    98 if( value != TRUE && value != FALSE )
    99 {
    100 SCIPerrorMessage("Invalid value <%u> for bool parameter <%s>. Must be <0> (FALSE) or <1> (TRUE).\n", value, param->name);
    102 }
    103
    104 return SCIP_OKAY;
    105}
    106
    107/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    108static
    110 SCIP_PARAM* param, /**< parameter */
    111 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    112 int value /**< value to test */
    113 )
    114{ /*lint --e{715}*/
    115 assert(param != NULL);
    116 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    117 assert(messagehdlr != NULL);
    118
    119 if( value < param->data.intparam.minvalue || value > param->data.intparam.maxvalue )
    120 {
    121 SCIPerrorMessage("Invalid value <%d> for int parameter <%s>. Must be in range [%d,%d].\n",
    122 value, param->name, param->data.intparam.minvalue, param->data.intparam.maxvalue);
    124 }
    125
    126 return SCIP_OKAY;
    127}
    128
    129/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    130static
    132 SCIP_PARAM* param, /**< parameter */
    133 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    134 SCIP_Longint value /**< value to test */
    135 )
    136{ /*lint --e{715}*/
    137 assert(param != NULL);
    138 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    139 assert(messagehdlr != NULL);
    140
    141 if( value < param->data.longintparam.minvalue || value > param->data.longintparam.maxvalue )
    142 {
    143 SCIPerrorMessage("Invalid value <%" SCIP_LONGINT_FORMAT "> for longint parameter <%s>. Must be in range [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "].\n",
    144 value, param->name, param->data.longintparam.minvalue, param->data.longintparam.maxvalue);
    146 }
    147
    148 return SCIP_OKAY;
    149}
    150
    151/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    152static
    154 SCIP_PARAM* param, /**< parameter */
    155 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    156 SCIP_Real value /**< value to test */
    157 )
    158{ /*lint --e{715}*/
    159 assert(param != NULL);
    160 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    161 assert(messagehdlr != NULL);
    162
    163 if( value < param->data.realparam.minvalue || value > param->data.realparam.maxvalue )
    164 {
    165 SCIPerrorMessage("Invalid value <%.15g> for real parameter <%s>. Must be in range [%.15g,%.15g].\n",
    166 value, param->name, param->data.realparam.minvalue, param->data.realparam.maxvalue);
    168 }
    169
    170 return SCIP_OKAY;
    171}
    172
    173/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    174static
    176 SCIP_PARAM* param, /**< parameter */
    177 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    178 char value /**< value to test */
    179 )
    180{ /*lint --e{715}*/
    181 assert(param != NULL);
    182 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    183 assert(messagehdlr != NULL);
    184
    185 if( value == '\b' || value == '\f' || value == '\n' || value == '\r' || value == '\v' )
    186 {
    187 SCIPerrorMessage("Invalid value <%d> for char parameter <%s>.\n", (int)value, param->name);
    189 }
    190
    191 if( param->data.charparam.allowedvalues != NULL )
    192 {
    193 char* c;
    194
    195 c = param->data.charparam.allowedvalues;
    196 while( *c != '\0' && *c != value )
    197 c++;
    198
    199 if( *c != value )
    200 {
    201 SCIPerrorMessage("Invalid value <%c> for char parameter <%s>. Must be in set {%s}.\n",
    202 value, param->name, param->data.charparam.allowedvalues);
    204 }
    205 }
    206
    207 return SCIP_OKAY;
    208}
    209
    210/** tests parameter value according to the given feasible domain; issues an error message if value was invalid */
    211static
    213 SCIP_PARAM* param, /**< parameter */
    214 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    215 const char* value /**< value to test */
    216 )
    217{ /*lint --e{715}*/
    218 unsigned int i;
    219
    220 assert(param != NULL);
    221 assert(param->paramtype == SCIP_PARAMTYPE_STRING);
    222 assert(messagehdlr != NULL);
    223
    224 if( value == NULL )
    225 {
    226 SCIPerrorMessage("Cannot assign a NULL string to a string parameter.\n");
    228 }
    229
    230 for( i = 0; i < (unsigned int) strlen(value); ++i )
    231 {
    232 if( value[i] == '\b' || value[i] == '\f' || value[i] == '\n' || value[i] == '\r' || value[i] == '\v' )
    233 {
    234 SCIPerrorMessage("Invalid character <%d> in string parameter <%s> at position %u.\n", (int)value[i], param->name, i);
    236 }
    237 }
    238
    239 return SCIP_OKAY;
    240}
    241
    242/** writes the parameter to a file */
    243static
    245 SCIP_PARAM* param, /**< parameter */
    246 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    247 FILE* file, /**< file stream to write parameter to, or NULL for stdout */
    248 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
    249 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
    250 )
    251{
    252 assert(param != NULL);
    253 assert(messagehdlr != NULL);
    254
    255 /* write parameters at default values only, if the onlychanged flag is not set or if the parameter is fixed */
    256 if( onlychanged && SCIPparamIsDefault(param) && !SCIPparamIsFixed(param) )
    257 return SCIP_OKAY;
    258
    259 /* write parameter description, bounds, and defaults as comments */
    260 if( comments )
    261 {
    262 SCIPmessageFPrintInfo(messagehdlr, file, "# %s\n", param->desc);
    263 switch( param->paramtype )
    264 {
    266 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: bool, advanced: %s, range: {TRUE,FALSE}, default: %s]\n",
    267 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    268 param->data.boolparam.defaultvalue ? "TRUE" : "FALSE");
    269 break;
    271 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: int, advanced: %s, range: [%d,%d], default: %d]\n",
    272 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    274 break;
    276 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: longint, advanced: %s, range: [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "], default: %" SCIP_LONGINT_FORMAT "]\n",
    277 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    279 break;
    281 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: real, advanced: %s, range: [%.15g,%.15g], default: %.15g]\n",
    282 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    284 break;
    286 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: char, advanced: %s, range: {%s}, default: %c]\n",
    287 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    288 param->data.charparam.allowedvalues != NULL ? param->data.charparam.allowedvalues : "all chars",
    290 break;
    292 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: string, advanced: %s, default: \"%s\"]\n",
    293 SCIPparamIsAdvanced(param) ? "TRUE" : "FALSE",
    295 break;
    296 default:
    297 SCIPerrorMessage("unknown parameter type\n");
    298 return SCIP_INVALIDDATA;
    299 }
    300 }
    301
    302 /* write parameter value */
    303 SCIPmessageFPrintInfo(messagehdlr, file, "%s = ", param->name);
    304 switch( param->paramtype )
    305 {
    307 SCIPmessageFPrintInfo(messagehdlr, file, "%s", SCIPparamGetBool(param) ? "TRUE" : "FALSE");
    308 break;
    310 SCIPmessageFPrintInfo(messagehdlr, file, "%d", SCIPparamGetInt(param));
    311 break;
    313 SCIPmessageFPrintInfo(messagehdlr, file, "%" SCIP_LONGINT_FORMAT "", SCIPparamGetLongint(param));
    314 break;
    316 SCIPmessageFPrintInfo(messagehdlr, file, "%.15g", SCIPparamGetReal(param));
    317 break;
    319 SCIPmessageFPrintInfo(messagehdlr, file, "%c", SCIPparamGetChar(param));
    320 break;
    322 SCIPmessageFPrintInfo(messagehdlr, file, "\"%s\"", SCIPparamGetString(param));
    323 break;
    324 default:
    325 SCIPerrorMessage("unknown parameter type\n");
    326 return SCIP_INVALIDDATA;
    327 }
    328
    329 /* write "fix" after value if parameter is fixed */
    330 if( SCIPparamIsFixed(param) )
    331 SCIPmessageFPrintInfo(messagehdlr, file, " fix");
    332
    333 SCIPmessageFPrintInfo(messagehdlr, file, "\n");
    334
    335 if( comments )
    336 SCIPmessageFPrintInfo(messagehdlr, file, "\n");
    337
    338 return SCIP_OKAY;
    339}
    340
    341/** if a bool parameter exits with the given parameter name it is set to the new value */
    342static
    344 SCIP_PARAMSET* paramset, /**< parameter set */
    345 SCIP_SET* set, /**< global SCIP settings */
    346 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    347 const char* paramname, /**< parameter name */
    348 SCIP_Bool value, /**< new value of the parameter */
    349 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    350 )
    351{
    352 SCIP_PARAM* param;
    353
    354 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    355 if( param != NULL )
    356 {
    357 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_BOOL);
    358
    359 if( SCIPparamIsFixed(param) )
    360 {
    361 SCIPsetDebugMsg(set, "hard coded parameter <%s> is fixed and is thus not changed.\n", param->name);
    362
    363 return SCIP_OKAY;
    364 }
    365 SCIP_CALL( SCIPparamSetBool(param, set, messagehdlr, value, FALSE, quiet) );
    366 }
    367#ifndef NDEBUG
    368 else
    369 {
    370 SCIPmessagePrintWarning(messagehdlr, "unknown hard coded bool parameter <%s>\n", paramname);
    371 }
    372#endif
    373
    374 return SCIP_OKAY;
    375}
    376
    377/** if an char parameter exits with the given parameter name it is set to the new value */
    378static
    380 SCIP_PARAMSET* paramset, /**< parameter set */
    381 SCIP_SET* set, /**< global SCIP settings */
    382 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    383 const char* paramname, /**< parameter name */
    384 char value, /**< new value of the parameter */
    385 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    386 )
    387{
    388 SCIP_PARAM* param;
    389
    390 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    391 if( param != NULL )
    392 {
    393 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_CHAR);
    394
    395 if( SCIPparamIsFixed(param) )
    396 {
    397 SCIPsetDebugMsg(set, "hard coded parameter <%s> is fixed and is thus not changed.\n", param->name);
    398
    399 return SCIP_OKAY;
    400 }
    401 SCIP_CALL( SCIPparamSetChar(param, set, messagehdlr, value, FALSE, quiet) );
    402 }
    403#ifndef NDEBUG
    404 else
    405 {
    406 SCIPmessagePrintWarning(messagehdlr, "unknown hard coded char parameter <%s>\n", paramname);
    407 }
    408#endif
    409
    410 return SCIP_OKAY;
    411}
    412
    413/** if an integer parameter exits with the given parameter name it is set to the new value */
    414static
    416 SCIP_PARAMSET* paramset, /**< parameter set */
    417 SCIP_SET* set, /**< global SCIP settings */
    418 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    419 const char* paramname, /**< parameter name */
    420 int value, /**< new value of the parameter */
    421 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    422 )
    423{
    424 SCIP_PARAM* param;
    425
    426 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    427 if( param != NULL )
    428 {
    429 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    430
    431 if( SCIPparamIsFixed(param) )
    432 {
    433 SCIPsetDebugMsg(set, "hard coded parameter <%s> is fixed and is thus not changed.\n", param->name);
    434
    435 return SCIP_OKAY;
    436 }
    437 SCIP_CALL( SCIPparamSetInt(param, set, messagehdlr, value, FALSE, quiet) );
    438 }
    439#ifndef NDEBUG
    440 else
    441 {
    442 SCIPmessagePrintWarning(messagehdlr, "unknown hard coded int parameter <%s>\n", paramname);
    443 }
    444#endif
    445
    446 return SCIP_OKAY;
    447}
    448
    449/** if a long integer parameter exits with the given parameter name it is set to the new value */
    450static
    452 SCIP_PARAMSET* paramset, /**< parameter set */
    453 SCIP_SET* set, /**< global SCIP settings */
    454 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    455 const char* paramname, /**< parameter name */
    456 SCIP_Longint value, /**< new value of the parameter */
    457 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    458 )
    459{
    460 SCIP_PARAM* param;
    461
    462 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    463 if( param != NULL )
    464 {
    466
    467 if( SCIPparamIsFixed(param) )
    468 {
    469 SCIPsetDebugMsg(set, "hard coded parameter <%s> is fixed and is thus not changed.\n", param->name);
    470
    471 return SCIP_OKAY;
    472 }
    473 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, value, FALSE, quiet) );
    474 }
    475#ifndef NDEBUG
    476 else
    477 {
    478 SCIPmessagePrintWarning(messagehdlr, "unknown hard coded longint parameter <%s>\n", paramname);
    479 }
    480#endif
    481
    482 return SCIP_OKAY;
    483}
    484
    485/** if a real parameter exits with the given parameter name it is set to the new value */
    486static
    488 SCIP_PARAMSET* paramset, /**< parameter set */
    489 SCIP_SET* set, /**< global SCIP settings */
    490 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    491 const char* paramname, /**< parameter name */
    492 SCIP_Real value, /**< new value of the parameter */
    493 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    494 )
    495{
    496 SCIP_PARAM* param;
    497
    498 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    499 if( param != NULL )
    500 {
    501 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_REAL);
    502
    503 if( SCIPparamIsFixed(param) )
    504 {
    505 SCIPsetDebugMsg(set, "hard coded parameter <%s> is fixed and is thus not changed.\n", param->name);
    506
    507 return SCIP_OKAY;
    508 }
    509 SCIP_CALL( SCIPparamSetReal(param, set, messagehdlr, value, FALSE, quiet) );
    510 }
    511#ifndef NDEBUG
    512 else
    513 {
    514 SCIPmessagePrintWarning(messagehdlr, "unknown hard coded real parameter <%s>\n", paramname);
    515 }
    516#endif
    517
    518 return SCIP_OKAY;
    519}
    520
    521/** copies value of source Bool parameter to target Bool parameter*/
    522static
    524 SCIP_PARAM* sourceparam, /**< source Bool parameter */
    525 SCIP_PARAM* targetparam, /**< target Bool parameter */
    526 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    527 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    528 )
    529{
    530 SCIP_Bool value;
    531
    532 assert(sourceparam != NULL);
    533 assert(targetparam != NULL);
    534
    535 /* get value of source parameter and copy it to target parameter */
    536 value = SCIPparamGetBool(sourceparam);
    537 SCIP_CALL( SCIPparamSetBool(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    538
    539 return SCIP_OKAY;
    540}
    541
    542/** copies value of source int parameter to target int parameter*/
    543static
    545 SCIP_PARAM* sourceparam, /**< source int parameter */
    546 SCIP_PARAM* targetparam, /**< target int parameter */
    547 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    548 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    549 )
    550{
    551 int value;
    552
    553 assert(sourceparam != NULL);
    554 assert(targetparam != NULL);
    555
    556 /* get value of source parameter and copy it to target parameter */
    557 value = SCIPparamGetInt(sourceparam);
    558 SCIP_CALL( SCIPparamSetInt(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    559
    560 return SCIP_OKAY;
    561}
    562
    563/** copies value of source longint parameter to target longint parameter*/
    564static
    566 SCIP_PARAM* sourceparam, /**< source longint parameter */
    567 SCIP_PARAM* targetparam, /**< target longint parameter */
    568 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    569 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    570 )
    571{
    572 SCIP_Longint value;
    573
    574 assert(sourceparam != NULL);
    575 assert(targetparam != NULL);
    576
    577 /* get value of source parameter and copy it to target parameter */
    578 value = SCIPparamGetLongint(sourceparam);
    579 SCIP_CALL( SCIPparamSetLongint(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    580
    581 return SCIP_OKAY;
    582}
    583
    584/** copies value of source real parameter to target real parameter*/
    585static
    587 SCIP_PARAM* sourceparam, /**< source real parameter */
    588 SCIP_PARAM* targetparam, /**< target real parameter */
    589 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    590 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    591 )
    592{
    593 SCIP_Real value;
    594
    595 assert(sourceparam != NULL);
    596 assert(targetparam != NULL);
    597
    598 /* get value of source parameter and copy it to target parameter */
    599 value = SCIPparamGetReal(sourceparam);
    600 SCIP_CALL( SCIPparamSetReal(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    601
    602 return SCIP_OKAY;
    603}
    604
    605/** copies value of source char parameter to target char parameter*/
    606static
    608 SCIP_PARAM* sourceparam, /**< source char parameter */
    609 SCIP_PARAM* targetparam, /**< target char parameter */
    610 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    611 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    612 )
    613{
    614 char value;
    615
    616 assert(sourceparam != NULL);
    617 assert(targetparam != NULL);
    618
    619 /* get value of source parameter and copy it to target parameter */
    620 value = SCIPparamGetChar(sourceparam);
    621 SCIP_CALL( SCIPparamSetChar(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    622
    623 return SCIP_OKAY;
    624}
    625
    626/** copies value of source string parameter to target string parameter*/
    627static
    629 SCIP_PARAM* sourceparam, /**< source string parameter */
    630 SCIP_PARAM* targetparam, /**< target string parameter */
    631 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    632 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    633 )
    634{
    635 char* value;
    636
    637 assert(sourceparam != NULL);
    638 assert(targetparam != NULL);
    639
    640 /* get value of source parameter and copy it to target parameter */
    641 value = SCIPparamGetString(sourceparam);
    642 SCIP_CALL( SCIPparamSetString(targetparam, set, messagehdlr, value, FALSE, TRUE) );
    643
    644 return SCIP_OKAY;
    645}
    646
    647/** returns type of parameter */
    649 SCIP_PARAM* param /**< parameter */
    650 )
    651{
    652 assert(param != NULL);
    653
    654 return param->paramtype;
    655}
    656
    657/** returns name of parameter */
    659 SCIP_PARAM* param /**< parameter */
    660 )
    661{
    662 assert(param != NULL);
    663
    664 return param->name;
    665}
    666
    667/** returns description of parameter */
    669 SCIP_PARAM* param /**< parameter */
    670 )
    671{
    672 assert(param != NULL);
    673
    674 return param->desc;
    675}
    676
    677/** returns locally defined parameter specific data */
    679 SCIP_PARAM* param /**< parameter */
    680 )
    681{
    682 assert(param != NULL);
    683
    684 return param->paramdata;
    685}
    686
    687/** returns whether parameter is advanced */
    689 SCIP_PARAM* param /**< parameter */
    690 )
    691{
    692 assert(param != NULL);
    693
    694 return param->isadvanced;
    695}
    696
    697/** returns whether parameter is fixed */
    699 SCIP_PARAM* param /**< parameter */
    700 )
    701{
    702 assert(param != NULL);
    703
    704 return param->isfixed;
    705}
    706
    707/** returns value of SCIP_Bool parameter */
    709 SCIP_PARAM* param /**< parameter */
    710 )
    711{
    712 assert(param != NULL);
    713 assert(param->paramtype == SCIP_PARAMTYPE_BOOL);
    714
    715 if( param->data.boolparam.valueptr != NULL )
    716 return *param->data.boolparam.valueptr;
    717 else
    718 return param->data.boolparam.curvalue;
    719}
    720
    721/** returns default value of SCIP_Bool parameter */
    723 SCIP_PARAM* param /**< parameter */
    724 )
    725{
    726 assert(param != NULL);
    727 assert(param->paramtype == SCIP_PARAMTYPE_BOOL);
    728
    729 return param->data.boolparam.defaultvalue;
    730}
    731
    732/** returns value of int parameter */
    734 SCIP_PARAM* param /**< parameter */
    735 )
    736{
    737 assert(param != NULL);
    738 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    739
    740 if( param->data.intparam.valueptr != NULL )
    741 return *param->data.intparam.valueptr;
    742 else
    743 return param->data.intparam.curvalue;
    744}
    745
    746/** returns minimal value of int parameter */
    748 SCIP_PARAM* param /**< parameter */
    749 )
    750{
    751 assert(param != NULL);
    752 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    753
    754 return param->data.intparam.minvalue;
    755}
    756
    757/** returns maximal value of int parameter */
    759 SCIP_PARAM* param /**< parameter */
    760 )
    761{
    762 assert(param != NULL);
    763 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    764
    765 return param->data.intparam.maxvalue;
    766}
    767
    768/** returns default value of int parameter */
    770 SCIP_PARAM* param /**< parameter */
    771 )
    772{
    773 assert(param != NULL);
    774 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    775
    776 return param->data.intparam.defaultvalue;
    777}
    778
    779/** returns value of SCIP_Longint parameter */
    781 SCIP_PARAM* param /**< parameter */
    782 )
    783{
    784 assert(param != NULL);
    785 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    786
    787 if( param->data.longintparam.valueptr != NULL )
    788 return *param->data.longintparam.valueptr;
    789 else
    790 return param->data.longintparam.curvalue;
    791}
    792
    793/** returns minimal value of longint parameter */
    795 SCIP_PARAM* param /**< parameter */
    796 )
    797{
    798 assert(param != NULL);
    799 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    800
    801 return param->data.longintparam.minvalue;
    802}
    803
    804/** returns maximal value of longint parameter */
    806 SCIP_PARAM* param /**< parameter */
    807 )
    808{
    809 assert(param != NULL);
    810 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    811
    812 return param->data.longintparam.maxvalue;
    813}
    814
    815/** returns default value of SCIP_Longint parameter */
    817 SCIP_PARAM* param /**< parameter */
    818 )
    819{
    820 assert(param != NULL);
    821 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    822
    823 return param->data.longintparam.defaultvalue;
    824}
    825
    826/** returns value of SCIP_Real parameter */
    828 SCIP_PARAM* param /**< parameter */
    829 )
    830{
    831 assert(param != NULL);
    832 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    833
    834 if( param->data.realparam.valueptr != NULL )
    835 return *param->data.realparam.valueptr;
    836 else
    837 return param->data.realparam.curvalue;
    838}
    839
    840/** returns minimal value of real parameter */
    842 SCIP_PARAM* param /**< parameter */
    843 )
    844{
    845 assert(param != NULL);
    846 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    847
    848 return param->data.realparam.minvalue;
    849}
    850
    851/** returns maximal value of real parameter */
    853 SCIP_PARAM* param /**< parameter */
    854 )
    855{
    856 assert(param != NULL);
    857 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    858
    859 return param->data.realparam.maxvalue;
    860}
    861
    862/** returns default value of SCIP_Real parameter */
    864 SCIP_PARAM* param /**< parameter */
    865 )
    866{
    867 assert(param != NULL);
    868 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    869
    870 return param->data.realparam.defaultvalue;
    871}
    872
    873/** returns value of char parameter */
    875 SCIP_PARAM* param /**< parameter */
    876 )
    877{
    878 assert(param != NULL);
    879 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    880
    881 if( param->data.charparam.valueptr != NULL )
    882 return *param->data.charparam.valueptr;
    883 else
    884 return param->data.charparam.curvalue;
    885}
    886
    887/** returns allowed values of char parameter, or NULL if everything is allowed */
    889 SCIP_PARAM* param /**< parameter */
    890 )
    891{
    892 assert(param != NULL);
    893 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    894
    895 return param->data.charparam.allowedvalues;
    896}
    897
    898/** returns default value of char parameter */
    900 SCIP_PARAM* param /**< parameter */
    901 )
    902{
    903 assert(param != NULL);
    904 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    905
    906 return param->data.charparam.defaultvalue;
    907}
    908
    909/** returns value of string parameter */
    911 SCIP_PARAM* param /**< parameter */
    912 )
    913{
    914 assert(param != NULL);
    915 assert(param->paramtype == SCIP_PARAMTYPE_STRING);
    916
    917 if( param->data.stringparam.valueptr != NULL )
    918 return *param->data.stringparam.valueptr;
    919 else
    920 return param->data.stringparam.curvalue;
    921}
    922
    923/** returns default value of String parameter */
    925 SCIP_PARAM* param /**< parameter */
    926 )
    927{
    928 assert(param != NULL);
    929 assert(param->paramtype == SCIP_PARAMTYPE_STRING);
    930
    931 return param->data.stringparam.defaultvalue;
    932}
    933
    934/** returns whether the parameter is on its default setting */
    936 SCIP_PARAM* param /**< parameter */
    937 )
    938{
    939 assert(param != NULL);
    940
    941 switch( param->paramtype )
    942 {
    944 return (SCIPparamGetBool(param) == SCIPparamGetBoolDefault(param));
    945
    947 return (SCIPparamGetInt(param) == SCIPparamGetIntDefault(param));
    948
    950 return (SCIPparamGetLongint(param) == SCIPparamGetLongintDefault(param));
    951
    953 return EPSZ(SCIPparamGetReal(param) - SCIPparamGetRealDefault(param), 1e-16);
    954
    956 return (SCIPparamGetChar(param) == SCIPparamGetCharDefault(param));
    957
    959 return (strcmp(SCIPparamGetString(param), SCIPparamGetStringDefault(param)) == 0);
    960
    961 default:
    962 SCIPerrorMessage("unknown parameter type\n");
    963 SCIPABORT();
    964 return FALSE; /*lint !e527*/
    965 }
    966}
    967
    968/** creates a parameter with name and description, does not set the type specific parameter values themselves */
    969static
    971 SCIP_PARAM** param, /**< pointer to the parameter */
    972 BMS_BLKMEM* blkmem, /**< block memory */
    973 const char* name, /**< name of the parameter */
    974 const char* desc, /**< description of the parameter */
    975 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    976 SCIP_PARAMDATA* paramdata, /**< locally defined parameter specific data */
    977 SCIP_Bool isadvanced /**< is the parameter advanced? */
    978 )
    979{
    980 assert(param != NULL);
    981 assert(name != NULL);
    982 assert(desc != NULL);
    983
    984 SCIP_ALLOC( BMSallocBlockMemory(blkmem, param) );
    985
    986 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->name, name, strlen(name)+1) );
    987 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->desc, desc, strlen(desc)+1) );
    988
    989 (*param)->paramchgd = paramchgd;
    990 (*param)->paramdata = paramdata;
    991 (*param)->isadvanced = isadvanced;
    992 (*param)->isfixed = FALSE;
    993
    994 return SCIP_OKAY;
    995}
    996
    997/** creates a SCIP_Bool parameter, and sets its value to default */
    998static
    1000 SCIP_PARAM** param, /**< pointer to the parameter */
    1001 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1002 BMS_BLKMEM* blkmem, /**< block memory */
    1003 const char* name, /**< name of the parameter */
    1004 const char* desc, /**< description of the parameter */
    1005 SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */
    1006 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1007 SCIP_Bool defaultvalue, /**< default value of the parameter */
    1008 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1009 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1010 )
    1011{
    1012 assert(param != NULL);
    1013 assert(name != NULL);
    1014
    1015 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1016
    1017 (*param)->paramtype = SCIP_PARAMTYPE_BOOL;
    1018 (*param)->data.boolparam.valueptr = valueptr;
    1019 (*param)->data.boolparam.defaultvalue = defaultvalue;
    1020
    1021 SCIP_CALL( SCIPparamSetBool(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1022
    1023 return SCIP_OKAY;
    1024}
    1025
    1026/** creates a int parameter, and sets its value to default */
    1027static
    1029 SCIP_PARAM** param, /**< pointer to the parameter */
    1030 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1031 BMS_BLKMEM* blkmem, /**< block memory */
    1032 const char* name, /**< name of the parameter */
    1033 const char* desc, /**< description of the parameter */
    1034 int* valueptr, /**< pointer to store the current parameter value, or NULL */
    1035 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1036 int defaultvalue, /**< default value of the parameter */
    1037 int minvalue, /**< minimum value for parameter */
    1038 int maxvalue, /**< maximum value for parameter */
    1039 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1040 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1041 )
    1042{
    1043 assert(param != NULL);
    1044 assert(name != NULL);
    1045
    1046 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1047
    1048 (*param)->paramtype = SCIP_PARAMTYPE_INT;
    1049 (*param)->data.intparam.valueptr = valueptr;
    1050 (*param)->data.intparam.defaultvalue = defaultvalue;
    1051 (*param)->data.intparam.minvalue = minvalue;
    1052 (*param)->data.intparam.maxvalue = maxvalue;
    1053
    1054 SCIP_CALL( SCIPparamSetInt(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1055
    1056 return SCIP_OKAY;
    1057}
    1058
    1059/** creates a SCIP_Longint parameter, and sets its value to default */
    1060static
    1062 SCIP_PARAM** param, /**< pointer to the parameter */
    1063 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1064 BMS_BLKMEM* blkmem, /**< block memory */
    1065 const char* name, /**< name of the parameter */
    1066 const char* desc, /**< description of the parameter */
    1067 SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */
    1068 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1069 SCIP_Longint defaultvalue, /**< default value of the parameter */
    1070 SCIP_Longint minvalue, /**< minimum value for parameter */
    1071 SCIP_Longint maxvalue, /**< maximum value for parameter */
    1072 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1073 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1074 )
    1075{
    1076 assert(param != NULL);
    1077 assert(name != NULL);
    1078
    1079 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1080
    1081 (*param)->paramtype = SCIP_PARAMTYPE_LONGINT;
    1082 (*param)->data.longintparam.valueptr = valueptr;
    1083 (*param)->data.longintparam.defaultvalue = defaultvalue;
    1084 (*param)->data.longintparam.minvalue = minvalue;
    1085 (*param)->data.longintparam.maxvalue = maxvalue;
    1086
    1087 SCIP_CALL( SCIPparamSetLongint(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1088
    1089 return SCIP_OKAY;
    1090}
    1091
    1092/** creates a SCIP_Real parameter, and sets its value to default */
    1093static
    1095 SCIP_PARAM** param, /**< pointer to the parameter */
    1096 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1097 BMS_BLKMEM* blkmem, /**< block memory */
    1098 const char* name, /**< name of the parameter */
    1099 const char* desc, /**< description of the parameter */
    1100 SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */
    1101 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1102 SCIP_Real defaultvalue, /**< default value of the parameter */
    1103 SCIP_Real minvalue, /**< minimum value for parameter */
    1104 SCIP_Real maxvalue, /**< maximum value for parameter */
    1105 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1106 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1107 )
    1108{
    1109 assert(param != NULL);
    1110 assert(name != NULL);
    1111
    1112 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1113
    1114 (*param)->paramtype = SCIP_PARAMTYPE_REAL;
    1115 (*param)->data.realparam.valueptr = valueptr;
    1116 (*param)->data.realparam.defaultvalue = defaultvalue;
    1117 (*param)->data.realparam.minvalue = minvalue;
    1118 (*param)->data.realparam.maxvalue = maxvalue;
    1119
    1120 SCIP_CALL( SCIPparamSetReal(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1121
    1122 return SCIP_OKAY;
    1123}
    1124
    1125/** creates a char parameter, and sets its value to default */
    1126static
    1128 SCIP_PARAM** param, /**< pointer to the parameter */
    1129 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1130 BMS_BLKMEM* blkmem, /**< block memory */
    1131 const char* name, /**< name of the parameter */
    1132 const char* desc, /**< description of the parameter */
    1133 char* valueptr, /**< pointer to store the current parameter value, or NULL */
    1134 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1135 char defaultvalue, /**< default value of the parameter */
    1136 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
    1137 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1138 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1139 )
    1140{
    1141 assert(param != NULL);
    1142 assert(name != NULL);
    1143
    1144 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1145
    1146 (*param)->paramtype = SCIP_PARAMTYPE_CHAR;
    1147 (*param)->data.charparam.valueptr = valueptr;
    1148 (*param)->data.charparam.defaultvalue = defaultvalue;
    1149 if( allowedvalues != NULL )
    1150 {
    1151 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->data.charparam.allowedvalues, allowedvalues, strlen(allowedvalues)+1) );
    1152 }
    1153 else
    1154 (*param)->data.charparam.allowedvalues = NULL;
    1155
    1156 SCIP_CALL( SCIPparamSetChar(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1157
    1158 return SCIP_OKAY;
    1159}
    1160
    1161/** creates a string parameter, and sets its value to default */
    1162static
    1164 SCIP_PARAM** param, /**< pointer to the parameter */
    1165 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1166 BMS_BLKMEM* blkmem, /**< block memory */
    1167 const char* name, /**< name of the parameter */
    1168 const char* desc, /**< description of the parameter */
    1169 char** valueptr, /**< pointer to store the current parameter value, or NULL */
    1170 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1171 const char* defaultvalue, /**< default value of the parameter */
    1172 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1173 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1174 )
    1175{
    1176 assert(param != NULL);
    1177 assert(name != NULL);
    1178 assert(valueptr == NULL || *valueptr == NULL);
    1179 assert(defaultvalue != NULL);
    1180
    1181 SCIP_CALL( paramCreate(param, blkmem, name, desc, paramchgd, paramdata, isadvanced) );
    1182
    1183 (*param)->paramtype = SCIP_PARAMTYPE_STRING;
    1184 (*param)->data.stringparam.valueptr = valueptr;
    1185 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->data.stringparam.defaultvalue, defaultvalue, strlen(defaultvalue)+1) );
    1186 (*param)->data.stringparam.curvalue = NULL;
    1187
    1188 SCIP_CALL( SCIPparamSetString(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );
    1189
    1190 return SCIP_OKAY;
    1191}
    1192
    1193/** frees a single parameter */
    1194static
    1196 SCIP_PARAM** param, /**< pointer to the parameter */
    1197 BMS_BLKMEM* blkmem /**< block memory */
    1198 )
    1199{
    1200 assert(param != NULL);
    1201 assert(*param != NULL);
    1202
    1203 switch( (*param)->paramtype )
    1204 {
    1206 case SCIP_PARAMTYPE_INT:
    1209 break;
    1211 BMSfreeMemoryArrayNull(&(*param)->data.charparam.allowedvalues);
    1212 break;
    1214 BMSfreeMemoryArray(&(*param)->data.stringparam.defaultvalue);
    1215 if( (*param)->data.stringparam.valueptr == NULL )
    1216 {
    1217 BMSfreeMemoryArray(&(*param)->data.stringparam.curvalue);
    1218 }
    1219 else
    1220 {
    1221 BMSfreeMemoryArray((*param)->data.stringparam.valueptr);
    1222 }
    1223 break;
    1224 default:
    1225 SCIPerrorMessage("invalid parameter type\n");
    1226 /* just continuing the function in this case seems save */
    1227 SCIPABORT();
    1228 }
    1229
    1230 BMSfreeMemoryArray(&(*param)->name);
    1231 BMSfreeMemoryArray(&(*param)->desc);
    1232 BMSfreeBlockMemory(blkmem, param);
    1233}
    1234
    1235/** sets SCIP_Bool parameter according to the value of the given string */
    1236static
    1238 SCIP_PARAM* param, /**< parameter */
    1239 SCIP_SET* set, /**< global SCIP settings */
    1240 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1241 char* valuestr /**< value in string format (may be modified during parse) */
    1242 )
    1243{
    1244 assert(param != NULL);
    1245 assert(param->paramtype == SCIP_PARAMTYPE_BOOL);
    1246 assert(set != NULL);
    1247 assert(valuestr != NULL);
    1248
    1249 if( SCIPstrcasecmp(valuestr, "TRUE") == 0 )
    1250 {
    1251 SCIP_CALL( SCIPparamSetBool(param, set, messagehdlr, TRUE, FALSE, TRUE) );
    1252 }
    1253 else if( SCIPstrcasecmp(valuestr, "FALSE") == 0 )
    1254 {
    1255 SCIP_CALL( SCIPparamSetBool(param, set, messagehdlr, FALSE, FALSE, TRUE) );
    1256 }
    1257 else
    1258 {
    1259 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Bool parameter <%s>\n", valuestr, param->name);
    1260 return SCIP_READERROR;
    1261 }
    1262
    1263 return SCIP_OKAY;
    1264}
    1265
    1266/** sets int parameter according to the value of the given string */
    1267static
    1269 SCIP_PARAM* param, /**< parameter */
    1270 SCIP_SET* set, /**< global SCIP settings */
    1271 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1272 char* valuestr /**< value in string format (may be modified during parse) */
    1273 )
    1274{
    1275 int value;
    1276
    1277 assert(param != NULL);
    1278 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    1279 assert(set != NULL);
    1280 assert(valuestr != NULL);
    1281
    1282 /* coverity[secure_coding] */
    1283 if( sscanf(valuestr, "%d", &value) == 1 )
    1284 {
    1285 SCIP_CALL( SCIPparamSetInt(param, set, messagehdlr, value, FALSE, TRUE) );
    1286 }
    1287 else
    1288 {
    1289 SCIPerrorMessage("invalid parameter value <%s> for int parameter <%s>\n", valuestr, param->name);
    1290 return SCIP_READERROR;
    1291 }
    1292
    1293 return SCIP_OKAY;
    1294}
    1295
    1296/** sets SCIP_Longint parameter according to the value of the given string */
    1297static
    1299 SCIP_PARAM* param, /**< parameter */
    1300 SCIP_SET* set, /**< global SCIP settings */
    1301 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1302 char* valuestr /**< value in string format (may be modified during parse) */
    1303 )
    1304{
    1305 SCIP_Longint value;
    1306
    1307 assert(param != NULL);
    1308 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    1309 assert(set != NULL);
    1310 assert(valuestr != NULL);
    1311
    1312 /* coverity[secure_coding] */
    1313 if( sscanf(valuestr, "%" SCIP_LONGINT_FORMAT, &value) == 1 )
    1314 {
    1315 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, value, FALSE, TRUE) );
    1316 }
    1317 else
    1318 {
    1319 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Longint parameter <%s>\n", valuestr, param->name);
    1320 return SCIP_READERROR;
    1321 }
    1322
    1323 return SCIP_OKAY;
    1324}
    1325
    1326/** sets SCIP_Real parameter according to the value of the given string */
    1327static
    1329 SCIP_PARAM* param, /**< parameter */
    1330 SCIP_SET* set, /**< global SCIP settings */
    1331 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1332 char* valuestr /**< value in string format (may be modified during parse) */
    1333 )
    1334{
    1335 SCIP_Real value;
    1336
    1337 assert(param != NULL);
    1338 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    1339 assert(set != NULL);
    1340 assert(valuestr != NULL);
    1341
    1342 /* coverity[secure_coding] */
    1343 if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &value) == 1 )
    1344 {
    1345 SCIP_CALL( SCIPparamSetReal(param, set, messagehdlr, value, FALSE, TRUE) );
    1346 }
    1347 else
    1348 {
    1349 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Real parameter <%s>\n", valuestr, param->name);
    1350 return SCIP_READERROR;
    1351 }
    1352
    1353 return SCIP_OKAY;
    1354}
    1355
    1356/** sets Char parameter according to the value of the given string */
    1357static
    1359 SCIP_PARAM* param, /**< parameter */
    1360 SCIP_SET* set, /**< global SCIP settings */
    1361 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1362 char* valuestr /**< value in string format (may be modified during parse) */
    1363 )
    1364{
    1365 char value;
    1366
    1367 assert(param != NULL);
    1368 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    1369 assert(set != NULL);
    1370 assert(valuestr != NULL);
    1371
    1372 /* coverity[secure_coding] */
    1373 if( sscanf(valuestr, "%c", &value) == 1 )
    1374 {
    1375 SCIP_CALL( SCIPparamSetChar(param, set, messagehdlr, value, FALSE, TRUE) );
    1376 }
    1377 else
    1378 {
    1379 SCIPerrorMessage("invalid parameter value <%s> for char parameter <%s>\n", valuestr, param->name);
    1380 return SCIP_READERROR;
    1381 }
    1382
    1383 return SCIP_OKAY;
    1384}
    1385
    1386/** sets string parameter according to the value of the given string */
    1387static
    1389 SCIP_PARAM* param, /**< parameter */
    1390 SCIP_SET* set, /**< global SCIP settings */
    1391 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1392 char* valuestr /**< value in string format (may be modified during parse) */
    1393 )
    1394{
    1395 unsigned int len;
    1396
    1397 assert(param != NULL);
    1398 assert(param->paramtype == SCIP_PARAMTYPE_STRING);
    1399 assert(set != NULL);
    1400 assert(valuestr != NULL);
    1401
    1402 /* check for quotes */
    1403 len = (unsigned int) strlen(valuestr);
    1404 if( len <= 1 || valuestr[0] != '"' || valuestr[len-1] != '"' )
    1405 {
    1406 SCIPerrorMessage("invalid parameter value <%s> for string parameter <%s> (string has to be in double quotes)\n",
    1407 valuestr, param->name);
    1408 return SCIP_READERROR;
    1409 }
    1410
    1411 /* remove the quotes */
    1412 valuestr[len-1] = '\0';
    1413 valuestr++;
    1414 SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, valuestr, FALSE, TRUE) );
    1415
    1416 return SCIP_OKAY;
    1417}
    1418
    1419
    1420/*
    1421 * Parameter set methods
    1422 */
    1423
    1424/** creates parameter set */
    1426 SCIP_PARAMSET** paramset, /**< pointer to store the parameter set */
    1427 BMS_BLKMEM* blkmem /**< block memory */
    1428 )
    1429{
    1430 assert(paramset != NULL);
    1431
    1432 SCIP_ALLOC( BMSallocMemory(paramset) );
    1433
    1434 SCIP_CALL( SCIPhashtableCreate(&(*paramset)->hashtable, blkmem, SCIP_HASHSIZE_PARAMS,
    1435 hashGetKeyParam, SCIPhashKeyEqString, SCIPhashKeyValString, NULL) );
    1436
    1437 (*paramset)->params = NULL;
    1438 (*paramset)->nparams = 0;
    1439 (*paramset)->paramssize = 0;
    1440
    1441 return SCIP_OKAY;
    1442}
    1443
    1444/** frees parameter set */
    1446 SCIP_PARAMSET** paramset, /**< pointer to the parameter set */
    1447 BMS_BLKMEM* blkmem /**< block memory */
    1448 )
    1449{
    1450 int i;
    1451
    1452 assert(paramset != NULL);
    1453 assert(*paramset != NULL);
    1454 assert((*paramset)->paramssize == 0 || (*paramset)->params != NULL);
    1455 assert((*paramset)->paramssize >= (*paramset)->nparams);
    1456
    1457 for( i = (*paramset)->nparams - 1; i >= 0; --i )
    1458 {
    1459 paramFree(&(*paramset)->params[i], blkmem);
    1460 }
    1461
    1462 SCIPhashtableFree(&(*paramset)->hashtable);
    1463
    1464 BMSfreeMemoryArrayNull(&(*paramset)->params);
    1465 BMSfreeMemory(paramset);
    1466}
    1467
    1468/** adds parameter to the parameter set */
    1469static
    1471 SCIP_PARAMSET* paramset, /**< parameter set */
    1472 SCIP_PARAM* param /**< parameter to add */
    1473 )
    1474{
    1475 assert(paramset != NULL);
    1476 assert(param != NULL);
    1477
    1478 /* insert the parameter name to the hash table */
    1479 SCIP_CALL( SCIPhashtableSafeInsert(paramset->hashtable, (void*)param) );
    1480
    1481 /* ensure, that there is enough space in the params array */
    1482 if( paramset->nparams >= paramset->paramssize )
    1483 {
    1484 paramset->paramssize *= 2;
    1485 paramset->paramssize = MAX(paramset->paramssize, paramset->nparams+1);
    1486 SCIP_ALLOC( BMSreallocMemoryArray(&paramset->params, paramset->paramssize) );
    1487 }
    1488 assert(paramset->nparams < paramset->paramssize);
    1489
    1490 /* insert parameter in the params array */
    1491 paramset->params[paramset->nparams] = param;
    1492 paramset->nparams++;
    1493
    1494 return SCIP_OKAY;
    1495}
    1496
    1497/** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */
    1499 SCIP_PARAMSET* paramset, /**< parameter set */
    1500 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1501 BMS_BLKMEM* blkmem, /**< block memory */
    1502 const char* name, /**< name of the parameter */
    1503 const char* desc, /**< description of the parameter */
    1504 SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */
    1505 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1506 SCIP_Bool defaultvalue, /**< default value of the parameter */
    1507 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1508 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1509 )
    1510{
    1511 SCIP_PARAM* param;
    1512
    1513 assert(paramset != NULL);
    1514
    1515 /* create the parameter */
    1516 SCIP_CALL( paramCreateBool(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, paramchgd, paramdata) );
    1517
    1518 /* add parameter to the parameter set */
    1519 SCIP_CALL( paramsetAdd(paramset, param) );
    1520
    1521 return SCIP_OKAY;
    1522}
    1523
    1524/** creates a int parameter, sets it to its default value, and adds it to the parameter set */
    1526 SCIP_PARAMSET* paramset, /**< parameter set */
    1527 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1528 BMS_BLKMEM* blkmem, /**< block memory */
    1529 const char* name, /**< name of the parameter */
    1530 const char* desc, /**< description of the parameter */
    1531 int* valueptr, /**< pointer to store the current parameter value, or NULL */
    1532 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1533 int defaultvalue, /**< default value of the parameter */
    1534 int minvalue, /**< minimum value for parameter */
    1535 int maxvalue, /**< maximum value for parameter */
    1536 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1537 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1538 )
    1539{
    1540 SCIP_PARAM* param;
    1541
    1542 assert(paramset != NULL);
    1543
    1544 /* create the parameter */
    1545 SCIP_CALL( paramCreateInt(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
    1546 paramchgd, paramdata) );
    1547
    1548 /* add parameter to the parameter set */
    1549 SCIP_CALL( paramsetAdd(paramset, param) );
    1550
    1551 return SCIP_OKAY;
    1552}
    1553
    1554/** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */
    1556 SCIP_PARAMSET* paramset, /**< parameter set */
    1557 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1558 BMS_BLKMEM* blkmem, /**< block memory */
    1559 const char* name, /**< name of the parameter */
    1560 const char* desc, /**< description of the parameter */
    1561 SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */
    1562 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1563 SCIP_Longint defaultvalue, /**< default value of the parameter */
    1564 SCIP_Longint minvalue, /**< minimum value for parameter */
    1565 SCIP_Longint maxvalue, /**< maximum value for parameter */
    1566 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1567 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1568 )
    1569{
    1570 SCIP_PARAM* param;
    1571
    1572 assert(paramset != NULL);
    1573
    1574 /* create the parameter */
    1575 SCIP_CALL( paramCreateLongint(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
    1576 paramchgd, paramdata) );
    1577
    1578 /* add parameter to the parameter set */
    1579 SCIP_CALL( paramsetAdd(paramset, param) );
    1580
    1581 return SCIP_OKAY;
    1582}
    1583
    1584/** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */
    1586 SCIP_PARAMSET* paramset, /**< parameter set */
    1587 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1588 BMS_BLKMEM* blkmem, /**< block memory */
    1589 const char* name, /**< name of the parameter */
    1590 const char* desc, /**< description of the parameter */
    1591 SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */
    1592 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1593 SCIP_Real defaultvalue, /**< default value of the parameter */
    1594 SCIP_Real minvalue, /**< minimum value for parameter */
    1595 SCIP_Real maxvalue, /**< maximum value for parameter */
    1596 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1597 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1598 )
    1599{
    1600 SCIP_PARAM* param;
    1601
    1602 assert(paramset != NULL);
    1603
    1604 /* create the parameter */
    1605 SCIP_CALL( paramCreateReal(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
    1606 paramchgd, paramdata) );
    1607
    1608 /* add parameter to the parameter set */
    1609 SCIP_CALL( paramsetAdd(paramset, param) );
    1610
    1611 return SCIP_OKAY;
    1612}
    1613
    1614/** creates a char parameter, sets it to its default value, and adds it to the parameter set */
    1616 SCIP_PARAMSET* paramset, /**< parameter set */
    1617 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1618 BMS_BLKMEM* blkmem, /**< block memory */
    1619 const char* name, /**< name of the parameter */
    1620 const char* desc, /**< description of the parameter */
    1621 char* valueptr, /**< pointer to store the current parameter value, or NULL */
    1622 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1623 char defaultvalue, /**< default value of the parameter */
    1624 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
    1625 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1626 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1627 )
    1628{
    1629 SCIP_PARAM* param;
    1630
    1631 assert(paramset != NULL);
    1632
    1633 /* create the parameter */
    1634 SCIP_CALL( paramCreateChar(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, allowedvalues,
    1635 paramchgd, paramdata) );
    1636
    1637 /* add parameter to the parameter set */
    1638 SCIP_CALL( paramsetAdd(paramset, param) );
    1639
    1640 return SCIP_OKAY;
    1641}
    1642
    1643/** creates a string parameter, sets it to its default value, and adds it to the parameter set */
    1645 SCIP_PARAMSET* paramset, /**< parameter set */
    1646 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1647 BMS_BLKMEM* blkmem, /**< block memory */
    1648 const char* name, /**< name of the parameter */
    1649 const char* desc, /**< description of the parameter */
    1650 char** valueptr, /**< pointer to store the current parameter value, or NULL */
    1651 SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
    1652 const char* defaultvalue, /**< default value of the parameter */
    1653 SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
    1654 SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
    1655 )
    1656{
    1657 SCIP_PARAM* param;
    1658
    1659 assert(paramset != NULL);
    1660
    1661 /* create the parameter */
    1662 SCIP_CALL( paramCreateString(&param, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, paramchgd, paramdata) );
    1663
    1664 /* add parameter to the parameter set */
    1665 SCIP_CALL( paramsetAdd(paramset, param) );
    1666
    1667 return SCIP_OKAY;
    1668}
    1669
    1670/** returns the name of the given parameter type */
    1671static
    1673 SCIP_PARAMTYPE paramtype /**< type of parameter */
    1674 )
    1675{
    1676 static const char* paramtypename[] = {
    1677 "Bool", /* SCIP_PARAMTYPE_BOOL = 0 */
    1678 "int", /* SCIP_PARAMTYPE_INT = 1 */
    1679 "Longint", /* SCIP_PARAMTYPE_LONGINT = 2 */
    1680 "Real", /* SCIP_PARAMTYPE_REAL = 3 */
    1681 "char", /* SCIP_PARAMTYPE_CHAR = 4 */
    1682 "string" /* SCIP_PARAMTYPE_STRING = 5 */
    1683 };
    1684
    1685 return paramtypename[(int)paramtype];
    1686}
    1687
    1688/** returns whether an existing parameter is fixed */
    1690 SCIP_PARAMSET* paramset, /**< parameter set */
    1691 const char* name /**< name of the parameter */
    1692 )
    1693{
    1694 SCIP_PARAM* param;
    1695
    1696 assert(paramset != NULL);
    1697
    1698 /* retrieve parameter from hash table */
    1699 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1700 if( param == NULL )
    1701 {
    1702 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1703 SCIPABORT();
    1704 return FALSE; /*lint !e527*/
    1705 }
    1706
    1707 return SCIPparamIsFixed(param);
    1708}
    1709
    1710/** returns the pointer to an existing SCIP parameter */
    1712 SCIP_PARAMSET* paramset, /**< parameter set */
    1713 const char* name /**< name of the parameter */
    1714 )
    1715{
    1716 assert(paramset != NULL);
    1717
    1718 /* retrieve parameter from hash table and return it */
    1719 return (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1720}
    1721
    1722/** gets the value of an existing SCIP_Bool parameter */
    1724 SCIP_PARAMSET* paramset, /**< parameter set */
    1725 const char* name, /**< name of the parameter */
    1726 SCIP_Bool* value /**< pointer to store the parameter */
    1727 )
    1728{
    1729 SCIP_PARAM* param;
    1730
    1731 assert(paramset != NULL);
    1732 assert(value != NULL);
    1733
    1734 /* retrieve parameter from hash table */
    1735 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1736 if( param == NULL )
    1737 {
    1738 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1739 return SCIP_PARAMETERUNKNOWN;
    1740 }
    1741 if( param->paramtype != SCIP_PARAMTYPE_BOOL )
    1742 {
    1743 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1746 }
    1747
    1748 /* get the parameter's current value */
    1749 *value = SCIPparamGetBool(param);
    1750
    1751 return SCIP_OKAY;
    1752}
    1753
    1754/** gets the value of an existing int parameter */
    1756 SCIP_PARAMSET* paramset, /**< parameter set */
    1757 const char* name, /**< name of the parameter */
    1758 int* value /**< pointer to store the parameter */
    1759 )
    1760{
    1761 SCIP_PARAM* param;
    1762
    1763 assert(paramset != NULL);
    1764 assert(value != NULL);
    1765
    1766 /* retrieve parameter from hash table */
    1767 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1768 if( param == NULL )
    1769 {
    1770 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1771 return SCIP_PARAMETERUNKNOWN;
    1772 }
    1773 if( param->paramtype != SCIP_PARAMTYPE_INT )
    1774 {
    1775 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1778 }
    1779
    1780 /* get the parameter's current value */
    1781 *value = SCIPparamGetInt(param);
    1782
    1783 return SCIP_OKAY;
    1784}
    1785
    1786/** gets the value of an existing SCIP_Longint parameter */
    1788 SCIP_PARAMSET* paramset, /**< parameter set */
    1789 const char* name, /**< name of the parameter */
    1790 SCIP_Longint* value /**< pointer to store the parameter */
    1791 )
    1792{
    1793 SCIP_PARAM* param;
    1794
    1795 assert(paramset != NULL);
    1796 assert(value != NULL);
    1797
    1798 /* retrieve parameter from hash table */
    1799 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1800 if( param == NULL )
    1801 {
    1802 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1803 return SCIP_PARAMETERUNKNOWN;
    1804 }
    1805 if( param->paramtype != SCIP_PARAMTYPE_LONGINT )
    1806 {
    1807 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1810 }
    1811
    1812 /* get the parameter's current value */
    1813 *value = SCIPparamGetLongint(param);
    1814
    1815 return SCIP_OKAY;
    1816}
    1817
    1818/** gets the value of an existing SCIP_Real parameter */
    1820 SCIP_PARAMSET* paramset, /**< parameter set */
    1821 const char* name, /**< name of the parameter */
    1822 SCIP_Real* value /**< pointer to store the parameter */
    1823 )
    1824{
    1825 SCIP_PARAM* param;
    1826
    1827 assert(paramset != NULL);
    1828 assert(value != NULL);
    1829
    1830 /* retrieve parameter from hash table */
    1831 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1832 if( param == NULL )
    1833 {
    1834 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1835 return SCIP_PARAMETERUNKNOWN;
    1836 }
    1837 if( param->paramtype != SCIP_PARAMTYPE_REAL )
    1838 {
    1839 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1842 }
    1843
    1844 /* get the parameter's current value */
    1845 *value = SCIPparamGetReal(param);
    1846
    1847 return SCIP_OKAY;
    1848}
    1849
    1850/** gets the value of an existing char parameter */
    1852 SCIP_PARAMSET* paramset, /**< parameter set */
    1853 const char* name, /**< name of the parameter */
    1854 char* value /**< pointer to store the parameter */
    1855 )
    1856{
    1857 SCIP_PARAM* param;
    1858
    1859 assert(paramset != NULL);
    1860 assert(value != NULL);
    1861
    1862 /* retrieve parameter from hash table */
    1863 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1864 if( param == NULL )
    1865 {
    1866 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1867 return SCIP_PARAMETERUNKNOWN;
    1868 }
    1869 if( param->paramtype != SCIP_PARAMTYPE_CHAR )
    1870 {
    1871 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1874 }
    1875
    1876 /* get the parameter's current value */
    1877 *value = SCIPparamGetChar(param);
    1878
    1879 return SCIP_OKAY;
    1880}
    1881
    1882/** gets the value of an existing string parameter */
    1884 SCIP_PARAMSET* paramset, /**< parameter set */
    1885 const char* name, /**< name of the parameter */
    1886 char** value /**< pointer to store the parameter */
    1887 )
    1888{
    1889 SCIP_PARAM* param;
    1890
    1891 assert(paramset != NULL);
    1892 assert(value != NULL);
    1893
    1894 /* retrieve parameter from hash table */
    1895 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1896 if( param == NULL )
    1897 {
    1898 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1899 return SCIP_PARAMETERUNKNOWN;
    1900 }
    1901 if( param->paramtype != SCIP_PARAMTYPE_STRING )
    1902 {
    1903 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1906 }
    1907
    1908 /* get the parameter's current value */
    1909 *value = SCIPparamGetString(param);
    1910
    1911 return SCIP_OKAY;
    1912}
    1913
    1914/** changes the fixing status of an existing parameter */
    1916 SCIP_PARAMSET* paramset, /**< parameter set */
    1917 const char* name, /**< name of the parameter */
    1918 SCIP_Bool fixed /**< new fixing status of the parameter */
    1919 )
    1920{
    1921 SCIP_PARAM* param;
    1922
    1923 assert(paramset != NULL);
    1924
    1925 /* retrieve parameter from hash table */
    1926 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1927 if( param == NULL )
    1928 {
    1929 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1930 return SCIP_PARAMETERUNKNOWN;
    1931 }
    1932
    1933 SCIPparamSetFixed(param, fixed);
    1934
    1935 return SCIP_OKAY;
    1936}
    1937
    1938/** changes the value of an existing SCIP_Bool parameter */
    1940 SCIP_PARAMSET* paramset, /**< parameter set */
    1941 SCIP_SET* set, /**< global SCIP settings */
    1942 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1943 const char* name, /**< name of the parameter */
    1944 SCIP_Bool value /**< new value of the parameter */
    1945 )
    1946{
    1947 SCIP_PARAM* param;
    1948
    1949 assert(paramset != NULL);
    1950 assert(set != NULL);
    1951
    1952 /* retrieve parameter from hash table */
    1953 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1954 if( param == NULL )
    1955 {
    1956 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1957 return SCIP_PARAMETERUNKNOWN;
    1958 }
    1959 if( param->paramtype != SCIP_PARAMTYPE_BOOL )
    1960 {
    1961 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1964 }
    1965
    1966 /* set the parameter's current value */
    1967 SCIP_CALL( SCIPparamSetBool(param, set, messagehdlr, value, FALSE, TRUE) );
    1968
    1969 return SCIP_OKAY;
    1970}
    1971
    1972/** changes the value of an existing int parameter */
    1974 SCIP_PARAMSET* paramset, /**< parameter set */
    1975 SCIP_SET* set, /**< global SCIP settings */
    1976 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    1977 const char* name, /**< name of the parameter */
    1978 int value /**< new value of the parameter */
    1979 )
    1980{
    1981 SCIP_PARAM* param;
    1982
    1983 assert(paramset != NULL);
    1984 assert(set != NULL);
    1985
    1986 /* retrieve parameter from hash table */
    1987 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    1988 if( param == NULL )
    1989 {
    1990 SCIPerrorMessage("parameter <%s> unknown\n", name);
    1991 return SCIP_PARAMETERUNKNOWN;
    1992 }
    1993 if( param->paramtype != SCIP_PARAMTYPE_INT )
    1994 {
    1995 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    1998 }
    1999
    2000 /* set the parameter's current value */
    2001 SCIP_CALL( SCIPparamSetInt(param, set, messagehdlr, value, FALSE, TRUE) );
    2002
    2003 return SCIP_OKAY;
    2004}
    2005
    2006/** changes the value of an existing SCIP_Longint parameter */
    2008 SCIP_PARAMSET* paramset, /**< parameter set */
    2009 SCIP_SET* set, /**< global SCIP settings */
    2010 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2011 const char* name, /**< name of the parameter */
    2012 SCIP_Longint value /**< new value of the parameter */
    2013 )
    2014{
    2015 SCIP_PARAM* param;
    2016
    2017 assert(paramset != NULL);
    2018 assert(set != NULL);
    2019
    2020 /* retrieve parameter from hash table */
    2021 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2022 if( param == NULL )
    2023 {
    2024 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2025 return SCIP_PARAMETERUNKNOWN;
    2026 }
    2027 if( param->paramtype != SCIP_PARAMTYPE_LONGINT )
    2028 {
    2029 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2032 }
    2033
    2034 /* set the parameter's current value */
    2035 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, value, FALSE, TRUE) );
    2036
    2037 return SCIP_OKAY;
    2038}
    2039
    2040/** changes the value of an existing SCIP_Real parameter */
    2042 SCIP_PARAMSET* paramset, /**< parameter set */
    2043 SCIP_SET* set, /**< global SCIP settings */
    2044 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2045 const char* name, /**< name of the parameter */
    2046 SCIP_Real value /**< new value of the parameter */
    2047 )
    2048{
    2049 SCIP_PARAM* param;
    2050
    2051 assert(paramset != NULL);
    2052 assert(set != NULL);
    2053
    2054 /* retrieve parameter from hash table */
    2055 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2056 if( param == NULL )
    2057 {
    2058 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2059 return SCIP_PARAMETERUNKNOWN;
    2060 }
    2061 if( param->paramtype != SCIP_PARAMTYPE_REAL )
    2062 {
    2063 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2066 }
    2067
    2068 /* set the parameter's current value */
    2069 SCIP_CALL( SCIPparamSetReal(param, set, messagehdlr, value, FALSE, TRUE) );
    2070
    2071 return SCIP_OKAY;
    2072}
    2073
    2074/** changes the value of an existing char parameter */
    2076 SCIP_PARAMSET* paramset, /**< parameter set */
    2077 SCIP_SET* set, /**< global SCIP settings */
    2078 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2079 const char* name, /**< name of the parameter */
    2080 char value /**< new value of the parameter */
    2081 )
    2082{
    2083 SCIP_PARAM* param;
    2084
    2085 assert(paramset != NULL);
    2086 assert(set != NULL);
    2087
    2088 /* retrieve parameter from hash table */
    2089 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2090 if( param == NULL )
    2091 {
    2092 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2093 return SCIP_PARAMETERUNKNOWN;
    2094 }
    2095 if( param->paramtype != SCIP_PARAMTYPE_CHAR )
    2096 {
    2097 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2100 }
    2101
    2102 /* set the parameter's current value */
    2103 SCIP_CALL( SCIPparamSetChar(param, set, messagehdlr, value, FALSE, TRUE) );
    2104
    2105 return SCIP_OKAY;
    2106}
    2107
    2108/** changes the value of an existing string parameter */
    2110 SCIP_PARAMSET* paramset, /**< parameter set */
    2111 SCIP_SET* set, /**< global SCIP settings */
    2112 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2113 const char* name, /**< name of the parameter */
    2114 const char* value /**< new value of the parameter */
    2115 )
    2116{
    2117 SCIP_PARAM* param;
    2118
    2119 assert(paramset != NULL);
    2120 assert(set != NULL);
    2121
    2122 /* retrieve parameter from hash table */
    2123 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2124 if( param == NULL )
    2125 {
    2126 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2127 return SCIP_PARAMETERUNKNOWN;
    2128 }
    2129 if( param->paramtype != SCIP_PARAMTYPE_STRING )
    2130 {
    2131 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2134 }
    2135
    2136 /* set the parameter's current value */
    2137 SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, value, FALSE, TRUE) );
    2138
    2139 return SCIP_OKAY;
    2140}
    2141
    2142/** changes the value of an existing parameter */
    2144 SCIP_PARAMSET* paramset, /**< parameter set */
    2145 SCIP_SET* set, /**< global SCIP settings */
    2146 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2147 const char* name, /**< name of the parameter */
    2148 const char* value, /**< new value of the parameter as string */
    2149 SCIP_Bool fix /**< whether to fix parameter */
    2150 )
    2151{
    2152 SCIP_PARAM* param;
    2153
    2154 assert(paramset != NULL);
    2155 assert(paramset->hashtable != NULL);
    2156 assert(name != NULL);
    2157 assert(value != NULL);
    2158
    2159 /* retrieve parameter from hash table */
    2160 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2161 if( param == NULL )
    2162 {
    2163 SCIPmessagePrintWarning(messagehdlr, "unknown parameter <%s>\n", name);
    2164 return SCIP_OKAY;
    2165 }
    2166
    2167 SCIPparamSetFixed(param, FALSE);
    2168
    2169 /* set parameter's value */
    2170 switch( param->paramtype )
    2171 {
    2173 SCIP_CALL( paramParseBool(param, set, messagehdlr, (char*)value) );
    2174 break;
    2175 case SCIP_PARAMTYPE_INT:
    2176 SCIP_CALL( paramParseInt(param, set, messagehdlr, (char*)value) );
    2177 break;
    2179 SCIP_CALL( paramParseLongint(param, set, messagehdlr, (char*)value) );
    2180 break;
    2182 SCIP_CALL( paramParseReal(param, set, messagehdlr, (char*)value) );
    2183 break;
    2185 SCIP_CALL( paramParseChar(param, set, messagehdlr, (char*)value) );
    2186 break;
    2188 SCIP_CALL( paramParseString(param, set, messagehdlr, (char*)value) );
    2189 break;
    2190 default:
    2191 SCIPerrorMessage("unknown parameter type\n");
    2192 return SCIP_INVALIDDATA;
    2193 }
    2194
    2195 if( fix )
    2196 SCIPparamSetFixed(param, TRUE);
    2197
    2198 return SCIP_OKAY;
    2199}
    2200
    2201/** changes the default value of an existing SCIP_Bool parameter */
    2203 SCIP_PARAMSET* paramset, /**< parameter set */
    2204 const char* name, /**< name of the parameter */
    2205 SCIP_Bool defaultvalue /**< new default value of the parameter */
    2206 )
    2207{
    2208 SCIP_PARAM* param;
    2209
    2210 assert(paramset != NULL);
    2211
    2212 /* retrieve parameter from hash table */
    2213 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2214 if( param == NULL )
    2215 {
    2216 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2217 return SCIP_PARAMETERUNKNOWN;
    2218 }
    2219 if( param->paramtype != SCIP_PARAMTYPE_BOOL )
    2220 {
    2221 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2224 }
    2225
    2226 /* set the parameter's default value */
    2227 SCIPparamSetDefaultBool(param, defaultvalue);
    2228
    2229 return SCIP_OKAY;
    2230}
    2231
    2232/** changes the default value of an existing int parameter */
    2234 SCIP_PARAMSET* paramset, /**< parameter set */
    2235 const char* name, /**< name of the parameter */
    2236 int defaultvalue /**< new default value of the parameter */
    2237 )
    2238{
    2239 SCIP_PARAM* param;
    2240
    2241 assert(paramset != NULL);
    2242
    2243 /* retrieve parameter from hash table */
    2244 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2245 if( param == NULL )
    2246 {
    2247 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2248 return SCIP_PARAMETERUNKNOWN;
    2249 }
    2250 if( param->paramtype != SCIP_PARAMTYPE_INT )
    2251 {
    2252 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2255 }
    2256
    2257 /* set the parameter's default value */
    2258 SCIPparamSetDefaultInt(param, defaultvalue);
    2259
    2260 return SCIP_OKAY;
    2261}
    2262
    2263/** changes the default value of an existing SCIP_Longint parameter */
    2265 SCIP_PARAMSET* paramset, /**< parameter set */
    2266 const char* name, /**< name of the parameter */
    2267 SCIP_Longint defaultvalue /**< new default value of the parameter */
    2268 )
    2269{
    2270 SCIP_PARAM* param;
    2271
    2272 assert(paramset != NULL);
    2273
    2274 /* retrieve parameter from hash table */
    2275 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2276 if( param == NULL )
    2277 {
    2278 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2279 return SCIP_PARAMETERUNKNOWN;
    2280 }
    2281 if( param->paramtype != SCIP_PARAMTYPE_LONGINT )
    2282 {
    2283 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2286 }
    2287
    2288 /* set the parameter's default value */
    2289 SCIPparamSetDefaultLongint(param, defaultvalue);
    2290
    2291 return SCIP_OKAY;
    2292}
    2293
    2294/** changes the default value of an existing SCIP_Real parameter */
    2296 SCIP_PARAMSET* paramset, /**< parameter set */
    2297 const char* name, /**< name of the parameter */
    2298 SCIP_Real defaultvalue /**< new default value of the parameter */
    2299 )
    2300{
    2301 SCIP_PARAM* param;
    2302
    2303 assert(paramset != NULL);
    2304
    2305 /* retrieve parameter from hash table */
    2306 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2307 if( param == NULL )
    2308 {
    2309 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2310 return SCIP_PARAMETERUNKNOWN;
    2311 }
    2312 if( param->paramtype != SCIP_PARAMTYPE_REAL )
    2313 {
    2314 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2317 }
    2318
    2319 /* set the parameter's default value */
    2320 SCIPparamSetDefaultReal(param, defaultvalue);
    2321
    2322 return SCIP_OKAY;
    2323}
    2324
    2325/** changes the default value of an existing char parameter */
    2327 SCIP_PARAMSET* paramset, /**< parameter set */
    2328 const char* name, /**< name of the parameter */
    2329 char defaultvalue /**< new default value of the parameter */
    2330 )
    2331{
    2332 SCIP_PARAM* param;
    2333
    2334 assert(paramset != NULL);
    2335
    2336 /* retrieve parameter from hash table */
    2337 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2338 if( param == NULL )
    2339 {
    2340 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2341 return SCIP_PARAMETERUNKNOWN;
    2342 }
    2343 if( param->paramtype != SCIP_PARAMTYPE_CHAR )
    2344 {
    2345 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2348 }
    2349
    2350 /* set the parameter's default value */
    2351 SCIPparamSetDefaultChar(param, defaultvalue);
    2352
    2353 return SCIP_OKAY;
    2354}
    2355
    2356/** changes the default value of an existing string parameter */
    2358 SCIP_PARAMSET* paramset, /**< parameter set */
    2359 const char* name, /**< name of the parameter */
    2360 const char* defaultvalue /**< new default value of the parameter */
    2361 )
    2362{
    2363 SCIP_PARAM* param;
    2364
    2365 assert(paramset != NULL);
    2366
    2367 /* retrieve parameter from hash table */
    2368 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)name);
    2369 if( param == NULL )
    2370 {
    2371 SCIPerrorMessage("parameter <%s> unknown\n", name);
    2372 return SCIP_PARAMETERUNKNOWN;
    2373 }
    2374 if( param->paramtype != SCIP_PARAMTYPE_STRING )
    2375 {
    2376 SCIPerrorMessage("wrong parameter type - parameter <%s> has type <%s> instead of <%s>\n",
    2379 }
    2380
    2381 /* set the parameter's default value */
    2382 SCIPparamSetDefaultString(param, defaultvalue);
    2383
    2384 return SCIP_OKAY;
    2385}
    2386
    2387/** parses emphasis settings */
    2388static
    2390 SCIP_PARAMSET* paramset, /**< parameter set */
    2391 SCIP_SET* set, /**< global SCIP settings */
    2392 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2393 char* line /**< line to parse (is modified during parse, but not freed) */
    2394 )
    2395{
    2396 SCIP_PARAMSETTING paramsetting;
    2397 SCIP_Bool globalemphasis = FALSE;
    2398 char* paramname;
    2399 char* paramvaluestr;
    2400
    2401 assert( paramset != NULL );
    2402 assert( line != NULL );
    2403
    2404 /* find the start of the parameter name */
    2405 while ( *line == ' ' || *line == '\t' || *line == '\r' )
    2406 line++;
    2407 if ( *line == '\0' || *line == '\n' || *line == '#' )
    2408 return SCIP_OKAY;
    2409 paramname = line;
    2410
    2411 /* find the end of the parameter name */
    2412 while ( *line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#' && *line != '\0' && *line != '=' && *line != ':' )
    2413 line++;
    2414 *line = '\0';
    2415 ++line;
    2416
    2417 /* check for global emphasis settings */
    2418 if ( strcmp(paramname, "default") == 0 )
    2419 {
    2421 globalemphasis = TRUE;
    2422 }
    2423 else if ( strcmp(paramname, "counter") == 0 )
    2424 {
    2426 globalemphasis = TRUE;
    2427 }
    2428 else if ( strcmp(paramname, "cpsolver") == 0 )
    2429 {
    2431 globalemphasis = TRUE;
    2432 }
    2433 else if ( strcmp(paramname, "easycip") == 0 )
    2434 {
    2436 globalemphasis = TRUE;
    2437 }
    2438 else if ( strcmp(paramname, "feasibility") == 0 )
    2439 {
    2441 globalemphasis = TRUE;
    2442 }
    2443 else if ( strcmp(paramname, "hardlp") == 0 )
    2444 {
    2446 globalemphasis = TRUE;
    2447 }
    2448 else if ( strcmp(paramname, "optimality") == 0 )
    2449 {
    2451 globalemphasis = TRUE;
    2452 }
    2453 else if ( strcmp(paramname, "numerics") == 0 )
    2454 {
    2456 globalemphasis = TRUE;
    2457 }
    2458 else if ( strcmp(paramname, "benchmark") == 0 )
    2459 {
    2461 globalemphasis = TRUE;
    2462 }
    2463
    2464 /* check whether rest of line is clean */
    2465 if ( globalemphasis )
    2466 {
    2467 /* check, if the rest of the line is clean */
    2468 while ( *line == ' ' || *line == '\t' || *line == '\r' )
    2469 ++line;
    2470 if ( *line != '\0' && *line != '\n' && *line != '#' )
    2471 {
    2472 SCIPerrorMessage("additional characters after global emphasis setting: %s.\n", line);
    2473 return SCIP_READERROR;
    2474 }
    2475 return SCIP_OKAY;
    2476 }
    2477
    2478 /* find the start of the parameter value string */
    2479 while ( *line == ' ' || *line == '\t' || *line == '\r' )
    2480 ++line;
    2481 if ( *line == '\0' || *line == '\n' || *line == '#' )
    2482 {
    2483 SCIPerrorMessage("emphasis parameter value is missing\n");
    2484 return SCIP_READERROR;
    2485 }
    2486 paramvaluestr = line;
    2487
    2488 /* find the end of the parameter value string */
    2489 while ( *line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#' && *line != '\0' )
    2490 ++line;
    2491
    2492 if ( *line == '#' )
    2493 *line = '\0';
    2494 else if ( *line != '\0' )
    2495 {
    2496 *line = '\0';
    2497 ++line;
    2498 /* check, if the rest of the line is clean */
    2499 while ( *line == ' ' || *line == '\t' || *line == '\r' )
    2500 ++line;
    2501 if ( *line != '\0' && *line != '\n' && *line != '#' )
    2502 {
    2503 SCIPerrorMessage("additional characters after emphasis parameter value: %s.\n", line);
    2504 return SCIP_READERROR;
    2505 }
    2506 }
    2507
    2508 /* determine type of setting */
    2509 if ( strcmp(paramvaluestr, "default") == 0 )
    2510 paramsetting = SCIP_PARAMSETTING_DEFAULT;
    2511 else if ( strcmp(paramvaluestr, "aggressive") == 0 )
    2512 paramsetting = SCIP_PARAMSETTING_AGGRESSIVE;
    2513 else if ( strcmp(paramvaluestr, "fast") == 0 )
    2514 paramsetting = SCIP_PARAMSETTING_FAST;
    2515 else if ( strcmp(paramvaluestr, "off") == 0 )
    2516 paramsetting = SCIP_PARAMSETTING_OFF;
    2517 else
    2518 {
    2519 SCIPerrorMessage("unkown parameter setting: %s.\n", paramvaluestr);
    2520 return SCIP_READERROR;
    2521 }
    2522
    2523 /* check which kind of emphasis we want to set */
    2524 if ( strcmp(paramname, "heuristics") == 0 )
    2525 {
    2526 SCIP_CALL( SCIPsetSetHeuristics(set, messagehdlr, paramsetting, FALSE) );
    2527 }
    2528 else if ( strcmp(paramname, "presolving") == 0 )
    2529 {
    2530 SCIP_CALL( SCIPsetSetPresolving(set, messagehdlr, paramsetting, FALSE) );
    2531 }
    2532 else if ( strcmp(paramname, "separating") == 0 )
    2533 {
    2534 SCIP_CALL( SCIPsetSetSeparating(set, messagehdlr, paramsetting, FALSE) );
    2535 }
    2536
    2537 return SCIP_OKAY;
    2538}
    2539
    2540/** parses a parameter file line "paramname = paramvalue" and sets parameter accordingly */
    2541static
    2543 SCIP_PARAMSET* paramset, /**< parameter set */
    2544 SCIP_SET* set, /**< global SCIP settings */
    2545 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2546 char* line, /**< line to parse (is modified during parse, but not freed) */
    2547 SCIP_Bool* foundnormalparam /**< pointer to store whether a normal parameter (not emphasis setting) has been found */
    2548 )
    2549{
    2550 char* paramname;
    2551 char* paramvaluestr;
    2552 char* paramend;
    2553 char* lastquote;
    2554 SCIP_Bool quoted;
    2555 SCIP_Bool fix = FALSE;
    2556
    2557 assert(paramset != NULL);
    2558 assert(line != NULL);
    2559 assert(foundnormalparam != NULL);
    2560
    2561 /* find the start of the parameter name */
    2562 while( *line == ' ' || *line == '\t' || *line == '\r' )
    2563 line++;
    2564 if( *line == '\0' || *line == '\n' || *line == '#' )
    2565 return SCIP_OKAY;
    2566 paramname = line;
    2567
    2568 /* find the end of the parameter name */
    2569 while( *line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#' && *line != '\0' && *line != '=' && *line != ':' )
    2570 line++;
    2571 paramend = line;
    2572
    2573 /* skip possible whitespace */
    2574 while( *line == ' ' || *line == '\t' || *line == '\r' )
    2575 line++;
    2576
    2577 /* check whether first part consists of "emphasis:" */
    2578 if ( *line == ':' )
    2579 {
    2580 *paramend = '\0'; /* could have paramend == line */
    2581 if ( strcmp(paramname, "emphasis") != 0 )
    2582 {
    2583 SCIPerrorMessage("expected \"emphasis:\" at beginning of line.\n");
    2584 return SCIP_READERROR;
    2585 }
    2586
    2587 /* check that emphasis settings only appear at beginning of file */
    2588 if ( *foundnormalparam )
    2589 {
    2590 SCIPerrorMessage("emphasis settings have to appear at top of file.\n");
    2591 return SCIP_READERROR;
    2592 }
    2593
    2594 /* parse emphasis line */
    2595 SCIP_CALL( emphasisParse(paramset, set, messagehdlr, line+1) ); /* message handler */
    2596 return SCIP_OKAY;
    2597 }
    2598 else if ( *line != '=' )
    2599 {
    2600 SCIPerrorMessage("expected character '=' after the parameter name.\n");
    2601 return SCIP_READERROR;
    2602 }
    2603 *paramend = '\0'; /* could have paramend == line */
    2604 ++line;
    2605
    2606 /* find the start of the parameter value string */
    2607 while( *line == ' ' || *line == '\t' || *line == '\r' )
    2608 line++;
    2609 if( *line == '\0' || *line == '\n' || *line == '#' )
    2610 {
    2611 SCIPerrorMessage("parameter value is missing\n");
    2612 return SCIP_READERROR;
    2613 }
    2614 paramvaluestr = line;
    2615
    2616 /* find the end of the parameter value string */
    2617 quoted = (*paramvaluestr == '"');
    2618 lastquote = NULL;
    2619 while( (quoted || (*line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#')) && *line != '\0' )
    2620 {
    2621 if( *line == '"' )
    2622 lastquote = line;
    2623 line++;
    2624 }
    2625 if( lastquote != NULL )
    2626 line = lastquote+1;
    2627 if( *line == '#' )
    2628 *line = '\0';
    2629 else if( *line != '\0' )
    2630 {
    2631 /* check, if the rest of the line is clean */
    2632 *line = '\0';
    2633 line++;
    2634 while( *line == ' ' || *line == '\t' || *line == '\r' )
    2635 line++;
    2636 if( *line == 'f' && *(line+1) == 'i' && *(line+2) == 'x' )
    2637 {
    2638 fix = TRUE;
    2639 line += 3;
    2640
    2641 while( *line == ' ' || *line == '\t' || *line == '\r' )
    2642 line++;
    2643 }
    2644 if( *line != '\0' && *line != '\n' && *line != '#' )
    2645 {
    2646 SCIPerrorMessage("additional characters <%c> after parameter value (and possible 'fix' keyword)\n", *line);
    2647 return SCIP_READERROR;
    2648 }
    2649 }
    2650
    2651 SCIP_CALL( SCIPparamsetSet(paramset, set, messagehdlr, paramname, paramvaluestr, fix) );
    2652
    2653 *foundnormalparam = TRUE;
    2654
    2655 return SCIP_OKAY;
    2656}
    2657
    2658/** reads parameters from a file */
    2660 SCIP_PARAMSET* paramset, /**< parameter set */
    2661 SCIP_SET* set, /**< global SCIP settings */
    2662 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2663 const char* filename /**< file name */
    2664 )
    2665{
    2666 SCIP_RETCODE retcode;
    2667 SCIP_Bool foundnormalparam = FALSE;
    2668 FILE* file;
    2669 char line[1024];
    2670 int lineno;
    2671
    2672 assert(paramset != NULL);
    2673 assert(filename != NULL);
    2674
    2675 /* open the file for reading */
    2676 file = fopen(filename, "r");
    2677 if( file == NULL )
    2678 {
    2679 SCIPerrorMessage("cannot open file <%s> for reading\n", filename);
    2680 SCIPprintSysError(filename);
    2681 return SCIP_NOFILE;
    2682 }
    2683
    2684 /* read the parameters from the file */
    2685 lineno = 0;
    2686 retcode = SCIP_OKAY;
    2687 while( fgets(line, (int) sizeof(line), file) != NULL && retcode == SCIP_OKAY )
    2688 {
    2689 lineno++;
    2690 retcode = paramsetParse(paramset, set, messagehdlr, line, &foundnormalparam);
    2691 }
    2692
    2693 /* close input file */
    2694 fclose(file);
    2695
    2696 if( retcode == SCIP_READERROR )
    2697 {
    2698 SCIPerrorMessage("input error in file <%s> line %d\n", filename, lineno);
    2699 }
    2700 else
    2701 {
    2702 SCIP_CALL( retcode );
    2703 }
    2704
    2705 return SCIP_OKAY;
    2706}
    2707
    2708/** writes all parameters in the parameter set to a file */
    2710 SCIP_PARAMSET* paramset, /**< parameter set */
    2711 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2712 const char* filename, /**< file name, or NULL for stdout */
    2713 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
    2714 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
    2715 )
    2716{
    2717 SCIP_RETCODE retcode;
    2718 FILE* file;
    2719 SCIP_Bool oldquiet = FALSE;
    2720 int i;
    2721
    2722 assert(paramset != NULL);
    2723
    2724 /* open the file for writing */
    2725 if( filename != NULL )
    2726 {
    2727 file = fopen(filename, "w");
    2728 if( file == NULL )
    2729 {
    2730 SCIPerrorMessage("cannot open file <%s> for writing\n", filename);
    2731 SCIPprintSysError(filename);
    2732 return SCIP_FILECREATEERROR;
    2733 }
    2734
    2735 /* temporarily set the quiet flag of the message handler to FALSE */
    2736 if( messagehdlr != NULL )
    2737 {
    2738 oldquiet = SCIPmessagehdlrIsQuiet(messagehdlr);
    2739 SCIPmessagehdlrSetQuiet(messagehdlr, FALSE);
    2740 }
    2741 }
    2742 else
    2743 file = NULL;
    2744
    2745 if( comments )
    2746 {
    2747 /* display the SCIP version as comment in the first line */
    2748 SCIPmessageFPrintInfo(messagehdlr, file, "# SCIP version %d.%d.%d\n",
    2749 SCIP_VERSION_MAJOR, SCIP_VERSION_MINOR, SCIP_VERSION_PATCH);
    2750
    2751 SCIPmessageFPrintInfo(messagehdlr, file, "\n");
    2752 }
    2753
    2754 /* write the parameters to the file */
    2755 for( i = 0; i < paramset->nparams; ++i )
    2756 {
    2757 retcode = paramWrite(paramset->params[i], messagehdlr, file, comments, onlychanged);
    2758 if( retcode != SCIP_OKAY )
    2759 {
    2760 if( filename != NULL )
    2761 {
    2762 assert(file != NULL);
    2763 fclose(file);
    2764 }
    2765 SCIP_CALL( retcode );
    2766 }
    2767 }
    2768
    2769 /* close output file */
    2770 if( filename != NULL )
    2771 {
    2772 assert(file != NULL); /*lint !e449*/
    2773
    2774 /* reset the quiet flag of the message handler */
    2775 if( messagehdlr != NULL )
    2776 {
    2777 SCIPmessagehdlrSetQuiet(messagehdlr, oldquiet);
    2778 }
    2779
    2780 fclose(file);
    2781 }
    2782
    2783 return SCIP_OKAY;
    2784} /*lint !e593*/
    2785
    2786/** installs default values for all parameters */
    2788 SCIP_PARAMSET* paramset, /**< parameter set */
    2789 SCIP_SET* set, /**< global SCIP settings */
    2790 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
    2791 )
    2792{
    2793 int i;
    2794
    2795 /* set all parameters to their default values */
    2796 for( i = 0; i < paramset->nparams; ++i )
    2797 {
    2798 SCIP_CALL( SCIPparamSetToDefault(paramset->params[i], set, messagehdlr) );
    2799 }
    2800
    2801 return SCIP_OKAY;
    2802}
    2803
    2804/** installs default value for a single parameter */
    2806 SCIP_PARAMSET* paramset, /**< parameter set */
    2807 SCIP_SET* set, /**< global SCIP settings */
    2808 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2809 const char* paramname /**< name of the parameter */
    2810 )
    2811{
    2812 SCIP_PARAM* param;
    2813
    2814 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    2815
    2816 if( param != NULL )
    2817 {
    2818 SCIP_CALL( SCIPparamSetToDefault(param, set, messagehdlr) );
    2819 }
    2820
    2821 return SCIP_OKAY;
    2822}
    2823
    2824/** resets parameters changed by SCIPparamsetSetHeuristicsXyz functions to their default values
    2825 *
    2826 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
    2827 */ /*lint --e{715}*/
    2828static
    2830 SCIP_PARAMSET* paramset, /**< parameter set */
    2831 SCIP_SET* set, /**< global SCIP settings */
    2832 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2833 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    2834 )
    2835{ /*lint --e{715}*/
    2836 SCIP_HEUR** heurs;
    2838 int nheurs;
    2839 int i;
    2840
    2841 heurs = set->heurs;
    2842 nheurs = set->nheurs;
    2843
    2844 for( i = 0; i < nheurs; ++i )
    2845 {
    2846 const char* heurname;
    2847 heurname = SCIPheurGetName(heurs[i]);
    2848
    2849 /* set frequency parameter to default */
    2850 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/freq", heurname);
    2851 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    2852
    2853 /* set LP iteration offset to default */
    2854 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/maxlpiterofs", heurname);
    2855 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    2856
    2857 /* set LP iteration quota to default */
    2858 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/maxlpiterquot", heurname);
    2859 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    2860 }
    2861
    2862 /* set specific parameters for RENS heuristic */
    2863 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/rens/nodesofs") );
    2864 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/rens/minfixingrate") );
    2865
    2866 /* set specific parameters for Crossover heuristic */
    2867 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/nwaitingnodes") );
    2868 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/dontwaitatroot") );
    2869 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/nodesquot") );
    2870 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/minfixingrate") );
    2871
    2872 return SCIP_OKAY;
    2873}
    2874
    2875/** sets heuristics to aggressive */
    2876static
    2878 SCIP_PARAMSET* paramset, /**< parameter set */
    2879 SCIP_SET* set, /**< global SCIP settings */
    2880 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    2881 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    2882 )
    2883{
    2884 SCIP_HEUR** heurs;
    2885 SCIP_PARAM* param;
    2887 int nheurs;
    2888 int i;
    2889
    2890 heurs = set->heurs;
    2891 nheurs = set->nheurs;
    2892
    2893 SCIP_CALL( paramsetSetHeuristicsDefault(paramset, set, messagehdlr, quiet) );
    2894
    2895 for( i = 0; i < nheurs; ++i )
    2896 {
    2897 const char* heurname;
    2898 heurname = SCIPheurGetName(heurs[i]);
    2899
    2900 /* dualval heuristic should stay disabled */
    2901 if( strcmp(heurname, "dualval") == 0 )
    2902 continue;
    2903
    2904 /* the aggressive Benders' decomposition heuristics should remain disabled */
    2905 if( strstr(heurname, "benders") != NULL )
    2906 continue;
    2907
    2908 /* get frequency parameter of heuristic */
    2909 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/freq", heurname);
    2910 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    2911
    2912 if( param != NULL )
    2913 {
    2914 int deffreq;
    2915 int newfreq;
    2916
    2917 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    2918 deffreq = SCIPparamGetIntDefault(param);
    2919
    2920 /* change frequency to half of the default value, if it is > 0, otherwise set to 20 */
    2921 if( deffreq == -1 || deffreq == 0 )
    2922 {
    2923 newfreq = 20;
    2924 }
    2925 else
    2926 {
    2927 newfreq = (int) SCIPsetCeil(set, deffreq/2.0);
    2928 newfreq = MAX(newfreq, 1);
    2929 }
    2930
    2931 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, newfreq, quiet) );
    2932
    2933 /* LP iteration limits only get increased for heuristics which are activated by default */
    2934 if( SCIPparamGetIntDefault(param) > -1 )
    2935 {
    2936 /* construct (possible) parameter name for LP iteration offset */
    2937 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/maxlpiterofs", heurname);
    2938 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    2939
    2940 if( param != NULL && SCIPparamGetType(param) == SCIP_PARAMTYPE_INT )
    2941 {
    2942 /* set LP iteration offset to 1.5 time the current value */
    2943 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * SCIPparamGetIntDefault(param)), quiet) );
    2944 }
    2945
    2946 /* construct (possible) parameter name for LP iteration quotient parameter */
    2947 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/maxlpiterquot", heurname);
    2948 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    2949
    2950 if( param != NULL && SCIPparamGetType(param) == SCIP_PARAMTYPE_REAL )
    2951 {
    2952 /* set LP iteration quotient to 1.5 time the current value */
    2953 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, paramname, 1.5 * SCIPparamGetRealDefault(param), quiet) );
    2954 }
    2955 }
    2956 }
    2957 }
    2958
    2959 /* set specific parameters for RENS heuristic, if the heuristic is included */
    2960#ifndef NDEBUG
    2961 if( SCIPsetFindHeur(set, "rens") != NULL )
    2962#endif
    2963 {
    2964 SCIP_CALL( paramSetLongint(paramset, set, messagehdlr, "heuristics/rens/nodesofs", (SCIP_Longint)2000, quiet) );
    2965 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/rens/minfixingrate", 0.3, quiet) );
    2966 }
    2967
    2968 /* set specific parameters for Crossover heuristic, if the heuristic is included */
    2969#ifndef NDEBUG
    2970 if( SCIPsetFindHeur(set, "crossover") != NULL )
    2971#endif
    2972 {
    2973 SCIP_CALL( paramSetLongint(paramset, set, messagehdlr, "heuristics/crossover/nwaitingnodes", (SCIP_Longint)20, quiet) );
    2974 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "heuristics/crossover/dontwaitatroot", TRUE, quiet) );
    2975 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/crossover/nodesquot", 0.15, quiet) );
    2976 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/crossover/minfixingrate", 0.5, quiet) );
    2977 }
    2978
    2979 /* set specific parameters for Adaptive Large Neighborhood Search heuristic, if the heuristic is included */
    2980#ifndef NDEBUG
    2981 if( SCIPsetFindHeur(set, "alns") != NULL )
    2982#endif
    2983 {
    2984 /* activate all neighborhoods explicitly (keep list in alphabetic order) */
    2985 int nneighborhoods = 9;
    2986 const char* neighborhoodnames[] = {
    2987 "crossover",
    2988 "dins",
    2989 "localbranching",
    2990 "mutation",
    2991 "proximity",
    2992 "rens",
    2993 "rins",
    2994 "trustregion",
    2995 "zeroobjective"
    2996 };
    2997 for( i = 0; i < nneighborhoods; ++i )
    2998 {
    2999 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/alns/%s/active", neighborhoodnames[i]);
    3000 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, paramname, TRUE, quiet) );
    3001 }
    3002 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/alns/nodesquot", 0.2, quiet) );
    3003 SCIP_CALL( paramSetLongint(paramset, set, messagehdlr, "heuristics/alns/nodesofs", (SCIP_Longint)2000, quiet) );
    3004 }
    3005
    3006 return SCIP_OKAY;
    3007}
    3008
    3009/** sets heuristics to fast */
    3010static
    3012 SCIP_PARAMSET* paramset, /**< parameter set */
    3013 SCIP_SET* set, /**< global SCIP settings */
    3014 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3015 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3016 )
    3017{
    3018 int i;
    3019
    3020 SCIP_HEUR** heurs;
    3021 int nheurs;
    3022
    3023#define NEXPENSIVEHEURFREQS 12
    3024 static const char* const expensiveheurfreqs[NEXPENSIVEHEURFREQS] = {
    3025 "heuristics/coefdiving/freq",
    3026 "heuristics/distributiondiving/freq",
    3027 "heuristics/feaspump/freq",
    3028 "heuristics/fracdiving/freq",
    3029 "heuristics/guideddiving/freq",
    3030 "heuristics/linesearchdiving/freq",
    3031 "heuristics/nlpdiving/freq",
    3032 "heuristics/subnlp/freq",
    3033 "heuristics/objpscostdiving/freq",
    3034 "heuristics/pscostdiving/freq",
    3035 "heuristics/rootsoldiving/freq",
    3036 "heuristics/veclendiving/freq"
    3037 };
    3038
    3039 SCIP_CALL( paramsetSetHeuristicsDefault(paramset, set, messagehdlr, quiet) );
    3040
    3041 /* disable all heuristics that use subSCIPs */
    3042 heurs = SCIPgetHeurs(set->scip);
    3043 nheurs = SCIPgetNHeurs(set->scip);
    3044 for( i = 0; i < nheurs; ++i )
    3045 {
    3046 if( SCIPheurUsesSubscip(heurs[i]) )
    3047 {
    3049 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/freq", SCIPheurGetName(heurs[i]));
    3050 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    3051 }
    3052 }
    3053
    3054 /* explicitly turn off further expensive heuristics, if included */
    3055 for( i = 0; i < NEXPENSIVEHEURFREQS; ++i )
    3056 if( SCIPhashtableRetrieve(paramset->hashtable, (void*)expensiveheurfreqs[i]) != NULL )
    3057 {
    3058 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, expensiveheurfreqs[i], -1, quiet) );
    3059 }
    3060
    3061 return SCIP_OKAY;
    3062}
    3063
    3064/** turns all heuristics off */
    3065static
    3067 SCIP_PARAMSET* paramset, /**< parameter set */
    3068 SCIP_SET* set, /**< global SCIP settings */
    3069 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3070 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3071 )
    3072{
    3073 SCIP_HEUR** heurs;
    3075 int nheurs;
    3076 int i;
    3077
    3078 heurs = set->heurs;
    3079 nheurs = set->nheurs;
    3080
    3081 SCIP_CALL( paramsetSetHeuristicsDefault(paramset, set, messagehdlr, quiet) );
    3082
    3083 for( i = 0; i < nheurs; ++i )
    3084 {
    3085 const char* heurname;
    3086 heurname = SCIPheurGetName(heurs[i]);
    3087
    3088 /* get frequency parameter of heuristic */
    3089 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/freq", heurname);
    3090
    3091 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    3092 }
    3093
    3094 return SCIP_OKAY;
    3095}
    3096
    3097/** resets all parameters that start with "presolving" in their name to their default value; additionally set the
    3098 * parameters which might have previously been changed by the methods SCIPparamsetSetToPresolving{Off,Fast,Aggressive}
    3099 * to their default value
    3100 *
    3101 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
    3102 */
    3103static
    3105 SCIP_PARAMSET* paramset, /**< parameter set */
    3106 SCIP_SET* set, /**< global SCIP settings */
    3107 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3108 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3109 )
    3110{ /*lint --e{715}*/
    3111 SCIP_PROP** props;
    3112 SCIP_CONSHDLR** conshdlrs;
    3113 SCIP_PRESOL** presols;
    3115 int nprops;
    3116 int nconshdlrs;
    3117 int npresols;
    3118 int i;
    3119
    3120 presols = set->presols;
    3121 npresols = set->npresols;
    3122
    3123 /* reset each individual presolver */
    3124 for( i = 0; i < npresols; ++i )
    3125 {
    3126 const char* presolname;
    3127 presolname = SCIPpresolGetName(presols[i]);
    3128
    3129 /* reset maxrounds parameter of presolvers */
    3130 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "presolving/%s/maxrounds", presolname);
    3131
    3132 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3133 }
    3134
    3135 props = set->props;
    3136 nprops = set->nprops;
    3137
    3138 /* reset presolving for each individual propagator */
    3139 for( i = 0; i < nprops; ++i )
    3140 {
    3141 const char* propname;
    3142 propname = SCIPpropGetName(props[i]);
    3143
    3144 /* reset maxprerounds parameter of propagator */
    3145 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "propagating/%s/maxprerounds", propname);
    3146 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3147 }
    3148
    3149 conshdlrs = set->conshdlrs;
    3150 nconshdlrs = set->nconshdlrs;
    3151
    3152 /* reset presolving settings for each individual constraint handler */
    3153 for( i = 0; i < nconshdlrs; ++i )
    3154 {
    3155 const char* conshdlrname;
    3156 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3157
    3158 /* reset maxprerounds parameter of constraint handler */
    3159 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxprerounds", conshdlrname);
    3160 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3161
    3162 /* reset presolpairwise parameter of constraint handler */
    3163 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/presolpairwise", conshdlrname);
    3164 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3165 }
    3166
    3167 /* explicitly reset parameters of setppc constraint handler, if the constraint handler is included */
    3168 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/setppc/cliquelifting") );
    3169
    3170 /* explicitly reset parameters of knapsack constraint handler, if the constraint handler is included */
    3171 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/knapsack/disaggregation") );
    3172
    3173 /* explicitly reset restart and maxrounds parameters */
    3174 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "presolving/maxrestarts") );
    3175 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "presolving/restartfac") );
    3176 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "presolving/restartminred") );
    3177 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "presolving/maxrounds") );
    3178
    3179 /* explicitly reset probing parameters */
    3180 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxuseless") );
    3181 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxtotaluseless") );
    3182 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxprerounds") );
    3183
    3184 return SCIP_OKAY;
    3185}
    3186
    3187/** sets presolving to aggressive */
    3188static
    3190 SCIP_PARAMSET* paramset, /**< parameter set */
    3191 SCIP_SET* set, /**< global SCIP settings */
    3192 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3193 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3194 )
    3195{
    3196 SCIP_PARAM* param;
    3197 SCIP_PRESOL** presols;
    3199 int npresols;
    3200 int p;
    3201
    3202 /* reset previous changes on presolving parameters */
    3203 SCIP_CALL( paramsetSetPresolvingDefault(paramset, set, messagehdlr, quiet) );
    3204
    3205 /* explicitly change restart parameters */
    3206 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "presolving/restartfac", 0.0125, quiet) );
    3207 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "presolving/restartminred", 0.06, quiet) );
    3208
    3209 /* explicitly enable clique lifting of setppc constraint handler, if included */
    3210#ifndef NDEBUG
    3211 if( SCIPsetFindConshdlr(set, "setppc") != NULL )
    3212#endif
    3213 {
    3214 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/setppc/cliquelifting", TRUE, quiet) );
    3215 }
    3216
    3217 presols = set->presols;
    3218 npresols = set->npresols;
    3219
    3220 /* enable all presolvers except for convertinttobin */
    3221 for( p = 0; p < npresols; ++p )
    3222 {
    3223 const char* presolname;
    3224 presolname = SCIPpresolGetName(presols[p]);
    3225
    3226 /* convertinttobin alters the problem formulation, which needs to be actively enabled by the user */
    3227 if( strcmp(presolname, "convertinttobin") == 0 )
    3228 continue;
    3229
    3230 /* get maxrounds parameter of presolvers */
    3231 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "presolving/%s/maxrounds", presolname);
    3232
    3233 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    3234 }
    3235
    3236 /* explicitly change parameters of probing */
    3237 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "propagating/probing/maxuseless");
    3238 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3239 if( param != NULL )
    3240 {
    3241 int defvalue;
    3242
    3243 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3244 defvalue = SCIPparamGetIntDefault(param);
    3245
    3246 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defvalue), quiet) );
    3247 }
    3248 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "propagating/probing/maxtotaluseless");
    3249 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3250 if( param != NULL )
    3251 {
    3252 int defvalue;
    3253
    3254 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3255 defvalue = SCIPparamGetIntDefault(param);
    3256
    3257 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defvalue), quiet) );
    3258 }
    3259
    3260 return SCIP_OKAY;
    3261}
    3262
    3263/** sets presolving to fast */
    3264static
    3266 SCIP_PARAMSET* paramset, /**< parameter set */
    3267 SCIP_SET* set, /**< global SCIP settings */
    3268 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3269 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3270 )
    3271{
    3272 SCIP_CONSHDLR** conshdlrs;
    3273 SCIP_PARAM* param;
    3275 int nconshdlrs;
    3276 int i;
    3277
    3278 /* reset previous changes on presolving parameters */
    3279 SCIP_CALL( paramsetSetPresolvingDefault(paramset, set, messagehdlr, quiet) );
    3280
    3281 conshdlrs = set->conshdlrs;
    3282 nconshdlrs = set->nconshdlrs;
    3283
    3284 /* turn off pairwise comparison for each constraint handler that has this feature */
    3285 for( i = 0; i < nconshdlrs; ++i )
    3286 {
    3287 const char* conshdlrname;
    3288 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3289
    3290 /* get presolpairwise parameter of constraint handler */
    3291 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/presolpairwise", conshdlrname);
    3292 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3293
    3294 if( param != NULL && SCIPparamGetType(param) == SCIP_PARAMTYPE_BOOL )
    3295 {
    3296 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, paramname, FALSE, quiet) );
    3297 }
    3298 }
    3299
    3300 /* explicitly turn off restarts */
    3301 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/maxrestarts", 0, quiet) );
    3302
    3303 /* explicitly change parameters of presolver convertinttobin, if included */
    3304#ifndef NDEBUG
    3305 if( SCIPsetFindPresol(set, "convertinttobin") != NULL )
    3306#endif
    3307 {
    3308 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/convertinttobin/maxrounds", 0, quiet) );
    3309 }
    3310
    3311 /* turn off probing, if included */
    3312#ifndef NDEBUG
    3313 if( SCIPsetFindProp(set, "probing") != NULL )
    3314#endif
    3315 {
    3316 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "propagating/probing/maxprerounds", 0, quiet) );
    3317 }
    3318
    3319 /* explicitly disable components constraint handler, if included */
    3320#ifndef NDEBUG
    3321 if( SCIPsetFindConshdlr(set, "components") != NULL )
    3322#endif
    3323 {
    3324 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/components/maxprerounds", 0, quiet) );
    3325 }
    3326
    3327 /* explicitly disable dominated columns presolver, if included */
    3328#ifndef NDEBUG
    3329 if( SCIPsetFindPresol(set, "domcol") != NULL )
    3330#endif
    3331 {
    3332 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/domcol/maxrounds", 0, quiet) );
    3333 }
    3334
    3335 /* explicitly disable gate extraction presolver, if included */
    3336#ifndef NDEBUG
    3337 if( SCIPsetFindPresol(set, "gateextraction") != NULL )
    3338#endif
    3339 {
    3340 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/gateextraction/maxrounds", 0, quiet) );
    3341 }
    3342
    3343 /* explicitly disable sparsify presolver, if included */
    3344#ifndef NDEBUG
    3345 if( SCIPsetFindPresol(set, "sparsify") != NULL )
    3346#endif
    3347 {
    3348 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/sparsify/maxrounds", 0, quiet) );
    3349 }
    3350
    3351 /* explicitly disable dual sparsify presolver, if included */
    3352#ifndef NDEBUG
    3353 if( SCIPsetFindPresol(set, "dualsparsify") != NULL )
    3354#endif
    3355 {
    3356 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/dualsparsify/maxrounds", 0, quiet) );
    3357 }
    3358
    3359 /* explicitly disable tworowbnd presolver, if included */
    3360#ifndef NDEBUG
    3361 if( SCIPsetFindPresol(set, "tworowbnd") != NULL )
    3362#endif
    3363 {
    3364 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/tworowbnd/maxrounds", 0, quiet) );
    3365 }
    3366
    3367 /* explicitly forbid the use of implications in logicor presolving */
    3368#ifndef NDEBUG
    3369 if( SCIPsetFindConshdlr(set, "logicor") != NULL )
    3370#endif
    3371 {
    3372 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/logicor/implications", 0, quiet) );
    3373 }
    3374
    3375 return SCIP_OKAY;
    3376}
    3377
    3378/** turns all presolving off */
    3379static
    3381 SCIP_PARAMSET* paramset, /**< parameter set */
    3382 SCIP_SET* set, /**< global SCIP settings */
    3383 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3384 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3385 )
    3386{
    3387 SCIP_PRESOL** presols;
    3388 SCIP_PROP** props;
    3389 SCIP_CONSHDLR** conshdlrs;
    3391 int npresols;
    3392 int nprops;
    3393 int nconshdlrs;
    3394 int i;
    3395
    3396 /* reset previous changes on presolving parameters */
    3397 SCIP_CALL( paramsetSetPresolvingDefault(paramset, set, messagehdlr, quiet) );
    3398
    3399 presols = set->presols;
    3400 npresols = set->npresols;
    3401
    3402 /* turn each individual presolver off */
    3403 for( i = 0; i < npresols; ++i )
    3404 {
    3405 const char* presolname;
    3406 presolname = SCIPpresolGetName(presols[i]);
    3407
    3408 /* get maxrounds parameter of presolvers */
    3409 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "presolving/%s/maxrounds", presolname);
    3410
    3411 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, 0, quiet) );
    3412 }
    3413
    3414 props = set->props;
    3415 nprops = set->nprops;
    3416
    3417 /* turn off presolving for each individual propagator */
    3418 for( i = 0; i < nprops; ++i )
    3419 {
    3420 const char* propname;
    3421 propname = SCIPpropGetName(props[i]);
    3422
    3423 /* get maxrounds parameter of propagator */
    3424 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "propagating/%s/maxprerounds", propname);
    3425
    3426 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, 0, quiet) );
    3427 }
    3428
    3429 conshdlrs = set->conshdlrs;
    3430 nconshdlrs = set->nconshdlrs;
    3431
    3432 /* turn off presolving for each individual constraint handler */
    3433 for( i = 0; i < nconshdlrs; ++i )
    3434 {
    3435 const char* conshdlrname;
    3436 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3437
    3438 /* get maxprerounds parameter of constraint handler */
    3439 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxprerounds", conshdlrname);
    3440
    3441 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, 0, quiet) );
    3442 }
    3443
    3444 /* explicitly turn off restarts */
    3445 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/maxrestarts", 0, quiet) );
    3446
    3447 /* set the maximum number of presolving rounds to zero */
    3448 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/maxrounds", 0, quiet) );
    3449
    3450 return SCIP_OKAY;
    3451}
    3452
    3453/** reset parameters that may have been changed by other SCIPparamsetSetSeparatingXyz to their default values
    3454 *
    3455 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
    3456 */ /*lint !e715*/
    3457static
    3459 SCIP_PARAMSET* paramset, /**< parameter set */
    3460 SCIP_SET* set, /**< global SCIP settings */
    3461 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3462 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3463 )
    3464{ /*lint --e{715}*/
    3465 SCIP_SEPA** sepas;
    3466 SCIP_CONSHDLR** conshdlrs;
    3468 int nconshdlrs;
    3469 int nsepas;
    3470 int i;
    3471
    3472 sepas = set->sepas;
    3473 nsepas = set->nsepas;
    3474
    3475 /* reset separating parameters of all separators */
    3476 for( i = 0; i < nsepas; ++i )
    3477 {
    3478 const char* sepaname;
    3479 sepaname = SCIPsepaGetName(sepas[i]);
    3480
    3481 /* reset frequency parameter of separator */
    3482 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", sepaname);
    3483 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3484
    3485 /* reset maximum number of rounds in root node */
    3486 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxroundsroot", sepaname);
    3487 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3488
    3489 /* reset maximum number of cuts per separation in root node */
    3490 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxsepacutsroot", sepaname);
    3491 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3492 }
    3493
    3494 conshdlrs = set->conshdlrs;
    3495 nconshdlrs = set->nconshdlrs;
    3496
    3497 /* reset each individual constraint handler separation settings */
    3498 for( i = 0; i < nconshdlrs; ++i )
    3499 {
    3500 const char* conshdlrname;
    3501 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3502
    3503 /* reset separation frequency parameter of constraint handler, if available */
    3504 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/sepafreq", conshdlrname);
    3505 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3506
    3507 /* reset maximal separated cuts in root node of constraint handler, if available */
    3508 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxsepacutsroot", conshdlrname);
    3509 if( SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname) != NULL )
    3510 {
    3511 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, paramname) );
    3512 }
    3513 }
    3514
    3515 /* explicitly reset individual parameters */
    3516 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/linear/separateall") );
    3517 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "cutselection/hybrid/minorthoroot") );
    3518 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/maxroundsrootsubrun") );
    3519 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/maxaddrounds") );
    3520 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/maxcutsroot") );
    3521 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/poolfreq") );
    3522 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/aggregation/maxfailsroot") );
    3523 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/mcf/maxtestdelta") );
    3524 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/mcf/trynegscaling") );
    3525 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/aggregation/maxtriesroot") );
    3526 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/aggregation/maxaggrsroot") );
    3527 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/maxbounddist") );
    3528 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/zerohalf/maxslackroot") );
    3529 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/zerohalf/maxslack") );
    3530 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/zerohalf/maxsepacutsroot") );
    3531 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/zerohalf/maxroundsroot") );
    3532
    3533 return SCIP_OKAY;
    3534}
    3535
    3536/** sets separating to aggressive */
    3537static
    3539 SCIP_PARAMSET* paramset, /**< parameter set */
    3540 SCIP_SET* set, /**< global SCIP settings */
    3541 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3542 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3543 )
    3544{
    3545 SCIP_CONSHDLR** conshdlrs;
    3546 SCIP_SEPA** sepas;
    3547 SCIP_PARAM* param;
    3549 int nconshdlrs;
    3550 int nsepas;
    3551 int i;
    3552
    3553 sepas = set->sepas;
    3554 nsepas = set->nsepas;
    3555
    3556 /* set all separating parameters to default values */
    3557 SCIP_CALL( paramsetSetSeparatingDefault(paramset, set, messagehdlr, quiet) );
    3558
    3559 /* set separating parameters of all separators */
    3560 for( i = 0; i < nsepas; ++i )
    3561 {
    3562 const char* sepaname;
    3563 sepaname = SCIPsepaGetName(sepas[i]);
    3564
    3565 /* intobj and cgmip separators should stay disabled */
    3566 if( strcmp(sepaname, "intobj") == 0 || strcmp(sepaname, "cgmip") == 0 )
    3567 continue;
    3568
    3569 /* get frequency parameter of separator */
    3570 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", sepaname);
    3571 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3572
    3573 if( param != NULL )
    3574 {
    3575 int deffreq;
    3576 int newfreq;
    3577
    3578 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3579 deffreq = SCIPparamGetIntDefault(param);
    3580
    3581 /* for enabled separators, change frequency to at least every 20th depths and
    3582 * enable disabled separators
    3583 */
    3584 if( deffreq == -1 )
    3585 newfreq = 0;
    3586 else if( deffreq == 0 )
    3587 newfreq = 20;
    3588 else
    3589 newfreq = MIN(deffreq, 20);
    3590
    3591 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, newfreq, quiet) );
    3592 }
    3593
    3594 /* get maximum number of rounds in root node */
    3595 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxroundsroot", sepaname);
    3596 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3597
    3598 if( param != NULL )
    3599 {
    3600 int defrounds;
    3601
    3602 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3603 defrounds = SCIPparamGetIntDefault(param);
    3604
    3605 /* increase the maximum number of rounds in the root node by factor of 1.5 */
    3606 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defrounds), quiet) );
    3607 }
    3608
    3609 /* get maximum number of cuts per separation in root node */
    3610 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxsepacutsroot", sepaname);
    3611 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3612
    3613 if( param != NULL )
    3614 {
    3615 int defnumber;
    3616
    3617 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3618 defnumber = SCIPparamGetIntDefault(param);
    3619
    3620 /* increase the maximum number of cut per separation rounds in the root node by factor of 2 */
    3621 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, 2*defnumber, quiet) );
    3622 }
    3623 }
    3624
    3625 conshdlrs = set->conshdlrs;
    3626 nconshdlrs = set->nconshdlrs;
    3627
    3628 /* set separating parameters of all constraint handlers */
    3629 for( i = 0; i < nconshdlrs; ++i )
    3630 {
    3631 const char* conshdlrname;
    3632 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3633
    3634 /* get separating frequency parameter of constraint handler */
    3635 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/sepafreq", conshdlrname);
    3636 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3637
    3638 if( param != NULL )
    3639 {
    3640 int deffreq;
    3641 int newfreq;
    3642
    3643 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3644 deffreq = SCIPparamGetIntDefault(param);
    3645
    3646 /* for constraint handlers with enabled separation, change frequency to at least every 10th depths and
    3647 * enable disabled separation routines
    3648 */
    3649 if( deffreq == -1 )
    3650 newfreq = 0;
    3651 else if( deffreq == 0 )
    3652 newfreq = 10;
    3653 else
    3654 newfreq = MIN(deffreq, 10);
    3655
    3656 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, newfreq, quiet) );
    3657 }
    3658
    3659 /* get maximal separated cuts in root node of constraint handler */
    3660 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxsepacutsroot", conshdlrname);
    3661 param = (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname);
    3662
    3663 if( param != NULL )
    3664 {
    3665 int defnumber;
    3666
    3667 assert(SCIPparamGetType(param) == SCIP_PARAMTYPE_INT);
    3668 defnumber = SCIPparamGetIntDefault(param);
    3669
    3670 /* change maximal cuts in root node to at least 500 */
    3671 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, MAX(defnumber, 500), quiet) );
    3672 }
    3673 }
    3674
    3675 /* explicitly change general separating parameters */
    3676 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "cutselection/hybrid/minorthoroot", 0.1, quiet) );
    3677 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxroundsrootsubrun", 5, quiet) );
    3678 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxaddrounds", 5, quiet) );
    3679 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxcutsroot", 5000, quiet) );
    3680 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/poolfreq", 10, quiet) );
    3681
    3682 /* explicitly change a separating parameter of the linear constraint handler, if included */
    3683#ifndef NDEBUG
    3684 if( SCIPsetFindConshdlr(set, "linear") != NULL )
    3685#endif
    3686 {
    3687 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/separateall", TRUE, quiet) );
    3688 }
    3689
    3690 /* explicitly change a separating parameter of cmir separator, if included */
    3691#ifndef NDEBUG
    3692 if( SCIPsetFindSepa(set, "aggregation") != NULL )
    3693#endif
    3694 {
    3695 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/maxfailsroot", 200, quiet) );
    3696 }
    3697
    3698 /* explicitly change separating parameters of mcf separator, if included */
    3699#ifndef NDEBUG
    3700 if( SCIPsetFindSepa(set, "mcf") != NULL )
    3701#endif
    3702 {
    3703 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/mcf/maxtestdelta", -1, quiet) );
    3704 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "separating/mcf/trynegscaling", TRUE, quiet) );
    3705 }
    3706
    3707 return SCIP_OKAY;
    3708}
    3709
    3710/** sets separating to fast */
    3711static
    3713 SCIP_PARAMSET* paramset, /**< parameter set */
    3714 SCIP_SET* set, /**< global SCIP settings */
    3715 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3716 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3717 )
    3718{
    3719 /* reset previous changes on separating parameters */
    3720 SCIP_CALL( paramsetSetSeparatingDefault(paramset, set, messagehdlr, quiet) );
    3721
    3722 /* explicitly decrease maxbounddist */
    3723 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "separating/maxbounddist", 0.0, quiet) );
    3724
    3725 /* explicitly turn off expensive separators, if included */
    3726#ifndef NDEBUG
    3727 if( SCIPsetFindConshdlr(set, "and") != NULL )
    3728#endif
    3729 {
    3730 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/and/sepafreq", 0, quiet) );
    3731 }
    3732#ifndef NDEBUG
    3733 if( SCIPsetFindSepa(set, "aggregation") != NULL )
    3734#endif
    3735 {
    3736 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/maxroundsroot", 5, quiet) );
    3737 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/maxtriesroot", 100, quiet) );
    3738 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/maxaggrsroot", 3, quiet) );
    3739 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/maxsepacutsroot", 200, quiet) );
    3740 }
    3741#ifndef NDEBUG
    3742 if( SCIPsetFindSepa(set, "zerohalf") != NULL )
    3743#endif
    3744 {
    3745 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "separating/zerohalf/maxslackroot", 0.0, quiet) );
    3746 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "separating/zerohalf/maxslack", 0.0, quiet) );
    3747 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/zerohalf/maxsepacutsroot", 200, quiet) );
    3748 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/zerohalf/maxroundsroot", 5, quiet) );
    3749 }
    3750#ifndef NDEBUG
    3751 if( SCIPsetFindSepa(set, "gomory") != NULL )
    3752#endif
    3753 {
    3754 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/gomory/maxroundsroot", 20, quiet) );
    3755 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/gomory/maxsepacutsroot", 200, quiet) );
    3756 }
    3757#ifndef NDEBUG
    3758 if( SCIPsetFindSepa(set, "mcf") != NULL )
    3759#endif
    3760 {
    3761 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/mcf/freq", -1, quiet) );
    3762 }
    3763
    3764 return SCIP_OKAY;
    3765}
    3766
    3767/** turns all cuts off */
    3768static
    3770 SCIP_PARAMSET* paramset, /**< parameter set */
    3771 SCIP_SET* set, /**< global SCIP settings */
    3772 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3773 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3774 )
    3775{
    3776 SCIP_SEPA** sepas;
    3777 SCIP_CONSHDLR** conshdlrs;
    3779 int nsepas;
    3780 int nconshdlrs;
    3781 int i;
    3782
    3783 /* reset previous changes on separating parameters */
    3784 SCIP_CALL( paramsetSetSeparatingDefault(paramset, set, messagehdlr, quiet) );
    3785
    3786 sepas = set->sepas;
    3787 nsepas = set->nsepas;
    3788
    3789 /* turn each individual separator off */
    3790 for( i = 0; i < nsepas; ++i )
    3791 {
    3792 const char* sepaname;
    3793 sepaname = SCIPsepaGetName(sepas[i]);
    3794
    3795 /* get frequency parameter of separator */
    3796 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", sepaname);
    3797 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    3798 }
    3799
    3800 conshdlrs = set->conshdlrs;
    3801 nconshdlrs = set->nconshdlrs;
    3802
    3803 /* turn off separation for each individual constraint handler */
    3804 for( i = 0; i < nconshdlrs; ++i )
    3805 {
    3806 const char* conshdlrname;
    3807 conshdlrname = SCIPconshdlrGetName(conshdlrs[i]);
    3808
    3809 /* get separation frequency parameter of constraint handler */
    3810 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/sepafreq", conshdlrname);
    3811 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    3812 }
    3813
    3814 return SCIP_OKAY;
    3815}
    3816
    3817/** sets parameters to
    3818 *
    3819 * - \ref SCIP_PARAMEMPHASIS_DEFAULT to use default values (see also SCIPparamsetSetToDefault())
    3820 * - \ref SCIP_PARAMEMPHASIS_COUNTER to get feasible and "fast" counting process
    3821 * - \ref SCIP_PARAMEMPHASIS_CPSOLVER to get CP like search (e.g. no LP relaxation)
    3822 * - \ref SCIP_PARAMEMPHASIS_EASYCIP to solve easy problems fast
    3823 * - \ref SCIP_PARAMEMPHASIS_FEASIBILITY to detect feasibility fast
    3824 * - \ref SCIP_PARAMEMPHASIS_HARDLP to be capable to handle hard LPs
    3825 * - \ref SCIP_PARAMEMPHASIS_OPTIMALITY to prove optimality fast
    3826 * - \ref SCIP_PARAMEMPHASIS_PHASEFEAS to find feasible solutions during a 3 phase solution process
    3827 * - \ref SCIP_PARAMEMPHASIS_PHASEIMPROVE to find improved solutions during a 3 phase solution process
    3828 * - \ref SCIP_PARAMEMPHASIS_PHASEPROOF to proof optimality during a 3 phase solution process
    3829 * - \ref SCIP_PARAMEMPHASIS_NUMERICS to solve problems which cause numerical issues
    3830 * - \ref SCIP_PARAMEMPHASIS_BENCHMARK to not try to avoid running into memory limit
    3831 */
    3833 SCIP_PARAMSET* paramset, /**< parameter set */
    3834 SCIP_SET* set, /**< global SCIP settings */
    3835 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    3836 SCIP_PARAMEMPHASIS paramemphasis, /**< parameter emphasis */
    3837 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    3838 )
    3839{
    3840 switch( paramemphasis )
    3841 {
    3843 /* reset all parameter to default */
    3844 SCIP_CALL( SCIPparamsetSetToDefaults(paramset, set, messagehdlr) );
    3845 break;
    3846
    3848 /* TODO: should constraints/linear/detectlowerbound and detectcutoffbound be set to FALSE? */
    3849 /* avoid logicor upgrade since the logicor constraint handler does not perform full propagation */
    3850 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/upgrade/logicor", FALSE, quiet) );
    3851
    3852 /* set priority for inference branching to highest possible value */
    3853 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/inference/priority", INT_MAX/4, quiet) );
    3854
    3855 /* set priority for depth first search to highest possible value */
    3856 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/dfs/stdpriority", INT_MAX/4, quiet) );
    3857
    3858 /* avoid that the ZIMPL reader transforms the problem before the problem is generated */
    3859 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "reading/zplreader/usestartsol", FALSE, quiet) );
    3860
    3861 /* turn off all heuristics */
    3862 SCIP_CALL( paramsetSetHeuristicsOff(paramset, set, messagehdlr, quiet) );
    3863
    3864 /* turn off all separation */
    3865 SCIP_CALL( paramsetSetSeparatingOff(paramset, set, messagehdlr, quiet) );
    3866
    3867 /* turn off restart */
    3868 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/maxrestarts", 0, quiet) );
    3869
    3870 /* unlimited number of propagation rounds in any branch and bound node */
    3871 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "propagating/maxrounds", -1, quiet) );
    3872 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "propagating/maxroundsroot", -1, quiet) );
    3873
    3874 /* adjust conflict analysis for depth first search */
    3875 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "conflict/fuiplevels", 1, quiet) );
    3876 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "conflict/dynamic", FALSE, quiet) );
    3877
    3878 /* prefer binary variables for branching */
    3879 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "branching/preferbinary", TRUE, quiet) );
    3880
    3881 /* turn on aggressive constraint aging */
    3882 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/agelimit", 1, quiet) );
    3883
    3884 /* turn off symmetry handling */
    3885 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "misc/usesymmetry", 0, quiet) );
    3886
    3887 /* turn off components presolver since we are currently not able to handle that in case of counting */
    3888#ifndef NDEBUG
    3889 if( SCIPsetFindConshdlr(set, "components") != NULL )
    3890#endif
    3891 {
    3892 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/components/maxprerounds", 0, quiet) );
    3893 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/components/propfreq", -1, quiet) );
    3894 }
    3895 break;
    3896
    3898 /* shrink the minimal maximum value for the conflict length */
    3899 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "conflict/minmaxvars", 10, quiet) );
    3900
    3901 /* use only first unique implication point */
    3902 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "conflict/fuiplevels", 1, quiet) );
    3903
    3904 /* do not use reconversion conflicts */
    3905 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "conflict/reconvlevels", 0, quiet) );
    3906
    3907 /* after 250 conflict we force a restart since then the variable statistics are reasonable initialized */
    3908 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "conflict/restartnum", 250, quiet) );
    3909
    3910 /* increase the number of conflicts which induce a restart */
    3911 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "conflict/restartfac", 2.0, quiet) );
    3912
    3913 /* weight the variable which made into a conflict */
    3914 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "conflict/conflictweight", 1.0, quiet) );
    3915
    3916 /* do not check pseudo solution (for performance reasons) */
    3917 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/disableenfops", TRUE, quiet) );
    3918
    3919 /* use value based history to detect a reasonable branching point */
    3920 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "history/valuebased", TRUE, quiet) );
    3921
    3922 /* turn of LP relaxation */
    3923 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "lp/solvefreq", -1, quiet) );
    3924
    3925 /* prefer the down branch in case the value based history does not suggest something */
    3926 SCIP_CALL( paramSetChar(paramset, set, messagehdlr, "nodeselection/childsel", 'd', quiet) );
    3927
    3928 /* accept any bound change */
    3929 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "numerics/boundstreps", 1e-6, quiet) );
    3930
    3931 /* allow for at most 10 restart, after that the value based history should be reliable */
    3932 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/maxrestarts", 10, quiet) );
    3933
    3934 /* set priority for depth first search to highest possible value */
    3935 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/dfs/stdpriority", INT_MAX/4, quiet) );
    3936
    3937 break;
    3938
    3940 /* set heuristics to fast, to avoid spending to much time for involved heuristics */
    3941 SCIP_CALL( paramsetSetHeuristicsFast(paramset, set, messagehdlr, quiet) );
    3942
    3943 /* set presolving to fast, to avoid spending to much time for involved presolving */
    3944 SCIP_CALL( paramsetSetPresolvingFast(paramset, set, messagehdlr, quiet) );
    3945
    3946 /* set separating to fast, to avoid spending to much time for involved separators */
    3947 SCIP_CALL( paramsetSetSeparatingFast(paramset, set, messagehdlr, quiet) );
    3948
    3949 break;
    3950
    3952 /* set heuristics aggressive */
    3953 SCIP_CALL( paramsetSetHeuristicsAggressive(paramset, set, messagehdlr, quiet) );
    3954
    3955 /* reduce the amount of separation rounds and disable most expensive separators */
    3956 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxrounds", 1, quiet) );
    3957 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxroundsroot", 5, quiet) );
    3958 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/aggregation/freq", -1, quiet) );
    3959 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/mcf/freq", -1, quiet) );
    3960
    3961 /* set priority for node selection "restartdfs" to be higher as the current used one */
    3962 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/restartdfs/stdpriority", INT_MAX/4, quiet) );
    3963 break;
    3964
    3966 /* set heuristics to fast, to avoid heuristics which solve also an LP */
    3967 SCIP_CALL( paramsetSetHeuristicsFast(paramset, set, messagehdlr, quiet) );
    3968
    3969 /* set presolving to fast, to avoid spending to much time for involved presolving */
    3970 SCIP_CALL( paramsetSetPresolvingFast(paramset, set, messagehdlr, quiet) );
    3971
    3972 /* reduce the amount of strong branching */
    3973 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/relpscost/maxreliable", 1.0, quiet) );
    3974 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/relpscost/inititer", 10, quiet) );
    3975
    3976 /* reduce the amount of separation rounds */
    3977 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxrounds", 1, quiet) );
    3978 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxroundsroot", 5, quiet) );
    3979
    3980 break;
    3981
    3983 /* set cuts aggressive */
    3984 SCIP_CALL( paramsetSetSeparatingAggressive(paramset, set, messagehdlr, quiet) );
    3985
    3986 /* increase the amount of strong branching */
    3987 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/fullstrong/maxdepth", 10, quiet) );
    3988 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/fullstrong/priority", INT_MAX / 4, quiet) );
    3989 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/fullstrong/maxbounddist", 0.0, quiet) );
    3990 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/relpscost/sbiterquot", 1.0, quiet) );
    3991 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/relpscost/sbiterofs", 1000000, quiet) );
    3992 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/relpscost/maxreliable", 10.0, quiet) );
    3993 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "branching/relpscost/usehyptestforreliability",TRUE, quiet) );
    3994 break;
    3996
    3997 /* enable two phase node selection: UCT will run first, but deactivate itself after a small number of nodes */
    3998 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/uct/stdpriority", (INT_MAX / 4) + 1, quiet) );
    3999 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/restartdfs/stdpriority", INT_MAX/4, quiet) );
    4000
    4001 /* enable inference branching */
    4002 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/inference/priority", INT_MAX / 4, quiet) );
    4003 break;
    4004
    4006 /* use UCT node selection in all subSCIP heuristics that have this parameter */
    4007 {
    4008 int h;
    4009 SCIP_HEUR** heurs = set->heurs;
    4010 int nheurs = set->nheurs;
    4011
    4012 for( h = 0; h < nheurs; ++h )
    4013 {
    4015 if( SCIPheurUsesSubscip(heurs[h]) )
    4016 {
    4017 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/useuct", SCIPheurGetName(heurs[h]));
    4018
    4019 if( (SCIP_PARAM*)SCIPhashtableRetrieve(paramset->hashtable, (void*)paramname) != NULL )
    4020 {
    4021 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, paramname, TRUE, quiet) );
    4022 }
    4023 }
    4024 }
    4025
    4026 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "heuristics/useuctsubscip", TRUE, quiet) );
    4027 }
    4028 break;
    4030 /* deactivate primal heuristics */
    4031 SCIP_CALL( paramsetSetHeuristicsOff(paramset, set, messagehdlr, quiet) );
    4032
    4033 /* make aggressive use of separators, also locally */
    4034 SCIP_CALL( paramsetSetSeparatingAggressive(paramset, set, messagehdlr, quiet) );
    4035
    4036 /* use depth-first node selection strategy that makes best use of LP warmstarts */
    4037 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/dfs/stdpriority", INT_MAX/4, quiet) );
    4038
    4039 /* enable dynamic weights for reliability pseudo cost branching */
    4040 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "branching/relpscost/dynamicweights", TRUE, quiet) );
    4041 break;
    4042
    4044
    4045 /* huge val is used as a threshold in multiaggregation; decreasing it leads to safer multiaggregations */
    4046 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "numerics/hugeval", 1e+10, quiet) );
    4047
    4048 /* The higher the Markowitz Parameter is, more sparse pivots will be ignored and the numerically
    4049 more stable ones will be used as pivot */
    4050 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "lp/minmarkowitz", 0.999, quiet) );
    4051
    4052 /* Added parameters as suggested here: https://git.zib.de/integer/scip/issues/2002#note_92716 */
    4053 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "lp/fastmip", 0, quiet) );
    4054 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "lp/scaling", 2, quiet) );
    4055 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "lp/presolving", FALSE, quiet) );
    4056 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "lp/refactorinterval", 40, quiet) );
    4057
    4058 /* To prevent numerically bad multiaggregations in dualPresolve() and convertLongEquality() set maxmultiaggrqout small*/
    4059 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "constraints/linear/maxmultaggrquot", 10.0, quiet) );
    4060 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "constraints/linear/maxdualmultaggrquot", 10.0, quiet) );
    4061
    4062 /* When upgrading constr with knapsack/setppc causes problems */
    4063 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/upgrade/knapsack", FALSE, quiet) );
    4064 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/upgrade/setppc", FALSE, quiet) );
    4065
    4066 /* For numerical stability turn rangedrowpropagation, simplifyInequalities and extractCliques off */
    4067 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/rangedrowpropagation", FALSE, quiet) );
    4068 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/extractcliques", FALSE, quiet) );
    4069 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/simplifyinequalities", FALSE, quiet) );
    4070
    4071 /* Reduce the max coefratio to prevent the creation of potentially numerical unstable cuts */
    4072 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "separating/maxcoefratio", 100.0, quiet) );
    4073 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "separating/maxcoefratiofacrowprep", 1.0, quiet) );
    4074
    4075#ifdef SCIP_WITH_PAPILO
    4076 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "presolving/milp/hugebound", 1e6, quiet) );
    4077 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "presolving/milp/markowitztolerance", 0.1, quiet) );
    4078#endif
    4079
    4080 /* weaken domain propagation of nonlinear constraints by increasing relaxation of variable bounds and constraint sides */
    4081 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "constraints/nonlinear/conssiderelaxamount", 1e-7, quiet) );
    4082 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "constraints/nonlinear/varboundrelaxamount", 1e-7, quiet) );
    4083
    4084 break;
    4085
    4087
    4088 /* turn off memory saving mode and do not try to avoid memory limit */
    4089 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "memory/savefac", 1.0, quiet) );
    4090 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "misc/avoidmemout", FALSE, quiet) );
    4091 break;
    4092
    4093 default:
    4094 SCIPerrorMessage("the parameter setting <%d> is not allowed for emphasis call\n", paramemphasis);
    4095 return SCIP_INVALIDCALL;
    4096 }
    4097 return SCIP_OKAY;
    4098}
    4099
    4100/** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for
    4101 * auxiliary SCIP instances to avoid recursion
    4102 */
    4104 SCIP_PARAMSET* paramset, /**< parameter set */
    4105 SCIP_SET* set, /**< global SCIP settings */
    4106 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4107 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    4108 )
    4109{
    4110 SCIP_HEUR** heurs;
    4111 SCIP_SEPA** sepas;
    4112
    4114
    4115 int nheurs;
    4116 int nsepas;
    4117 int i;
    4118
    4119 heurs = set->heurs;
    4120 nheurs = set->nheurs;
    4121
    4122 /* disable all heuristics that use auxiliary SCIP instances */
    4123 for( i = 0; i < nheurs; ++i )
    4124 {
    4125 if( SCIPheurUsesSubscip(heurs[i]) )
    4126 {
    4127 const char* heurname;
    4128 heurname = SCIPheurGetName(heurs[i]);
    4129
    4130 /* get frequency parameter of heuristic */
    4131 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "heuristics/%s/freq", heurname);
    4132
    4133 /* we have to unfix the parameter if it fixed and not already set to -1 */
    4134 if( SCIPparamsetIsFixed(paramset, paramname) )
    4135 {
    4136 int oldfreq;
    4137
    4138 SCIP_CALL( SCIPparamsetGetInt(paramset, paramname, &oldfreq) );
    4139
    4140 /* if the frequency is already set to -1, we do not have to unfix it, but must not try to set it, either */
    4141 if( oldfreq == -1 )
    4142 continue;
    4143
    4144 /* unfix parameter */
    4145 SCIPmessageFPrintInfo(messagehdlr, NULL, "unfixing parameter %s in order to disable sub-SCIPs in the current (sub-)SCIP instance\n", paramname);
    4147 }
    4148
    4149 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    4150 }
    4151 }
    4152
    4153 sepas = set->sepas;
    4154 nsepas = set->nsepas;
    4155
    4156 /* disable all separators that use auxiliary SCIP instances */
    4157 for( i = 0; i < nsepas; ++i )
    4158 {
    4159 if( SCIPsepaUsesSubscip(sepas[i]) )
    4160 {
    4161 const char* sepaname;
    4162 sepaname = SCIPsepaGetName(sepas[i]);
    4163
    4164 /* get frequency parameter of separator */
    4165 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", sepaname);
    4166
    4167 /* we have to unfix the parameter if it fixed and not already set to -1 */
    4168 if( SCIPparamsetIsFixed(paramset, paramname) )
    4169 {
    4170 int oldfreq;
    4171
    4172 SCIP_CALL( SCIPparamsetGetInt(paramset, paramname, &oldfreq) );
    4173
    4174 /* if the frequency is already set to -1, we do not have to unfix it, but must not try to set it, either */
    4175 if( oldfreq == -1 )
    4176 continue;
    4177
    4178 /* unfix parameter */
    4179 SCIPmessageFPrintInfo(messagehdlr, NULL, "unfixing parameter %s in order to disable sub-SCIPs in the current (sub-)SCIP instance\n", paramname);
    4181 }
    4182
    4183 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, -1, quiet) );
    4184 }
    4185 }
    4186
    4187 /* turn off components constraint handler */
    4188 #ifndef NDEBUG
    4189 if( SCIPsetFindConshdlr(set, "components") != NULL )
    4190#endif
    4191 {
    4192 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/components/maxprerounds", 0, quiet) );
    4193 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "constraints/components/propfreq", -1, quiet) );
    4194 }
    4195
    4196 /* marking that the sub-SCIPs have been deactivated */
    4197 set->subscipsoff = TRUE;
    4198
    4199 return SCIP_OKAY;
    4200}
    4201
    4202/** sets heuristic parameters values to
    4203 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters
    4204 * - SCIP_PARAMSETTING_FAST such that the time spent on heuristics is decreased
    4205 * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristics are called more aggressively
    4206 * - SCIP_PARAMSETTING_OFF which turn off all heuristics
    4207 */
    4209 SCIP_PARAMSET* paramset, /**< parameter set */
    4210 SCIP_SET* set, /**< global SCIP settings */
    4211 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4212 SCIP_PARAMSETTING paramsetting, /**< parameter settings */
    4213 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    4214 )
    4215{
    4216 switch( paramsetting )
    4217 {
    4219 SCIP_CALL( paramsetSetHeuristicsDefault(paramset, set, messagehdlr, quiet) );
    4220 break;
    4222 SCIP_CALL( paramsetSetHeuristicsOff(paramset, set, messagehdlr, quiet) );
    4223 break;
    4225 SCIP_CALL( paramsetSetHeuristicsFast(paramset, set, messagehdlr, quiet) );
    4226 break;
    4228 SCIP_CALL( paramsetSetHeuristicsAggressive(paramset, set, messagehdlr, quiet) );
    4229 break;
    4230 default:
    4231 SCIPerrorMessage("the parameter setting <%d> is not allowed for heuristics\n", paramsetting);
    4232 return SCIP_INVALIDCALL;
    4233 }
    4234
    4235 return SCIP_OKAY;
    4236}
    4237
    4238/** sets presolving parameters to
    4239 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters
    4240 * - SCIP_PARAMSETTING_FAST such that the time spent on presolving is decreased
    4241 * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggressive
    4242 * - SCIP_PARAMSETTING_OFF which turn off all presolving
    4243 */
    4245 SCIP_PARAMSET* paramset, /**< parameter set */
    4246 SCIP_SET* set, /**< global SCIP settings */
    4247 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4248 SCIP_PARAMSETTING paramsetting, /**< parameter settings */
    4249 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    4250 )
    4251{
    4252 switch( paramsetting )
    4253 {
    4255 SCIP_CALL( paramsetSetPresolvingDefault(paramset, set, messagehdlr, quiet) );
    4256 break;
    4258 SCIP_CALL( paramsetSetPresolvingOff(paramset, set, messagehdlr, quiet) );
    4259 break;
    4261 SCIP_CALL( paramsetSetPresolvingFast(paramset, set, messagehdlr, quiet) );
    4262 break;
    4264 SCIP_CALL( paramsetSetPresolvingAggressive(paramset, set, messagehdlr, quiet) );
    4265 break;
    4266 default:
    4267 SCIPerrorMessage("the parameter setting <%d> is not allowed for presolving\n", paramsetting);
    4268 return SCIP_INVALIDCALL;
    4269 }
    4270
    4271 return SCIP_OKAY;
    4272}
    4273
    4274/** sets separating parameters to
    4275 * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters
    4276 * - SCIP_PARAMSETTING_FAST such that the time spent on separating is decreased
    4277 * - SCIP_PARAMSETTING_AGGRESSIVE such that separating is more aggressive
    4278 * - SCIP_PARAMSETTING_OFF which turn off all separating
    4279 */
    4281 SCIP_PARAMSET* paramset, /**< parameter set */
    4282 SCIP_SET* set, /**< global SCIP settings */
    4283 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4284 SCIP_PARAMSETTING paramsetting, /**< parameter settings */
    4285 SCIP_Bool quiet /**< should the parameters be set quietly (no output)? */
    4286 )
    4287{
    4288 switch( paramsetting )
    4289 {
    4291 SCIP_CALL( paramsetSetSeparatingDefault(paramset, set, messagehdlr, quiet) );
    4292 break;
    4294 SCIP_CALL( paramsetSetSeparatingOff(paramset, set, messagehdlr, quiet) );
    4295 break;
    4297 SCIP_CALL( paramsetSetSeparatingFast(paramset, set, messagehdlr, quiet) );
    4298 break;
    4300 SCIP_CALL( paramsetSetSeparatingAggressive(paramset, set, messagehdlr, quiet) );
    4301 break;
    4302 default:
    4303 SCIPerrorMessage("the parameter setting <%d> is not allowed for separating\n", paramsetting);
    4304 return SCIP_INVALIDCALL;
    4305 }
    4306
    4307 return SCIP_OKAY;
    4308}
    4309
    4310/** returns the array of parameters */
    4312 SCIP_PARAMSET* paramset /**< parameter set */
    4313 )
    4314{
    4315 assert(paramset != NULL);
    4316
    4317 return paramset->params;
    4318}
    4319
    4320/** returns the number of parameters in the parameter set */
    4322 SCIP_PARAMSET* paramset /**< parameter set */
    4323 )
    4324{
    4325 assert(paramset != NULL);
    4326
    4327 return paramset->nparams;
    4328}
    4329
    4330/** copies all parameter values of the source parameter set to the corresponding parameters in the target set
    4331 *
    4332 * by default reoptimization is disabled after copying the parameters. if you want to use reoptimization, you have
    4333 * to enable it explicitly.
    4334 */
    4336 SCIP_PARAMSET* sourceparamset, /**< source parameter set */
    4337 SCIP_PARAMSET* targetparamset, /**< target parameter set */
    4338 SCIP_SET* set, /**< global SCIP settings of target SCIP */
    4339 SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
    4340 )
    4341{
    4342 int i;
    4343
    4344 assert(sourceparamset != NULL);
    4345 assert(targetparamset != NULL);
    4346 assert(sourceparamset != targetparamset);
    4347 assert(set != NULL);
    4348
    4349 assert(sourceparamset->nparams == 0 || sourceparamset->params != NULL);
    4350 assert(targetparamset->nparams == 0 || targetparamset->params != NULL);
    4351
    4352 for( i = 0; i < sourceparamset->nparams; ++i )
    4353 {
    4354 SCIP_PARAM* sourceparam;
    4355 SCIP_PARAM* targetparam;
    4356 const char* paramname;
    4357
    4358 sourceparam = sourceparamset->params[i];
    4359 assert(sourceparam != NULL);
    4360
    4361 /* find parameter of same name in target scip */
    4362 paramname = SCIPparamGetName(sourceparam);
    4363 targetparam = (SCIP_PARAM*)SCIPhashtableRetrieve(targetparamset->hashtable, (void*)paramname);
    4364
    4365 /* if a plugin was not copied, the parameter does not exist in the target SCIP */
    4366 if( targetparam == NULL )
    4367 continue;
    4368
    4369 assert(SCIPparamGetType(sourceparam) == SCIPparamGetType(targetparam));
    4370
    4371 /* set value of target parameter to value of source parameter */
    4372 switch( SCIPparamGetType(sourceparam) )
    4373 {
    4375 SCIP_CALL( paramCopyBool(sourceparam, targetparam, set, messagehdlr) );
    4376 break;
    4377
    4378 case SCIP_PARAMTYPE_INT:
    4379 SCIP_CALL( paramCopyInt(sourceparam, targetparam, set, messagehdlr) );
    4380 break;
    4381
    4383 SCIP_CALL( paramCopyLongint(sourceparam, targetparam, set, messagehdlr) );
    4384 break;
    4385
    4387 SCIP_CALL( paramCopyReal(sourceparam, targetparam, set, messagehdlr) );
    4388 break;
    4389
    4391 SCIP_CALL( paramCopyChar(sourceparam, targetparam, set, messagehdlr) );
    4392 break;
    4393
    4395 /* the visualization and certificate parameters are explicitly not copied to avoid that these files of the
    4396 * original SCIP are overwritten; to avoid a hard coded comparison, each parameter could get a Bool flag which
    4397 * tells if the value of that parameter can be copied
    4398 */
    4399 if( strncmp(sourceparam->name, "visual/", 7) != 0 && strncmp(sourceparam->name, "certificate/", 12) != 0 )
    4400 {
    4401 SCIP_CALL( paramCopyString(sourceparam, targetparam, set, messagehdlr) );
    4402 }
    4403 break;
    4404
    4405 default:
    4406 SCIPerrorMessage("unknown parameter type\n");
    4407 return SCIP_INVALIDDATA;
    4408 }
    4409
    4410 /* copy fixing status of parameter */
    4411 SCIPparamSetFixed(targetparam, SCIPparamIsFixed(sourceparam));
    4412 }
    4413
    4414 /* disable reoptimization explicitly */
    4415 if( set->reopt_enable )
    4416 {
    4417 if( SCIPsetIsParamFixed(set, "reoptimization/enable") )
    4418 {
    4419 SCIP_CALL( SCIPsetChgParamFixed(set, "reoptimization/enable", FALSE) );
    4420 }
    4421 SCIP_CALL( SCIPparamsetSetBool(targetparamset, set, messagehdlr, "reoptimization/enable", FALSE) );
    4423 }
    4424
    4425 return SCIP_OKAY;
    4426}
    4427
    4428/** default comparer for integers */
    4429static
    4431{
    4432 if( elem1 < elem2 )
    4433 return -1;
    4434
    4435 if( elem2 < elem1 )
    4436 return 1;
    4437
    4438 return 0;
    4439}
    4440
    4441/** checks whether the value pointers attached to each parameter are unique
    4442 *
    4443 * When creating a parameter a value pointer can be attached. This function checks whether these pointers are
    4444 * unique. Duplicate pointers indicate an error.
    4445 */
    4447 SCIP_PARAMSET* paramset, /**< parameter set */
    4448 SCIP_SET* set /**< global SCIP settings */
    4449 )
    4450{
    4451 void** valueptr;
    4452 int* paramidx;
    4453 int nparam = 0;
    4454 int i;
    4455
    4456 SCIP_CALL( SCIPsetAllocBufferArray(set, &valueptr, paramset->nparams) );
    4457 SCIP_CALL( SCIPsetAllocBufferArray(set, &paramidx, paramset->nparams) );
    4458
    4459 for( i = 0; i < paramset->nparams; ++i)
    4460 {
    4461 SCIP_PARAM* param;
    4462
    4463 paramidx[nparam] = i;
    4464 param = paramset->params[i];
    4465 switch( param->paramtype )
    4466 {
    4468 if( param->data.boolparam.valueptr != NULL )
    4469 valueptr[nparam++] = (void*) param->data.boolparam.valueptr;
    4470 break;
    4471 case SCIP_PARAMTYPE_INT:
    4472 if( param->data.intparam.valueptr != NULL )
    4473 valueptr[nparam++] = (void*) param->data.intparam.valueptr;
    4474 break;
    4476 if( param->data.longintparam.valueptr != NULL )
    4477 valueptr[nparam++] = (void*) param->data.longintparam.valueptr;
    4478 break;
    4480 if( param->data.realparam.valueptr != NULL )
    4481 valueptr[nparam++] = (void*) param->data.realparam.valueptr;
    4482 break;
    4484 if( param->data.charparam.valueptr != NULL )
    4485 valueptr[nparam++] = (void*) param->data.charparam.valueptr;
    4486 break;
    4488 if( param->data.stringparam.valueptr != NULL )
    4489 valueptr[nparam++] = (void*) param->data.stringparam.valueptr;
    4490 break;
    4491 default:
    4492 SCIPerrorMessage("Wrong parameter type %d\n", param->paramtype);
    4493 SCIPABORT();
    4494 }
    4495 }
    4496 SCIPsortPtrInt(valueptr, paramidx, SCIPsortCompPtr, nparam);
    4497
    4498 /* check whether some consecutive pointers are the same */
    4499 for( i = 0; i < nparam - 1; ++i)
    4500 {
    4501 SCIP_PARAM* param1;
    4502 SCIP_PARAM* param2;
    4503
    4504 assert( 0 <= paramidx[i] && paramidx[i] < paramset->nparams );
    4505 assert( 0 <= paramidx[i+1] && paramidx[i+1] < paramset->nparams );
    4506 param1 = paramset->params[paramidx[i]];
    4507 param2 = paramset->params[paramidx[i+1]];
    4508 if( valueptr[i] == valueptr[i+1] )
    4509 {
    4510 SCIPerrorMessage("Value pointer for parameter <%s> is the same as for parameter <%s>.\n", param1->name, param2->name);
    4511 SCIPABORT();
    4512 }
    4513 }
    4514
    4515 SCIPsetFreeBufferArray(set, &paramidx);
    4516 SCIPsetFreeBufferArray(set, &valueptr);
    4517
    4518 return SCIP_OKAY;
    4519}
    4520
    4521/** sets fixing status of given parameter */
    4523 SCIP_PARAM* param, /**< parameter */
    4524 SCIP_Bool fixed /**< new fixing status of the parameter */
    4525 )
    4526{
    4527 assert(param != NULL);
    4528
    4529 param->isfixed = fixed;
    4530}
    4531
    4532/** checks whether value of bool parameter is valid */
    4534 SCIP_PARAM* param, /**< parameter */
    4535 SCIP_Bool value /**< value to check */
    4536 )
    4537{ /*lint --e{715}*/
    4538 assert(param != NULL);
    4539 return ( value == TRUE || value == FALSE );
    4540}
    4541
    4542/** checks whether value of integer parameter is valid */
    4544 SCIP_PARAM* param, /**< parameter */
    4545 int value /**< value to check */
    4546 )
    4547{
    4548 assert(param != NULL);
    4549
    4550 return ( value >= param->data.intparam.minvalue && value <= param->data.intparam.maxvalue );
    4551}
    4552
    4553/** checks whether value of SCIP_Longint parameter is valid */
    4555 SCIP_PARAM* param, /**< parameter */
    4556 SCIP_Longint value /**< value to check */
    4557 )
    4558{
    4559 assert( param != NULL );
    4560
    4561 return ( value >= param->data.longintparam.minvalue && value <= param->data.longintparam.maxvalue );
    4562}
    4563
    4564/** checks whether value of SCIP_Real parameter is valid */
    4566 SCIP_PARAM* param, /**< parameter */
    4567 SCIP_Real value /**< value to check */
    4568 )
    4569{
    4570 assert( param != NULL );
    4571
    4572 return ( value >= param->data.realparam.minvalue && value <= param->data.realparam.maxvalue );
    4573}
    4574
    4575/** checks whether value of char parameter is valid */
    4577 SCIP_PARAM* param, /**< parameter */
    4578 const char value /**< value to check */
    4579 )
    4580{
    4581 assert( param != NULL );
    4582
    4583 if( value == '\b' || value == '\f' || value == '\n' || value == '\r' || value == '\v' )
    4584 return FALSE;
    4585
    4586 if( param->data.charparam.allowedvalues != NULL )
    4587 {
    4588 char* c;
    4589
    4590 c = param->data.charparam.allowedvalues;
    4591 while( *c != '\0' && *c != value )
    4592 c++;
    4593
    4594 if( *c != value )
    4595 return FALSE;
    4596 }
    4597
    4598 return TRUE;
    4599}
    4600
    4601/** checks whether value of string parameter is valid */
    4603 SCIP_PARAM* param, /**< parameter */
    4604 const char* value /**< value to check */
    4605 )
    4606{ /*lint --e{715}*/
    4607 unsigned int i;
    4608
    4609 assert(param != NULL);
    4610
    4611 for( i = 0; i < (unsigned int) strlen(value); ++i )
    4612 {
    4613 if( value[i] == '\b' || value[i] == '\f' || value[i] == '\n' || value[i] == '\r' || value[i] == '\v' )
    4614 return FALSE;
    4615 }
    4616 return TRUE;
    4617}
    4618
    4619/** sets value of SCIP_Bool parameter */
    4621 SCIP_PARAM* param, /**< parameter */
    4622 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4623 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4624 SCIP_Bool value, /**< new value of the parameter */
    4625 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4626 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4627 )
    4628{
    4629 assert(param != NULL);
    4630
    4631 /* check if value is possible for the parameter */
    4632 SCIP_CALL_QUIET( paramTestBool(param, messagehdlr, value) );
    4633
    4634 /* is the value of the parameter changed? */
    4635 if( initialize || (param->data.boolparam.valueptr != NULL && *param->data.boolparam.valueptr != value)
    4636 || (param->data.boolparam.valueptr == NULL && param->data.boolparam.curvalue != value) )
    4637 {
    4638 SCIP_Bool oldvalue = FALSE;
    4639
    4640 /* check if the parameter is not fixed */
    4641 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4642
    4643 if( !initialize )
    4644 oldvalue = SCIPparamGetBool(param);
    4645
    4646 /* set the parameter's current value */
    4647 if( param->data.boolparam.valueptr != NULL )
    4648 *param->data.boolparam.valueptr = value;
    4649 else
    4650 param->data.boolparam.curvalue = value;
    4651
    4652 /* call the parameter's change information method, unless initializing */
    4653 if( !initialize && param->paramchgd != NULL && set != NULL )
    4654 {
    4655 SCIP_RETCODE retcode;
    4656
    4657 retcode = param->paramchgd(set->scip, param);
    4658
    4659 if( retcode == SCIP_PARAMETERWRONGVAL )
    4660 {
    4661 if( param->data.boolparam.valueptr != NULL )
    4662 *param->data.boolparam.valueptr = oldvalue;
    4663 else
    4664 param->data.boolparam.curvalue = oldvalue;
    4665 }
    4666 else
    4667 {
    4668 SCIP_CALL( retcode );
    4669 }
    4670 }
    4671 }
    4672
    4673 if( !quiet )
    4674 {
    4675 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4676 }
    4677
    4678 return SCIP_OKAY;
    4679}
    4680
    4681/** sets value of int parameter */
    4683 SCIP_PARAM* param, /**< parameter */
    4684 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4685 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4686 int value, /**< new value of the parameter */
    4687 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4688 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4689 )
    4690{
    4691 assert(param != NULL);
    4692
    4693 /* check if value is possible for the parameter */
    4694 SCIP_CALL_QUIET( paramTestInt(param, messagehdlr, value) );
    4695
    4696 /* is the value of the parameter changed? */
    4697 if( initialize || (param->data.intparam.valueptr != NULL && *param->data.intparam.valueptr != value)
    4698 || (param->data.intparam.valueptr == NULL && param->data.intparam.curvalue != value) )
    4699 {
    4700 int oldvalue = 0;
    4701
    4702 /* check if the parameter is not fixed */
    4703 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4704
    4705 if( !initialize )
    4706 oldvalue = SCIPparamGetInt(param);
    4707
    4708 /* set the parameter's current value */
    4709 if( param->data.intparam.valueptr != NULL )
    4710 *param->data.intparam.valueptr = value;
    4711 else
    4712 param->data.intparam.curvalue = value;
    4713
    4714 /* call the parameter's change information method, unless initialization */
    4715 if( !initialize && param->paramchgd != NULL && set != NULL )
    4716 {
    4717 SCIP_RETCODE retcode;
    4718
    4719 retcode = param->paramchgd(set->scip, param);
    4720
    4721 if( retcode == SCIP_PARAMETERWRONGVAL )
    4722 {
    4723 if( param->data.intparam.valueptr != NULL )
    4724 *param->data.intparam.valueptr = oldvalue;
    4725 else
    4726 param->data.intparam.curvalue = oldvalue;
    4727 }
    4728 else
    4729 {
    4730 SCIP_CALL( retcode );
    4731 }
    4732 }
    4733 }
    4734
    4735 if( !quiet )
    4736 {
    4737 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4738 }
    4739
    4740 return SCIP_OKAY;
    4741}
    4742
    4743/** sets value of SCIP_Longint parameter */
    4745 SCIP_PARAM* param, /**< parameter */
    4746 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4747 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4748 SCIP_Longint value, /**< new value of the parameter */
    4749 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4750 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4751 )
    4752{
    4753 assert(param != NULL);
    4754
    4755 /* check if value is possible for the parameter */
    4756 SCIP_CALL_QUIET( paramTestLongint(param, messagehdlr, value) );
    4757
    4758 /* is the value of the parameter changed? */
    4759 if( initialize || (param->data.longintparam.valueptr != NULL && *param->data.longintparam.valueptr != value)
    4760 || (param->data.longintparam.valueptr == NULL && param->data.longintparam.curvalue != value) )
    4761 {
    4762 SCIP_Longint oldvalue = 0L;
    4763
    4764 /* check if the parameter is not fixed */
    4765 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4766
    4767 if( !initialize )
    4768 oldvalue = SCIPparamGetLongint(param);
    4769
    4770 /* set the parameter's current value */
    4771 if( param->data.longintparam.valueptr != NULL )
    4772 *param->data.longintparam.valueptr = value;
    4773 else
    4774 param->data.longintparam.curvalue = value;
    4775
    4776 /* call the parameter's change information method, unless initialization */
    4777 if( !initialize && param->paramchgd != NULL && set != NULL )
    4778 {
    4779 SCIP_RETCODE retcode;
    4780
    4781 retcode = param->paramchgd(set->scip, param);
    4782
    4783 if( retcode == SCIP_PARAMETERWRONGVAL )
    4784 {
    4785 if( param->data.longintparam.valueptr != NULL )
    4786 *param->data.longintparam.valueptr = oldvalue;
    4787 else
    4788 param->data.longintparam.curvalue = oldvalue;
    4789 }
    4790 else
    4791 {
    4792 SCIP_CALL( retcode );
    4793 }
    4794 }
    4795 }
    4796
    4797 if( !quiet )
    4798 {
    4799 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4800 }
    4801
    4802 return SCIP_OKAY;
    4803}
    4804
    4805/** sets value of SCIP_Real parameter */
    4807 SCIP_PARAM* param, /**< parameter */
    4808 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4809 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4810 SCIP_Real value, /**< new value of the parameter */
    4811 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4812 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4813 )
    4814{
    4815 assert(param != NULL);
    4816
    4817 /* check if value is possible for the parameter */
    4818 value = MAX(value, SCIP_REAL_MIN);
    4819 value = MIN(value, SCIP_REAL_MAX);
    4820 SCIP_CALL_QUIET( paramTestReal(param, messagehdlr, value) );
    4821
    4822 /* is the value of the parameter changed? */
    4823 if( initialize || (param->data.realparam.valueptr != NULL && *param->data.realparam.valueptr != value) /*lint !e777*/
    4824 || (param->data.realparam.valueptr == NULL && param->data.realparam.curvalue != value) ) /*lint !e777*/
    4825 {
    4826 SCIP_Real oldvalue = 0.0;
    4827
    4828 /* check if the parameter is not fixed */
    4829 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4830
    4831 if( !initialize )
    4832 oldvalue = SCIPparamGetReal(param);
    4833
    4834 /* set the parameter's current value */
    4835 if( param->data.realparam.valueptr != NULL )
    4836 *param->data.realparam.valueptr = value;
    4837 else
    4838 param->data.realparam.curvalue = value;
    4839
    4840 /* call the parameter's change information method, unless initializing */
    4841 if( !initialize && param->paramchgd != NULL && set != NULL )
    4842 {
    4843 SCIP_RETCODE retcode;
    4844
    4845 retcode = param->paramchgd(set->scip, param);
    4846
    4847 if( retcode == SCIP_PARAMETERWRONGVAL )
    4848 {
    4849 if( param->data.realparam.valueptr != NULL )
    4850 *param->data.realparam.valueptr = oldvalue;
    4851 else
    4852 param->data.realparam.curvalue = oldvalue;
    4853 }
    4854 else
    4855 {
    4856 SCIP_CALL( retcode );
    4857 }
    4858 }
    4859 }
    4860
    4861 if( !quiet )
    4862 {
    4863 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4864 }
    4865
    4866 return SCIP_OKAY;
    4867}
    4868
    4869/** sets value of char parameter */
    4871 SCIP_PARAM* param, /**< parameter */
    4872 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4873 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4874 char value, /**< new value of the parameter */
    4875 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4876 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4877 )
    4878{
    4879 assert(param != NULL);
    4880
    4881 /* check, if value is possible for the parameter and the parameter is not fixed */
    4882 SCIP_CALL_QUIET( paramTestChar(param, messagehdlr, value) );
    4883
    4884 /* is the value of the parameter changed? */
    4885 if( initialize || (param->data.charparam.valueptr != NULL && *param->data.charparam.valueptr != value)
    4886 || (param->data.charparam.valueptr == NULL && param->data.charparam.curvalue != value) )
    4887 {
    4888 char oldvalue = '\0';
    4889
    4890 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4891
    4892 if( !initialize )
    4893 oldvalue = SCIPparamGetChar(param);
    4894
    4895 /* set the parameter's current value */
    4896 if( param->data.charparam.valueptr != NULL )
    4897 *param->data.charparam.valueptr = value;
    4898 else
    4899 param->data.charparam.curvalue = value;
    4900
    4901 /* call the parameter's change information method, unless initializing */
    4902 if( !initialize && param->paramchgd != NULL && set != NULL )
    4903 {
    4904 SCIP_RETCODE retcode;
    4905
    4906 retcode = param->paramchgd(set->scip, param);
    4907
    4908 if( retcode == SCIP_PARAMETERWRONGVAL )
    4909 {
    4910 if( param->data.charparam.valueptr != NULL )
    4911 *param->data.charparam.valueptr = oldvalue;
    4912 else
    4913 param->data.charparam.curvalue = oldvalue;
    4914 }
    4915 else
    4916 {
    4917 SCIP_CALL( retcode );
    4918 }
    4919 }
    4920 }
    4921
    4922 if( !quiet )
    4923 {
    4924 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4925 }
    4926
    4927 return SCIP_OKAY;
    4928}
    4929
    4930/** sets value of string parameter */
    4932 SCIP_PARAM* param, /**< parameter */
    4933 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
    4934 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    4935 const char* value, /**< new value of the parameter */
    4936 SCIP_Bool initialize, /**< is this the initialization of the parameter? */
    4937 SCIP_Bool quiet /**< should the parameter be set quietly (no output)? */
    4938 )
    4939{
    4940 char* oldvalue = NULL;
    4941
    4942 assert(param != NULL);
    4943
    4944 /* check if value is possible for the parameter and the parameter is not fixed */
    4945 SCIP_CALL_QUIET( paramTestString(param, messagehdlr, value) );
    4946 SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );
    4947
    4948 /* set the parameter's current value */
    4949 if( param->data.stringparam.valueptr != NULL )
    4950 {
    4951 if( !initialize )
    4952 oldvalue = *param->data.stringparam.valueptr;
    4953 SCIP_ALLOC( BMSduplicateMemoryArray(param->data.stringparam.valueptr, value, strlen(value)+1) );
    4954 }
    4955 else
    4956 {
    4957 if( !initialize )
    4958 oldvalue = param->data.stringparam.curvalue;
    4959 SCIP_ALLOC( BMSduplicateMemoryArray(&param->data.stringparam.curvalue, value, strlen(value)+1) );
    4960 }
    4961
    4962 /* call the parameter's change information method, unless initializing */
    4963 if( !initialize && param->paramchgd != NULL && set != NULL )
    4964 {
    4965 SCIP_RETCODE retcode;
    4966
    4967 retcode = param->paramchgd(set->scip, param);
    4968
    4969 if( retcode == SCIP_PARAMETERWRONGVAL )
    4970 {
    4971 if( param->data.stringparam.valueptr != NULL )
    4972 {
    4974 *param->data.stringparam.valueptr = oldvalue;
    4975 }
    4976 else
    4977 {
    4979 param->data.stringparam.curvalue = oldvalue;
    4980 }
    4981 }
    4982 else
    4983 {
    4984 BMSfreeMemoryArrayNull(&oldvalue);
    4985 SCIP_CALL( retcode );
    4986 }
    4987 }
    4988 else
    4989 {
    4990 BMSfreeMemoryArrayNull(&oldvalue);
    4991 }
    4992
    4993 if( !quiet )
    4994 {
    4995 SCIP_CALL( paramWrite(param, messagehdlr, NULL, FALSE, TRUE) );
    4996 }
    4997
    4998 return SCIP_OKAY;
    4999}
    5000
    5001/** changes default value of SCIP_Bool parameter */
    5003 SCIP_PARAM* param, /**< parameter */
    5004 SCIP_Bool defaultvalue /**< new default value */
    5005 )
    5006{
    5007 assert(param != NULL);
    5008 assert(param->paramtype == SCIP_PARAMTYPE_BOOL);
    5009
    5010 param->data.boolparam.defaultvalue = defaultvalue;
    5011}
    5012
    5013/** changes default value of int parameter */
    5015 SCIP_PARAM* param, /**< parameter */
    5016 int defaultvalue /**< new default value */
    5017 )
    5018{
    5019 assert(param != NULL);
    5020 assert(param->paramtype == SCIP_PARAMTYPE_INT);
    5021
    5022 assert(param->data.intparam.minvalue <= defaultvalue && param->data.intparam.maxvalue >= defaultvalue);
    5023
    5024 param->data.intparam.defaultvalue = defaultvalue;
    5025}
    5026
    5027/** sets default value of SCIP_Longint parameter */
    5029 SCIP_PARAM* param, /**< parameter */
    5030 SCIP_Longint defaultvalue /**< new default value */
    5031 )
    5032{
    5033 assert(param != NULL);
    5034 assert(param->paramtype == SCIP_PARAMTYPE_LONGINT);
    5035
    5036 assert(param->data.longintparam.minvalue <= defaultvalue && param->data.longintparam.maxvalue >= defaultvalue);
    5037
    5038 param->data.longintparam.defaultvalue = defaultvalue;
    5039}
    5040
    5041/** sets default value of SCIP_Real parameter */
    5043 SCIP_PARAM* param, /**< parameter */
    5044 SCIP_Real defaultvalue /**< new default value */
    5045 )
    5046{
    5047 assert(param != NULL);
    5048 assert(param->paramtype == SCIP_PARAMTYPE_REAL);
    5049
    5050 assert(param->data.realparam.minvalue <= defaultvalue && param->data.realparam.maxvalue >= defaultvalue);
    5051
    5052 param->data.realparam.defaultvalue = defaultvalue;
    5053}
    5054
    5055/** sets default value of char parameter */
    5057 SCIP_PARAM* param, /**< parameter */
    5058 char defaultvalue /**< new default value */
    5059 )
    5060{
    5061 assert(param != NULL);
    5062 assert(param->paramtype == SCIP_PARAMTYPE_CHAR);
    5063
    5064 param->data.charparam.defaultvalue = defaultvalue;
    5065}
    5066
    5067/** sets default value of string parameter */
    5069 SCIP_PARAM* param, /**< parameter */
    5070 const char* defaultvalue /**< new default value */
    5071 )
    5072{
    5073 assert(param != NULL);
    5074 assert(param->paramtype == SCIP_PARAMTYPE_STRING);
    5075
    5077 SCIP_ALLOC_ABORT( BMSduplicateMemoryArray(&param->data.stringparam.defaultvalue, defaultvalue, strlen(defaultvalue)+1) );
    5078}
    5079
    5080/** sets the parameter to its default setting */
    5082 SCIP_PARAM* param, /**< parameter */
    5083 SCIP_SET* set, /**< global SCIP settings */
    5084 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
    5085 )
    5086{
    5087 assert(param != NULL);
    5088
    5089 /* do not change the parameter if it is fixed */
    5090 if( SCIPparamIsFixed(param) )
    5091 {
    5092 SCIPsetDebugMsg(set, "parameter <%s> is fixed and is not reset to its default value.\n", param->name);
    5093
    5094 return SCIP_OKAY;
    5095 }
    5096
    5097 switch( param->paramtype )
    5098 {
    5100 SCIP_CALL( SCIPparamSetBool(param, set, messagehdlr, SCIPparamGetBoolDefault(param), FALSE, TRUE) );
    5101 break;
    5102
    5103 case SCIP_PARAMTYPE_INT:
    5104 SCIP_CALL( SCIPparamSetInt(param, set, messagehdlr, SCIPparamGetIntDefault(param), FALSE, TRUE) );
    5105 break;
    5106
    5108 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, SCIPparamGetLongintDefault(param), FALSE, TRUE) );
    5109 break;
    5110
    5112 SCIP_CALL( SCIPparamSetReal(param, set, messagehdlr, SCIPparamGetRealDefault(param), FALSE, TRUE) );
    5113 break;
    5114
    5116 SCIP_CALL( SCIPparamSetChar(param, set, messagehdlr, SCIPparamGetCharDefault(param), FALSE, TRUE) );
    5117 break;
    5118
    5120 SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, SCIPparamGetStringDefault(param), FALSE, TRUE) );
    5121 break;
    5122
    5123 default:
    5124 SCIPerrorMessage("unknown parameter type\n");
    5125 return SCIP_INVALIDDATA;
    5126 }
    5127
    5128 return SCIP_OKAY;
    5129}
    5130
    5131/** writes a single parameter to a file */
    5133 SCIP_PARAM* param, /**< parameter */
    5134 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    5135 const char* filename, /**< file name, or NULL for stdout */
    5136 SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
    5137 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
    5138 )
    5139{
    5140 SCIP_RETCODE retcode;
    5141 FILE* file;
    5142
    5143 assert(param != NULL);
    5144
    5145 /* open the file for writing */
    5146 if( filename != NULL )
    5147 {
    5148 file = fopen(filename, "w");
    5149 if( file == NULL )
    5150 {
    5151 SCIPerrorMessage("cannot open file <%s> for writing\n", filename);
    5152 SCIPprintSysError(filename);
    5153 return SCIP_FILECREATEERROR;
    5154 }
    5155 }
    5156 else
    5157 file = NULL;
    5158
    5159 /* write the parameter to the file */
    5160 retcode = paramWrite(param, messagehdlr, file, comments, onlychanged);
    5161
    5162 /* close output file */
    5163 if( filename != NULL )
    5164 {
    5165 assert(file != NULL); /*lint !e449*/
    5166 fclose(file);
    5167 }
    5168
    5169 SCIP_CALL( retcode );
    5170
    5171 return SCIP_OKAY;
    5172}
    SCIP_VAR * h
    Definition: circlepacking.c:68
    #define NULL
    Definition: def.h:248
    #define SCIP_MAXSTRLEN
    Definition: def.h:269
    #define SCIP_Longint
    Definition: def.h:141
    #define SCIP_ALLOC_ABORT(x)
    Definition: def.h:345
    #define SCIP_REAL_MAX
    Definition: def.h:158
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_CALL_QUIET(x)
    Definition: def.h:330
    #define MIN(x, y)
    Definition: def.h:224
    #define SCIP_ALLOC(x)
    Definition: def.h:366
    #define SCIP_Real
    Definition: def.h:156
    #define TRUE
    Definition: def.h:93
    #define FALSE
    Definition: def.h:94
    #define MAX(x, y)
    Definition: def.h:220
    #define SCIP_LONGINT_FORMAT
    Definition: def.h:148
    #define SCIP_HASHSIZE_PARAMS
    Definition: def.h:279
    #define SCIPABORT()
    Definition: def.h:327
    #define SCIP_REAL_MIN
    Definition: def.h:159
    #define EPSZ(x, eps)
    Definition: def.h:188
    #define SCIP_REAL_FORMAT
    Definition: def.h:161
    #define SCIP_CALL(x)
    Definition: def.h:355
    void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
    Definition: misc.c:2348
    SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element)
    Definition: misc.c:2567
    SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
    Definition: misc.c:2298
    void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
    Definition: misc.c:2596
    const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
    Definition: cons.c:4316
    SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
    Definition: scip_heur.c:276
    SCIP_Bool SCIPheurUsesSubscip(SCIP_HEUR *heur)
    Definition: heur.c:1518
    int SCIPgetNHeurs(SCIP *scip)
    Definition: scip_heur.c:287
    const char * SCIPheurGetName(SCIP_HEUR *heur)
    Definition: heur.c:1467
    const char * SCIPpresolGetName(SCIP_PRESOL *presol)
    Definition: presol.c:625
    const char * SCIPpropGetName(SCIP_PROP *prop)
    Definition: prop.c:951
    const char * SCIPsepaGetName(SCIP_SEPA *sepa)
    Definition: sepa.c:746
    SCIP_Bool SCIPsepaUsesSubscip(SCIP_SEPA *sepa)
    Definition: sepa.c:831
    void SCIPsortPtrInt(void **ptrarray, int *intarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
    int SCIPstrcasecmp(const char *s1, const char *s2)
    Definition: misc.c:10863
    int SCIPsnprintf(char *t, int len, const char *s,...)
    Definition: misc.c:10827
    void SCIPprintSysError(const char *message)
    Definition: misc.c:10719
    static const char * paramname[]
    Definition: lpi_msk.c:5172
    #define BMSfreeMemory(ptr)
    Definition: memory.h:145
    #define BMSfreeBlockMemory(mem, ptr)
    Definition: memory.h:465
    #define BMSallocBlockMemory(mem, ptr)
    Definition: memory.h:451
    #define BMSreallocMemoryArray(ptr, num)
    Definition: memory.h:127
    #define BMSduplicateMemoryArray(ptr, source, num)
    Definition: memory.h:143
    #define BMSfreeMemoryArray(ptr)
    Definition: memory.h:147
    struct BMS_BlkMem BMS_BLKMEM
    Definition: memory.h:437
    #define BMSfreeMemoryArrayNull(ptr)
    Definition: memory.h:148
    #define BMSallocMemory(ptr)
    Definition: memory.h:118
    void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
    Definition: message.c:618
    void SCIPmessagehdlrSetQuiet(SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: message.c:411
    void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
    Definition: message.c:427
    SCIP_Bool SCIPmessagehdlrIsQuiet(SCIP_MESSAGEHDLR *messagehdlr)
    Definition: message.c:910
    SCIP_RETCODE SCIPparamsetGetBool(SCIP_PARAMSET *paramset, const char *name, SCIP_Bool *value)
    Definition: paramset.c:1723
    static SCIP_RETCODE paramParseReal(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1328
    SCIP_RETCODE SCIPparamsetCreate(SCIP_PARAMSET **paramset, BMS_BLKMEM *blkmem)
    Definition: paramset.c:1425
    SCIP_RETCODE SCIPparamsetSetDefaultString(SCIP_PARAMSET *paramset, const char *name, const char *defaultvalue)
    Definition: paramset.c:2357
    SCIP_RETCODE SCIPparamSetString(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4931
    static SCIP_RETCODE paramParseChar(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1358
    SCIP_RETCODE SCIPparamsetSetReal(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_Real value)
    Definition: paramset.c:2041
    SCIP_Bool SCIPparamIsDefault(SCIP_PARAM *param)
    Definition: paramset.c:935
    SCIP_RETCODE SCIPparamsetSetDefaultLongint(SCIP_PARAMSET *paramset, const char *name, SCIP_Longint defaultvalue)
    Definition: paramset.c:2264
    static SCIP_RETCODE paramsetSetSeparatingAggressive(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3538
    void SCIPparamSetDefaultString(SCIP_PARAM *param, const char *defaultvalue)
    Definition: paramset.c:5068
    const char * SCIPparamGetName(SCIP_PARAM *param)
    Definition: paramset.c:658
    SCIP_Real SCIPparamGetRealMin(SCIP_PARAM *param)
    Definition: paramset.c:841
    char SCIPparamGetCharDefault(SCIP_PARAM *param)
    Definition: paramset.c:899
    static SCIP_RETCODE paramTestReal(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real value)
    Definition: paramset.c:153
    SCIP_RETCODE SCIPparamsetGetString(SCIP_PARAMSET *paramset, const char *name, char **value)
    Definition: paramset.c:1883
    static SCIP_RETCODE paramsetSetPresolvingOff(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3380
    SCIP_RETCODE SCIPparamSetLongint(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Longint value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4744
    SCIP_RETCODE SCIPparamWrite(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
    Definition: paramset.c:5132
    SCIP_RETCODE SCIPparamSetReal(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Real value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4806
    int SCIPparamsetGetNParams(SCIP_PARAMSET *paramset)
    Definition: paramset.c:4321
    static SCIP_RETCODE paramCreateReal(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1094
    static SCIP_RETCODE paramParseBool(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1237
    SCIP_RETCODE SCIPparamsetCheckValuePtrUnique(SCIP_PARAMSET *paramset, SCIP_SET *set)
    Definition: paramset.c:4446
    #define NEXPENSIVEHEURFREQS
    static SCIP_RETCODE paramsetSetSeparatingDefault(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3458
    static SCIP_RETCODE paramSetChar(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname, char value, SCIP_Bool quiet)
    Definition: paramset.c:379
    static SCIP_RETCODE emphasisParse(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *line)
    Definition: paramset.c:2389
    void SCIPparamSetDefaultReal(SCIP_PARAM *param, SCIP_Real defaultvalue)
    Definition: paramset.c:5042
    static SCIP_RETCODE paramTestString(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, const char *value)
    Definition: paramset.c:212
    SCIP_Bool SCIPparamIsValidInt(SCIP_PARAM *param, int value)
    Definition: paramset.c:4543
    SCIP_RETCODE SCIPparamsetSetInt(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, int value)
    Definition: paramset.c:1973
    char * SCIPparamGetCharAllowedValues(SCIP_PARAM *param)
    Definition: paramset.c:888
    SCIP_RETCODE SCIPparamsetAddString(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1644
    SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
    Definition: paramset.c:678
    SCIP_RETCODE SCIPparamsetGetInt(SCIP_PARAMSET *paramset, const char *name, int *value)
    Definition: paramset.c:1755
    static SCIP_RETCODE paramCopyInt(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:544
    SCIP_Bool SCIPparamIsValidBool(SCIP_PARAM *param, SCIP_Bool value)
    Definition: paramset.c:4533
    static SCIP_DECL_HASHGETKEY(hashGetKeyParam)
    Definition: paramset.c:57
    void SCIPparamSetDefaultChar(SCIP_PARAM *param, char defaultvalue)
    Definition: paramset.c:5056
    static SCIP_RETCODE paramsetSetSeparatingFast(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3712
    SCIP_Bool SCIPparamIsValidString(SCIP_PARAM *param, const char *value)
    Definition: paramset.c:4602
    static SCIP_RETCODE paramSetBool(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname, SCIP_Bool value, SCIP_Bool quiet)
    Definition: paramset.c:343
    static SCIP_RETCODE paramCreateString(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char **valueptr, SCIP_Bool isadvanced, const char *defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1163
    SCIP_RETCODE SCIPparamsetGetLongint(SCIP_PARAMSET *paramset, const char *name, SCIP_Longint *value)
    Definition: paramset.c:1787
    static SCIP_RETCODE paramTestChar(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, char value)
    Definition: paramset.c:175
    SCIP_Bool SCIPparamIsAdvanced(SCIP_PARAM *param)
    Definition: paramset.c:688
    static SCIP_RETCODE paramsetSetSeparatingOff(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3769
    SCIP_RETCODE SCIPparamsetAddChar(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1615
    SCIP_RETCODE SCIPparamsetSetPresolving(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: paramset.c:4244
    SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
    Definition: paramset.c:648
    static SCIP_RETCODE paramParseInt(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1268
    char * SCIPparamGetString(SCIP_PARAM *param)
    Definition: paramset.c:910
    static SCIP_RETCODE paramParseString(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1388
    int SCIPparamGetIntMin(SCIP_PARAM *param)
    Definition: paramset.c:747
    void SCIPparamSetFixed(SCIP_PARAM *param, SCIP_Bool fixed)
    Definition: paramset.c:4522
    void SCIPparamsetFree(SCIP_PARAMSET **paramset, BMS_BLKMEM *blkmem)
    Definition: paramset.c:1445
    SCIP_RETCODE SCIPparamSetToDefault(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:5081
    SCIP_Longint SCIPparamGetLongintMin(SCIP_PARAM *param)
    Definition: paramset.c:794
    static SCIP_RETCODE paramsetAdd(SCIP_PARAMSET *paramset, SCIP_PARAM *param)
    Definition: paramset.c:1470
    static const char * paramtypeGetName(SCIP_PARAMTYPE paramtype)
    Definition: paramset.c:1672
    SCIP_RETCODE SCIPparamsetAddInt(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1525
    SCIP_PARAM * SCIPparamsetGetParam(SCIP_PARAMSET *paramset, const char *name)
    Definition: paramset.c:1711
    SCIP_RETCODE SCIPparamsetRead(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *filename)
    Definition: paramset.c:2659
    static SCIP_RETCODE paramCreateLongint(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1061
    SCIP_RETCODE SCIPparamsetSetChar(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, char value)
    Definition: paramset.c:2075
    static SCIP_RETCODE paramsetSetHeuristicsOff(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3066
    static SCIP_RETCODE paramSetInt(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname, int value, SCIP_Bool quiet)
    Definition: paramset.c:415
    SCIP_RETCODE SCIPparamsetSetDefaultChar(SCIP_PARAMSET *paramset, const char *name, char defaultvalue)
    Definition: paramset.c:2326
    SCIP_Bool SCIPparamGetBool(SCIP_PARAM *param)
    Definition: paramset.c:708
    const char * SCIPparamGetDesc(SCIP_PARAM *param)
    Definition: paramset.c:668
    SCIP_RETCODE SCIPparamsetSetDefaultBool(SCIP_PARAMSET *paramset, const char *name, SCIP_Bool defaultvalue)
    Definition: paramset.c:2202
    static SCIP_RETCODE paramTestLongint(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Longint value)
    Definition: paramset.c:131
    SCIP_Bool SCIPparamIsValidLongint(SCIP_PARAM *param, SCIP_Longint value)
    Definition: paramset.c:4554
    void SCIPparamSetDefaultBool(SCIP_PARAM *param, SCIP_Bool defaultvalue)
    Definition: paramset.c:5002
    SCIP_RETCODE SCIPparamsetGetChar(SCIP_PARAMSET *paramset, const char *name, char *value)
    Definition: paramset.c:1851
    int SCIPparamGetInt(SCIP_PARAM *param)
    Definition: paramset.c:733
    static SCIP_RETCODE paramCreateBool(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:999
    SCIP_Bool SCIPparamGetBoolDefault(SCIP_PARAM *param)
    Definition: paramset.c:722
    SCIP_RETCODE SCIPparamsetSetToSubscipsOff(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:4103
    SCIP_RETCODE SCIPparamsetSetToDefaults(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:2787
    static SCIP_RETCODE paramsetSetHeuristicsFast(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3011
    SCIP_Bool SCIPparamIsValidReal(SCIP_PARAM *param, SCIP_Real value)
    Definition: paramset.c:4565
    int SCIPparamGetIntMax(SCIP_PARAM *param)
    Definition: paramset.c:758
    SCIP_Real SCIPparamGetReal(SCIP_PARAM *param)
    Definition: paramset.c:827
    SCIP_Bool SCIPparamsetIsFixed(SCIP_PARAMSET *paramset, const char *name)
    Definition: paramset.c:1689
    int SCIPparamGetIntDefault(SCIP_PARAM *param)
    Definition: paramset.c:769
    void SCIPparamSetDefaultLongint(SCIP_PARAM *param, SCIP_Longint defaultvalue)
    Definition: paramset.c:5028
    SCIP_RETCODE SCIPparamsetAddBool(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1498
    char SCIPparamGetChar(SCIP_PARAM *param)
    Definition: paramset.c:874
    SCIP_Longint SCIPparamGetLongint(SCIP_PARAM *param)
    Definition: paramset.c:780
    SCIP_Longint SCIPparamGetLongintMax(SCIP_PARAM *param)
    Definition: paramset.c:805
    SCIP_RETCODE SCIPparamsetWrite(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
    Definition: paramset.c:2709
    SCIP_Real SCIPparamGetRealMax(SCIP_PARAM *param)
    Definition: paramset.c:852
    SCIP_RETCODE SCIPparamsetSetString(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, const char *value)
    Definition: paramset.c:2109
    SCIP_RETCODE SCIPparamsetSetToDefault(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname)
    Definition: paramset.c:2805
    static SCIP_RETCODE paramTestInt(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, int value)
    Definition: paramset.c:109
    SCIP_RETCODE SCIPparamsetSetDefaultInt(SCIP_PARAMSET *paramset, const char *name, int defaultvalue)
    Definition: paramset.c:2233
    SCIP_RETCODE SCIPparamsetSetDefaultReal(SCIP_PARAMSET *paramset, const char *name, SCIP_Real defaultvalue)
    Definition: paramset.c:2295
    SCIP_RETCODE SCIPparamsetAddReal(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1585
    static SCIP_RETCODE paramTestBool(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool value)
    Definition: paramset.c:88
    SCIP_RETCODE SCIPparamsetCopyParams(SCIP_PARAMSET *sourceparamset, SCIP_PARAMSET *targetparamset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:4335
    SCIP_RETCODE SCIPparamSetBool(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4620
    void SCIPparamSetDefaultInt(SCIP_PARAM *param, int defaultvalue)
    Definition: paramset.c:5014
    SCIP_RETCODE SCIPparamsetSetHeuristics(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: paramset.c:4208
    SCIP_RETCODE SCIPparamsetSetSeparating(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: paramset.c:4280
    static SCIP_DECL_SORTPTRCOMP(SCIPsortCompPtr)
    Definition: paramset.c:4430
    SCIP_RETCODE SCIPparamsetSetLongint(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_Longint value)
    Definition: paramset.c:2007
    SCIP_RETCODE SCIPparamsetSetEmphasis(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
    Definition: paramset.c:3832
    SCIP_RETCODE SCIPparamsetGetReal(SCIP_PARAMSET *paramset, const char *name, SCIP_Real *value)
    Definition: paramset.c:1819
    static SCIP_RETCODE paramsetSetPresolvingFast(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3265
    SCIP_PARAM ** SCIPparamsetGetParams(SCIP_PARAMSET *paramset)
    Definition: paramset.c:4311
    static SCIP_RETCODE paramCreate(SCIP_PARAM **param, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata, SCIP_Bool isadvanced)
    Definition: paramset.c:970
    static SCIP_RETCODE paramCopyBool(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:523
    static SCIP_RETCODE paramCopyReal(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:586
    static SCIP_RETCODE paramSetLongint(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname, SCIP_Longint value, SCIP_Bool quiet)
    Definition: paramset.c:451
    SCIP_Bool SCIPparamIsValidChar(SCIP_PARAM *param, const char value)
    Definition: paramset.c:4576
    static SCIP_RETCODE paramCopyLongint(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:565
    static SCIP_RETCODE paramTestFixed(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:69
    SCIP_RETCODE SCIPparamsetSet(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, const char *value, SCIP_Bool fix)
    Definition: paramset.c:2143
    static SCIP_RETCODE paramsetSetHeuristicsAggressive(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:2877
    SCIP_RETCODE SCIPparamsetAddLongint(SCIP_PARAMSET *paramset, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1555
    SCIP_Longint SCIPparamGetLongintDefault(SCIP_PARAM *param)
    Definition: paramset.c:816
    static SCIP_RETCODE paramsetParse(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *line, SCIP_Bool *foundnormalparam)
    Definition: paramset.c:2542
    SCIP_RETCODE SCIPparamsetFix(SCIP_PARAMSET *paramset, const char *name, SCIP_Bool fixed)
    Definition: paramset.c:1915
    static void paramFree(SCIP_PARAM **param, BMS_BLKMEM *blkmem)
    Definition: paramset.c:1195
    SCIP_RETCODE SCIPparamSetChar(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4870
    SCIP_Real SCIPparamGetRealDefault(SCIP_PARAM *param)
    Definition: paramset.c:863
    static SCIP_RETCODE paramParseLongint(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, char *valuestr)
    Definition: paramset.c:1298
    static SCIP_RETCODE paramCopyChar(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:607
    static SCIP_RETCODE paramCreateInt(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1028
    static SCIP_RETCODE paramCreateChar(SCIP_PARAM **param, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
    Definition: paramset.c:1127
    static SCIP_RETCODE paramsetSetPresolvingAggressive(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3189
    SCIP_RETCODE SCIPparamsetSetBool(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_Bool value)
    Definition: paramset.c:1939
    SCIP_RETCODE SCIPparamSetInt(SCIP_PARAM *param, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, int value, SCIP_Bool initialize, SCIP_Bool quiet)
    Definition: paramset.c:4682
    static SCIP_RETCODE paramSetReal(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *paramname, SCIP_Real value, SCIP_Bool quiet)
    Definition: paramset.c:487
    static SCIP_RETCODE paramCopyString(SCIP_PARAM *sourceparam, SCIP_PARAM *targetparam, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: paramset.c:628
    SCIP_Bool SCIPparamIsFixed(SCIP_PARAM *param)
    Definition: paramset.c:698
    static SCIP_RETCODE paramsetSetHeuristicsDefault(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:2829
    static SCIP_RETCODE paramsetSetPresolvingDefault(SCIP_PARAMSET *paramset, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
    Definition: paramset.c:3104
    static SCIP_RETCODE paramWrite(SCIP_PARAM *param, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Bool comments, SCIP_Bool onlychanged)
    Definition: paramset.c:244
    char * SCIPparamGetStringDefault(SCIP_PARAM *param)
    Definition: paramset.c:924
    internal methods for handling parameter settings
    #define SCIPerrorMessage
    Definition: pub_message.h:64
    SCIP callable library.
    SCIP_RETCODE SCIPsetSetSeparating(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: set.c:3884
    SCIP_RETCODE SCIPsetSetHeuristics(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: set.c:3848
    SCIP_RETCODE SCIPsetSetReoptimizationParams(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
    Definition: set.c:807
    SCIP_Real SCIPsetCeil(SCIP_SET *set, SCIP_Real val)
    Definition: set.c:6728
    SCIP_HEUR * SCIPsetFindHeur(SCIP_SET *set, const char *name)
    Definition: set.c:4864
    SCIP_Bool SCIPsetIsParamFixed(SCIP_SET *set, const char *name)
    Definition: set.c:3346
    SCIP_CONSHDLR * SCIPsetFindConshdlr(SCIP_SET *set, const char *name)
    Definition: set.c:4244
    SCIP_RETCODE SCIPsetChgParamFixed(SCIP_SET *set, const char *name, SCIP_Bool fixed)
    Definition: set.c:3452
    SCIP_RETCODE SCIPsetSetPresolving(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
    Definition: set.c:3866
    SCIP_SEPA * SCIPsetFindSepa(SCIP_SET *set, const char *name)
    Definition: set.c:4509
    SCIP_PROP * SCIPsetFindProp(SCIP_SET *set, const char *name)
    Definition: set.c:4644
    SCIP_PRESOL * SCIPsetFindPresol(SCIP_SET *set, const char *name)
    Definition: set.c:4361
    internal methods for global SCIP settings
    #define SCIPsetFreeBufferArray(set, ptr)
    Definition: set.h:1782
    #define SCIPsetAllocBufferArray(set, ptr, num)
    Definition: set.h:1775
    #define SCIPsetDebugMsg
    Definition: set.h:1811
    SCIP_Bool defaultvalue
    SCIP_Bool curvalue
    SCIP_Bool * valueptr
    SCIP_Longint * valueptr
    SCIP_Longint curvalue
    SCIP_Longint defaultvalue
    SCIP_Longint minvalue
    SCIP_Longint maxvalue
    SCIP_PARAM ** params
    SCIP_HASHTABLE * hashtable
    SCIP_PARAMTYPE paramtype
    SCIP_INTPARAM intparam
    SCIP_STRINGPARAM stringparam
    SCIP_LONGINTPARAM longintparam
    SCIP_BOOLPARAM boolparam
    unsigned int isfixed
    SCIP_CHARPARAM charparam
    SCIP_REALPARAM realparam
    SCIP_PARAMDATA * paramdata
    unsigned int isadvanced
    union SCIP_Param::@19 data
    SCIP_Real defaultvalue
    SCIP_Real * valueptr
    SCIP_Real curvalue
    SCIP_Real maxvalue
    SCIP_Real minvalue
    datastructures for handling parameter settings
    Definition: heur_padm.c:135
    @ SCIP_PARAMSETTING_OFF
    Definition: type_paramset.h:63
    @ SCIP_PARAMSETTING_AGGRESSIVE
    Definition: type_paramset.h:61
    @ SCIP_PARAMSETTING_DEFAULT
    Definition: type_paramset.h:59
    @ SCIP_PARAMSETTING_FAST
    Definition: type_paramset.h:62
    @ SCIP_PARAMEMPHASIS_DEFAULT
    Definition: type_paramset.h:70
    @ SCIP_PARAMEMPHASIS_NUMERICS
    Definition: type_paramset.h:81
    @ SCIP_PARAMEMPHASIS_PHASEIMPROVE
    Definition: type_paramset.h:79
    @ SCIP_PARAMEMPHASIS_CPSOLVER
    Definition: type_paramset.h:72
    @ SCIP_PARAMEMPHASIS_HARDLP
    Definition: type_paramset.h:75
    @ SCIP_PARAMEMPHASIS_FEASIBILITY
    Definition: type_paramset.h:74
    @ SCIP_PARAMEMPHASIS_BENCHMARK
    Definition: type_paramset.h:82
    @ SCIP_PARAMEMPHASIS_PHASEPROOF
    Definition: type_paramset.h:80
    @ SCIP_PARAMEMPHASIS_EASYCIP
    Definition: type_paramset.h:73
    @ SCIP_PARAMEMPHASIS_PHASEFEAS
    Definition: type_paramset.h:78
    @ SCIP_PARAMEMPHASIS_COUNTER
    Definition: type_paramset.h:77
    @ SCIP_PARAMEMPHASIS_OPTIMALITY
    Definition: type_paramset.h:76
    enum SCIP_ParamSetting SCIP_PARAMSETTING
    Definition: type_paramset.h:65
    struct SCIP_ParamData SCIP_PARAMDATA
    Definition: type_paramset.h:87
    enum SCIP_ParamEmphasis SCIP_PARAMEMPHASIS
    Definition: type_paramset.h:84
    enum SCIP_ParamType SCIP_PARAMTYPE
    Definition: type_paramset.h:54
    #define SCIP_DECL_PARAMCHGD(x)
    @ SCIP_PARAMTYPE_CHAR
    Definition: type_paramset.h:51
    @ SCIP_PARAMTYPE_STRING
    Definition: type_paramset.h:52
    @ SCIP_PARAMTYPE_BOOL
    Definition: type_paramset.h:47
    @ SCIP_PARAMTYPE_INT
    Definition: type_paramset.h:48
    @ SCIP_PARAMTYPE_LONGINT
    Definition: type_paramset.h:49
    @ SCIP_PARAMTYPE_REAL
    Definition: type_paramset.h:50
    @ SCIP_FILECREATEERROR
    Definition: type_retcode.h:48
    @ SCIP_NOFILE
    Definition: type_retcode.h:47
    @ SCIP_READERROR
    Definition: type_retcode.h:45
    @ SCIP_INVALIDDATA
    Definition: type_retcode.h:52
    @ SCIP_PARAMETERUNKNOWN
    Definition: type_retcode.h:55
    @ SCIP_PARAMETERWRONGVAL
    Definition: type_retcode.h:57
    @ SCIP_PARAMETERWRONGTYPE
    Definition: type_retcode.h:56
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    @ SCIP_INVALIDCALL
    Definition: type_retcode.h:51
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63