53#define CONFLICTSTORE_DUALRAYSIZE 100
54#define CONFLICTSTORE_DUALSOLSIZE 75
55#define CONFLICTSTORE_MINSIZE 2000
56#define CONFLICTSTORE_MAXSIZE 60000
57#define CONFLICTSTORE_SIZE 10000
58#define CONFLICTSTORE_SORTFREQ 20
61#define EVENTHDLR_NAME "ConflictStore"
62#define EVENTHDLR_DESC "Solution event handler for conflict store."
94 if( !cleanboundexceeding )
114 if( !cleanboundexceeding )
138#ifdef SCIP_DISABLED_CODE
154 if( nvars1 >= nvars2 )
193 else if(
nvars/2 <= 5000 )
246 newsize =
MAX(newsize, num);
340 assert(pos >= 0 && pos < conflictstore->nconflicts);
343 conflict = conflictstore->
conflicts[pos];
349#ifdef SCIP_PRINT_DETAILS
413#ifdef SCIP_PRINT_DETAILS
464 assert(pos >= 0 && pos < conflictstore->ndualsolconfs);
475#ifdef SCIP_PRINT_DETAILS
578 SCIPsetDebugMsg(
set,
"> removed %d/%d as deleted marked dual infeasibility proofs.\n",
616 SCIPsetDebugMsg(
set,
"> removed %d/%d as deleted marked dual boundexceeding proofs.\n",
717 if(
set->conf_maxstoresize == -1 )
727 SCIPsetDebugMsg(
set,
"clean-up #%lld: removed %d/%d conflicts, %d depending on cutoff bound\n",
779 (*conflictstore)->conflicts =
NULL;
780 (*conflictstore)->confprimalbnds =
NULL;
781 (*conflictstore)->dualprimalbnds =
NULL;
782 (*conflictstore)->scalefactors =
NULL;
783 (*conflictstore)->updateside =
NULL;
784 (*conflictstore)->drayrelaxonly =
NULL;
785 (*conflictstore)->dsolrelaxonly =
NULL;
786 (*conflictstore)->dualrayconfs =
NULL;
787 (*conflictstore)->dualsolconfs =
NULL;
788 (*conflictstore)->origconfs =
NULL;
789 (*conflictstore)->nnzdualrays = 0;
790 (*conflictstore)->nnzdualsols = 0;
791 (*conflictstore)->conflictsize = 0;
792 (*conflictstore)->origconflictsize = 0;
793 (*conflictstore)->nconflicts = 0;
794 (*conflictstore)->ndualrayconfs = 0;
795 (*conflictstore)->ndualsolconfs = 0;
796 (*conflictstore)->norigconfs = 0;
797 (*conflictstore)->ncbconflicts = 0;
798 (*conflictstore)->nconflictsfound = 0;
799 (*conflictstore)->initstoresize = -1;
800 (*conflictstore)->storesize = -1;
801 (*conflictstore)->maxstoresize = -1;
802 (*conflictstore)->ncleanups = 0;
804 (*conflictstore)->lastnodenum = -1;
808 if( (*conflictstore)->eventhdlr ==
NULL )
811 NULL,
NULL, eventInitsolConflictstore, eventExitsolConflictstore,
NULL, eventExecConflictstore,
NULL) );
862 SCIPsetDebugMsg(
set,
"clearing conflict store: %d origconfs, %d conflicts, %d dual proofs\n",
1265#ifdef SCIP_PRINT_DETAILS
1267 SCIPsetDebugMsg(
set,
" -> conflict type: %d, cutoff involved = %u\n", conftype, cutoffinvolved);
1268 if( cutoffinvolved )
1353 if(
set->conf_maxstoresize == 0 )
1357 if( !
set->conf_cleanbnddepend )
1372 improvement = (1 -
set->conf_minimprove);
1374 improvement = (1 +
set->conf_minimprove);
1403 SCIPsetDebugMsg(
set,
"-> removed %d/%d conflicts, %d depending on cutoff bound\n", ndelconfs,
1404 conflictstore->
nconflicts+ndelconfs, ndelconfs);
1493 SCIPsetDebugMsg(
set,
"-> changed %d sides of dual solution constraints\n", nchgsides);
1545 if( conflictstore->
nconflicts > conflictsize )
1564 if( *nconflicts > conflictsize )
1568 conflicts[*nconflicts] = conflict;
1609 if( transcons !=
NULL )
SCIP_CERTIFICATE * SCIPgetCertificate(SCIP *scip)
methods for certificate output
#define CONFLICTSTORE_DUALSOLSIZE
SCIP_RETCODE SCIPconflictstoreTransform(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt)
#define CONFLICTSTORE_DUALRAYSIZE
SCIP_RETCODE SCIPconflictstoreUpgradeConflict(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONS *oldcons, SCIP_CONS *newcons)
#define CONFLICTSTORE_MAXSIZE
static SCIP_RETCODE conflictstoreCleanUpStorage(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, BMS_BLKMEM *blkmem, 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)
static SCIP_RETCODE conflictstoreAddOrigConflict(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons)
static SCIP_RETCODE initConflictstore(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_PROB *transprob)
int SCIPconflictstoreGetNDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_Real SCIPconflictstoreGetAvgNnzDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreCleanNewIncumbent(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real cutoffbound)
static SCIP_RETCODE delPosConflict(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int pos, SCIP_Bool deleteconflict)
static SCIP_RETCODE cleanDeletedAndCheckedDualsolCons(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int *ndelproofs)
static SCIP_RETCODE cleanDeletedAndCheckedConflicts(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int *ndelconfs)
static void adjustStorageSize(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set)
SCIP_RETCODE SCIPconflictstoreClear(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
int SCIPconflictstoreGetMaxPoolSize(SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetNDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
static SCIP_RETCODE cleanDeletedAndCheckedDualrayCons(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int *ndelproofs)
SCIP_RETCODE SCIPconflictstoreFree(SCIP_CONFLICTSTORE **conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreGetConflicts(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS **conflicts, int conflictsize, int *nconflicts)
int SCIPconflictstoreGetNConflictsInStore(SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreClean(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt)
static SCIP_RETCODE conflictstoreEnsureMem(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, BMS_BLKMEM *blkmem, int num)
SCIP_Real SCIPconflictstoreGetAvgNnzDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
#define CONFLICTSTORE_SORTFREQ
static SCIP_RETCODE delPosDualray(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int pos, SCIP_Bool deleteconflict)
#define CONFLICTSTORE_MINSIZE
static SCIP_RETCODE delPosDualsol(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, BMS_BLKMEM *blkmem, SCIP_REOPT *reopt, int pos, SCIP_Bool deleteconflict)
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)
static SCIP_RETCODE removeExactConflictFromCertificateHashmap(SCIP_SET *set, SCIP_CONS *cons)
SCIP_RETCODE SCIPconflictstoreCreate(SCIP_CONFLICTSTORE **conflictstore, SCIP_SET *set)
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)
#define CONFLICTSTORE_SIZE
int SCIPconflictstoreGetInitPoolSize(SCIP_CONFLICTSTORE *conflictstore)
internal methods for storing conflicts
SCIP_RETCODE SCIPconsAddLocks(SCIP_CONS *cons, SCIP_SET *set, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
void SCIPconsCapture(SCIP_CONS *cons)
SCIP_RETCODE SCIPconsGetNVars(SCIP_CONS *cons, SCIP_SET *set, int *nvars, SCIP_Bool *success)
SCIP_RETCODE SCIPconsDelete(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconsRelease(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set)
SCIP_RETCODE SCIPconsMarkConflict(SCIP_CONS *cons)
SCIP_CONS * SCIPconsGetTransformed(SCIP_CONS *cons)
internal methods for constraints and constraint handlers
Constraint handler for linear constraints in their most general form, .
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPeventhdlrCreate(SCIP_EVENTHDLR **eventhdlr, SCIP_SET *set, const char *name, const char *desc, SCIP_DECL_EVENTCOPY((*eventcopy)), SCIP_DECL_EVENTFREE((*eventfree)), SCIP_DECL_EVENTINIT((*eventinit)), SCIP_DECL_EVENTEXIT((*eventexit)), SCIP_DECL_EVENTINITSOL((*eventinitsol)), SCIP_DECL_EVENTEXITSOL((*eventexitsol)), SCIP_DECL_EVENTDELETE((*eventdelete)), SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
internal methods for managing events
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPclearConflictStore(SCIP *scip, SCIP_EVENT *event)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_Bool SCIPisCertified(SCIP *scip)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPconshdlrIsExact(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
void SCIPconsAddUpgradeLocks(SCIP_CONS *cons, int nlocks)
SCIP_Bool SCIPconsIsConflict(SCIP_CONS *cons)
SCIP_Real SCIPconsGetAge(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Bool SCIPisExact(SCIP *scip)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Bool SCIPisInRestart(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
void SCIPsortPtrRealRealBoolBool(void **ptrarray, SCIP_Real *realarray1, SCIP_Real *realarray2, SCIP_Bool *boolarray1, SCIP_Bool *boolarray2, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrBool(void **ptrarray, SCIP_Bool *boolarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortPtrReal(void **ptrarray, SCIP_Real *realarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)
#define BMSfreeMemoryNull(ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
struct BMS_BlkMem BMS_BLKMEM
#define BMSallocMemory(ptr)
internal miscellaneous methods
int SCIPprobGetNConss(SCIP_PROB *prob)
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
int SCIPprobGetNVars(SCIP_PROB *prob)
internal methods for storing and manipulating the main problem
data structures and methods for collecting reoptimization information
public methods for certified solving
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_STAGE SCIPsetGetStage(SCIP_SET *set)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
SCIP_RETCODE SCIPsetGetIntParam(SCIP_SET *set, const char *name, int *value)
SCIP_RETCODE SCIPsetIncludeEventhdlr(SCIP_SET *set, SCIP_EVENTHDLR *eventhdlr)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPsetCutoffbounddelta(SCIP_SET *set)
SCIP_EVENTHDLR * SCIPsetFindEventhdlr(SCIP_SET *set, const char *name)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
internal methods for global SCIP settings
SCIP_HASHMAP * rowdatahash
SCIP_Real lastcutoffbound
SCIP_Bool * dsolrelaxonly
SCIP_CONS ** dualsolconfs
SCIP_Real * confprimalbnds
SCIP_Real * dualprimalbnds
SCIP_Bool * drayrelaxonly
SCIP_CONS ** dualrayconfs
data structures for certificate output
SCIP_NODE * SCIPtreeGetFocusNode(SCIP_TREE *tree)
internal methods for branch and bound tree
struct SCIP_Certificate SCIP_CERTIFICATE
@ SCIP_CONFTYPE_BNDEXCEEDING
enum SCIP_ConflictType SCIP_CONFTYPE
struct SCIP_ConflictStore SCIP_CONFLICTSTORE
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_EVENTINITSOL(x)
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_BESTSOLFOUND
#define SCIP_DECL_EVENTEXITSOL(x)
#define SCIP_DECL_SORTPTRCOMP(x)
struct SCIP_Prob SCIP_PROB
struct SCIP_Reopt SCIP_REOPT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
struct SCIP_Stat SCIP_STAT
struct SCIP_Tree SCIP_TREE