Scippy

SCIP

Solving Constraint Integer Programs

sepa_gomory.c File Reference

Detailed Description

Gomory MIR Cuts.

Author
Tobias Achterberg
Stefan Heinz
Domenico Salvagnin
Marc Pfetsch

Definition in file sepa_gomory.c.

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

Go to the source code of this file.

Macros

#define SEPA_NAME   "gomory"
 
#define SEPA_DESC   "Gomory MIR cuts separator"
 
#define SEPA_PRIORITY   -1000
 
#define SEPA_FREQ   0
 
#define SEPA_MAXBOUNDDIST   0.0
 
#define SEPA_USESSUBSCIP   FALSE
 
#define SEPA_DELAY   FALSE
 
#define DEFAULT_MAXROUNDS   5
 
#define DEFAULT_MAXROUNDSROOT   10
 
#define DEFAULT_MAXSEPACUTS   50
 
#define DEFAULT_MAXSEPACUTSROOT   200
 
#define DEFAULT_MAXRANK   3
 
#define DEFAULT_MAXRANKINTEGRAL   -1
 
#define DEFAULT_DYNAMICCUTS   TRUE
 
#define DEFAULT_MAXWEIGHTRANGE   1e+04
 
#define DEFAULT_AWAY   0.01
 
#define DEFAULT_MAKEINTEGRAL   TRUE
 
#define DEFAULT_FORCECUTS   TRUE
 
#define DEFAULT_SEPARATEROWS   TRUE
 
#define DEFAULT_DELAYEDCUTS   TRUE
 
#define DEFAULT_SIDETYPEBASIS   FALSE
 
#define DEFAULT_RANDSEED   53
 
#define BOUNDSWITCH   0.9999
 
#define USEVBDS   TRUE
 
#define ALLOWLOCAL   TRUE
 
#define FIXINTEGRALRHS   FALSE
 
#define MAKECONTINTEGRAL   FALSE
 
#define MAXAGGRLEN(nvars)   (0.1*(nvars)+1000)
 

Functions

static SCIP_RETCODE evaluateCutNumerics (SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_ROW *cut, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Bool *useful)
 
static SCIP_DECL_SEPACOPY (sepaCopyGomory)
 
static SCIP_DECL_SEPAFREE (sepaFreeGomory)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpGomory)
 
SCIP_RETCODE SCIPincludeSepaGomory (SCIP *scip)
 

Macro Definition Documentation

◆ SEPA_NAME

#define SEPA_NAME   "gomory"

Max y Subject to c1: -x + y <= 1 c2: 2x + 3y <= 12 c3: 3x + 2y <= 12 Bounds 0 <= x 0 <= y General x y END

Definition at line 56 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPACOPY(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAFREE(), and SCIPincludeSepaGomory().

◆ SEPA_DESC

#define SEPA_DESC   "Gomory MIR cuts separator"

Definition at line 57 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ SEPA_PRIORITY

#define SEPA_PRIORITY   -1000

Definition at line 58 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ SEPA_FREQ

#define SEPA_FREQ   0

Definition at line 59 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ SEPA_MAXBOUNDDIST

#define SEPA_MAXBOUNDDIST   0.0

Definition at line 60 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ SEPA_USESSUBSCIP

#define SEPA_USESSUBSCIP   FALSE

does the separator use a secondary SCIP instance?

Definition at line 61 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ SEPA_DELAY

#define SEPA_DELAY   FALSE

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

Definition at line 62 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXROUNDS

#define DEFAULT_MAXROUNDS   5

maximal number of gomory separation rounds per node (-1: unlimited)

Definition at line 64 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXROUNDSROOT

#define DEFAULT_MAXROUNDSROOT   10

maximal number of gomory separation rounds in the root node (-1: unlimited)

Definition at line 65 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXSEPACUTS

#define DEFAULT_MAXSEPACUTS   50

maximal number of gomory cuts separated per separation round

Definition at line 66 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXSEPACUTSROOT

#define DEFAULT_MAXSEPACUTSROOT   200

maximal number of gomory cuts separated per separation round in root node

Definition at line 67 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXRANK

#define DEFAULT_MAXRANK   3

maximal rank of a gomory cut that could not be scaled to integral coefficients (-1: unlimited)

Definition at line 68 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXRANKINTEGRAL

#define DEFAULT_MAXRANKINTEGRAL   -1

maximal rank of a gomory cut that could be scaled to integral coefficients (-1: unlimited)

Definition at line 69 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_DYNAMICCUTS

#define DEFAULT_DYNAMICCUTS   TRUE

should generated cuts be removed from the LP if they are no longer tight?

Definition at line 70 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAXWEIGHTRANGE

#define DEFAULT_MAXWEIGHTRANGE   1e+04

maximal valid range max(|weights|)/min(|weights|) of row weights

Definition at line 71 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_AWAY

#define DEFAULT_AWAY   0.01

minimal integrality violation of a basis variable in order to try Gomory cut

Definition at line 72 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_MAKEINTEGRAL

#define DEFAULT_MAKEINTEGRAL   TRUE

try to scale all cuts to integral coefficients

Definition at line 73 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_FORCECUTS

#define DEFAULT_FORCECUTS   TRUE

if conversion to integral coefficients failed still consider the cut

Definition at line 74 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_SEPARATEROWS

#define DEFAULT_SEPARATEROWS   TRUE

separate rows with integral slack

Definition at line 75 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_DELAYEDCUTS

#define DEFAULT_DELAYEDCUTS   TRUE

should cuts be added to the delayed cut pool?

Definition at line 76 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_SIDETYPEBASIS

#define DEFAULT_SIDETYPEBASIS   FALSE

choose side types of row (lhs/rhs) based on basis information?

Definition at line 77 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ DEFAULT_RANDSEED

#define DEFAULT_RANDSEED   53

initial random seed

Definition at line 78 of file sepa_gomory.c.

Referenced by SCIPincludeSepaGomory().

◆ BOUNDSWITCH

#define BOUNDSWITCH   0.9999

threshold for bound switching - see SCIPcalcMIR()

Definition at line 80 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ USEVBDS

#define USEVBDS   TRUE

use variable bounds - see SCIPcalcMIR()

Definition at line 81 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ ALLOWLOCAL

#define ALLOWLOCAL   TRUE

allow to generate local cuts - see SCIPcalcMIR()

Definition at line 82 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ FIXINTEGRALRHS

#define FIXINTEGRALRHS   FALSE

try to generate an integral rhs - see SCIPcalcMIR()

Definition at line 83 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ MAKECONTINTEGRAL

#define MAKECONTINTEGRAL   FALSE

convert continuous variable to integral variables in SCIPmakeRowIntegral()

Definition at line 84 of file sepa_gomory.c.

Referenced by evaluateCutNumerics().

◆ MAXAGGRLEN

#define MAXAGGRLEN (   nvars)    (0.1*(nvars)+1000)

maximal length of base inequality

Definition at line 86 of file sepa_gomory.c.

Referenced by SCIP_DECL_SEPAEXECLP().

Function Documentation

◆ evaluateCutNumerics()

static SCIP_RETCODE evaluateCutNumerics ( SCIP scip,
SCIP_SEPADATA sepadata,
SCIP_ROW cut,
SCIP_Longint  maxdnom,
SCIP_Real  maxscale,
SCIP_Bool useful 
)
static

returns TRUE if the cut can be taken, otherwise FALSE if there some numerical evidences

Parameters
scipSCIP data structure
sepadatadata of the separator
cutcut to check
maxdnommaximal denominator to use for scaling
maxscalemaximal scaling factor
usefulpointer to store if the cut is useful

Definition at line 113 of file sepa_gomory.c.

References FALSE, MAKECONTINTEGRAL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPepsilon(), SCIPisInfinity(), SCIPmakeRowIntegral(), SCIProwGetRank(), SCIProwGetRhs(), SCIPsumepsilon(), and TRUE.

Referenced by SCIP_DECL_SEPAEXECLP().

◆ SCIP_DECL_SEPACOPY()

static SCIP_DECL_SEPACOPY ( sepaCopyGomory  )
static

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

Definition at line 162 of file sepa_gomory.c.

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

◆ SCIP_DECL_SEPAFREE()

static SCIP_DECL_SEPAFREE ( sepaFreeGomory  )
static

destructor of separator to free user data (called when SCIP is exiting) ! [SnippetSepaFreeGomory]

Definition at line 177 of file sepa_gomory.c.

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

◆ SCIP_DECL_SEPAEXECLP()

static SCIP_DECL_SEPAEXECLP ( sepaExeclpGomory  )
static

! [SnippetSepaFreeGomory] LP solution separation method of separator

Definition at line 201 of file sepa_gomory.c.

References ALLOWLOCAL, BOUNDSWITCH, evaluateCutNumerics(), FALSE, FIXINTEGRALRHS, MAXAGGRLEN, NULL, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_LPSOLSTAT_OPTIMAL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIP_VARTYPE_CONTINUOUS, SCIPaddCut(), SCIPaddDelayedPoolCut(), SCIPaddPoolCut(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPcalcMIR(), SCIPcolGetPrimsol(), SCIPcolGetVar(), SCIPcreateEmptyRowSepa(), SCIPdebugMsg, SCIPfeasFrac(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPgetCutEfficacy(), SCIPgetDepth(), SCIPgetLPBasisInd(), SCIPgetLPBInvRow(), SCIPgetLPColsData(), SCIPgetLPRowsData(), SCIPgetLPSolstat(), SCIPgetMaxDepth(), SCIPgetNCutsFound(), SCIPgetNLPBranchCands(), SCIPgetNLPs(), SCIPgetRowActivity(), SCIPgetRowLPActivity(), SCIPgetRowMaxCoef(), SCIPgetRowMinCoef(), SCIPgetVarsData(), SCIPgetVarSol(), SCIPinfinity(), SCIPisCutEfficacious(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasNegative(), SCIPisInfinity(), SCIPisLPSolBasic(), SCIPisStopped(), SCIPisZero(), SCIPrandomPermuteIntArray(), SCIPreleaseRow(), SCIProwChgRank(), SCIProwGetBasisStatus(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetNorm(), SCIProwGetRhs(), SCIProwIsIntegral(), SCIProwIsModifiable(), SCIPsepaGetData(), SCIPsepaGetName(), SCIPsepaGetNCallsAtNode(), SCIPsepaWasLPDelayed(), SCIPsnprintf(), SCIPvarGetName(), SCIPvarGetType(), SEPA_NAME, TRUE, and USEVBDS.