Scippy

SCIP

Solving Constraint Integer Programs

sepa_impliedbounds.c File Reference

Detailed Description

implied bounds separator

Author
Kati Wolter
Tobias Achterberg

Definition in file sepa_impliedbounds.c.

#include <assert.h>
#include <string.h>
#include "scip/sepa_impliedbounds.h"
#include "scip/pub_misc.h"

Go to the source code of this file.

Macros

#define SEPA_NAME   "impliedbounds"
 
#define SEPA_DESC   "implied bounds separator"
 
#define SEPA_PRIORITY   -50
 
#define SEPA_FREQ   0
 
#define SEPA_MAXBOUNDDIST   0.0
 
#define SEPA_USESSUBSCIP   FALSE
 
#define SEPA_DELAY   FALSE
 
#define RELCUTCOEFMAXRANGE   1.0
 
#define DEFAULT_USETWOSIZECLIQUES   TRUE
 

Functions

static SCIP_RETCODE addCut (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_Real val1, SCIP_VAR *var1, SCIP_Real solval1, SCIP_Real val2, SCIP_VAR *var2, SCIP_Real solval2, SCIP_Real rhs, SCIP_Bool *cutoff, int *ncuts)
 
static SCIP_RETCODE separateCuts (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_Real *solvals, SCIP_VAR **fracvars, SCIP_Real *fracvals, int nfracs, SCIP_Bool *cutoff, int *ncuts)
 
static SCIP_DECL_SEPACOPY (sepaCopyImpliedbounds)
 
static SCIP_DECL_SEPAFREE (sepaFreeImpliedbounds)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpImpliedbounds)
 
static SCIP_DECL_SEPAEXECSOL (sepaExecsolImpliedbounds)
 
SCIP_RETCODE SCIPincludeSepaImpliedbounds (SCIP *scip)
 

Macro Definition Documentation

#define SEPA_NAME   "impliedbounds"
#define SEPA_DESC   "implied bounds separator"

Definition at line 32 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define SEPA_PRIORITY   -50

Definition at line 33 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define SEPA_FREQ   0

Definition at line 34 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define SEPA_MAXBOUNDDIST   0.0

Definition at line 35 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define SEPA_USESSUBSCIP   FALSE

does the separator use a secondary SCIP instance?

Definition at line 36 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define SEPA_DELAY   FALSE

should separation method be delayed, if other separators found cuts?

Definition at line 37 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

#define RELCUTCOEFMAXRANGE   1.0

maximal allowed range of cut coefficients, relative to 1/feastol

Definition at line 39 of file sepa_impliedbounds.c.

Referenced by separateCuts().

#define DEFAULT_USETWOSIZECLIQUES   TRUE

should violated inequalities for cliques with 2 variables be separated?

Definition at line 40 of file sepa_impliedbounds.c.

Referenced by SCIPincludeSepaImpliedbounds().

Function Documentation

static SCIP_RETCODE addCut ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SOL sol,
SCIP_Real  val1,
SCIP_VAR var1,
SCIP_Real  solval1,
SCIP_Real  val2,
SCIP_VAR var2,
SCIP_Real  solval2,
SCIP_Real  rhs,
SCIP_Bool cutoff,
int *  ncuts 
)
static

adds given cut with two variables, if it is violated

Parameters
scipSCIP data structure
sepaseparator
solthe solution that should be separated, or NULL for LP solution
val1given coefficient of first variable
var1given first variable
solval1current LP solution value of first variable
val2given coefficient of second variable
var2given second variable
solval2current LP solution value of second variable
rhsgiven right hand side of the cut to add
cutoffwhether a cutoff has been detected
ncutspointer to update number of cuts added

Definition at line 54 of file sepa_impliedbounds.c.

References FALSE, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddPoolCut(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPcreateEmptyRowSepa(), SCIPdebugMessage, SCIPflushRowExtensions(), SCIPgetNLPs(), SCIPinfinity(), SCIPisEfficacious(), SCIPprintRow(), SCIPreleaseRow(), SCIProwChgRank(), SCIPsnprintf(), and TRUE.

Referenced by separateCuts().

static SCIP_RETCODE separateCuts ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SOL sol,
SCIP_Real solvals,
SCIP_VAR **  fracvars,
SCIP_Real fracvals,
int  nfracs,
SCIP_Bool cutoff,
int *  ncuts 
)
static

searches and adds implied bound cuts that are violated by the given solution value array

Parameters
scipSCIP data structure
sepaseparator
solthe solution that should be separated, or NULL for LP solution
solvalsarray with solution values of all problem variables
fracvarsarray of fractional variables
fracvalssolution values of fractional variables
nfracsnumber of fractional variables
cutoffwhether a cutoff has been detected
ncutspointer to store the number of generated cuts

Definition at line 118 of file sepa_impliedbounds.c.

References addCut(), FALSE, NULL, RELCUTCOEFMAXRANGE, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPcleanupCliques(), SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPcliqueIsEquation(), SCIPdebugMessage, SCIPfeastol(), SCIPgetCliques(), SCIPgetNCliques(), SCIPgetSolVal(), SCIPisGE(), SCIPisLE(), SCIPsepaGetData(), SCIPvarGetImplBounds(), SCIPvarGetImplTypes(), SCIPvarGetImplVars(), SCIPvarGetLbGlobal(), SCIPvarGetNImpls(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by SCIP_DECL_SEPAEXECLP(), and SCIP_DECL_SEPAEXECSOL().

static SCIP_DECL_SEPACOPY ( sepaCopyImpliedbounds  )
static

copy method for separator plugins (called when SCIP copies plugins)

Definition at line 357 of file sepa_impliedbounds.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeSepaImpliedbounds(), SCIPsepaGetName(), and SEPA_NAME.

static SCIP_DECL_SEPAFREE ( sepaFreeImpliedbounds  )
static

destructor of separator to free user data (called when SCIP is exiting)

Definition at line 371 of file sepa_impliedbounds.c.

References NULL, SCIP_OKAY, SCIPfreeMemory, SCIPsepaGetData(), SCIPsepaGetName(), SCIPsepaSetData(), and SEPA_NAME.

static SCIP_DECL_SEPAEXECLP ( sepaExeclpImpliedbounds  )
static
static SCIP_DECL_SEPAEXECSOL ( sepaExecsolImpliedbounds  )
static
SCIP_RETCODE SCIPincludeSepaImpliedbounds ( SCIP scip)

creates the impliedbounds separator and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 517 of file sepa_impliedbounds.c.

References DEFAULT_USETWOSIZECLIQUES, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPallocMemory, SCIPincludeSepaBasic(), SCIPsetSepaCopy(), SCIPsetSepaFree(), SEPA_DELAY, SEPA_DESC, SEPA_FREQ, SEPA_MAXBOUNDDIST, SEPA_NAME, SEPA_PRIORITY, SEPA_USESSUBSCIP, and TRUE.

Referenced by SCIP_DECL_SEPACOPY(), and SCIPincludeDefaultPlugins().