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] )
273 assert(cutpool !=
NULL);
284 assert(num <= cutpool->cutssize);
304 assert(blkmem !=
NULL);
311 (*cut)->processedlp = -1;
312 (*cut)->processedlpsol = -1;
331 assert(*cut !=
NULL);
332 assert((*cut)->row !=
NULL);
333 assert(blkmem !=
NULL);
353 return (agelimit >= 0 && cut->
age > agelimit);
394 return (nlpsaftercreation > 0 ? activeinlpcounter / (
SCIP_Real)nlpsaftercreation : 0.0);
410 assert(cutpool !=
NULL);
411 assert(agelimit >= -1);
419 hashGetKeyCut, hashKeyEqCut, hashKeyValCut, (
void*)
set) );
421 (*cutpool)->cuts =
NULL;
422 (*cutpool)->cutssize = 0;
423 (*cutpool)->ncuts = 0;
424 (*cutpool)->nremovablecuts = 0;
425 (*cutpool)->agelimit = agelimit;
426 (*cutpool)->processedlp = -1;
427 (*cutpool)->processedlpsol = -1;
428 (*cutpool)->firstunprocessed = 0;
429 (*cutpool)->firstunprocessedsol = 0;
430 (*cutpool)->maxncuts = 0;
431 (*cutpool)->ncalls = 0;
432 (*cutpool)->ncutsfound = 0;
433 (*cutpool)->globalcutpool = globalcutpool;
446 assert(cutpool !=
NULL);
447 assert(*cutpool !=
NULL);
474 assert(cutpool !=
NULL);
477 for( i = 0; i < cutpool->
ncuts; ++i )
498 assert(cutpool !=
NULL);
524 assert(cutpool !=
NULL);
581 assert(cutpool !=
NULL);
584 assert(blkmem !=
NULL);
585 assert(stat !=
NULL);
592 assert(0 <= pos && pos < cutpool->ncuts);
593 assert(cutpool->
cuts[pos] == cut);
616 if( pos < cutpool->ncuts-1 )
650 assert(cutpool !=
NULL);
690 assert(cutpool !=
NULL);
691 assert(stat !=
NULL);
696 assert(result !=
NULL);
725 SCIPsetDebugMsg(
set,
"separating%s cut pool %p with %d cuts, beginning with cut %d\n", ( sol ==
NULL ) ?
"" :
" solution from", (
void*)cutpool, cutpool->
ncuts, firstunproc);
735 for( c = firstunproc; c < cutpool->ncuts; ++c )
739 cut = cutpool->cuts[c];
743 assert(cut->
pos == c);
747 if( proclp < stat->lpcount )
765 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, sol, row,
FALSE, root, &cutoff) );
774 SCIPsetDebugMsg(
set,
" -> separated cut <%s> from the cut pool (feasibility: %g)\n",
776 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, sol, row,
FALSE, root, &cutoff) );
779 if ( cutpoolisdelayed )
818 cutpool->processedlp = stat->
lpcount;
819 cutpool->firstunprocessed = cutpool->ncuts;
823 cutpool->processedlpsol = stat->
lpcount;
824 cutpool->firstunprocessedsol = cutpool->ncuts;
846 assert(cutpool !=
NULL);
848 return cutpool->
cuts;
856 assert(cutpool !=
NULL);
858 return cutpool->
ncuts;
866 assert(cutpool !=
NULL);
876 assert(cutpool !=
NULL);
886 assert(cutpool !=
NULL);
896 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)
#define SCIPhashFour(a, b, c, d)
static SCIP_RETCODE cutCreate(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_ROW *row)
#define SCIPcombineThreeInt(a, b, c)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
#define SCIPpositiveRealHashCode(x, n)
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
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)