55 assert(sepastore != NULL);
67 assert(num <= sepastore->cutssize);
80 assert(sepastore != NULL);
84 (*sepastore)->cuts = NULL;
85 (*sepastore)->scores = NULL;
86 (*sepastore)->cutssize = 0;
87 (*sepastore)->ncuts = 0;
88 (*sepastore)->nforcedcuts = 0;
89 (*sepastore)->ncutsfound = 0;
90 (*sepastore)->ncutsfoundround = 0;
91 (*sepastore)->ncutsapplied = 0;
92 (*sepastore)->initiallp =
FALSE;
93 (*sepastore)->forcecuts =
FALSE;
103 assert(sepastore != NULL);
104 assert(*sepastore != NULL);
105 assert((*sepastore)->ncuts == 0);
119 assert(sepastore != NULL);
121 assert(sepastore->
ncuts == 0);
131 assert(sepastore != NULL);
133 assert(sepastore->
ncuts == 0);
143 assert(sepastore != NULL);
154 assert(sepastore != NULL);
174 assert(sepastore != NULL);
189 SCIPsetDebugMsg(
set,
"ignoring activity redundant cut <%s> (sides=[%g,%g], act=[%g,%g])\n",
213 assert(sepastore != NULL);
215 assert(infeasible != NULL);
231 SCIPsetDebugMsg(
set,
"ignoring activity redundant cut <%s> (sides=[%g,%g], act=[%g,%g])\n",
239 SCIPsetDebugMsg(
set,
"cut <%s> is infeasible (sides=[%g,%g], act=[%g,%g])\n",
276 assert(cols != NULL);
280 assert(vals != NULL);
365 assert(sepastore != NULL);
366 assert(sepastore->
cuts != NULL);
367 assert(sepastore->
nforcedcuts <= pos && pos < sepastore->ncuts);
412 assert(sepastore != NULL);
417 assert(eventqueue != NULL);
418 assert(eventfilter != NULL);
446 if( !forcecut && sepastore->
ncuts > 0 && redundant )
464 sepastore->
ncuts = 0;
492 SCIPsetDebugMsg(
set,
"adding cut <%s> to separation storage of size %d (forcecut=%u, len=%d)\n",
509 pos = sepastore->
ncuts;
511 sepastore->
cuts[pos] = cut;
512 sepastore->
scores[pos] = cutscore;
551 assert(sepastore != NULL);
552 assert(cutoff != NULL);
553 assert(applied != NULL);
563 SCIPsetDebugMsg(
set,
" -> applying bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
578 SCIPsetDebugMsg(
set,
" -> ignoring bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
587 SCIPsetDebugMsg(
set,
" -> applying global bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
606 SCIPsetDebugMsg(
set,
" -> ignoring global bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
636 assert(sepastore != NULL);
637 assert(cutoff != NULL);
638 assert(applied != NULL);
648 SCIPsetDebugMsg(
set,
" -> applying bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
663 SCIPsetDebugMsg(
set,
" -> ignoring bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
672 SCIPsetDebugMsg(
set,
" -> applying global bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
691 SCIPsetDebugMsg(
set,
" -> ignoring global bound change: <%s>: [%.20g,%.20g] -> [%.20g,%.20g]\n",
726 assert(sepastore != NULL);
729 assert(cutoff != NULL);
730 assert(applied != NULL);
737 assert(cols != NULL);
741 assert(vals != NULL);
758 SCIP_CALL(
sepastoreApplyLb(sepastore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
759 cliquetable, var, lhs/vals[0], local, applied, cutoff) );
764 SCIP_CALL(
sepastoreApplyUb(sepastore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
765 cliquetable, var, lhs/vals[0], local, applied, cutoff) );
777 SCIP_CALL(
sepastoreApplyUb(sepastore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
778 cliquetable, var, rhs/vals[0], local, applied, cutoff) );
783 SCIP_CALL(
sepastoreApplyLb(sepastore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand, eventqueue,
784 cliquetable, var, rhs/vals[0], local, applied, cutoff) );
811 assert(sepastore != NULL);
814 while( pos < sepastore->ncuts )
821 if( thisortho < MIN(mincutorthogonality, 0.5) || (thisortho < mincutorthogonality && sepastore->scores[pos] < 0.9 * bestscore) )
824 SCIPsetDebugMsg(
set,
" -> deleting parallel cut <%s> after adding <%s> (pos=%d, len=%d, orthogonality=%g, score=%g)\n",
852 assert(sepastore != NULL);
853 assert(ncutsapplied != NULL);
870 assert( cut->
origin != NULL );
874 assert( cut->
origin != NULL );
905 assert(sepastore != NULL);
909 bestscore = sepastore->
scores[bestpos];
911 for( pos = sepastore->
nforcedcuts + 1; pos < sepastore->ncuts; pos++ )
915 if( sepastore->
scores[pos] > bestscore )
917 bestscore = sepastore->
scores[pos];
942 cut = sepastore->
cuts[pos];
945 switch ( efficiacychoice )
971 sepastore->
scores[pos] = cutscore;
972 *bestscore =
MAX(*bestscore, cutscore);
1006 assert(sepastore != NULL);
1007 assert(
set != NULL);
1008 assert(tree != NULL);
1010 assert(cutoff != NULL);
1017 assert(node != NULL);
1027 mincutorthogonality = root ?
set->sepa_minorthoroot :
set->sepa_minortho;
1028 mincutorthogonality =
MAX(mincutorthogonality, set->num_epsilon);
1033 for( pos = sepastore->
nforcedcuts; pos < sepastore->ncuts; pos++ )
1039 for( pos = 0; pos < sepastore->
nforcedcuts && !(*cutoff); pos++ )
1043 cut = sepastore->
cuts[pos];
1051 SCIP_CALL(
sepastoreApplyBdchg(sepastore, blkmem,
set, stat, transprob, origprob, tree, reopt, lp, branchcand,
1052 eventqueue, cliquetable, cut, &applied, cutoff) );
1062 SCIP_CALL(
sepastoreApplyCut(sepastore, blkmem,
set, eventqueue, eventfilter, lp, cut, mincutorthogonality, bestscore, depth, &ncutsapplied) );
1067 while( ncutsapplied < maxsepacuts && sepastore->ncuts > sepastore->
nforcedcuts && !(*cutoff) )
1075 assert(sepastore->
nforcedcuts <= bestpos && bestpos < sepastore->ncuts);
1077 cut = sepastore->
cuts[bestpos];
1081 SCIPsetDebugMsg(
set,
" -> applying cut <%s> (pos=%d/%d, len=%d, LP efficacy=%g, objparallelism=%g, score=%g)\n",
1100 SCIP_CALL(
sepastoreApplyCut(sepastore, blkmem,
set, eventqueue, eventfilter, lp, cut, mincutorthogonality, bestscore, depth, &ncutsapplied) );
1125 assert(sepastore != NULL);
1130 for( c = 0; c < sepastore->
ncuts; ++c )
1147 sepastore->
ncuts = 0;
1177 assert( sepastore != NULL );
1182 while( c < sepastore->ncuts )
1186 switch ( efficiacychoice )
1231 assert(sepastore != NULL);
1233 return sepastore->
cuts;
1241 assert(sepastore != NULL);
1243 return sepastore->
ncuts;
1251 assert(sepastore != NULL);
1261 assert(sepastore != NULL);
1271 assert(sepastore != NULL);
internal methods for separators
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
static SCIP_RETCODE sepastoreApplyLb(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Real bound, SCIP_Bool local, SCIP_Bool *applied, SCIP_Bool *cutoff)
internal methods for managing events
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsetIsFeasZero(SCIP_SET *set, SCIP_Real val)
#define BMSfreeMemoryArrayNull(ptr)
internal methods for branch and bound tree
static SCIP_RETCODE sepastoreUpdateOrthogonalities(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_ROW *cut, SCIP_Real mincutorthogonality, SCIP_Real bestscore)
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
static SCIP_RETCODE sepastoreApplyBdchg(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_ROW *cut, SCIP_Bool *applied, SCIP_Bool *cutoff)
SCIP_RETCODE SCIPeventqueueAdd(SCIP_EVENTQUEUE *eventqueue, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENT **event)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
void SCIPsepaIncNAppliedCuts(SCIP_SEPA *sepa)
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
void SCIProwCapture(SCIP_ROW *row)
const char * SCIProwGetName(SCIP_ROW *row)
void SCIPsepastoreStartForceCuts(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
static SCIP_RETCODE computeScore(SCIP_SEPASTORE *sepastore, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool handlepool, int pos, SCIP_EFFICIACYCHOICE efficiacychoice, SCIP_Real *bestscore)
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
#define SCIPdebugCheckRow(set, row)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Real SCIProwGetLPEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Real SCIProwGetNLPEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
static SCIP_Bool sepastoreIsCutRedundant(SCIP_SEPASTORE *sepastore, SCIP_SET *set, SCIP_STAT *stat, SCIP_ROW *cut)
int SCIPnodeGetDepth(SCIP_NODE *node)
#define BMSfreeMemory(ptr)
void SCIPvarAdjustLb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *lb)
internal methods for LP management
int SCIPsetGetSepaMaxcuts(SCIP_SET *set, SCIP_Bool root)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_Bool SCIPsetIsEfficacious(SCIP_SET *set, SCIP_Bool root, SCIP_Real efficacy)
SCIP_RETCODE SCIPnodeCutoff(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_REOPT *reopt, SCIP_LP *lp, BMS_BLKMEM *blkmem)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPeventCreateRowDeletedSepa(SCIP_EVENT **event, BMS_BLKMEM *blkmem, SCIP_ROW *row)
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsepastoreIsCutApplicable(SCIP_SET *set, SCIP_ROW *cut)
#define SCIP_EVENTTYPE_ROWADDEDSEPA
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
static SCIP_RETCODE sepastoreApplyCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_ROW *cut, SCIP_Real mincutorthogonality, SCIP_Real bestscore, int depth, int *ncutsapplied)
SCIP_RETCODE SCIProwChgLocal(SCIP_ROW *row, SCIP_Bool local)
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
SCIP_RETCODE SCIPsepastoreRemoveInefficaciousCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore)
SCIP_RETCODE SCIPlpAddRow(SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_ROW *row, int depth)
internal methods for global SCIP settings
SCIP_Bool SCIPsetIsFeasGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
static int sepastoreGetBestCut(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
internal methods for storing separated cuts
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_Bool SCIPsetIsFeasLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE sepastoreDelCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, int pos)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
int SCIProwGetNumIntCols(SCIP_ROW *row, SCIP_SET *set)
SCIP_RETCODE SCIProwRelease(SCIP_ROW **row, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
data structures and methods for collecting reoptimization information
internal methods for problem variables
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
static SCIP_Bool sepastoreIsCutRedundantOrInfeasible(SCIP_SEPASTORE *sepastore, SCIP_SET *set, SCIP_STAT *stat, SCIP_ROW *cut, SCIP_Bool *infeasible)
static SCIP_RETCODE sepastoreApplyUb(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Real bound, SCIP_Bool local, SCIP_Bool *applied, SCIP_Bool *cutoff)
void SCIPconshdlrIncNAppliedCuts(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsepastoreFree(SCIP_SEPASTORE **sepastore)
#define SCIP_EVENTTYPE_ROWDELETEDSEPA
static SCIP_RETCODE sepastoreEnsureCutsMem(SCIP_SEPASTORE *sepastore, SCIP_SET *set, int num)
static SCIP_Bool sepastoreIsBdchgApplicable(SCIP_SET *set, SCIP_ROW *cut)
void SCIPsepastoreEndInitialLP(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIProwGetRelaxEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
SCIP_Bool SCIPsetIsFeasLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
void SCIPsepastoreStartInitialLP(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIProwGetMaxActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
SCIP_Real SCIProwGetMinActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_NODE * SCIPtreeGetRootNode(SCIP_TREE *tree)
SCIP_RETCODE SCIPnodeAddBoundchg(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype, SCIP_Bool probingchange)
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
SCIP_RETCODE SCIPsepastoreApplyCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice, SCIP_Bool *cutoff)
SCIP_Bool SCIPsetIsGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
internal methods for problem statistics
SCIP_Real SCIProwGetObjParallelism(SCIP_ROW *row, SCIP_SET *set, SCIP_LP *lp)
SCIP_Bool SCIPsetIsFeasPositive(SCIP_SET *set, SCIP_Real val)
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
#define BMSallocMemory(ptr)
#define BMSreallocMemoryArray(ptr, num)
internal methods for constraints and constraint handlers
SCIP_Bool SCIPsetIsFeasGT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
void SCIPvarAdjustUb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *ub)
datastructures for storing conflicts
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
void SCIPsepastoreEndForceCuts(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)
SCIP_Real SCIProwGetOrthogonality(SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
SCIP_RETCODE SCIPeventCreateRowAddedSepa(SCIP_EVENT **event, BMS_BLKMEM *blkmem, SCIP_ROW *row)
SCIP_Bool SCIProwIsInGlobalCutpool(SCIP_ROW *row)