Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

hybrid cut selector

Author
Leona Gottwald
Felipe Serrano
Mark Turner

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)
 

Macro Definition Documentation

◆ CUTSEL_NAME

#define CUTSEL_NAME   "hybrid"

Definition at line 35 of file cutsel_hybrid.c.

Referenced by SCIP_DECL_CUTSELCOPY(), and SCIPincludeCutselHybrid().

◆ CUTSEL_DESC

#define CUTSEL_DESC   "weighted sum of efficacy, dircutoffdist, objparal, and intsupport"

Definition at line 36 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ CUTSEL_PRIORITY

#define CUTSEL_PRIORITY   8000

Definition at line 37 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ RANDSEED

#define RANDSEED   0x5EED

Definition at line 39 of file cutsel_hybrid.c.

Referenced by SCIP_DECL_CUTSELINIT().

◆ GOODSCORE

#define GOODSCORE   0.9

Definition at line 40 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ BADSCORE

#define BADSCORE   0.0

Definition at line 41 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_EFFICACYWEIGHT

#define DEFAULT_EFFICACYWEIGHT   1.0

weight of efficacy in score calculation

Definition at line 43 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_DIRCUTOFFDISTWEIGHT

#define DEFAULT_DIRCUTOFFDISTWEIGHT   0.0

weight of directed cutoff distance in score calculation

Definition at line 44 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_OBJPARALWEIGHT

#define DEFAULT_OBJPARALWEIGHT   0.1

weight of objective parallelism in score calculation

Definition at line 45 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_INTSUPPORTWEIGHT

#define DEFAULT_INTSUPPORTWEIGHT   0.1

weight of integral support in cut score calculation

Definition at line 46 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_MINORTHO

#define DEFAULT_MINORTHO   0.90

minimal orthogonality for a cut to enter the LP

Definition at line 47 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

◆ DEFAULT_MINORTHOROOT

#define DEFAULT_MINORTHOROOT   0.90

minimal orthogonality for a cut to enter the LP in the root node

Definition at line 48 of file cutsel_hybrid.c.

Referenced by SCIPincludeCutselHybrid().

Function Documentation

◆ scoring()

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

returns the maximum score of cuts; if scores is not NULL, then stores the individual score of each cut in scores

Parameters
scipSCIP data structure
cutsarray with cuts to score
randnumgenrandom number generator for tie-breaking, or NULL
dircutoffdistweightweight of directed cutoff distance in cut score calculation
efficacyweightweight of efficacy in cut score calculation
objparalweightweight of objective parallelism in cut score calculation
intsupportweightweight of integral support in cut score calculation
ncutsnumber of cuts in cuts array
scoresarray to store the score of cuts or NULL

Definition at line 76 of file cutsel_hybrid.c.

References MAX, NULL, SCIP_Real, SCIPgetBestSol(), SCIPgetCutEfficacy(), SCIPgetCutLPSolCutoffDistance(), SCIPgetRowNumIntCols(), SCIPgetRowObjParallelism(), SCIPrandomGetReal(), SCIProwGetNNonz(), SCIProwIsInGlobalCutpool(), and SCIProwIsLocal().

Referenced by SCIPselectCutsHybrid().

◆ selectBestCut()

static void selectBestCut ( SCIP_ROW **  cuts,
SCIP_Real scores,
int  ncuts 
)
static

move the cut with the highest score to the first position in the array; there must be at least one cut

Parameters
cutsarray with cuts to perform selection algorithm
scoresarray with scores of cuts to perform selection algorithm
ncutsnumber of cuts in given array

Definition at line 192 of file cutsel_hybrid.c.

References NULL, SCIP_Real, SCIPswapPointers(), and SCIPswapReals().

Referenced by SCIPselectCutsHybrid().

◆ filterWithParallelism()

static int filterWithParallelism ( SCIP_ROW cut,
SCIP_ROW **  cuts,
SCIP_Real scores,
int  ncuts,
SCIP_Real  goodscore,
SCIP_Real  goodmaxparall,
SCIP_Real  maxparall 
)
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
cutcut to filter orthogonality with
cutsarray with cuts to perform selection algorithm
scoresarray with scores of cuts to perform selection algorithm
ncutsnumber of cuts in given array
goodscorethreshold for the score to be considered a good cut
goodmaxparallmaximal parallelism for good cuts
maxparallmaximal parallelism for all cuts that are not good

Definition at line 225 of file cutsel_hybrid.c.

References NULL, SCIP_Real, SCIProwGetParallelism(), SCIPswapPointers(), and SCIPswapReals().

Referenced by SCIPselectCutsHybrid().

◆ SCIP_DECL_CUTSELCOPY()

static SCIP_DECL_CUTSELCOPY ( cutselCopyHybrid  )
static

copy method for cut selector plugin (called when SCIP copies plugins)

Definition at line 268 of file cutsel_hybrid.c.

References CUTSEL_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcutselGetName(), and SCIPincludeCutselHybrid().

◆ SCIP_DECL_CUTSELFREE()

static SCIP_DECL_CUTSELFREE ( cutselFreeHybrid  )
static

destructor of cut selector to free user data (called when SCIP is exiting) ! [SnippetCutselFreeHybrid]

Definition at line 283 of file cutsel_hybrid.c.

References NULL, SCIP_OKAY, SCIPcutselGetData(), SCIPcutselSetData(), and SCIPfreeBlockMemory.

◆ SCIP_DECL_CUTSELINIT()

static SCIP_DECL_CUTSELINIT ( cutselInitHybrid  )
static

! [SnippetCutselFreeHybrid] initialization method of cut selector (called after problem was transformed)

Definition at line 299 of file cutsel_hybrid.c.

References NULL, RANDSEED, SCIP_CALL, SCIP_OKAY, SCIPcreateRandom(), SCIPcutselGetData(), and TRUE.

◆ SCIP_DECL_CUTSELEXIT()

static SCIP_DECL_CUTSELEXIT ( cutselExitHybrid  )
static

deinitialization method of cut selector (called before transformed problem is freed)

Definition at line 313 of file cutsel_hybrid.c.

References NULL, SCIP_OKAY, SCIPcutselGetData(), and SCIPfreeRandom().

◆ SCIP_DECL_CUTSELSELECT()

static SCIP_DECL_CUTSELSELECT ( cutselSelectHybrid  )
static

cut selection method of cut selector

Definition at line 328 of file cutsel_hybrid.c.

References MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPcutselGetData(), and SCIPselectCutsHybrid().