Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_conflict.h
    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.h
    26 * @ingroup PUBLICCOREAPI
    27 * @brief public methods for conflict handler plugins and conflict analysis
    28 * @author Tobias Achterberg
    29 * @author Timo Berthold
    30 * @author Thorsten Koch
    31 * @author Alexander Martin
    32 * @author Marc Pfetsch
    33 * @author Kati Wolter
    34 * @author Gregor Hendel
    35 * @author Leona Gottwald
    36 */
    37
    38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    39
    40#ifndef __SCIP_SCIP_CONFLICT_H__
    41#define __SCIP_SCIP_CONFLICT_H__
    42
    43
    44#include "scip/def.h"
    45#include "scip/type_conflict.h"
    46#include "scip/type_cons.h"
    47#include "scip/type_lp.h"
    48
    49#ifdef __cplusplus
    50extern "C" {
    51#endif
    52
    53/**@addtogroup PublicConflicthdlrMethods
    54 *
    55 * @{
    56 */
    57
    58/** creates a conflict handler and includes it in SCIP
    59 *
    60 * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
    61 * callback is added
    62 * in future releases; consider using SCIPincludeConflicthdlrBasic() and setter functions
    63 * if you seek for a method which is less likely to change in future releases
    64 */
    65SCIP_EXPORT
    67 SCIP* scip, /**< SCIP data structure */
    68 const char* name, /**< name of conflict handler */
    69 const char* desc, /**< description of conflict handler */
    70 int priority, /**< priority of the conflict handler */
    71 SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
    72 SCIP_DECL_CONFLICTFREE((*conflictfree)), /**< destructor of conflict handler */
    73 SCIP_DECL_CONFLICTINIT((*conflictinit)), /**< initialize conflict handler */
    74 SCIP_DECL_CONFLICTEXIT((*conflictexit)), /**< deinitialize conflict handler */
    75 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
    76 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
    77 SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
    78 SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
    79 );
    80
    81/** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
    82 * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
    83 * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
    84 * SCIPsetConflicthdlrInit(), SCIPsetConflicthdlrExit(), SCIPsetConflicthdlrInitsol(),
    85 * and SCIPsetConflicthdlrExitsol()
    86 *
    87 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
    88 */
    89SCIP_EXPORT
    91 SCIP* scip, /**< SCIP data structure */
    92 SCIP_CONFLICTHDLR** conflicthdlrptr, /**< reference to a conflict handler pointer, or NULL */
    93 const char* name, /**< name of conflict handler */
    94 const char* desc, /**< description of conflict handler */
    95 int priority, /**< priority of the conflict handler */
    96 SCIP_DECL_CONFLICTEXEC((*conflictexec)), /**< conflict processing method of conflict handler */
    97 SCIP_CONFLICTHDLRDATA* conflicthdlrdata /**< conflict handler data */
    98 );
    99
    100/** set copy method of conflict handler */
    101SCIP_EXPORT
    103 SCIP* scip, /**< SCIP data structure */
    104 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    105 SCIP_DECL_CONFLICTCOPY((*conflictcopy)) /**< copy method of conflict handler */
    106 );
    107
    108/** set destructor of conflict handler */
    109SCIP_EXPORT
    111 SCIP* scip, /**< SCIP data structure */
    112 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    113 SCIP_DECL_CONFLICTFREE((*conflictfree)) /**< destructor of conflict handler */
    114 );
    115
    116/** set initialization method of conflict handler */
    117SCIP_EXPORT
    119 SCIP* scip, /**< SCIP data structure */
    120 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    121 SCIP_DECL_CONFLICTINIT((*conflictinit)) /**< initialize conflict handler */
    122 );
    123
    124/** set deinitialization method of conflict handler */
    125SCIP_EXPORT
    127 SCIP* scip, /**< SCIP data structure */
    128 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    129 SCIP_DECL_CONFLICTEXIT((*conflictexit)) /**< deinitialize conflict handler */
    130 );
    131
    132/** set solving process initialization method of conflict handler */
    133SCIP_EXPORT
    135 SCIP* scip, /**< SCIP data structure */
    136 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    137 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
    138 );
    139
    140/** set solving process deinitialization method of conflict handler */
    141SCIP_EXPORT
    143 SCIP* scip, /**< SCIP data structure */
    144 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    145 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
    146 );
    147
    148/** returns the conflict handler of the given name, or NULL if not existing */
    149SCIP_EXPORT
    151 SCIP* scip, /**< SCIP data structure */
    152 const char* name /**< name of conflict handler */
    153 );
    154
    155/** returns the array of currently available conflict handlers */
    156SCIP_EXPORT
    158 SCIP* scip /**< SCIP data structure */
    159 );
    160
    161/** returns the number of currently available conflict handlers */
    162SCIP_EXPORT
    164 SCIP* scip /**< SCIP data structure */
    165 );
    166
    167/** sets the priority of a conflict handler */
    168SCIP_EXPORT
    170 SCIP* scip, /**< SCIP data structure */
    171 SCIP_CONFLICTHDLR* conflicthdlr, /**< conflict handler */
    172 int priority /**< new priority of the conflict handler */
    173 );
    174
    175/** @} */
    176
    177/**@addtogroup PublicConflictMethods
    178 *
    179 * @{
    180 */
    181
    182/** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
    183 * conflict analysis since it will not be applied
    184 *
    185 * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
    186 * conflict analysis since it will not be applied
    187 *
    188 * @pre This method can be called if SCIP is in one of the following stages:
    189 * - \ref SCIP_STAGE_INITPRESOLVE
    190 * - \ref SCIP_STAGE_PRESOLVING
    191 * - \ref SCIP_STAGE_EXITPRESOLVE
    192 * - \ref SCIP_STAGE_SOLVING
    193 *
    194 * @note SCIP stage does not get changed
    195 */
    196SCIP_EXPORT
    198 SCIP* scip /**< SCIP data structure */
    199 );
    200
    201/** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
    202 * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
    203 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
    204 *
    205 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    206 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    207 *
    208 * @pre This method can be called if SCIP is in one of the following stages:
    209 * - \ref SCIP_STAGE_PRESOLVING
    210 * - \ref SCIP_STAGE_SOLVING
    211 *
    212 * @note SCIP stage does not get changed
    213 */
    214SCIP_EXPORT
    216 SCIP* scip, /**< SCIP data structure */
    217 SCIP_CONFTYPE conftype, /**< type of conflict */
    218 SCIP_Bool iscutoffinvolved /**< is the current cutoff bound involved? */
    219 );
    220
    221/** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
    222 * this method should be called in one of the following two cases:
    223 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
    224 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    225 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
    226 * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
    227 *
    228 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    229 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    230 *
    231 * @pre This method can be called if SCIP is in one of the following stages:
    232 * - \ref SCIP_STAGE_PRESOLVING
    233 * - \ref SCIP_STAGE_SOLVING
    234 *
    235 * @note SCIP stage does not get changed
    236 */
    237SCIP_EXPORT
    239 SCIP* scip, /**< SCIP data structure */
    240 SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
    241 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    242 * conflicting bound was valid, NULL for current local bound */
    243 );
    244
    245/** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
    246 * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
    247 * to explain a certain bound change;
    248 * this method should be called in one of the following two cases:
    249 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
    250 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    251 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
    252 * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
    253 *
    254 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    255 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    256 *
    257 * @pre This method can be called if SCIP is in one of the following stages:
    258 * - \ref SCIP_STAGE_PRESOLVING
    259 * - \ref SCIP_STAGE_SOLVING
    260 *
    261 * @note SCIP stage does not get changed
    262 */
    263SCIP_EXPORT
    265 SCIP* scip, /**< SCIP data structure */
    266 SCIP_VAR* var, /**< variable whose lower bound should be added to conflict candidate queue */
    267 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    268 * conflicting bound was valid, NULL for current local bound */
    269 SCIP_Real relaxedlb /**< the relaxed lower bound */
    270 );
    271
    272/** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
    273 * this method should be called in one of the following two cases:
    274 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
    275 * led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    276 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
    277 * each upper bound, whose current assignment led to the deduction of the given conflict bound.
    278 *
    279 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    280 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    281 *
    282 * @pre This method can be called if SCIP is in one of the following stages:
    283 * - \ref SCIP_STAGE_PRESOLVING
    284 * - \ref SCIP_STAGE_SOLVING
    285 *
    286 * @note SCIP stage does not get changed
    287 */
    288SCIP_EXPORT
    290 SCIP* scip, /**< SCIP data structure */
    291 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    292 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    293 * conflicting bound was valid, NULL for current local bound */
    294 );
    295
    296/** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
    297 * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
    298 * to explain a certain bound change;
    299 * this method should be called in one of the following two cases:
    300 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
    301 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    302 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
    303 * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
    304 * bound.
    305 *
    306 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    307 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    308 *
    309 * @pre This method can be called if SCIP is in one of the following stages:
    310 * - \ref SCIP_STAGE_PRESOLVING
    311 * - \ref SCIP_STAGE_SOLVING
    312 *
    313 * @note SCIP stage does not get changed
    314 */
    315SCIP_EXPORT
    317 SCIP* scip, /**< SCIP data structure */
    318 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    319 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    320 * conflicting bound was valid, NULL for current local bound */
    321 SCIP_Real relaxedub /**< the relaxed upper bound */
    322 );
    323
    324/** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
    325 * storage; this method should be called in one of the following two cases:
    326 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
    327 * that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    328 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
    329 * for each bound, whose current assignment led to the deduction of the given conflict bound.
    330 *
    331 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    332 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    333 *
    334 * @pre This method can be called if SCIP is in one of the following stages:
    335 * - \ref SCIP_STAGE_PRESOLVING
    336 * - \ref SCIP_STAGE_SOLVING
    337 *
    338 * @note SCIP stage does not get changed
    339 */
    340SCIP_EXPORT
    342 SCIP* scip, /**< SCIP data structure */
    343 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    344 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    345 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
    346 * conflicting bound was valid, NULL for current local bound */
    347 );
    348
    349/** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
    350 * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
    351 * which would be enough to explain a certain bound change;
    352 * this method should be called in one of the following two cases:
    353 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
    354 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    355 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
    356 * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
    357 *
    358 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    359 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    360 *
    361 * @pre This method can be called if SCIP is in one of the following stages:
    362 * - \ref SCIP_STAGE_PRESOLVING
    363 * - \ref SCIP_STAGE_SOLVING
    364 *
    365 * @note SCIP stage does not get changed
    366 */
    367SCIP_EXPORT
    369 SCIP* scip, /**< SCIP data structure */
    370 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    371 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    372 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    373 * conflicting bound was valid, NULL for current local bound */
    374 SCIP_Real relaxedbd /**< the relaxed bound */
    375 );
    376
    377/** adds changed bound of fixed binary variable to the conflict analysis' candidate storage;
    378 * this method should be called in one of the following two cases:
    379 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
    380 * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
    381 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
    382 * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
    383 *
    384 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    385 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    386 *
    387 * @pre This method can be called if SCIP is in one of the following stages:
    388 * - \ref SCIP_STAGE_PRESOLVING
    389 * - \ref SCIP_STAGE_SOLVING
    390 *
    391 * @note SCIP stage does not get changed
    392 */
    393SCIP_EXPORT
    395 SCIP* scip, /**< SCIP data structure */
    396 SCIP_VAR* var /**< binary variable whose changed bound should be added to conflict queue */
    397 );
    398
    399/** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
    400 * even stronger bound
    401 *
    402 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    403 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    404 *
    405 * @pre This method can be called if SCIP is in one of the following stages:
    406 * - \ref SCIP_STAGE_PRESOLVING
    407 * - \ref SCIP_STAGE_SOLVING
    408 *
    409 * @note SCIP stage does not get changed
    410 */
    411SCIP_EXPORT
    413 SCIP* scip, /**< SCIP data structure */
    414 SCIP_VAR* var, /**< variable whose upper bound should be added to conflict candidate queue */
    415 SCIP_BOUNDTYPE boundtype, /**< the type of the conflicting bound (lower or upper bound) */
    416 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
    417 * conflicting bound was valid, NULL for current local bound */
    418 SCIP_Bool* used /**< pointer to store if the variable is already used */
    419 );
    420
    421/** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
    422 * bound
    423 *
    424 * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
    425 * bound
    426 *
    427 * @pre This method can be called if SCIP is in one of the following stages:
    428 * - \ref SCIP_STAGE_PRESOLVING
    429 * - \ref SCIP_STAGE_SOLVING
    430 *
    431 * @note SCIP stage does not get changed
    432 */
    433SCIP_EXPORT
    435 SCIP* scip, /**< SCIP data structure */
    436 SCIP_VAR* var /**< problem variable */
    437 );
    438
    439/** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
    440 * upper bound
    441 *
    442 * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
    443 * upper bound
    444 *
    445 * @pre This method can be called if SCIP is in one of the following stages:
    446 * - \ref SCIP_STAGE_PRESOLVING
    447 * - \ref SCIP_STAGE_SOLVING
    448 *
    449 * @note SCIP stage does not get changed
    450 */
    451SCIP_EXPORT
    453 SCIP* scip, /**< SCIP data structure */
    454 SCIP_VAR* var /**< problem variable */
    455 );
    456
    457/** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
    458 * SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
    459 * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
    460 * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
    461 * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
    462 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
    463 * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
    464 * instead of SCIPanalyzeConflict() to make sure, that the correct valid depth is used
    465 *
    466 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    467 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    468 *
    469 * @pre This method can be called if SCIP is in one of the following stages:
    470 * - \ref SCIP_STAGE_PRESOLVING
    471 * - \ref SCIP_STAGE_SOLVING
    472 *
    473 * @note SCIP stage does not get changed
    474 */
    475SCIP_EXPORT
    477 SCIP* scip, /**< SCIP data structure */
    478 int validdepth, /**< minimal depth level at which the initial conflict set is valid */
    479 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
    480 );
    481
    482/** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
    483 * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
    484 * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
    485 * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
    486 * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
    487 * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
    488 * SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar())
    489 *
    490 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
    491 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
    492 *
    493 * @pre This method can be called if SCIP is in one of the following stages:
    494 * - \ref SCIP_STAGE_PRESOLVING
    495 * - \ref SCIP_STAGE_SOLVING
    496 *
    497 * @note SCIP stage does not get changed
    498 */
    499SCIP_EXPORT
    501 SCIP* scip, /**< SCIP data structure */
    502 SCIP_CONS* cons, /**< constraint that detected the conflict */
    503 SCIP_Bool* success /**< pointer to store whether a conflict constraint was created, or NULL */
    504 );
    505
    506/**@} */
    507
    508#ifdef __cplusplus
    509}
    510#endif
    511
    512#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    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)))
    type definitions for conflict analysis
    #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)
    type definitions for constraints and constraint handlers
    type definitions for LP management
    enum SCIP_BoundType SCIP_BOUNDTYPE
    Definition: type_lp.h:60
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63