SCIP Doxygen Documentation
Loading...
Searching...
No Matches
conflictstore.h File Reference

Detailed Description

internal methods for storing conflicts

Author
Jakob Witzig

Definition in file conflictstore.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_conflictstore.h"
#include "scip/type_retcode.h"
#include "scip/type_cons.h"
#include "scip/type_event.h"
#include "scip/type_conflict.h"
#include "scip/type_prob.h"
#include "scip/type_reopt.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_tree.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPconflictstoreCreate (SCIP_CONFLICTSTORE **conflictstore, SCIP_SET *set)
SCIP_RETCODE SCIPconflictstoreFree (SCIP_CONFLICTSTORE **conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreClear (SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreClean (SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreAddDualraycons (SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Bool hasrelaxvar)
SCIP_RETCODE SCIPconflictstoreAddDualsolcons (SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real scale, SCIP_Bool updateside, SCIP_Bool hasrelaxvar)
SCIP_RETCODE SCIPconflictstoreAddConflict (SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_CONS *cons, SCIP_CONFTYPE conftype, SCIP_Bool cutoffinvolved, SCIP_Real primalbound)
SCIP_RETCODE SCIPconflictstoreUpgradeConflict (SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONS *oldcons, SCIP_CONS *newcons)
SCIP_RETCODE SCIPconflictstoreCleanNewIncumbent (SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real cutoffbound)
int SCIPconflictstoreGetMaxPoolSize (SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetInitPoolSize (SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetNConflictsInStore (SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreGetConflicts (SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS **conflicts, int conflictsize, int *nconflicts)
SCIP_RETCODE SCIPconflictstoreTransform (SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt)
SCIP_Real SCIPconflictstoreGetAvgNnzDualInfProofs (SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetNDualInfProofs (SCIP_CONFLICTSTORE *conflictstore)
SCIP_Real SCIPconflictstoreGetAvgNnzDualBndProofs (SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetNDualBndProofs (SCIP_CONFLICTSTORE *conflictstore)

Function Documentation

◆ SCIPconflictstoreCreate()

SCIP_RETCODE SCIPconflictstoreCreate ( SCIP_CONFLICTSTORE ** conflictstore,
SCIP_SET * set )

creates separation storage

creates conflict store

Parameters
conflictstorepointer to store conflict store
setglobal SCIP settings

Definition at line 770 of file conflictstore.c.

References assert(), BMSallocMemory, EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPeventhdlrCreate(), SCIPsetFindEventhdlr(), and SCIPsetIncludeEventhdlr().

Referenced by copyProb(), and SCIPcreateProb().

◆ SCIPconflictstoreFree()

SCIP_RETCODE SCIPconflictstoreFree ( SCIP_CONFLICTSTORE ** conflictstore,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_REOPT * reopt )

frees separation storage

frees conflict store

Parameters
conflictstorepointer to store conflict store
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
reoptreoptimization data

Definition at line 820 of file conflictstore.c.

References assert(), BMSfreeBlockMemoryArrayNull, BMSfreeMemoryNull, CONFLICTSTORE_DUALRAYSIZE, CONFLICTSTORE_DUALSOLSIZE, NULL, SCIP_CALL, SCIP_OKAY, and SCIPconflictstoreClear().

Referenced by SCIPfreeProb().

◆ SCIPconflictstoreClear()

◆ SCIPconflictstoreClean()

SCIP_RETCODE SCIPconflictstoreClean ( SCIP_CONFLICTSTORE * conflictstore,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_PROB * transprob,
SCIP_REOPT * reopt )

◆ SCIPconflictstoreAddDualraycons()

SCIP_RETCODE SCIPconflictstoreAddDualraycons ( SCIP_CONFLICTSTORE * conflictstore,
SCIP_CONS * dualproof,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_PROB * transprob,
SCIP_REOPT * reopt,
SCIP_Bool hasrelaxvar )

adds a constraint to the pool of proof constraints based on dual rays

Note
this methods captures the constraint
Parameters
conflictstoreconflict store
dualproofconstraint based on a dual ray
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
transprobtransformed problem
reoptreoptimization data
hasrelaxvardoes the dual proof contain at least one variable that exists in the current relaxation only?

Definition at line 986 of file conflictstore.c.

References assert(), BMSallocBlockMemoryArray, cleanDeletedAndCheckedDualrayCons(), CONFLICTSTORE_DUALRAYSIZE, delPosDualray(), SCIP_ConflictStore::drayrelaxonly, SCIP_ConflictStore::dualrayconfs, SCIP_ConflictStore::ndualrayconfs, SCIP_ConflictStore::nnzdualrays, NULL, nvars, removeExactConflictFromCertificateHashmap(), SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_CONFLICT, SCIP_OKAY, SCIPconsAddLocks(), SCIPconsAddUpgradeLocks(), SCIPconsCapture(), SCIPconsDelete(), SCIPconsGetAge(), SCIPconsGetNVars(), SCIPconsIsLocal(), SCIPconsMarkConflict(), SCIPsetIsGE(), SCIPsortPtrBool(), and TRUE.

Referenced by createAndAddProofcons().

◆ SCIPconflictstoreAddDualsolcons()

SCIP_RETCODE SCIPconflictstoreAddDualsolcons ( SCIP_CONFLICTSTORE * conflictstore,
SCIP_CONS * dualproof,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_PROB * transprob,
SCIP_REOPT * reopt,
SCIP_Real scale,
SCIP_Bool updateside,
SCIP_Bool hasrelaxvar )

adds a constraint to the pool of proof constraints based on dual solutions

Note
this methods captures the constraint
Parameters
conflictstoreconflict store
dualproofconstraint based on a dual solution
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
transprobtransformed problem
reoptreoptimization data
scalescaling factor that needs to be considered when updating the side
updatesideshould the side be updated if a new incumbent is found
hasrelaxvardoes the dual proof contain at least one variable that exists in the current relaxation only?

Definition at line 1077 of file conflictstore.c.

References assert(), BMSallocBlockMemoryArray, cleanDeletedAndCheckedDualsolCons(), CONFLICTSTORE_DUALSOLSIZE, delPosDualsol(), SCIP_ConflictStore::dsolrelaxonly, SCIP_ConflictStore::dualprimalbnds, SCIP_ConflictStore::dualsolconfs, SCIP_ConflictStore::ndualsolconfs, SCIP_ConflictStore::nnzdualsols, NULL, nvars, removeExactConflictFromCertificateHashmap(), SCIP_ConflictStore::scalefactors, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_CONFLICT, SCIP_OKAY, SCIP_Real, SCIPconsAddLocks(), SCIPconsAddUpgradeLocks(), SCIPconsCapture(), SCIPconsDelete(), SCIPconsGetAge(), SCIPconsGetNVars(), SCIPconsIsLocal(), SCIPconsMarkConflict(), SCIPgetCutoffbound(), SCIPprobIsObjIntegral(), SCIPsetCutoffbounddelta(), SCIPsetIsGE(), SCIPsortPtrRealRealBoolBool(), TRUE, and SCIP_ConflictStore::updateside.

Referenced by createAndAddProofcons().

◆ SCIPconflictstoreAddConflict()

SCIP_RETCODE SCIPconflictstoreAddConflict ( SCIP_CONFLICTSTORE * conflictstore,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_TREE * tree,
SCIP_PROB * transprob,
SCIP_REOPT * reopt,
SCIP_CONS * cons,
SCIP_CONFTYPE conftype,
SCIP_Bool cutoffinvolved,
SCIP_Real primalbound )

adds a conflict to the conflict store

Note
this method captures the constraint
Parameters
conflictstoreconflict store
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
treebranch and bound tree (or NULL for an original constraint)
transprobtransformed problem (or NULL for an original constraint)
reoptreoptimization data
consconstraint representing the conflict
conftypetype of the conflict
cutoffinvolvedis a cutoff bound involved in this conflict
primalboundprimal bound the conflict depend on (or -SCIPinfinity)

Definition at line 1177 of file conflictstore.c.

References assert(), SCIP_Cons::confconsspos, SCIP_ConflictStore::conflicts, SCIP_ConflictStore::conflictsize, conflictstoreAddOrigConflict(), conflictstoreCleanUpStorage(), conflictstoreEnsureMem(), SCIP_ConflictStore::confprimalbnds, initConflictstore(), SCIP_ConflictStore::initstoresize, SCIP_ConflictStore::lastnodenum, SCIP_ConflictStore::maxstoresize, SCIP_ConflictStore::ncbconflicts, SCIP_ConflictStore::nconflicts, SCIP_ConflictStore::nconflictsfound, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_BNDEXCEEDING, SCIP_LOCKTYPE_CONFLICT, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIPconsAddLocks(), SCIPconsCapture(), SCIPconsGetName(), SCIPconsIsOriginal(), SCIPconsMarkConflict(), SCIPnodeGetNumber(), SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsInfinity(), and SCIPtreeGetFocusNode().

Referenced by SCIPaddConflict(), SCIPconflictstoreTransform(), and SCIPcopyConss().

◆ SCIPconflictstoreUpgradeConflict()

SCIP_RETCODE SCIPconflictstoreUpgradeConflict ( SCIP_CONFLICTSTORE * conflictstore,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_CONS * oldcons,
SCIP_CONS * newcons )

upgrades an unchecked conflict in the conflict store

Note
this method releases oldcons and captures newcons
Parameters
conflictstoreconflict store
blkmemblock memory
setglobal SCIP settings
oldconsunderlying constraint to upgrade
newconsupgraded constraint to add

Definition at line 1279 of file conflictstore.c.

References assert(), SCIP_Cons::confconsspos, SCIP_ConflictStore::conflicts, SCIP_ConflictStore::nconflicts, NULL, SCIP_CALL, SCIP_LOCKTYPE_CONFLICT, SCIP_OKAY, SCIPconsAddLocks(), SCIPconsCapture(), SCIPconsIsChecked(), SCIPconsIsConflict(), SCIPconsIsDeleted(), SCIPconsMarkConflict(), and SCIPconsRelease().

Referenced by SCIPaddConsUpgrade().

◆ SCIPconflictstoreCleanNewIncumbent()

◆ SCIPconflictstoreGetMaxPoolSize()

int SCIPconflictstoreGetMaxPoolSize ( SCIP_CONFLICTSTORE * conflictstore)

returns the maximal size of the conflict pool

Parameters
conflictstoreconflict store

Definition at line 1500 of file conflictstore.c.

References assert(), SCIP_ConflictStore::maxstoresize, MIN, NULL, and SCIP_ConflictStore::storesize.

Referenced by SCIPcollectConflictStatistics(), and SCIPprintConflictStatistics().

◆ SCIPconflictstoreGetInitPoolSize()

int SCIPconflictstoreGetInitPoolSize ( SCIP_CONFLICTSTORE * conflictstore)

returns the initial size of the conflict pool

Parameters
conflictstoreconflict store

Definition at line 1510 of file conflictstore.c.

References assert(), SCIP_ConflictStore::initstoresize, and NULL.

Referenced by SCIPcollectConflictStatistics(), and SCIPprintConflictStatistics().

◆ SCIPconflictstoreGetNConflictsInStore()

int SCIPconflictstoreGetNConflictsInStore ( SCIP_CONFLICTSTORE * conflictstore)

returns the number of stored conflicts on the conflict pool

Note
the number of active conflicts can be less
Parameters
conflictstoreconflict store

Definition at line 1523 of file conflictstore.c.

References assert(), SCIP_ConflictStore::nconflicts, and NULL.

Referenced by SCIPcopyConflicts().

◆ SCIPconflictstoreGetConflicts()

SCIP_RETCODE SCIPconflictstoreGetConflicts ( SCIP_CONFLICTSTORE * conflictstore,
SCIP_CONS ** conflicts,
int conflictsize,
int * nconflicts )

returns all active conflicts stored in the conflict store

Parameters
conflictstoreconflict store
conflictsarray to store conflicts
conflictsizesize of the conflict array
nconflictspointer to store the number of conflicts

Definition at line 1533 of file conflictstore.c.

References assert(), SCIP_ConflictStore::conflicts, i, SCIP_ConflictStore::nconflicts, NULL, SCIP_OKAY, SCIPconsIsActive(), and SCIPconsIsDeleted().

Referenced by SCIPcopyConflicts().

◆ SCIPconflictstoreTransform()

SCIP_RETCODE SCIPconflictstoreTransform ( SCIP_CONFLICTSTORE * conflictstore,
BMS_BLKMEM * blkmem,
SCIP_SET * set,
SCIP_STAT * stat,
SCIP_TREE * tree,
SCIP_PROB * transprob,
SCIP_REOPT * reopt )

transforms all original conflicts into transformed conflicts

transformes all original conflicts into transformed conflicts

Parameters
conflictstoreconflict store
blkmemblock memory
setglobal SCIP settings
statdynamic SCIP statistics
treebranch and bound tree
transprobtransformed problem
reoptreoptimization data

Definition at line 1577 of file conflictstore.c.

References assert(), FALSE, i, SCIP_ConflictStore::norigconfs, NULL, SCIP_ConflictStore::origconfs, SCIP_CALL, SCIP_CONFTYPE_UNKNOWN, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconflictstoreAddConflict(), SCIPconsGetTransformed(), SCIPconsIsOriginal(), SCIPconsRelease(), SCIPsetDebugMsg, SCIPsetGetStage(), and SCIPsetInfinity().

Referenced by SCIPprobTransform().

◆ SCIPconflictstoreGetAvgNnzDualInfProofs()

SCIP_Real SCIPconflictstoreGetAvgNnzDualInfProofs ( SCIP_CONFLICTSTORE * conflictstore)

returns the average number of non-zeros over all stored dual ray constraints

Parameters
conflictstoreconflict store

Definition at line 1628 of file conflictstore.c.

References assert(), SCIP_ConflictStore::ndualrayconfs, SCIP_ConflictStore::nnzdualrays, NULL, and SCIP_Real.

Referenced by createAndAddProofcons().

◆ SCIPconflictstoreGetNDualInfProofs()

int SCIPconflictstoreGetNDualInfProofs ( SCIP_CONFLICTSTORE * conflictstore)

return the number of stored dualray constraints

returns the number of all stored dual ray constraints

Parameters
conflictstoreconflict store

Definition at line 1641 of file conflictstore.c.

References assert(), SCIP_ConflictStore::ndualrayconfs, and NULL.

Referenced by createAndAddProofcons().

◆ SCIPconflictstoreGetAvgNnzDualBndProofs()

SCIP_Real SCIPconflictstoreGetAvgNnzDualBndProofs ( SCIP_CONFLICTSTORE * conflictstore)

returns the average number of non-zeros over all stored boundexceeding proofs

Parameters
conflictstoreconflict store

Definition at line 1651 of file conflictstore.c.

References assert(), SCIP_ConflictStore::ndualsolconfs, SCIP_ConflictStore::nnzdualsols, NULL, and SCIP_Real.

Referenced by createAndAddProofcons().

◆ SCIPconflictstoreGetNDualBndProofs()

int SCIPconflictstoreGetNDualBndProofs ( SCIP_CONFLICTSTORE * conflictstore)

returns the number of all stored boundexceeding proofs

Parameters
conflictstoreconflict store

Definition at line 1665 of file conflictstore.c.

References assert(), SCIP_ConflictStore::ndualsolconfs, and NULL.

Referenced by createAndAddProofcons().