scip_conflict.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
56 * @note method has all conflict handler callbacks as arguments and is thus changed every time a new
67 SCIP_DECL_CONFLICTCOPY((*conflictcopy)), /**< copy method of conflict handler or NULL if you don't want to copy your plugin into sub-SCIPs */
71 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)),/**< solving process initialization method of conflict handler */
72 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)),/**< solving process deinitialization method of conflict handler */
77 /** creates a conflict handler and includes it in SCIP with its most fundamental callbacks. All non-fundamental
79 * Optional callbacks can be set via specific setter functions SCIPsetConflicthdlrCopy(), SCIPsetConflicthdlrFree(),
83 * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConflicthdlr() instead
133 SCIP_DECL_CONFLICTINITSOL((*conflictinitsol))/**< solving process initialization method of conflict handler */
141 SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol))/**< solving process deinitialization method of conflict handler */
178 /** return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
181 * @return return TRUE if conflict analysis is applicable; In case the function return FALSE there is no need to initialize the
197 /** initializes the conflict analysis by clearing the conflict candidate queue; this method must be called before you
198 * enter the conflict variables by calling SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
199 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
201 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
217 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
219 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictLb() should be called for each lower bound
221 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictLb() should be called
222 * for each lower bound, whose current assignment led to the deduction of the given conflict bound.
224 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
237 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
241 /** adds lower bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
242 * with the additional information of a relaxed lower bound; this relaxed lower bound is the one which would be enough
245 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedLb() should be called for each (relaxed) lower bound
247 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelexedLb() should be called
248 * for each (relaxed) lower bound, whose current assignment led to the deduction of the given conflict bound.
250 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
263 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
268 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage;
270 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictUb() should be called for each upper bound that
272 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictUb() should be called for
275 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
288 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
292 /** adds upper bound of variable at the time of the given bound change index to the conflict analysis' candidate storage
293 * with the additional information of a relaxed upper bound; this relaxed upper bound is the one which would be enough
296 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedUb() should be called for each (relaxed) upper
297 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
298 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedUb() should be
299 * called for each (relaxed) upper bound, whose current assignment led to the deduction of the given conflict
302 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
315 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
320 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis' candidate
322 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBd() should be called for each bound
324 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBd() should be called
327 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
341 SCIP_BDCHGIDX* bdchgidx /**< bound change index representing time on path to current node, when the
345 /** adds lower or upper bound of variable at the time of the given bound change index to the conflict analysis'
346 * candidate storage; with the additional information of a relaxed upper bound; this relaxed upper bound is the one
349 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictRelaxedBd() should be called for each (relaxed)
350 * bound that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
351 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictRelaxedBd() should be
352 * called for each (relaxed) bound, whose current assignment led to the deduction of the given conflict bound.
354 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
368 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
375 * 1. Before calling the SCIPanalyzeConflict() method, SCIPaddConflictBinvar() should be called for each fixed binary
376 * variable that led to the conflict (e.g. the infeasibility of globally or locally valid constraint).
377 * 2. In the propagation conflict resolving method of a constraint handler, SCIPaddConflictBinvar() should be called
378 * for each binary variable, whose current fixing led to the deduction of the given conflict bound.
380 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
395 /** checks if the given variable is already part of the current conflict set or queued for resolving with the same or
398 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
412 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node, when the
417 /** returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
420 * @return returns the conflict lower bound if the variable is present in the current conflict set; otherwise the global lower
435 /** returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
438 * @return returns the conflict upper bound if the variable is present in the current conflict set; otherwise minus global
453 /** analyzes conflict bounds that were added after a call to SCIPinitConflictAnalysis() with calls to
455 * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar(); on success, calls the conflict
456 * handlers to create a conflict constraint out of the resulting conflict set; the given valid depth must be a depth
457 * level, at which the conflict set defined by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
458 * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and SCIPaddConflictBinvar() is
459 * valid for the whole subtree; if the conflict was found by a violated constraint, use SCIPanalyzeConflictCons()
462 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
478 /** analyzes conflict bounds that were added with calls to SCIPaddConflictLb(), SCIPaddConflictUb(),
479 * SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or
480 * SCIPaddConflictBinvar(); on success, calls the conflict handlers to create a conflict constraint out of the
481 * resulting conflict set; the given constraint must be the constraint that detected the conflict, i.e. the constraint
482 * that is infeasible in the local bounds of the initial conflict set (defined by calls to SCIPaddConflictLb(),
483 * SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(),
486 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrCopy(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTCOPY((*conflictcopy)))
Definition: scip_conflict.c:130
SCIP_EXPORT SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
Definition: scip_conflict.c:291
Definition: struct_var.h:99
Definition: struct_scip.h:58
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrInit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINIT((*conflictinit)))
Definition: scip_conflict.c:162
Definition: struct_var.h:198
SCIP_EXPORT SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
Definition: scip_conflict.c:313
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrInitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTINITSOL((*conflictinitsol)))
Definition: scip_conflict.c:194
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:342
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
Definition: scip_conflict.c:662
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictRelaxedLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedlb)
Definition: scip_conflict.c:376
SCIP_EXPORT SCIP_Real SCIPgetConflictVarUb(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:632
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictRelaxedBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
Definition: scip_conflict.c:512
Definition: struct_conflict.h:40
SCIP_EXPORT 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:55
type definitions for LP management
SCIP_EXPORT SCIP_Real SCIPgetConflictVarLb(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:608
SCIP_EXPORT SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
Definition: scip_conflict.c:239
Definition: struct_cons.h:37
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictBd(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:477
type definitions for SCIP's main datastructure
SCIP_EXPORT int SCIPgetNConflicthdlrs(SCIP *scip)
Definition: scip_conflict.c:252
struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
Definition: type_conflict.h:40
type definitions for problem variables
type definitions for conflict analysis
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
Definition: scip_conflict.c:409
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictRelaxedUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedub)
Definition: scip_conflict.c:444
type definitions for branch and bound tree
SCIP_EXPORT SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
Definition: scip_conflict.c:546
SCIP_EXPORT SCIP_RETCODE SCIPisConflictVarUsed(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool *used)
Definition: scip_conflict.c:580
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrFree(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTFREE((*conflictfree)))
Definition: scip_conflict.c:146
SCIP_EXPORT SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
Definition: scip_conflict.c:693
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrPriority(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, int priority)
Definition: scip_conflict.c:263
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrExit(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXIT((*conflictexit)))
Definition: scip_conflict.c:178
SCIP_EXPORT SCIP_CONFLICTHDLR * SCIPfindConflicthdlr(SCIP *scip, const char *name)
Definition: scip_conflict.c:226
result codes for SCIP callback methods
SCIP_EXPORT SCIP_RETCODE SCIPincludeConflicthdlrBasic(SCIP *scip, SCIP_CONFLICTHDLR **conflicthdlrptr, const char *name, const char *desc, int priority, SCIP_DECL_CONFLICTEXEC((*conflictexec)), SCIP_CONFLICTHDLRDATA *conflicthdlrdata)
Definition: scip_conflict.c:98
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
type definitions for constraints and constraint handlers
SCIP_EXPORT SCIP_RETCODE SCIPsetConflicthdlrExitsol(SCIP *scip, SCIP_CONFLICTHDLR *conflicthdlr, SCIP_DECL_CONFLICTEXITSOL((*conflictexitsol)))
Definition: scip_conflict.c:210