ncuts = *currentncuts;
107 if( sol !=
NULL&& dircutoffdistweight > 0.0 )
109 for( i = ncuts-1; i >= 0; --i )
116 if( intsupportweight > 0.0 )
121 if( objparalweight > 0.0 )
124objparallelism = 0.0;
130score = dircutoffdistweight * efficacy;
135score = dircutoffdistweight *
MAX(score, efficacy);
138efficacy *= efficacyweight;
139score += objparallelism + intsupport + efficacy;
145 if( randnumgen !=
NULL)
150maxscore =
MAX(maxscore, score);
152 if( scores !=
NULL)
170efficacyweight += dircutoffdistweight;
173 for( i = ncuts-1; i >= 0; --i )
180 if( intsupportweight > 0.0 )
185 if( objparalweight > 0.0 )
188objparallelism = 0.0;
192score = objparallelism + intsupport + efficacy;
198 if( randnumgen !=
NULL)
203maxscore =
MAX(maxscore, score);
205 if( scores !=
NULL)
218*currentncuts = ncuts;
246*score = sqrt(currentbestefficacy * currentbestefficacy + efficacy * efficacy
247- 2.0 * fabs(currentbestefficacy) * fabs(efficacy) * cosineangle)
248/ sqrt((1.0 - (cosineangle * cosineangle)));
249*score -= currentbestefficacy;
268assert(cuts !=
NULL);
269assert(scores !=
NULL);
271bestscore = scores[0];
274 for( i = 1; i < ncuts; ++i )
276 if( scores[i] > bestscore )
279bestscore = scores[i];
306assert(bestcut !=
NULL);
307assert(ncuts == 0 || cuts !=
NULL);
308assert(ncuts == 0 || scores !=
NULL);
313 for( i = ncuts-1; i >= 0; --i )
322 if(
SCIPisGE(
scip, bestcutefficacy, currentcutefficacy))
325thisparall = cosine * bestcutefficacy / currentcutefficacy;
326 SCIPdebugMsg(
scip,
"Thisparall(%g) = cosine(%g) * (bestcutefficacy(%g)/ currentcutefficacy(%g))\n\n", thisparall,
327cosine, bestcutefficacy, currentcutefficacy);
332thisparall = cosine * currentcutefficacy / bestcutefficacy;
333 SCIPdebugMsg(
scip,
"Thisparall(%g) = cosine(%g) * (currentcutefficacy(%g) / bestcutefficacy(%g))\n\n", thisparall,
334cosine, currentcutefficacy, bestcutefficacy);
339minmaxparall =
MAX( (bestcutefficacy * bestcutefficacy
340+ currentcutefficacy * currentcutefficacy
341- (1 + mingain) * bestcutefficacy * (1 + mingain) * bestcutefficacy * (1 - cosine * cosine))
342/ (2 * bestcutefficacy * currentcutefficacy),
369assert(cutsel !=
NULL);
402assert(cutseldata !=
NULL);
416assert(cutseldata !=
NULL);
417assert(cutseldata->randnumgen !=
NULL);
430assert(cutsel !=
NULL);
431assert(result !=
NULL);
436assert(cutseldata !=
NULL);
437 if(cutseldata->maxdepth != -1 && cutseldata->maxdepth <
SCIPgetDepth(
scip))
444cutseldata->mingain, 1-cutseldata->minortho, cutseldata->dircutoffdistweight, cutseldata->efficacyweight,
445cutseldata->objparalweight, cutseldata->intsupportweight, ncuts, nforcedcuts,
446maxnselectedcuts, nselectedcuts) );
470assert(cutsel !=
NULL);
482 "weight of efficacy in cut score calculation",
483&cutseldata->efficacyweight,
FALSE,
487 "cutselection/" CUTSEL_NAME "/dircutoffdistweight",
488 "weight of directed cutoff distance in cut score calculation",
489&cutseldata->dircutoffdistweight,
FALSE,
494 "weight of objective parallelism in cut score calculation",
495&cutseldata->objparalweight,
FALSE,
500 "weight of integral support in cut score calculation",
501&cutseldata->intsupportweight,
FALSE,
506 "minimal efficacy gain for a cut to enter the LP",
507&cutseldata->mingain,
FALSE,
512 "filtering strategy during cut selection",
513&cutseldata->filtermode,
FALSE,
518 "minimal orthogonality for a cut to enter the LP",
519&cutseldata->minortho,
FALSE,
524 "maximum depth at which this cutselector is employed",
525&cutseldata->maxdepth,
FALSE,
565assert(cuts !=
NULL&& ncuts > 0);
566assert(forcedcuts !=
NULL|| nforcedcuts == 0);
567assert(nselectedcuts !=
NULL);
575 scoring(
scip, cuts, randnumgen, dircutoffdistweight, efficacyweight, objparalweight, intsupportweight, &ncuts,
584 for( i = 0; i < nforcedcuts && ncuts > 0; ++i )
592 if( *nselectedcuts == maxselectedcuts )
595 if( filtermode ==
'f'&& nforcedcuts > 0 )
598ngoodforcedcuts = nforcedcuts;
599 scoring(
scip, forcedcuts, randnumgen, dircutoffdistweight, efficacyweight, objparalweight, intsupportweight,
600&ngoodforcedcuts, forcedscores);
602 if( ngoodforcedcuts != 0 )
608 for( i = 0; i < ncuts; i++ )
616 if( ngoodforcedcuts == 0 )
618assert(filtermode ==
'd'|| ngoodforcedcuts == 0);
621selectedcut = cuts[0];
627 if( *nselectedcuts == maxselectedcuts )
637 if( filtermode ==
'f')
639 for( i = 0; i < ncuts; i++ )
652selectedcut = cuts[0];
658 if( *nselectedcuts == maxselectedcuts )
668 if( filtermode ==
'f')
670 for( i = 0; i < ncuts; i++ )
#define DEFAULT_EFFICACYWEIGHT
#define DEFAULT_OBJPARALWEIGHT
static int filterWithDynamicParallelism(SCIP *scip, SCIP_ROW *bestcut, SCIP_ROW **cuts, SCIP_Real *scores, SCIP_Real mingain, SCIP_Real maxparall, int ncuts)
static SCIP_DECL_CUTSELSELECT(cutselSelectDynamic)
static SCIP_DECL_CUTSELFREE(cutselFreeDynamic)
static void selectBestCut(SCIP_ROW **cuts, SCIP_Real *scores, int ncuts)
static SCIP_DECL_CUTSELCOPY(cutselCopyDynamic)
#define DEFAULT_FILTERMODE
static SCIP_RETCODE computeProjectionScore(SCIP *scip, SCIP_ROW *bestcut, SCIP_ROW *cut, SCIP_Real *score)
#define DEFAULT_DIRCUTOFFDISTWEIGHT
static SCIP_DECL_CUTSELINIT(cutselInitDynamic)
static void scoring(SCIP *scip, SCIP_ROW **cuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int *currentncuts, SCIP_Real *scores)
static SCIP_DECL_CUTSELEXIT(cutselExitDynamic)
#define DEFAULT_INTSUPPORTWEIGHT
#define SCIP_MAXTREEDEPTH
SCIP_RETCODE SCIPselectCutsDynamic(SCIP *scip, SCIP_ROW **cuts, SCIP_ROW **forcedcuts, SCIP_RANDNUMGEN *randnumgen, char filtermode, SCIP_Real mingain, SCIP_Real maxparall, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, int nforcedcuts, int maxselectedcuts, int *nselectedcuts)
SCIP_RETCODE SCIPincludeCutselDynamic(SCIP *scip)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
void SCIPswapPointers(void **pointer1, void **pointer2)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_Real SCIPgetCutLPSolCutoffDistance(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
SCIP_RETCODE SCIPsetCutselInit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
SCIP_RETCODE SCIPincludeCutselBasic(SCIP *scip, SCIP_CUTSEL **cutsel, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
SCIP_RETCODE SCIPsetCutselCopy(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
SCIP_CUTSELDATA * SCIPcutselGetData(SCIP_CUTSEL *cutsel)
SCIP_RETCODE SCIPsetCutselFree(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
void SCIPcutselSetData(SCIP_CUTSEL *cutsel, SCIP_CUTSELDATA *cutseldata)
const char * SCIPcutselGetName(SCIP_CUTSEL *cutsel)
SCIP_RETCODE SCIPsetCutselExit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Real SCIProwGetParallelism(SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_Bool SCIProwIsInGlobalCutpool(SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
const char * SCIProwGetName(SCIP_ROW *row)
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
#define BMSclearMemory(ptr)
public methods for cuts and aggregation rows
public methods for cut selector plugins
public methods for the LP relaxation, rows and columns
public methods for random numbers
struct SCIP_CutselData SCIP_CUTSELDATA
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4