103 if( row1->
len != row2->
len 132 while( i < row1->nlpcols && i2 < row2->len )
134 assert(row1->
cols[i] != row2->
cols[i2]);
143 assert(i == row1->
nlpcols || i2 == row2->
len);
147 while( i < row1->len && i2 < row2->nlpcols )
149 assert(row1->
cols[i] != row2->
cols[i2]);
158 assert(i == row1->
len || i2 == row2->
nlpcols);
167 for( i = 0; i < row1->
len; ++i )
169 if( row1->
cols[i] != row2->
cols[i] )
174 for( i = 0; i < row1->
len; ++i )
205 for( i1 = 0; i1 < row1->
len; ++i1 )
208 if( ilp < row2->nlpcols && row1->
cols[i1] == row2->
cols[ilp] )
216 else if( inlp < row2->len && row1->
cols[i1] == row2->
cols[inlp] )
267 assert(cutpool !=
NULL);
278 assert(num <= cutpool->cutssize);
298 assert(blkmem !=
NULL);
305 (*cut)->processedlp = -1;
306 (*cut)->processedlpsol = -1;
325 assert(*cut !=
NULL);
326 assert((*cut)->row !=
NULL);
327 assert(blkmem !=
NULL);
347 return (agelimit >= 0 && cut->
age > agelimit);
388 return (nlpsaftercreation > 0 ? activeinlpcounter / (
SCIP_Real)nlpsaftercreation : 0.0);
404 assert(cutpool !=
NULL);
405 assert(agelimit >= -1);
413 hashGetKeyCut, hashKeyEqCut, hashKeyValCut, (
void*)
set) );
415 (*cutpool)->cuts =
NULL;
416 (*cutpool)->cutssize = 0;
417 (*cutpool)->ncuts = 0;
418 (*cutpool)->nremovablecuts = 0;
419 (*cutpool)->agelimit = agelimit;
420 (*cutpool)->processedlp = -1;
421 (*cutpool)->processedlpsol = -1;
422 (*cutpool)->firstunprocessed = 0;
423 (*cutpool)->firstunprocessedsol = 0;
424 (*cutpool)->maxncuts = 0;
425 (*cutpool)->ncalls = 0;
426 (*cutpool)->ncutsfound = 0;
427 (*cutpool)->globalcutpool = globalcutpool;
440 assert(cutpool !=
NULL);
441 assert(*cutpool !=
NULL);
468 assert(cutpool !=
NULL);
471 for( i = 0; i < cutpool->
ncuts; ++i )
492 assert(cutpool !=
NULL);
518 assert(cutpool !=
NULL);
575 assert(cutpool !=
NULL);
578 assert(blkmem !=
NULL);
579 assert(stat !=
NULL);
586 assert(0 <= pos && pos < cutpool->ncuts);
587 assert(cutpool->
cuts[pos] == cut);
610 if( pos < cutpool->ncuts-1 )
644 assert(cutpool !=
NULL);
684 assert(cutpool !=
NULL);
685 assert(stat !=
NULL);
690 assert(result !=
NULL);
719 SCIPsetDebugMsg(
set,
"separating%s cut pool %p with %d cuts, beginning with cut %d\n", ( sol ==
NULL ) ?
"" :
" solution from", (
void*)cutpool, cutpool->
ncuts, firstunproc);
729 for( c = firstunproc; c < cutpool->ncuts; ++c )
733 cut = cutpool->cuts[c];
737 assert(cut->
pos == c);
741 if( proclp < stat->lpcount )
759 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, sol, row,
FALSE, root, &cutoff) );
768 SCIPsetDebugMsg(
set,
" -> separated cut <%s> from the cut pool (feasibility: %g)\n",
770 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, sol, row,
FALSE, root, &cutoff) );
773 if ( cutpoolisdelayed )
812 cutpool->processedlp = stat->
lpcount;
813 cutpool->firstunprocessed = cutpool->ncuts;
817 cutpool->processedlpsol = stat->
lpcount;
818 cutpool->firstunprocessedsol = cutpool->ncuts;
840 assert(cutpool !=
NULL);
842 return cutpool->
cuts;
850 assert(cutpool !=
NULL);
852 return cutpool->
ncuts;
860 assert(cutpool !=
NULL);
870 assert(cutpool !=
NULL);
880 assert(cutpool !=
NULL);
890 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)
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_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)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
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)
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)
#define SCIP_DEFAULT_EPSILON
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)
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row)
static SCIP_RETCODE cutCreate(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_ROW *row)
#define SCIPcombineThreeInt(a, b, c)
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_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_Bool SCIProwIsSolEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Bool root)
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)
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_ROW *row)
#define BMSfreeBlockMemory(mem, ptr)
public data structures and miscellaneous methods
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_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
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)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
void SCIProwLock(SCIP_ROW *row)
SCIP_Bool SCIProwIsLPEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool root)
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
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
internal methods for constraints and constraint handlers
void SCIPsepaIncNCutsFound(SCIP_SEPA *sepa)
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 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
#define SCIPcombineTwoInt(a, b)
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)
void SCIProwUnlock(SCIP_ROW *row)