dynamic cut selector
Definition in file cutsel_dynamic.c.
#include <assert.h>
#include "scip/scip_cutsel.h"
#include "scip/scip_cut.h"
#include "scip/scip_lp.h"
#include "scip/scip_randnumgen.h"
#include "scip/cutsel_dynamic.h"
Go to the source code of this file.
Macros | |
#define | CUTSEL_NAME "dynamic" |
#define | CUTSEL_DESC "dynamic orthogonality for hybrid cutsel" |
#define | CUTSEL_PRIORITY 7000 |
#define | RANDSEED 0x5EED |
#define | DEFAULT_EFFICACYWEIGHT 1.0 |
#define | DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 |
#define | DEFAULT_OBJPARALWEIGHT 0.0 |
#define | DEFAULT_INTSUPPORTWEIGHT 0.0 |
#define | DEFAULT_MINORTHO 0.9 |
#define | DEFAULT_MINGAIN 0.01 |
#define | DEFAULT_MAXDEPTH (-1) |
#define | DEFAULT_FILTERMODE 'd' |
Functions | |
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_RETCODE | computeProjectionScore (SCIP *scip, SCIP_ROW *bestcut, SCIP_ROW *cut, SCIP_Real *score) |
static void | selectBestCut (SCIP_ROW **cuts, SCIP_Real *scores, int ncuts) |
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_CUTSELCOPY (cutselCopyDynamic) |
static | SCIP_DECL_CUTSELFREE (cutselFreeDynamic) |
static | SCIP_DECL_CUTSELINIT (cutselInitDynamic) |
static | SCIP_DECL_CUTSELEXIT (cutselExitDynamic) |
static | SCIP_DECL_CUTSELSELECT (cutselSelectDynamic) |
SCIP_RETCODE | SCIPincludeCutselDynamic (SCIP *scip) |
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) |
#define CUTSEL_NAME "dynamic" |
Definition at line 43 of file cutsel_dynamic.c.
Referenced by SCIP_DECL_CUTSELCOPY(), SCIP_DECL_CUTSELCOPY(), SCIP_DECL_CUTSELCOPY(), SCIPincludeCutselDynamic(), SCIPincludeCutselEnsemble(), and SCIPincludeCutselHybrid().
#define CUTSEL_DESC "dynamic orthogonality for hybrid cutsel" |
Definition at line 44 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic(), SCIPincludeCutselEnsemble(), and SCIPincludeCutselHybrid().
#define CUTSEL_PRIORITY 7000 |
Definition at line 45 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic(), SCIPincludeCutselEnsemble(), and SCIPincludeCutselHybrid().
#define RANDSEED 0x5EED |
Definition at line 47 of file cutsel_dynamic.c.
Referenced by SCIP_DECL_CUTSELINIT(), SCIP_DECL_CUTSELINIT(), SCIP_DECL_CUTSELINIT(), SCIP_DECL_SEPAINIT(), and setupStart().
#define DEFAULT_EFFICACYWEIGHT 1.0 |
weight of efficacy in score calculation
Definition at line 49 of file cutsel_dynamic.c.
#define DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 |
weight of directed cutoff distance in score calculation
Definition at line 50 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic(), SCIPincludeCutselEnsemble(), SCIPincludeCutselHybrid(), SCIPincludeSepaRlt(), and SCIPincludeSepaZerohalf().
#define DEFAULT_OBJPARALWEIGHT 0.0 |
weight of objective parallelism in score calculation
Definition at line 51 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic(), SCIPincludeCutselEnsemble(), SCIPincludeCutselHybrid(), SCIPincludeSepaRlt(), and SCIPincludeSepaZerohalf().
#define DEFAULT_INTSUPPORTWEIGHT 0.0 |
weight of integral support in cut score calculation
Definition at line 52 of file cutsel_dynamic.c.
#define DEFAULT_MINORTHO 0.9 |
minimal orthogonality in percent for a cut to enter the LP
Definition at line 53 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic(), and SCIPincludeCutselHybrid().
#define DEFAULT_MINGAIN 0.01 |
minimal efficacy gain for a cut to enter the LP
Definition at line 54 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic().
#define DEFAULT_MAXDEPTH (-1) |
maximum depth at which this cutselector is used (-1 : all nodes)
Definition at line 55 of file cutsel_dynamic.c.
#define DEFAULT_FILTERMODE 'd' |
filtering strategy during cut selection ( 'd'ynamic- and 'f'ull dynamic parallelism)
Definition at line 56 of file cutsel_dynamic.c.
Referenced by SCIPincludeCutselDynamic().
|
static |
returns the maximum score of cuts; if scores is not NULL, then stores the individual score of each cut in scores
scip | SCIP data structure |
cuts | array with cuts to score |
randnumgen | random number generator for tie-breaking, or NULL |
dircutoffdistweight | weight of directed cutoff distance in cut score calculation |
efficacyweight | weight of efficacy in cut score calculation |
objparalweight | weight of objective parallelism in cut score calculation |
intsupportweight | weight of integral support in cut score calculation |
currentncuts | current number of cuts in cuts array |
scores | array to store the score of cuts or NULL |
Definition at line 87 of file cutsel_dynamic.c.
References i, MAX, NULL, SCIP_Real, SCIPgetBestSol(), SCIPgetCutEfficacy(), SCIPgetCutLPSolCutoffDistance(), SCIPgetRowNumIntCols(), SCIPgetRowObjParallelism(), SCIPisLE(), SCIPrandomGetReal(), SCIProwGetNNonz(), SCIProwIsInGlobalCutpool(), SCIProwIsLocal(), SCIPswapPointers(), SCIPswapReals(), and sol.
Referenced by SCIPselectCutsDynamic().
|
static |
compute projectioncut score for cuts from a given bestcut.
scip | SCIP data structure |
bestcut | cut to filter orthogonality with |
cut | cut to perform scoring on |
score | score for cut |
Definition at line 223 of file cutsel_dynamic.c.
References NULL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPgetCutEfficacy(), SCIPinfinity(), SCIPisEQ(), SCIProwGetName(), and SCIProwGetParallelism().
Referenced by SCIPselectCutsDynamic().
move the cut with the highest score to the first position in the array; there must be at least one cut
cuts | array with cuts to perform selection algorithm |
scores | array with scores of cuts to perform selection algorithm |
ncuts | number of cuts in given array |
Definition at line 257 of file cutsel_dynamic.c.
References assert(), i, NULL, SCIP_Real, SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsDynamic().
|
static |
filters the given array of cuts to enforce a maximum parallelism constraint w.r.t the given cut; moves filtered cuts to the end of the array and returns number of selected cuts
scip | SCIP data structure |
bestcut | cut to filter orthogonality with |
cuts | array with cuts to perform selection algorithm |
scores | array with scores of cuts to perform selection algorithm |
mingain | minimum gain enforced on the two-cut efficacy |
maxparall | maximal parallelism for all cuts that are not good |
ncuts | number of cuts in given array |
Definition at line 290 of file cutsel_dynamic.c.
References assert(), i, MAX, NULL, SCIP_Bool, SCIP_Real, SCIPdebugMsg, SCIPgetCutEfficacy(), SCIPisGE(), SCIPisGT(), SCIProwGetParallelism(), SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsDynamic().
|
static |
copy method for cut selector plugin (called when SCIP copies plugins)
Definition at line 366 of file cutsel_dynamic.c.
References assert(), CUTSEL_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcutselGetName(), and SCIPincludeCutselDynamic().
|
static |
destructor of cut selector to free user data (called when SCIP is exiting) ! [SnippetCutselFreeDynamic]
Definition at line 381 of file cutsel_dynamic.c.
References NULL, SCIP_OKAY, SCIPcutselGetData(), SCIPcutselSetData(), and SCIPfreeBlockMemory.
|
static |
! [SnippetCutselFreeDynamic] initialization method of cut selector (called after problem was transformed)
Definition at line 397 of file cutsel_dynamic.c.
References assert(), NULL, RANDSEED, SCIP_CALL, SCIP_OKAY, SCIPcreateRandom(), SCIPcutselGetData(), and TRUE.
|
static |
deinitialization method of cut selector (called before transformed problem is freed)
Definition at line 411 of file cutsel_dynamic.c.
References assert(), NULL, SCIP_OKAY, SCIPcutselGetData(), and SCIPfreeRandom().
|
static |
cut selection method of cut selector
Definition at line 426 of file cutsel_dynamic.c.
References assert(), NULL, result, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPcutselGetData(), SCIPgetDepth(), and SCIPselectCutsDynamic().