Detailed Description
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) |
Macro Definition Documentation
◆ CUTSEL_NAME
#define CUTSEL_NAME "dynamic" |
Definition at line 43 of file cutsel_dynamic.c.
◆ CUTSEL_DESC
#define CUTSEL_DESC "dynamic orthogonality for hybrid cutsel" |
Definition at line 44 of file cutsel_dynamic.c.
◆ CUTSEL_PRIORITY
#define CUTSEL_PRIORITY 7000 |
Definition at line 45 of file cutsel_dynamic.c.
◆ RANDSEED
#define RANDSEED 0x5EED |
Definition at line 47 of file cutsel_dynamic.c.
◆ DEFAULT_EFFICACYWEIGHT
#define DEFAULT_EFFICACYWEIGHT 1.0 |
weight of efficacy in score calculation
Definition at line 49 of file cutsel_dynamic.c.
◆ DEFAULT_DIRCUTOFFDISTWEIGHT
#define DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 |
weight of directed cutoff distance in score calculation
Definition at line 50 of file cutsel_dynamic.c.
◆ DEFAULT_OBJPARALWEIGHT
#define DEFAULT_OBJPARALWEIGHT 0.0 |
weight of objective parallelism in score calculation
Definition at line 51 of file cutsel_dynamic.c.
◆ DEFAULT_INTSUPPORTWEIGHT
#define DEFAULT_INTSUPPORTWEIGHT 0.0 |
weight of integral support in cut score calculation
Definition at line 52 of file cutsel_dynamic.c.
◆ DEFAULT_MINORTHO
#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.
◆ DEFAULT_MINGAIN
#define DEFAULT_MINGAIN 0.01 |
minimal efficacy gain for a cut to enter the LP
Definition at line 54 of file cutsel_dynamic.c.
◆ DEFAULT_MAXDEPTH
#define DEFAULT_MAXDEPTH (-1) |
maximum depth at which this cutselector is used (-1 : all nodes)
Definition at line 55 of file cutsel_dynamic.c.
◆ DEFAULT_FILTERMODE
#define DEFAULT_FILTERMODE 'd' |
filtering strategy during cut selection ( 'd'ynamic- and 'f'ull dynamic parallelism)
Definition at line 57 of file cutsel_dynamic.c.
Function Documentation
◆ scoring()
|
static |
returns the maximum score of cuts; if scores is not NULL, then stores the individual score of each cut in scores
- Parameters
-
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 MAX, NULL, SCIP_Real, SCIPgetBestSol(), SCIPgetCutEfficacy(), SCIPgetCutLPSolCutoffDistance(), SCIPgetRowNumIntCols(), SCIPgetRowObjParallelism(), SCIPisLE(), SCIPrandomGetReal(), SCIProwGetNNonz(), SCIProwIsInGlobalCutpool(), SCIProwIsLocal(), SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsDynamic().
◆ computeProjectionScore()
|
static |
compute projectioncut score for cuts from a given bestcut.
- Parameters
-
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().
◆ selectBestCut()
move the cut with the highest score to the first position in the array; there must be at least one cut
- Parameters
-
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 NULL, SCIP_Real, SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsDynamic().
◆ filterWithDynamicParallelism()
|
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
- Parameters
-
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 MAX, NULL, SCIP_Bool, SCIP_Real, SCIPdebugMsg, SCIPgetCutEfficacy(), SCIPisGE(), SCIPisGT(), SCIProwGetParallelism(), SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsDynamic().
◆ SCIP_DECL_CUTSELCOPY()
|
static |
copy method for cut selector plugin (called when SCIP copies plugins)
Definition at line 366 of file cutsel_dynamic.c.
References CUTSEL_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcutselGetName(), and SCIPincludeCutselDynamic().
◆ SCIP_DECL_CUTSELFREE()
|
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.
◆ SCIP_DECL_CUTSELINIT()
|
static |
! [SnippetCutselFreeDynamic] initialization method of cut selector (called after problem was transformed)
Definition at line 397 of file cutsel_dynamic.c.
References NULL, RANDSEED, SCIP_CALL, SCIP_OKAY, SCIPcreateRandom(), SCIPcutselGetData(), and TRUE.
◆ SCIP_DECL_CUTSELEXIT()
|
static |
deinitialization method of cut selector (called before transformed problem is freed)
Definition at line 411 of file cutsel_dynamic.c.
References NULL, SCIP_OKAY, SCIPcutselGetData(), and SCIPfreeRandom().
◆ SCIP_DECL_CUTSELSELECT()
|
static |
cut selection method of cut selector
Definition at line 426 of file cutsel_dynamic.c.
References NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPcutselGetData(), SCIPgetDepth(), and SCIPselectCutsDynamic().