Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for cut selectors

Author
Felipe Serrano
Mark Turner

Definition in file cutsel.c.

#include <assert.h>
#include "scip/set.h"
#include "scip/clock.h"
#include "scip/paramset.h"
#include "scip/scip.h"
#include "scip/cutsel.h"
#include "scip/struct_cutsel.h"

Go to the source code of this file.

Functions

static SCIP_DECL_PARAMCHGD (paramChgdCutselPriority)
 
static SCIP_RETCODE doCutselCreate (SCIP_CUTSEL **cutsel, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
 
SCIP_RETCODE SCIPcutselCreate (SCIP_CUTSEL **cutsel, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
 
const char * SCIPcutselGetName (SCIP_CUTSEL *cutsel)
 
SCIP_RETCODE SCIPcutselsSelect (SCIP_SET *set, SCIP_ROW **cuts, int ncuts, int nforcedcuts, SCIP_Bool root, SCIP_Bool initiallp, int maxnselectedcuts, int *nselectedcuts)
 
const char * SCIPcutselGetDesc (SCIP_CUTSEL *cutsel)
 
SCIP_RETCODE SCIPcutselCopyInclude (SCIP_CUTSEL *cutsel, SCIP_SET *set)
 
SCIP_RETCODE SCIPcutselFree (SCIP_CUTSEL **cutsel, SCIP_SET *set)
 
SCIP_RETCODE SCIPcutselInit (SCIP_CUTSEL *cutsel, SCIP_SET *set)
 
SCIP_RETCODE SCIPcutselExit (SCIP_CUTSEL *cutsel, SCIP_SET *set)
 
SCIP_RETCODE SCIPcutselInitsol (SCIP_CUTSEL *cutsel, SCIP_SET *set)
 
SCIP_RETCODE SCIPcutselExitsol (SCIP_CUTSEL *cutsel, SCIP_SET *set)
 
SCIP_CUTSELDATASCIPcutselGetData (SCIP_CUTSEL *cutsel)
 
void SCIPcutselSetData (SCIP_CUTSEL *cutsel, SCIP_CUTSELDATA *cutseldata)
 
int SCIPcutselGetPriority (SCIP_CUTSEL *cutsel)
 
void SCIPcutselEnableOrDisableClocks (SCIP_CUTSEL *cutsel, SCIP_Bool enable)
 
void SCIPcutselSetCopy (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
 
void SCIPcutselSetFree (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
 
void SCIPcutselSetInit (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
 
void SCIPcutselSetExit (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
 
void SCIPcutselSetInitsol (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINITSOL((*cutselinitsol)))
 
void SCIPcutselSetExitsol (SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)))
 
void SCIPcutselSetPriority (SCIP_CUTSEL *cutsel, SCIP_SET *set, int priority)
 
SCIP_Bool SCIPcutselIsInitialized (SCIP_CUTSEL *cutsel)
 
SCIP_Real SCIPcutselGetSetupTime (SCIP_CUTSEL *cutsel)
 
SCIP_Real SCIPcutselGetTime (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNCalls (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNRootCalls (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNRootCuts (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNRootForcedCuts (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNRootCutsFiltered (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNLocalCuts (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNLocalForcedCuts (SCIP_CUTSEL *cutsel)
 
SCIP_Longint SCIPcutselGetNLocalCutsFiltered (SCIP_CUTSEL *cutsel)
 
 SCIP_DECL_SORTPTRCOMP (SCIPcutselComp)
 

Function Documentation

◆ SCIP_DECL_PARAMCHGD()

static SCIP_DECL_PARAMCHGD ( paramChgdCutselPriority  )
static

method to call, when the priority of a cut selector was changed

Definition at line 47 of file cutsel.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetCutselPriority().

◆ doCutselCreate()

static SCIP_RETCODE doCutselCreate ( SCIP_CUTSEL **  cutsel,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
const char *  name,
const char *  desc,
int  priority,
SCIP_DECL_CUTSELCOPY((*cutselcopy))  ,
SCIP_DECL_CUTSELFREE((*cutselfree))  ,
SCIP_DECL_CUTSELINIT((*cutselinit))  ,
SCIP_DECL_CUTSELEXIT((*cutselexit))  ,
SCIP_DECL_CUTSELINITSOL((*cutselinitsol))  ,
SCIP_DECL_CUTSELEXITSOL((*cutselexitsol))  ,
SCIP_DECL_CUTSELSELECT((*cutselselect))  ,
SCIP_CUTSELDATA cutseldata 
)
static

internal method for creating a cut selector

Parameters
cutselpointer to store cut selector
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of cut selector
descdescription of cut selector
prioritypriority of the cut selector
cutseldatacut selector data

Definition at line 62 of file cutsel.c.

References BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), and SCIPsnprintf().

Referenced by SCIPcutselCreate().

◆ SCIPcutselCreate()

SCIP_RETCODE SCIPcutselCreate ( SCIP_CUTSEL **  cutsel,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
const char *  name,
const char *  desc,
int  priority,
SCIP_DECL_CUTSELCOPY((*cutselcopy))  ,
SCIP_DECL_CUTSELFREE((*cutselfree))  ,
SCIP_DECL_CUTSELINIT((*cutselinit))  ,
SCIP_DECL_CUTSELEXIT((*cutselexit))  ,
SCIP_DECL_CUTSELINITSOL((*cutselinitsol))  ,
SCIP_DECL_CUTSELEXITSOL((*cutselexitsol))  ,
SCIP_DECL_CUTSELSELECT((*cutselselect))  ,
SCIP_CUTSELDATA cutseldata 
)

creates a cut selector

Parameters
cutselpointer to store cut selector
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of cut selector
descdescription of cut selector
prioritypriority of the cut selector in standard mode
cutseldatacut selector data

Definition at line 128 of file cutsel.c.

References doCutselCreate(), NULL, SCIP_CALL_FINALLY, SCIP_OKAY, and SCIPcutselFree().

Referenced by SCIPincludeCutsel(), and SCIPincludeCutselBasic().

◆ SCIPcutselsSelect()

SCIP_RETCODE SCIPcutselsSelect ( SCIP_SET set,
SCIP_ROW **  cuts,
int  ncuts,
int  nforcedcuts,
SCIP_Bool  root,
SCIP_Bool  initiallp,
int  maxnselectedcuts,
int *  nselectedcuts 
)

calls cut selectors to select cuts

Parameters
setglobal SCIP settings
cutsarray with cuts to select from
ncutslength of cuts
nforcedcutsnumber of forced cuts at start of given array
rootare we at the root node?
initiallpis the separation storage currently being filled with the initial LP rows?
maxnselectedcutsmaximum number of cuts to be selected
nselectedcutspointer to return number of selected cuts

Definition at line 169 of file cutsel.c.

References SCIP_Cutsel::cutseltime, MIN, SCIP_Cutsel::ncalls, SCIP_Cutsel::nlocalcutsfiltered, SCIP_Cutsel::nlocalcutsforced, SCIP_Cutsel::nlocalcutsselected, SCIP_Cutsel::nrootcalls, SCIP_Cutsel::nrootcutsfiltered, SCIP_Cutsel::nrootcutsforced, SCIP_Cutsel::nrootcutsselected, NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPclockStart(), SCIPclockStop(), and SCIPsetSortCutsels().

Referenced by SCIPsepastoreApplyCuts().

◆ SCIPcutselCopyInclude()

SCIP_RETCODE SCIPcutselCopyInclude ( SCIP_CUTSEL cutsel,
SCIP_SET set 
)

copies the given cut selector to a new scip

Parameters
cutselcut selector
setSCIP_SET of SCIP to copy to

Definition at line 255 of file cutsel.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcutselGetName(), and SCIPsetDebugMsg.

Referenced by SCIPsetCopyPlugins().

◆ SCIPcutselFree()

SCIP_RETCODE SCIPcutselFree ( SCIP_CUTSEL **  cutsel,
SCIP_SET set 
)

frees memory of cut selector

Parameters
cutselpointer to cut selector data structure
setglobal SCIP settings

Definition at line 273 of file cutsel.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().

Referenced by SCIPcutselCreate().

◆ SCIPcutselInit()

SCIP_RETCODE SCIPcutselInit ( SCIP_CUTSEL cutsel,
SCIP_SET set 
)

initializes cut selector

Parameters
cutselcut selector
setglobal SCIP settings

Definition at line 304 of file cutsel.c.

References SCIP_Cutsel::cutseltime, SCIP_Cutsel::initialized, SCIP_Cutsel::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Cutsel::setuptime, and TRUE.

Referenced by SCIPsetIncludeExternalCode().

◆ SCIPcutselExit()

SCIP_RETCODE SCIPcutselExit ( SCIP_CUTSEL cutsel,
SCIP_SET set 
)

deinitializes cut selector

Parameters
cutselcut selector
setglobal SCIP settings

Definition at line 341 of file cutsel.c.

References FALSE, SCIP_Cutsel::initialized, SCIP_Cutsel::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Cutsel::setuptime.

Referenced by SCIPsetInitPlugins().

◆ SCIPcutselInitsol()

SCIP_RETCODE SCIPcutselInitsol ( SCIP_CUTSEL cutsel,
SCIP_SET set 
)

informs cut selector that the branch and bound process is being started

Parameters
cutselcut selector
setglobal SCIP settings

Definition at line 371 of file cutsel.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Cutsel::setuptime.

Referenced by SCIPsetExitprePlugins().

◆ SCIPcutselExitsol()

SCIP_RETCODE SCIPcutselExitsol ( SCIP_CUTSEL cutsel,
SCIP_SET set 
)

informs cut selector that the branch and bound process is being started

Parameters
cutselcut selector
setglobal SCIP settings

Definition at line 395 of file cutsel.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Cutsel::setuptime.

Referenced by SCIPsetInitsolPlugins().

◆ SCIPcutselEnableOrDisableClocks()

void SCIPcutselEnableOrDisableClocks ( SCIP_CUTSEL cutsel,
SCIP_Bool  enable 
)

enables or disables all clocks of cutsel, depending on the value of the flag

Parameters
cutselthe cut selector for which all clocks should be enabled or disabled
enableshould the clocks of the cut selector be enabled?

Definition at line 450 of file cutsel.c.

References SCIP_Cutsel::cutseltime, NULL, SCIPclockEnableOrDisable(), and SCIP_Cutsel::setuptime.

◆ SCIPcutselSetCopy()

void SCIPcutselSetCopy ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELCOPY((*cutselcopy))   
)

sets copy method of cut selector

Parameters
cutselcut selector

Definition at line 465 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselCopy().

◆ SCIPcutselSetFree()

void SCIPcutselSetFree ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELFREE((*cutselfree))   
)

sets destructor method of cut selector

Parameters
cutselcut selector

Definition at line 476 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselFree().

◆ SCIPcutselSetInit()

void SCIPcutselSetInit ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELINIT((*cutselinit))   
)

sets initialization method of cut selector

Parameters
cutselcut selector

Definition at line 487 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselInit().

◆ SCIPcutselSetExit()

void SCIPcutselSetExit ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELEXIT((*cutselexit))   
)

sets deinitialization method of cut selector

Parameters
cutselcut selector

Definition at line 498 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselExit().

◆ SCIPcutselSetInitsol()

void SCIPcutselSetInitsol ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELINITSOL((*cutselinitsol))   
)

sets solving process initialization method of cut selector

Parameters
cutselcut selector

Definition at line 509 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselInitsol().

◆ SCIPcutselSetExitsol()

void SCIPcutselSetExitsol ( SCIP_CUTSEL cutsel,
SCIP_DECL_CUTSELEXITSOL((*cutselexitsol))   
)

sets solving process deinitialization method of cut selector

Parameters
cutselcut selector

Definition at line 520 of file cutsel.c.

References NULL.

Referenced by SCIPsetCutselExitsol().

◆ SCIPcutselSetPriority()

void SCIPcutselSetPriority ( SCIP_CUTSEL cutsel,
SCIP_SET set,
int  priority 
)

sets priority of cut selector

Parameters
cutselcut selector
setglobal SCIP settings
prioritynew priority of the cut selector

Definition at line 531 of file cutsel.c.

References FALSE, NULL, and SCIP_Cutsel::priority.

Referenced by SCIPsetCutselPriority().