hybrid cut selector
Definition in file cutsel_hybrid.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_hybrid.h"Go to the source code of this file.
Macros | |
| #define | CUTSEL_NAME "hybrid" |
| #define | CUTSEL_DESC "weighted sum of efficacy, dircutoffdist, objparal, and intsupport" |
| #define | CUTSEL_PRIORITY 8000 |
| #define | RANDSEED 0x5EED |
| #define | GOODSCORE 0.9 |
| #define | BADSCORE 0.0 |
| #define | DEFAULT_EFFICACYWEIGHT 1.0 |
| #define | DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 |
| #define | DEFAULT_OBJPARALWEIGHT 0.1 |
| #define | DEFAULT_INTSUPPORTWEIGHT 0.1 |
| #define | DEFAULT_MINORTHO 0.90 |
| #define | DEFAULT_MINORTHOROOT 0.90 |
Functions | |
| static SCIP_Real | scoring (SCIP *scip, SCIP_ROW **cuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, SCIP_Real *scores) |
| static void | selectBestCut (SCIP_ROW **cuts, SCIP_Real *scores, int ncuts) |
| static int | filterWithParallelism (SCIP_ROW *cut, SCIP_ROW **cuts, SCIP_Real *scores, int ncuts, SCIP_Real goodscore, SCIP_Real goodmaxparall, SCIP_Real maxparall) |
| static | SCIP_DECL_CUTSELCOPY (cutselCopyHybrid) |
| static | SCIP_DECL_CUTSELFREE (cutselFreeHybrid) |
| static | SCIP_DECL_CUTSELINIT (cutselInitHybrid) |
| static | SCIP_DECL_CUTSELEXIT (cutselExitHybrid) |
| static | SCIP_DECL_CUTSELSELECT (cutselSelectHybrid) |
| SCIP_RETCODE | SCIPincludeCutselHybrid (SCIP *scip) |
| SCIP_RETCODE | SCIPselectCutsHybrid (SCIP *scip, SCIP_ROW **cuts, SCIP_ROW **forcedcuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real goodscorefac, SCIP_Real badscorefac, SCIP_Real goodmaxparall, 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 "hybrid" |
Definition at line 44 of file cutsel_hybrid.c.
| #define CUTSEL_DESC "weighted sum of efficacy, dircutoffdist, objparal, and intsupport" |
Definition at line 45 of file cutsel_hybrid.c.
| #define CUTSEL_PRIORITY 8000 |
Definition at line 46 of file cutsel_hybrid.c.
| #define RANDSEED 0x5EED |
Definition at line 48 of file cutsel_hybrid.c.
| #define GOODSCORE 0.9 |
Definition at line 49 of file cutsel_hybrid.c.
Referenced by SCIPincludeCutselHybrid().
| #define BADSCORE 0.0 |
Definition at line 50 of file cutsel_hybrid.c.
Referenced by SCIPincludeCutselHybrid().
| #define DEFAULT_EFFICACYWEIGHT 1.0 |
weight of efficacy in score calculation
Definition at line 52 of file cutsel_hybrid.c.
| #define DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 |
weight of directed cutoff distance in score calculation
Definition at line 53 of file cutsel_hybrid.c.
| #define DEFAULT_OBJPARALWEIGHT 0.1 |
weight of objective parallelism in score calculation
Definition at line 54 of file cutsel_hybrid.c.
| #define DEFAULT_INTSUPPORTWEIGHT 0.1 |
weight of integral support in cut score calculation
Definition at line 55 of file cutsel_hybrid.c.
| #define DEFAULT_MINORTHO 0.90 |
minimal orthogonality for a cut to enter the LP
Definition at line 56 of file cutsel_hybrid.c.
| #define DEFAULT_MINORTHOROOT 0.90 |
minimal orthogonality for a cut to enter the LP in the root node
Definition at line 57 of file cutsel_hybrid.c.
Referenced by SCIPincludeCutselHybrid().
|
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 |
| ncuts | number of cuts in cuts array |
| scores | array to store the score of cuts or NULL |
Definition at line 85 of file cutsel_hybrid.c.
References i, MAX, NULL, SCIP_Real, SCIPgetBestSol(), SCIPgetCutEfficacy(), SCIPgetCutLPSolCutoffDistance(), SCIPgetRowNumIntCols(), SCIPgetRowObjParallelism(), SCIPrandomGetReal(), SCIProwGetNNonz(), SCIProwIsInGlobalCutpool(), SCIProwIsLocal(), and sol.
Referenced by SCIPselectCutsHybrid().
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 201 of file cutsel_hybrid.c.
References assert(), i, NULL, SCIP_Real, SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsHybrid().
|
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
| cut | cut to filter orthogonality with |
| 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 |
| goodscore | threshold for the score to be considered a good cut |
| goodmaxparall | maximal parallelism for good cuts |
| maxparall | maximal parallelism for all cuts that are not good |
Definition at line 234 of file cutsel_hybrid.c.
References assert(), i, NULL, SCIP_Real, SCIProwGetParallelism(), SCIPswapPointers(), and SCIPswapReals().
Referenced by SCIPselectCutsHybrid().
|
static |
copy method for cut selector plugin (called when SCIP copies plugins)
Definition at line 277 of file cutsel_hybrid.c.
References assert(), CUTSEL_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcutselGetName(), and SCIPincludeCutselHybrid().
|
static |
destructor of cut selector to free user data (called when SCIP is exiting) ! [SnippetCutselFreeHybrid]
Definition at line 292 of file cutsel_hybrid.c.
References NULL, SCIP_OKAY, SCIPcutselGetData(), SCIPcutselSetData(), and SCIPfreeBlockMemory.
|
static |
! [SnippetCutselFreeHybrid] initialization method of cut selector (called after problem was transformed)
Definition at line 308 of file cutsel_hybrid.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 322 of file cutsel_hybrid.c.
References assert(), NULL, SCIP_OKAY, SCIPcutselGetData(), and SCIPfreeRandom().
|
static |
cut selection method of cut selector
Definition at line 337 of file cutsel_hybrid.c.
References assert(), MAX, NULL, result, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPcutselGetData(), and SCIPselectCutsHybrid().