Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_conflict.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 scip_conflict.c
    26 * @ingroup OTHER_CFILES
    27 * @brief public methods for conflict handler plugins and conflict analysis
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Gerald Gamrath
    31 * @author Leona Gottwald
    32 * @author Stefan Heinz
    33 * @author Gregor Hendel
    34 * @author Thorsten Koch
    35 * @author Alexander Martin
    36 * @author Marc Pfetsch
    37 * @author Michael Winkler
    38 * @author Kati Wolter
    39 *
    40 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
    41 */
    42
    43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    44
    45#include "scip/conflict.h"
    46#include "scip/debug.h"
    47#include "misc.h"
    48#include "lp.h"
    49#include "var.h"
    50#include "scip/pub_cons.h"
    51#include "scip/pub_message.h"
    52#include "scip/pub_var.h"
    54#include "scip/scip_conflict.h"
    55#include "scip/scip_tree.h"
    56#include "scip/set.h"
    58#include "scip/struct_mem.h"
    59#include "scip/struct_scip.h"
    60#include "scip/struct_set.h"
    61#include "scip/struct_var.h"
    62
    63/** creates a conflict handler and includes it in SCIP
    64 *
    65 * @pre This method can be called if SCIP is in one of the following stages:
    66 * - \ref SCIP_STAGE_INIT
    67 * - \ref SCIP_STAGE_PROBLEM
    68 *
    69 * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
    70 * callback is added
    71 * in future releases; consider using SCIPincludeConflicthdlrBasic() and setter functions
    72 * if you seek for a method which is less likely to change in future releases
    73 */
    75 SCIP* scip, /**< SCIP data structure */
    76 const char* name, /**< name of conflict handler */
    77 const char* desc, /**< description of conflict handler */
    78 int priority, /**< priority of the conflict handler */
    79 SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
    80 SCIP_DECL_CONFLICTFREE((*conflictfree)), /**< destructor of conflict handler */
    81 SCIP_DECL_CONFLICTINIT((*conflictinit)), /**< initialize conflict handler */
    82 SCIP_DECL_CONFLICTEXIT((*conflictexit)), /**< deinitialize conflict handler */
    83 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
    84 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
    85 SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
    86 SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
    87 )
    88{
    89 SCIP_CONFLICTHDLR* conflicthdlr;
    90
    91 SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlr", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    92
    93 /* check whether conflict handler is already present */
    94 if( SCIPfindConflicthdlr(scip, name) != NULL )
    95 {
    96 SCIPerrorMessage("conflict handler <%s> already included.\n", name);
    97 return SCIP_INVALIDDATA;
    98 }
    99
    100 SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
    101 conflictcopy,
    102 conflictfree, conflictinit, conflictexit, conflictinitsol, conflictexitsol, conflictexec,
    103 conflicthdlrdata) );
    104 SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
    105
    106 return SCIP_OKAY;
    107}
    108
    109/** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
    110 * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
    111 * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
    112 * SCIPsetConflicthdlrInit(), SCIPsetConflicthdlrExit(), SCIPsetConflicthdlrInitsol(),
    113 * and SCIPsetConflicthdlrExitsol()
    114 *
    115 * @pre This method can be called if SCIP is in one of the following stages:
    116 * - \ref SCIP_STAGE_INIT
    117 * - \ref SCIP_STAGE_PROBLEM
    118 *
    119 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
    120 */
    122 SCIP* scip, /**< SCIP data structure */
    123 SCIP_CONFLICTHDLR** conflicthdlrptr, /**< reference to a conflict handler pointer, or NULL */
    124 const char* name, /**< name of conflict handler */
    125 const char* desc, /**< description of conflict handler */
    126 int priority, /**< priority of the conflict handler */
    127 SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
    128 SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
    129 )
    130{
    131 SCIP_CONFLICTHDLR* conflicthdlr;
    132
    133 SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConflicthdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    134
    135 /* check whether conflict handler is already present */
    136 if( SCIPfindConflicthdlr(scip, name) != NULL )
    137 {
    138 SCIPerrorMessage("conflict handler <%s> already included.\n", name);
    139 return SCIP_INVALIDDATA;
    140 }
    141
    142 SCIP_CALL( SCIPconflicthdlrCreate(&conflicthdlr, scip->set, scip->messagehdlr, scip->mem->setmem, name, desc, priority,
    143 NULL, NULL, NULL, NULL, NULL, NULL, conflictexec, conflicthdlrdata) );
    144 SCIP_CALL( SCIPsetIncludeConflicthdlr(scip->set, conflicthdlr) );
    145
    146 if( conflicthdlrptr != NULL )
    147 *conflicthdlrptr = conflicthdlr;
    148
    149 return SCIP_OKAY;
    150}
    151
    152/** set copy method of conflict handler */
    154 SCIP* scip, /**< SCIP data structure */
    155 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    156 SCIP_DECL_CONFLICTCOPY((*conflictcopy)) /**< copy method of conflict handler */
    157 )
    158{
    159 assert(scip != NULL);
    160
    161 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    162
    163 SCIPconflicthdlrSetCopy(conflicthdlr, conflictcopy);
    164
    165 return SCIP_OKAY;
    166}
    167
    168/** set destructor of conflict handler */
    170 SCIP* scip, /**< SCIP data structure */
    171 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    172 SCIP_DECL_CONFLICTFREE((*conflictfree)) /**< destructor of conflict handler */
    173 )
    174{
    175 assert(scip != NULL);
    176
    177 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    178
    179 SCIPconflicthdlrSetFree(conflicthdlr, conflictfree);
    180
    181 return SCIP_OKAY;
    182}
    183
    184/** set initialization method of conflict handler */
    186 SCIP* scip, /**< SCIP data structure */
    187 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    188 SCIP_DECL_CONFLICTINIT((*conflictinit)) /**< initialize conflict handler */
    189 )
    190{
    191 assert(scip != NULL);
    192
    193 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    194
    195 SCIPconflicthdlrSetInit(conflicthdlr, conflictinit);
    196
    197 return SCIP_OKAY;
    198}
    199
    200/** set deinitialization method of conflict handler */
    202 SCIP* scip, /**< SCIP data structure */
    203 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    204 SCIP_DECL_CONFLICTEXIT((*conflictexit)) /**< deinitialize conflict handler */
    205 )
    206{
    207 assert(scip != NULL);
    208
    209 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    210
    211 SCIPconflicthdlrSetExit(conflicthdlr, conflictexit);
    212
    213 return SCIP_OKAY;
    214}
    215
    216/** set solving process initialization method of conflict handler */
    218 SCIP* scip, /**< SCIP data structure */
    219 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    220 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
    221 )
    222{
    223 assert(scip != NULL);
    224
    225 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    226
    227 SCIPconflicthdlrSetInitsol(conflicthdlr, conflictinitsol);
    228
    229 return SCIP_OKAY;
    230}
    231
    232/** set solving process deinitialization method of conflict handler */
    234 SCIP* scip, /**< SCIP data structure */
    235 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    236 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
    237 )
    238{
    239 assert(scip != NULL);
    240
    241 SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConflicthdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
    242
    243 SCIPconflicthdlrSetExitsol(conflicthdlr, conflictexitsol);
    244
    245 return SCIP_OKAY;
    246}
    247
    248/** returns the conflict handler of the given name, or NULL if not existing */
    250 SCIP* scip, /**< SCIP data structure */
    251 const char* name /**< name of conflict handler */
    252 )
    253{
    254 assert(scip != NULL);
    255 assert(scip->set != NULL);
    256 assert(name != NULL);
    257
    258 return SCIPsetFindConflicthdlr(scip->set, name);
    259}
    260
    261/** returns the array of currently available conflict handlers */
    263 SCIP* scip /**< SCIP data structure */
    264 )
    265{
    266 assert(scip != NULL);
    267 assert(scip->set != NULL);
    268
    270
    271 return scip->set->conflicthdlrs;
    272}
    273
    274/** returns the number of currently available conflict handlers */
    276 SCIP* scip /**< SCIP data structure */
    277 )
    278{
    279 assert(scip != NULL);
    280 assert(scip->set != NULL);
    281
    282 return scip->set->nconflicthdlrs;
    283}
    284
    285/** sets the priority of a conflict handler */
    287 SCIP* scip, /**< SCIP data structure */
    288 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    289 int priority /**< new priority of the conflict handler */
    290 )
    291{
    292 assert(scip != NULL);
    293 assert(scip->set != NULL);
    294
    295 SCIPconflicthdlrSetPriority(conflicthdlr, scip->set, priority);
    296
    297 return SCIP_OKAY;
    298}
    299
    300/** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
    301 * conflict analysis since it will not be applied
    302 *
    303 * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
    304 * conflict analysis since it will not be applied
    305 *
    306 * @pre This method can be called if SCIP is in one of the following stages:
    307 * - \ref SCIP_STAGE_INITPRESOLVE
    308 * - \ref SCIP_STAGE_PRESOLVING
    309 * - \ref SCIP_STAGE_EXITPRESOLVE
    310 * - \ref SCIP_STAGE_SOLVING
    311 *
    312 * @note SCIP stage does not get changed
    313 */
    315 SCIP* scip /**< SCIP data structure */
    316 )
    317{
    318 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisConflictAnalysisApplicable", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    319
    320 return (SCIPgetDepth(scip) > 0 && SCIPconflictApplicable(scip->set));
    321}
    322
    323/** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
    324 * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
    325 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
    326 *
    327 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    328 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    329 *
    330 * @pre This method can be called if SCIP is in one of the following stages:
    331 * - \ref SCIP_STAGE_PRESOLVING
    332 * - \ref SCIP_STAGE_SOLVING
    333 *
    334 * @note SCIP stage does not get changed
    335 */
    337 SCIP* scip, /**< SCIP data structure */
    338 SCIP_CONFTYPE conftype, /**< type of conflict */
    339 SCIP_Bool iscutoffinvolved /**< is the current cutoff bound involved? */
    340 )
    341{
    342 SCIP_CALL( SCIPcheckStage(scip, "SCIPinitConflictAnalysis", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    343
    344 SCIP_CALL( SCIPconflictInit(scip->conflict, scip->set, scip->stat, scip->transprob, conftype, iscutoffinvolved) );
    345
    346 return SCIP_OKAY;
    347}
    348
    349/** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
    350 * this method should be called in one of the following two cases:
    351 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
    352 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    353 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
    354 * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
    355 *
    356 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    357 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    358 *
    359 * @pre This method can be called if SCIP is in one of the following stages:
    360 * - \ref SCIP_STAGE_PRESOLVING
    361 * - \ref SCIP_STAGE_SOLVING
    362 *
    363 * @note SCIP stage does not get changed
    364 */
    366 SCIP* scip, /**< SCIP data structure */
    367 SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
    368 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    369 * conflicting bound was valid, NULL for current local bound */
    370 )
    371{
    373
    374 assert( var->scip == scip );
    375
    376 SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx) );
    377
    378 return SCIP_OKAY;
    379}
    380
    381/** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
    382 * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
    383 * to explain a certain bound change;
    384 * this method should be called in one of the following two cases:
    385 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
    386 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    387 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
    388 * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
    389 *
    390 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    391 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    392 *
    393 * @pre This method can be called if SCIP is in one of the following stages:
    394 * - \ref SCIP_STAGE_PRESOLVING
    395 * - \ref SCIP_STAGE_SOLVING
    396 *
    397 * @note SCIP stage does not get changed
    398 */
    400 SCIP* scip, /**< SCIP data structure */
    401 SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
    402 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    403 * conflicting bound was valid, NULL for current local bound */
    404 SCIP_Real relaxedlb /**< the relaxed lower bound */
    405 )
    406{
    407 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedLb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    408
    409 assert( var->scip == scip );
    410
    411 SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, bdchgidx, relaxedlb) );
    412
    413 return SCIP_OKAY;
    414}
    415
    416/** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
    417 * this method should be called in one of the following two cases:
    418 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
    419 * led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    420 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
    421 * each upper bound, whose current assignment led to the deduction of the given conflict bound.
    422 *
    423 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    424 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    425 *
    426 * @pre This method can be called if SCIP is in one of the following stages:
    427 * - \ref SCIP_STAGE_PRESOLVING
    428 * - \ref SCIP_STAGE_SOLVING
    429 *
    430 * @note SCIP stage does not get changed
    431 */
    433 SCIP* scip, /**< SCIP data structure */
    434 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    435 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    436 * conflicting bound was valid, NULL for current local bound */
    437 )
    438{
    440
    441 assert( var->scip == scip );
    442
    443 SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx) );
    444
    445 return SCIP_OKAY;
    446}
    447
    448/** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
    449 * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
    450 * to explain a certain bound change;
    451 * this method should be called in one of the following two cases:
    452 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
    453 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    454 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
    455 * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
    456 * bound.
    457 *
    458 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    459 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    460 *
    461 * @pre This method can be called if SCIP is in one of the following stages:
    462 * - \ref SCIP_STAGE_PRESOLVING
    463 * - \ref SCIP_STAGE_SOLVING
    464 *
    465 * @note SCIP stage does not get changed
    466 */
    468 SCIP* scip, /**< SCIP data structure */
    469 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    470 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    471 * conflicting bound was valid, NULL for current local bound */
    472 SCIP_Real relaxedub /**< the relaxed upper bound */
    473 )
    474{
    475 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedUb", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    476
    477 assert( var->scip == scip );
    478
    479 SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, bdchgidx, relaxedub) );
    480
    481 return SCIP_OKAY;
    482}
    483
    484/** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
    485 * storage; this method should be called in one of the following two cases:
    486 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
    487 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    488 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
    489 * for each bound, whose current assignment led to the deduction of the given conflict bound.
    490 *
    491 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    492 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    493 *
    494 * @pre This method can be called if SCIP is in one of the following stages:
    495 * - \ref SCIP_STAGE_PRESOLVING
    496 * - \ref SCIP_STAGE_SOLVING
    497 *
    498 * @note SCIP stage does not get changed
    499 */
    501 SCIP* scip, /**< SCIP data structure */
    502 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    503 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    504 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    505 * conflicting bound was valid, NULL for current local bound */
    506 )
    507{
    509
    510 assert( var->scip == scip );
    511
    512 SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx) );
    513
    514 return SCIP_OKAY;
    515}
    516
    517/** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
    518 * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
    519 * which would be enough to explain a certain bound change;
    520 * this method should be called in one of the following two cases:
    521 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
    522 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    523 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
    524 * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
    525 *
    526 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    527 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    528 *
    529 * @pre This method can be called if SCIP is in one of the following stages:
    530 * - \ref SCIP_STAGE_PRESOLVING
    531 * - \ref SCIP_STAGE_SOLVING
    532 *
    533 * @note SCIP stage does not get changed
    534 */
    536 SCIP* scip, /**< SCIP data structure */
    537 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    538 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    539 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    540 * conflicting bound was valid, NULL for current local bound */
    541 SCIP_Real relaxedbd /**< the relaxed bound */
    542 )
    543{
    544 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictRelaxedBd", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    545
    546 assert( var->scip == scip );
    547
    548 SCIP_CALL( SCIPconflictAddRelaxedBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, boundtype, bdchgidx, relaxedbd) );
    549
    550 return SCIP_OKAY;
    551}
    552
    553/** adds changed bound of fixed binary variable to the conflict analysis' candidate storage;
    554 * this method should be called in one of the following two cases:
    555 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
    556 * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    557 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
    558 * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
    559 *
    560 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    561 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    562 *
    563 * @pre This method can be called if SCIP is in one of the following stages:
    564 * - \ref SCIP_STAGE_PRESOLVING
    565 * - \ref SCIP_STAGE_SOLVING
    566 *
    567 * @note SCIP stage does not get changed
    568 */
    570 SCIP* scip, /**< SCIP data structure */
    571 SCIP_VAR* var /**< binary variable whose changed bound should be added to conflict queue */
    572 )
    573{
    574 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConflictBinvar", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    575
    576 assert(var->scip == scip);
    577 assert(SCIPvarIsBinary(var));
    578
    579 if( SCIPvarGetLbLocal(var) > 0.5 )
    580 {
    581 SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_LOWER, NULL) );
    582 }
    583 else if( SCIPvarGetUbLocal(var) < 0.5 )
    584 {
    585 SCIP_CALL( SCIPconflictAddBound(scip->conflict, scip->mem->probmem, scip->set, scip->stat, var, SCIP_BOUNDTYPE_UPPER, NULL) );
    586 }
    587
    588 return SCIP_OKAY;
    589}
    590
    591/** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
    592 * even stronger bound
    593 *
    594 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    595 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    596 *
    597 * @pre This method can be called if SCIP is in one of the following stages:
    598 * - \ref SCIP_STAGE_PRESOLVING
    599 * - \ref SCIP_STAGE_SOLVING
    600 *
    601 * @note SCIP stage does not get changed
    602 */
    604 SCIP* scip, /**< SCIP data structure */
    605 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    606 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    607 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    608 * conflicting bound was valid, NULL for current local bound */
    609 SCIP_Bool* used /**< pointer to store if the variable is already used */
    610 )
    611{
    613
    614 assert( var->scip == scip );
    615
    616 return SCIPconflictIsVarUsed(scip->conflict, var, scip->set, boundtype, bdchgidx, used);
    617}
    618
    619/** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
    620 * bound
    621 *
    622 * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
    623 * bound
    624 *
    625 * @pre This method can be called if SCIP is in one of the following stages:
    626 * - \ref SCIP_STAGE_PRESOLVING
    627 * - \ref SCIP_STAGE_SOLVING
    628 *
    629 * @note SCIP stage does not get changed
    630 */
    632 SCIP* scip, /**< SCIP data structure */
    633 SCIP_VAR* var /**< problem variable */
    634 )
    635{
    637
    638 assert( var->scip == scip );
    639
    640 return SCIPconflictGetVarLb(scip->conflict, var);
    641}
    642
    643/** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
    644 * upper bound
    645 *
    646 * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
    647 * upper bound
    648 *
    649 * @pre This method can be called if SCIP is in one of the following stages:
    650 * - \ref SCIP_STAGE_PRESOLVING
    651 * - \ref SCIP_STAGE_SOLVING
    652 *
    653 * @note SCIP stage does not get changed
    654 */
    656 SCIP* scip, /**< SCIP data structure */
    657 SCIP_VAR* var /**< problem variable */
    658 )
    659{
    661
    662 assert( var->scip == scip );
    663
    664 return SCIPconflictGetVarUb(scip->conflict, var);
    665}
    666
    667/** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
    668 * SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
    669 * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
    670 * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
    671 * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
    672 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
    673 * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
    674 * instead of SCIPanalyzeConflict() to make sure, that the correct valid depth is used
    675 *
    676 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    677 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    678 *
    679 * @pre This method can be called if SCIP is in one of the following stages:
    680 * - \ref SCIP_STAGE_PRESOLVING
    681 * - \ref SCIP_STAGE_SOLVING
    682 *
    683 * @note SCIP stage does not get changed
    684 */
    686 SCIP* scip, /**< SCIP data structure */
    687 int validdepth, /**< minimal depth level at which the initial conflict set is valid */
    688 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
    689 )
    690{
    692
    693 SCIP_Bool successres = FALSE;
    694 SCIP_Bool successprop = FALSE;
    695
    696 /* call resolution conflict analysis */
    697 SCIP_CALL( SCIPconflictAnalyzeResolution(scip->conflict, scip->mem->probmem, scip->set, scip->stat, scip->transprob,
    698 scip->origprob, scip->tree, scip->reopt, scip->lp, scip->branchcand, scip->eventqueue, scip->eventfilter,
    699 scip->cliquetable, NULL, validdepth, &successres) );
    700
    701 /* call graph conflict analysis */
    702 SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
    703 scip->transprob, scip->tree, validdepth, &successprop) );
    704
    705 if( success != NULL )
    706 *success = (successres || successprop);
    707
    708 return SCIP_OKAY;
    709}
    710
    711/** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
    712 * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
    713 * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
    714 * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
    715 * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
    716 * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
    717 * SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar())
    718 *
    719 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    720 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    721 *
    722 * @pre This method can be called if SCIP is in one of the following stages:
    723 * - \ref SCIP_STAGE_PRESOLVING
    724 * - \ref SCIP_STAGE_SOLVING
    725 *
    726 * @note SCIP stage does not get changed
    727 */
    729 SCIP* scip, /**< SCIP data structure */
    730 SCIP_CONS* cons, /**< constraint that detected the conflict */
    731 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
    732 )
    733{
    734 SCIP_CALL( SCIPcheckStage(scip, "SCIPanalyzeConflictCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
    735
    736 SCIP_Bool successres = FALSE;
    737 SCIP_Bool successprop = FALSE;
    738 int validdepth;
    739
    740 if( SCIPconsIsGlobal(cons) )
    741 validdepth = 0;
    742 else if( SCIPconsIsActive(cons) )
    743 validdepth = SCIPconsGetValidDepth(cons);
    744 else
    745 return SCIP_OKAY;
    746
    747 /* call resolution conflict analysis */
    748 if( scip->set->conf_usegenres )
    749 {
    750 SCIP_ROW* conflictrow = NULL;
    751
    752 SCIP_CALL( SCIPconsCreateRow(scip, cons, &conflictrow) );
    753 SCIP_CALL( SCIPconflictAnalyzeResolution(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
    754 scip->transprob, scip->origprob, scip->tree, scip->reopt, scip->lp, scip->branchcand, scip->eventqueue,
    755 scip->eventfilter, scip->cliquetable, conflictrow, validdepth, &successres) );
    756 }
    757
    758 /* call graph conflict analysis */
    759 SCIP_CALL( SCIPconflictAnalyze(scip->conflict, scip->mem->probmem, scip->set, scip->stat,
    760 scip->transprob, scip->tree, validdepth, &successprop) );
    761
    762 if( success != NULL )
    763 *success = (successres || successprop);
    764
    765 return SCIP_OKAY;
    766}
    internal methods for conflict analysis
    SCIP_Bool SCIPconflictApplicable(SCIP_SET *set)
    SCIP_Real SCIPconflictGetVarUb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
    SCIP_Real SCIPconflictGetVarLb(SCIP_CONFLICT *conflict, SCIP_VAR *var)
    SCIP_RETCODE SCIPconflictAnalyze(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_TREE *tree, int validdepth, SCIP_Bool *success)
    SCIP_RETCODE SCIPconflictAnalyzeResolution(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_ROW *initialconflictrow, int validdepth, SCIP_Bool *success)
    SCIP_RETCODE SCIPconflicthdlrCreate(SCIP_CONFLICTHDLR **conflicthdlr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTCOPY((*conflictcopy)), SCIP_DECL_CONFLICTFREE((*conflictfree)), SCIP_DECL_CONFLICTINIT((*conflictinit)), SCIP_DECL_CONFLICTEXIT((*conflictexit)), SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)), SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)), SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
    void SCIPconflicthdlrSetInit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
    void SCIPconflicthdlrSetPriority(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_SET *set, int priority)
    SCIP_RETCODE SCIPconflictAddBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
    SCIP_RETCODE SCIPconflictAddRelaxedBound(SCIP_CONFLICT *conflict, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
    void SCIPconflicthdlrSetFree(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
    void SCIPconflicthdlrSetExitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
    void SCIPconflicthdlrSetExit(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
    void SCIPconflicthdlrSetCopy(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
    SCIP_RETCODE SCIPconflictIsVarUsed(SCIP_CONFLICT *conflict, SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
    SCIP_RETCODE SCIPconflictInit(SCIP_CONFLICT *conflict, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_CONFTYPE conftype, SCIP_Bool usescutoffbound)
    void SCIPconflicthdlrSetInitsol(SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
    methods for debugging
    #define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
    Definition: debug.h:364
    #define NULL
    Definition: def.h:248
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    #define TRUE
    Definition: def.h:93
    #define FALSE
    Definition: def.h:94
    #define SCIP_CALL_ABORT(x)
    Definition: def.h:334
    #define SCIP_CALL(x)
    Definition: def.h:355
    SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
    SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
    SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
    SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
    SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
    SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
    SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
    SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
    SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
    SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
    SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
    SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
    SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
    SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
    SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
    SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
    SCIP_RETCODE SCIPsetConflicthdlrExit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
    SCIP_RETCODE SCIPsetConflicthdlrInitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
    SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
    int SCIPgetNConflicthdlrs(SCIP *scip)
    SCIP_RETCODE SCIPincludeConflicthdlr(SCIP *scip, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTCOPY((*conflictcopy)), SCIP_DECL_CONFLICTFREE((*conflictfree)), SCIP_DECL_CONFLICTINIT((*conflictinit)), SCIP_DECL_CONFLICTEXIT((*conflictexit)), SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)), SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)), SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
    Definition: scip_conflict.c:74
    SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
    SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
    SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
    SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
    SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
    int SCIPconsGetValidDepth(SCIP_CONS *cons)
    Definition: cons.c:8472
    SCIP_Bool SCIPconsIsGlobal(SCIP_CONS *cons)
    Definition: cons.c:8618
    SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
    Definition: cons.c:8450
    int SCIPgetDepth(SCIP *scip)
    Definition: scip_tree.c:672
    SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
    Definition: var.c:23478
    SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
    Definition: var.c:24268
    SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
    Definition: var.c:24234
    internal methods for LP management
    internal miscellaneous methods
    SCIP_RETCODE SCIPconsCreateRow(SCIP *scip, SCIP_CONS *cons, SCIP_ROW **row)
    Definition: misc_linear.c:599
    public methods for managing constraints
    public methods for message output
    #define SCIPerrorMessage
    Definition: pub_message.h:64
    internal miscellaneous methods for linear constraints
    public methods for problem variables
    public methods for conflict handler plugins and conflict analysis
    public methods for the branch-and-bound tree
    SCIP_RETCODE SCIPsetIncludeConflicthdlr(SCIP_SET *set, SCIP_CONFLICTHDLR *conflicthdlr)
    Definition: set.c:4264
    SCIP_CONFLICTHDLR * SCIPsetFindConflicthdlr(SCIP_SET *set, const char *name)
    Definition: set.c:4288
    void SCIPsetSortConflicthdlrs(SCIP_SET *set)
    Definition: set.c:4308
    internal methods for global SCIP settings
    SCIP * scip
    Definition: struct_var.h:345
    datastructures for conflict analysis
    datastructures for block memory pools and memory buffers
    SCIP main data structure.
    datastructures for global SCIP settings
    datastructures for problem variables
    #define SCIP_DECL_CONFLICTEXIT(x)
    #define SCIP_DECL_CONFLICTCOPY(x)
    Definition: type_conflict.h:89
    #define SCIP_DECL_CONFLICTEXEC(x)
    #define SCIP_DECL_CONFLICTINITSOL(x)
    #define SCIP_DECL_CONFLICTFREE(x)
    Definition: type_conflict.h:97
    #define SCIP_DECL_CONFLICTINIT(x)
    enum SCIP_ConflictType SCIP_CONFTYPE
    Definition: type_conflict.h:68
    struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
    Definition: type_conflict.h:50
    #define SCIP_DECL_CONFLICTEXITSOL(x)
    @ SCIP_BOUNDTYPE_UPPER
    Definition: type_lp.h:58
    @ SCIP_BOUNDTYPE_LOWER
    Definition: type_lp.h:57
    enum SCIP_BoundType SCIP_BOUNDTYPE
    Definition: type_lp.h:60
    @ SCIP_INVALIDDATA
    Definition: type_retcode.h:52
    @ SCIP_OKAY
    Definition: type_retcode.h:42
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    internal methods for problem variables