127 row1scale = -row1scale;
129 row2scale = -row2scale;
183 for(
i = 0;
i < row1->
len; ++
i )
190 for(
i = 0;
i < row1->
len; ++
i )
217 tmpscale = row2scale;
218 row2scale = row1scale;
219 row1scale = tmpscale;
227 for( i1 = 0; i1 < row1->
len; ++i1 )
230 if( ilp < row2->nlpcols && row1->
cols[i1] == row2->
cols[ilp] )
238 else if( inlp < row2->len && row1->
cols[i1] == row2->
cols[inlp] )
272 hash = (uint64_t) (
long) row->
len;
274 for(
i = 0;
i < row->
len; ++
i )
308 assert(num <= cutpool->cutssize);
335 (*cut)->processedlp = -1;
336 (*cut)->processedlpsol = -1;
378 return (
unsigned int)cut->
age > (
unsigned int)agelimit;
419 return (nlpsaftercreation > 0 ? activeinlpcounter / (
SCIP_Real)nlpsaftercreation : 0.0);
444 hashGetKeyCut, hashKeyEqCut, hashKeyValCut, (
void*)
set) );
446 (*cutpool)->cuts =
NULL;
447 (*cutpool)->cutssize = 0;
448 (*cutpool)->ncuts = 0;
449 (*cutpool)->nremovablecuts = 0;
450 (*cutpool)->agelimit = agelimit;
451 (*cutpool)->processedlp = -1;
452 (*cutpool)->processedlpsol = -1;
455 (*cutpool)->firstunprocessed = 0;
456 (*cutpool)->firstunprocessedsol = 0;
457 (*cutpool)->maxncuts = 0;
458 (*cutpool)->ncalls = 0;
459 (*cutpool)->nrootcalls = 0;
460 (*cutpool)->ncutsfound = 0;
461 (*cutpool)->ncutsadded = 0;
462 (*cutpool)->globalcutpool = globalcutpool;
507 for(
i = 0;
i < cutpool->
ncuts; ++
i )
545 assert(0 <= pos && pos < cutpool->ncuts);
577 if( pos < cutpool->ncuts )
611 if( othercut ==
NULL )
615 else if( othercut->
row != row )
632 otherrhs = otherscale * (otherrow->
constant - otherrow->
lhs);
636 otherrhs = otherscale * (otherrow->
rhs - otherrow->
constant);
677 if( othercut ==
NULL )
698 otherrhs = otherscale * (otherrow->
constant - otherrow->
lhs);
702 otherrhs = otherscale * (otherrow->
rhs - otherrow->
constant);
850 int nefficaciouscuts;
889 if(
set->sepa_filtercutpoolrel )
892 minefficacy = root ?
set->sepa_minefficacyroot :
set->sepa_minefficacy;
905 SCIPsetDebugMsg(
set,
"separating%s cut pool %p with %d cuts, beginning with cut %d\n", (
sol ==
NULL ) ?
"" :
" solution from", (
void*)cutpool, cutpool->
ncuts, firstunproc);
913 nefficaciouscuts = 0;
917 for(
c = firstunproc;
c < cutpool->
ncuts; ++
c )
921 cut = cutpool->
cuts[
c];
929 if( retest || proclp < stat->lpcount )
952 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, row,
FALSE, root, &
cutoff) );
965 if( efficacy >= minefficacy )
971 SCIP_CALL(
SCIPsepastoreAddCut(sepastore, blkmem,
set, stat, eventqueue, eventfilter, lp, row,
FALSE, root, &
cutoff) );
974 if ( cutpoolisdelayed )
1025 if(
set->sepa_filtercutpoolrel && nefficaciouscuts > 0 )
1030 maxncuts =
MIN(maxncuts, nefficaciouscuts);
1032 if( ncuts > (0.5 * maxncuts) )
1036 else if( ncuts == 0 || (ncuts < (0.05 * maxncuts)) )
1073 return cutpool->
cuts;
1083 return cutpool->
ncuts;
void SCIPclockSetTime(SCIP_CLOCK *clck, SCIP_Real sec)
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
void SCIPclockFree(SCIP_CLOCK **clck)
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
internal methods for clocks and timing issues
void SCIPconshdlrIncNCutsFound(SCIP_CONSHDLR *conshdlr)
internal methods for constraints and constraint handlers
void SCIPcutpoolAddNCutsFound(SCIP_CUTPOOL *cutpool, SCIP_Longint ncutsfound)
static SCIP_Bool cutIsAged(SCIP_CUT *cut, int agelimit)
void SCIPcutpoolSetTime(SCIP_CUTPOOL *cutpool, SCIP_Real time)
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_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
static SCIP_RETCODE cutCreate(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_ROW *row)
SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool)
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
void SCIPcutpoolAddNCalls(SCIP_CUTPOOL *cutpool, SCIP_Longint ncalls)
static SCIP_RETCODE cutFree(SCIP_CUT **cut, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
void SCIPcutpoolAddMaxNCuts(SCIP_CUTPOOL *cutpool, SCIP_Longint ncuts)
static SCIP_RETCODE cutpoolEnsureCutsMem(SCIP_CUTPOOL *cutpool, SCIP_SET *set, int num)
void SCIPcutpoolAddNCutsAdded(SCIP_CUTPOOL *cutpool, SCIP_Longint ncutsadded)
void SCIPcutpoolAddNRootCalls(SCIP_CUTPOOL *cutpool, SCIP_Longint nrootcalls)
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
static SCIP_RETCODE cutpoolDelCut(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_CUT *cut)
SCIP_RETCODE SCIPcutpoolClear(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
internal methods for storing cuts in a cut pool
common defines and data types used in all packages of SCIP
#define SCIP_HASHSIZE_CUTPOOLS
#define SCIP_HASHSIZE_CUTPOOLS_SMALL
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashTwo(a, b)
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)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
void SCIPhashtableRemoveAll(SCIP_HASHTABLE *hashtable)
static INLINE uint32_t SCIPrealHashCode(double x)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_CUT ** SCIPcutpoolGetCuts(SCIP_CUTPOOL *cutpool)
SCIP_Longint SCIPcutpoolGetNRootCalls(SCIP_CUTPOOL *cutpool)
SCIP_Longint SCIPcutpoolGetNCutsFound(SCIP_CUTPOOL *cutpool)
SCIP_Real SCIPcutGetLPActivityQuot(SCIP_CUT *cut)
SCIP_Real SCIPcutpoolGetTime(SCIP_CUTPOOL *cutpool)
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
SCIP_Longint SCIPcutpoolGetMaxNCuts(SCIP_CUTPOOL *cutpool)
SCIP_ROW * SCIPcutGetRow(SCIP_CUT *cut)
SCIP_Longint SCIPcutpoolGetNCalls(SCIP_CUTPOOL *cutpool)
int SCIPcutGetAge(SCIP_CUT *cut)
SCIP_Longint SCIPcutpoolGetNCutsAdded(SCIP_CUTPOOL *cutpool)
void SCIProwSort(SCIP_ROW *row)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_Longint SCIProwGetActiveLPCount(SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_CONSHDLR * SCIProwGetOriginConshdlr(SCIP_ROW *row)
SCIP_Longint SCIProwGetNLPsAfterCreation(SCIP_ROW *row)
void SCIProwLock(SCIP_ROW *row)
SCIP_Bool SCIProwIsRemovable(SCIP_ROW *row)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_SEPA * SCIProwGetOriginSepa(SCIP_ROW *row)
void SCIProwUnlock(SCIP_ROW *row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_Real SCIProwGetMaxval(SCIP_ROW *row, SCIP_SET *set)
SCIP_Real SCIProwGetLPFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
void SCIProwCapture(SCIP_ROW *row)
SCIP_Real SCIProwGetSolFeasibility(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
SCIP_Real SCIProwGetSolEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
int SCIProwGetMaxidx(SCIP_ROW *row, SCIP_SET *set)
SCIP_LPSOLSTAT SCIPlpGetSolstat(SCIP_LP *lp)
SCIP_Real SCIProwGetMinval(SCIP_ROW *row, SCIP_SET *set)
SCIP_Real SCIProwGetLPEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
SCIP_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
internal methods for LP management
#define BMSfreeMemory(ptr)
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSreallocMemoryArray(ptr, num)
struct BMS_BlkMem BMS_BLKMEM
#define BMSfreeMemoryArrayNull(ptr)
#define BMSallocMemory(ptr)
public methods for message output
public data structures and miscellaneous methods
void SCIPsepaIncNCutsAdded(SCIP_SEPA *sepa, SCIP_Bool fromcutpool)
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
internal methods for separators
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
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)
int SCIPsepastoreGetNCutsAdded(SCIP_SEPASTORE *sepastore)
internal methods for storing separated cuts
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
int SCIPsetGetSepaMaxcuts(SCIP_SET *set, SCIP_Bool root)
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsFeasEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
internal methods for global SCIP settings
internal methods for problem statistics
SCIP_Longint processedlpsol
SCIP_Longint processedlpsol
SCIP_Real processedlpsolefficacy
SCIP_Real processedlpefficacy
SCIP_HASHTABLE * hashtable
unsigned int lpcolssorted
unsigned int inglobalcutpool
unsigned int nonlpcolssorted
unsigned int validminmaxidx
datastructures for storing cuts in a cut pool
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Cutpool SCIP_CUTPOOL
struct SCIP_EventFilter SCIP_EVENTFILTER
struct SCIP_EventQueue SCIP_EVENTQUEUE
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Sepa SCIP_SEPA
struct SCIP_SepaStore SCIP_SEPASTORE
struct SCIP_Stat SCIP_STAT