57 assert(cut->
row != NULL);
117 row1scale = -row1scale;
119 row2scale = -row2scale;
138 while( i < row1->nlpcols && i2 < row2->len )
140 assert(row1->
cols[i] != row2->
cols[i2]);
149 assert(i == row1->
nlpcols || i2 == row2->
len);
153 while( i < row1->len && i2 < row2->nlpcols )
155 assert(row1->
cols[i] != row2->
cols[i2]);
164 assert(i == row1->
len || i2 == row2->
nlpcols);
173 for( i = 0; i < row1->
len; ++i )
180 for( i = 0; i < row1->
len; ++i )
207 tmpscale = row2scale;
208 row2scale = row1scale;
209 row1scale = tmpscale;
217 for( i1 = 0; i1 < row1->
len; ++i1 )
220 if( ilp < row2->nlpcols && row1->
cols[i1] == row2->
cols[ilp] )
228 else if( inlp < row2->len && row1->
cols[i1] == row2->
cols[inlp] )
256 assert(row->
len > 0);
262 hash = (uint64_t) (
long) row->
len;
264 for( i = 0; i < row->
len; ++i )
287 assert(cutpool != NULL);
298 assert(num <= cutpool->cutssize);
318 assert(blkmem != NULL);
325 (*cut)->processedlp = -1;
326 (*cut)->processedlpsol = -1;
345 assert(*cut != NULL);
346 assert((*cut)->row != NULL);
347 assert(blkmem != NULL);
368 return (
unsigned int)cut->
age > (
unsigned int)agelimit;
404 assert(cut->
row != NULL);
409 return (nlpsaftercreation > 0 ? activeinlpcounter / (
SCIP_Real)nlpsaftercreation : 0.0);
425 assert(cutpool != NULL);
426 assert(agelimit >= -1);
434 hashGetKeyCut, hashKeyEqCut, hashKeyValCut, (
void*)
set) );
436 (*cutpool)->cuts = NULL;
437 (*cutpool)->cutssize = 0;
438 (*cutpool)->ncuts = 0;
439 (*cutpool)->nremovablecuts = 0;
440 (*cutpool)->agelimit = agelimit;
441 (*cutpool)->processedlp = -1;
442 (*cutpool)->processedlpsol = -1;
445 (*cutpool)->firstunprocessed = 0;
446 (*cutpool)->firstunprocessedsol = 0;
447 (*cutpool)->maxncuts = 0;
448 (*cutpool)->ncalls = 0;
449 (*cutpool)->ncutsfound = 0;
450 (*cutpool)->globalcutpool = globalcutpool;
463 assert(cutpool != NULL);
464 assert(*cutpool != NULL);
491 assert(cutpool != NULL);
494 for( i = 0; i < cutpool->
ncuts; ++i )
521 assert(cutpool != NULL);
524 assert(blkmem != NULL);
525 assert(stat != NULL);
529 assert(cut->
row != NULL);
532 assert(0 <= pos && pos < cutpool->ncuts);
533 assert(cutpool->
cuts[pos] == cut);
560 if( pos < cutpool->ncuts-1 )
590 assert(cutpool != NULL);
601 if( othercut == NULL )
605 else if( othercut->
row != row )
622 otherrhs = otherscale * (otherrow->
constant - otherrow->
lhs);
626 otherrhs = otherscale * (otherrow->
rhs - otherrow->
constant);
656 assert(cutpool != NULL);
664 if( othercut == NULL )
685 otherrhs = otherscale * (otherrow->
constant - otherrow->
lhs);
689 otherrhs = otherscale * (otherrow->
rhs - otherrow->
constant);
728 assert(cutpool != NULL);
796 assert(cutpool != NULL);
836 int nefficaciouscuts;
839 assert(cutpool != NULL);
840 assert(stat != NULL);
845 assert(result != NULL);
886 SCIPsetDebugMsg(
set,
"separating%s cut pool %p with %d cuts, beginning with cut %d\n", ( sol == NULL ) ?
"" :
" solution from", (
void*)cutpool, cutpool->
ncuts, firstunproc);
893 nefficaciouscuts = 0;
897 for( c = firstunproc; c < cutpool->ncuts; ++c )
901 cut = cutpool->cuts[c];
905 assert(cut->
pos == c);
909 if( retest || proclp < stat->lpcount )
929 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, row,
FALSE, root, &cutoff) );
942 if( efficacy >= minefficacy )
945 SCIPsetDebugMsg(
set,
" -> separated cut <%s> from the cut pool (feasibility: %g)\n",
947 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, row,
FALSE, root, &cutoff) );
950 if ( cutpoolisdelayed )
989 cutpool->processedlp = stat->
lpcount;
990 cutpool->firstunprocessed = cutpool->ncuts;
994 cutpool->processedlpsol = stat->
lpcount;
995 cutpool->firstunprocessedsol = cutpool->ncuts;
998 if( nefficaciouscuts > 0 )
1003 maxncuts = MIN(maxncuts, nefficaciouscuts);
1006 cutpool->ncutsfound += ncuts;
1008 if( ncuts > (0.5 * maxncuts) )
1012 else if( ncuts == 0 || (ncuts < (0.05 * maxncuts)) )
1020 cutpool->firstunprocessed = 0;
1021 cutpool->firstunprocessedsol = 0;
1047 assert(cutpool != NULL);
1049 return cutpool->
cuts;
1057 assert(cutpool != NULL);
1059 return cutpool->
ncuts;
1067 assert(cutpool != NULL);
1077 assert(cutpool != NULL);
1087 assert(cutpool != NULL);
1097 assert(cutpool != NULL);
enum SCIP_Result SCIP_RESULT
internal methods for separators
SCIP_Bool SCIProwIsRemovable(SCIP_ROW *row)
SCIP_Real SCIProwGetSolFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
int SCIProwGetMaxidx(SCIP_ROW *row, SCIP_SET *set)
SCIP_HASHTABLE * hashtable
#define BMSfreeMemoryArrayNull(ptr)
#define SCIP_HASHSIZE_CUTPOOLS
SCIP_SEPA * SCIProwGetOriginSepa(SCIP_ROW *row)
SCIP_Real SCIProwGetMinval(SCIP_ROW *row, SCIP_SET *set)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Longint SCIPcutpoolGetNCutsFound(SCIP_CUTPOOL *cutpool)
internal methods for clocks and timing issues
int SCIProwGetNNonz(SCIP_ROW *row)
void SCIProwCapture(SCIP_ROW *row)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Longint SCIProwGetActiveLPCount(SCIP_ROW *row)
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Longint processedlpsol
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Real SCIPcutGetLPActivityQuot(SCIP_CUT *cut)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Longint SCIPcutpoolGetNCalls(SCIP_CUTPOOL *cutpool)
SCIP_Real SCIProwGetLPEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
SCIP_Real processedlpefficacy
static SCIP_RETCODE cutpoolDelCut(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_CUT *cut)
int SCIPcutpoolGetMaxNCuts(SCIP_CUTPOOL *cutpool)
static SCIP_RETCODE cutFree(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
#define BMSfreeMemory(ptr)
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
internal methods for LP management
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
int SCIPsetGetSepaMaxcuts(SCIP_SET *set, SCIP_Bool root)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
void SCIProwSort(SCIP_ROW *row)
static SCIP_RETCODE cutCreate(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
static INLINE uint32_t SCIPrealHashCode(double x)
static SCIP_DECL_HASHKEYVAL(hashKeyValCut)
SCIP_Longint processedlpsol
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
datastructures for storing cuts in a cut pool
SCIP_CONSHDLR * SCIProwGetOriginCons(SCIP_ROW *row)
SCIP_ROW * SCIPcutGetRow(SCIP_CUT *cut)
internal methods for global SCIP settings
#define SCIPhashTwo(a, b)
SCIP_Real processedlpsolefficacy
SCIP_RETCODE SCIPcutpoolClear(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_CUT ** SCIPcutpoolGetCuts(SCIP_CUTPOOL *cutpool)
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
internal methods for storing separated cuts
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
void SCIPconshdlrIncNCutsFound(SCIP_CONSHDLR *conshdlr)
#define BMSfreeBlockMemory(mem, ptr)
public data structures and miscellaneous methods
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
void SCIPclockFree(SCIP_CLOCK **clck)
#define SCIP_HASHSIZE_CUTPOOLS_SMALL
SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool)
unsigned int lpcolssorted
internal methods for storing cuts in a cut pool
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_Real SCIProwGetSolEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
void SCIProwLock(SCIP_ROW *row)
unsigned int inglobalcutpool
public methods for message output
SCIP_Real SCIProwGetLPFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
internal methods for problem statistics
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
internal methods for constraints and constraint handlers
void SCIPsepaIncNCutsFound(SCIP_SEPA *sepa)
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
SCIP_RETCODE SCIPcutpoolSeparate(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, SCIP_Bool cutpoolisdelayed, SCIP_Bool root, SCIP_RESULT *result)
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
SCIP_Real SCIProwGetMaxval(SCIP_ROW *row, SCIP_SET *set)
#define BMSallocBlockMemory(mem, ptr)
SCIP_Real SCIPcutpoolGetTime(SCIP_CUTPOOL *cutpool)
int SCIPcutGetAge(SCIP_CUT *cut)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
unsigned int validminmaxidx
unsigned int nonlpcolssorted
SCIP_Longint SCIProwGetNLPsAfterCreation(SCIP_ROW *row)
static SCIP_Bool cutIsAged(SCIP_CUT *cut, int agelimit)
static SCIP_DECL_HASHGETKEY(hashGetKeyCut)
static SCIP_DECL_HASHKEYEQ(hashKeyEqCut)
static SCIP_RETCODE cutpoolEnsureCutsMem(SCIP_CUTPOOL *cutpool, SCIP_SET *set, int num)
SCIP_RETCODE SCIPsepastoreAddCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
void SCIProwUnlock(SCIP_ROW *row)