Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

flower-inequality separator

Author
Matthias Walter

Definition in file sepa_flower.c.

#include <assert.h>
#include "scip/sepa_flower.h"
#include "scip/cons_and.h"
#include "scip/cons_nonlinear.h"
#include "scip/struct_scip.h"
#include "scip/struct_set.h"
#include "scip/set.h"
#include "scip/hypergraph.h"

Go to the source code of this file.

Macros

#define SEPA_NAME   "flower"
 
#define SEPA_DESC   "flower cut separator"
 
#define SEPA_PRIORITY   100000
 
#define SEPA_FREQ   1
 
#define SEPA_MAXBOUNDDIST   1.0
 
#define SEPA_USESSUBSCIP   FALSE
 
#define SEPA_DELAY   FALSE
 
#define DEFAULT_MIN_OVERLAPS   1
 
#define DEFAULT_SCAN_AND   TRUE
 
#define DEFAULT_SCAN_PRODUCT   FALSE
 
#define DEFAULT_MAX_STANDARD   0
 
#define DEFAULT_MAX_ONEFLOWER   10000000
 
#define DEFAULT_MAX_TWOFLOWER   10000000
 
#define DEFAULT_DELAY_STANDARD   FALSE
 
#define DEFAULT_MAX_USELESS_ONEFLOWER   1
 
#define DEFAULT_MAX_USELESS_TWOFLOWER   1
 

Functions

static SCIP_RETCODE constructHypergraph (SCIP *scip, SCIP_SEPADATA *sepadata)
 constructs the hypergraph from transformed problem More...
 
static SCIP_RETCODE prepareSeparation (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol)
 
static SCIP_RETCODE addCut (SCIP *scip, SCIP_SOL *sol, SCIP_ROW *row, int *pnumseparated, SCIP_RESULT *presult, SCIP_Bool *padded)
 add a generated cut row to the cut pool (for the root node) or as a row (otherwise) More...
 
static SCIP_RETCODE separateStandard (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, int maxnsepa, SCIP_RESULT *presult)
 separate missing inequalities from the standard relaxation More...
 
static SCIP_RETCODE separateOneFlower (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, int maxnsepa, SCIP_RESULT *presult)
 
static SCIP_RETCODE separateTwoFlower (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, int maxnsepa, SCIP_RESULT *presult)
 
static SCIP_RETCODE separate (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
 Main separation function. More...
 
static SCIP_DECL_SEPACOPY (sepaCopyFlower)
 
static SCIP_DECL_SEPAFREE (sepaFreeFlower)
 
static SCIP_DECL_SEPAINIT (sepaInitFlower)
 
static SCIP_DECL_SEPAEXITSOL (sepaExitsolFlower)
 
static SCIP_DECL_SEPAEXECLP (sepaExeclpFlower)
 
static SCIP_DECL_SEPAEXECSOL (sepaExecsolFlower)
 
SCIP_RETCODE SCIPincludeSepaFlower (SCIP *scip)
 

Macro Definition Documentation

◆ SEPA_NAME

#define SEPA_NAME   "flower"

Definition at line 44 of file sepa_flower.c.

◆ SEPA_DESC

#define SEPA_DESC   "flower cut separator"

Definition at line 45 of file sepa_flower.c.

◆ SEPA_PRIORITY

#define SEPA_PRIORITY   100000

Definition at line 46 of file sepa_flower.c.

◆ SEPA_FREQ

#define SEPA_FREQ   1

Definition at line 47 of file sepa_flower.c.

◆ SEPA_MAXBOUNDDIST

#define SEPA_MAXBOUNDDIST   1.0

Definition at line 48 of file sepa_flower.c.

◆ SEPA_USESSUBSCIP

#define SEPA_USESSUBSCIP   FALSE

does the separator use a secondary SCIP instance?

Definition at line 49 of file sepa_flower.c.

◆ SEPA_DELAY

#define SEPA_DELAY   FALSE

should separation method be delayed if other separators found cuts?

Definition at line 50 of file sepa_flower.c.

◆ DEFAULT_MIN_OVERLAPS

#define DEFAULT_MIN_OVERLAPS   1

Definition at line 52 of file sepa_flower.c.

◆ DEFAULT_SCAN_AND

#define DEFAULT_SCAN_AND   TRUE

Definition at line 53 of file sepa_flower.c.

◆ DEFAULT_SCAN_PRODUCT

#define DEFAULT_SCAN_PRODUCT   FALSE

Definition at line 54 of file sepa_flower.c.

◆ DEFAULT_MAX_STANDARD

#define DEFAULT_MAX_STANDARD   0

Definition at line 55 of file sepa_flower.c.

◆ DEFAULT_MAX_ONEFLOWER

#define DEFAULT_MAX_ONEFLOWER   10000000

Definition at line 56 of file sepa_flower.c.

◆ DEFAULT_MAX_TWOFLOWER

#define DEFAULT_MAX_TWOFLOWER   10000000

Definition at line 57 of file sepa_flower.c.

◆ DEFAULT_DELAY_STANDARD

#define DEFAULT_DELAY_STANDARD   FALSE

Definition at line 58 of file sepa_flower.c.

◆ DEFAULT_MAX_USELESS_ONEFLOWER

#define DEFAULT_MAX_USELESS_ONEFLOWER   1

Number of useless separation rounds after which we stop separating.

Definition at line 59 of file sepa_flower.c.

◆ DEFAULT_MAX_USELESS_TWOFLOWER

#define DEFAULT_MAX_USELESS_TWOFLOWER   1

Number of useless separation rounds after which we stop separating.

Definition at line 60 of file sepa_flower.c.

Function Documentation

◆ constructHypergraph()

static SCIP_RETCODE constructHypergraph ( SCIP scip,
SCIP_SEPADATA sepadata 
)
static

◆ prepareSeparation()

◆ addCut()

static SCIP_RETCODE addCut ( SCIP scip,
SCIP_SOL sol,
SCIP_ROW row,
int *  pnumseparated,
SCIP_RESULT presult,
SCIP_Bool padded 
)
static

add a generated cut row to the cut pool (for the root node) or as a row (otherwise)

Parameters
scipSCIP datastructure.
solSolution.
rowCutting plane.
pnumseparatedPointer to store number of separated cuts.
presultPointer to store result.
paddedPointer for storing whether it was added.

Definition at line 473 of file sepa_flower.c.

References FALSE, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_SEPARATED, SCIPaddPoolCut(), SCIPaddRow(), SCIPgetDepth(), SCIPisCutEfficacious(), and TRUE.

Referenced by separateOneFlower(), separateStandard(), and separateTwoFlower().

◆ separateStandard()

static SCIP_RETCODE separateStandard ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SOL sol,
int  maxnsepa,
SCIP_RESULT presult 
)
static

separate missing inequalities from the standard relaxation

Parameters
scipSCIP datastructure.
sepaSeparator.
solSolution to be separated.
maxnsepaMaximum number of separated inequalities.
presultPointer to store result.

Definition at line 516 of file sepa_flower.c.

References addCut(), FALSE, NULL, SCIP_CALL, SCIP_CUTOFF, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarsToRow(), SCIPcreateClock(), SCIPcreateEmptyRowSepa(), SCIPdebugMessage, SCIPfreeClock(), SCIPgetClockTime(), SCIPgetDepth(), SCIPhypergraphEdgeData(), SCIPhypergraphEdgeSize(), SCIPhypergraphEdgeVertices(), SCIPhypergraphGetNEdges(), SCIPhypergraphVertexData(), SCIPinfinity(), SCIPisEfficacious(), SCIPreleaseRow(), SCIPsepaGetData(), SCIPsnprintf(), SCIPstartClock(), and TRUE.

Referenced by separate().

◆ separateOneFlower()

◆ separateTwoFlower()

◆ separate()

static SCIP_RETCODE separate ( SCIP scip,
SCIP_SEPA sepa,
SCIP_SOL sol,
SCIP_RESULT result 
)
static

Main separation function.

Parameters
scipSCIP data structure.
sepaSeparator.
solSolution to be separated (or NULL for the LP solution).
resultPointer for storing the result.

Definition at line 1221 of file sepa_flower.c.

References constructHypergraph(), NULL, prepareSeparation(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, SCIPdebugMsg, SCIPgetCurrentNode(), SCIPgetNRuns(), SCIPgetSubscipDepth(), SCIPhypergraphFree(), SCIPhypergraphGetNOverlaps(), SCIPsepaGetData(), separateOneFlower(), separateStandard(), and separateTwoFlower().

Referenced by copyConsPseudoboolean(), createAndAddAndCons(), createAndAddLinearCons(), createBinaryConstraint(), createCipFormulation(), createCons(), createConsCumulative(), createConsSetppc(), createConsXorIntvar(), createIndicatorConstraint(), createNormalizedKnapsack(), createNormalizedLogicor(), createNormalizedSetppc(), extractGates(), getConstraint(), orbisackUpgrade(), priceAndCutLoop(), readConstraints(), readConstraintsRational(), readIndicators(), readObjective(), readQMatrix(), readRows(), readRowsExact(), readSOS(), readSos(), readSOScons(), SCIP_DECL_CONFLICTEXEC(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_SEPAEXECLP(), SCIP_DECL_SEPAEXECSOL(), SCIPconsCopy(), SCIPconsCreate(), SCIPconsParse(), SCIPconsSetSeparated(), SCIPcopyConsExactLinear(), SCIPcopyConsLinear(), SCIPcreateCons(), SCIPcreateConsAnd(), SCIPcreateConsBounddisjunction(), SCIPcreateConsBounddisjunctionRedundant(), SCIPcreateConsCumulative(), SCIPcreateConsExactLinear(), SCIPcreateConsIndicator(), SCIPcreateConsIndicatorGeneric(), SCIPcreateConsIndicatorGenericLinCons(), SCIPcreateConsIndicatorGenericLinConsPure(), SCIPcreateConsIndicatorLinCons(), SCIPcreateConsIndicatorLinConsPure(), SCIPcreateConsKnapsack(), SCIPcreateConsLinear(), SCIPcreateConsLinking(), SCIPcreateConsLogicor(), SCIPcreateConsLOP(), SCIPcreateConsNonlinear(), SCIPcreateConsOptcumulative(), SCIPcreateConsOr(), SCIPcreateConsOrbisack(), SCIPcreateConsOrbitope(), SCIPcreateConsOrbitopeFull(), SCIPcreateConsOrbitopePP(), SCIPcreateConsPseudoboolean(), SCIPcreateConsPseudobooleanWithConss(), SCIPcreateConsQuadraticNonlinear(), SCIPcreateConsSetcover(), SCIPcreateConsSetpack(), SCIPcreateConsSetpart(), SCIPcreateConsSOS1(), SCIPcreateConsSOS2(), tsp::SCIPcreateConsSubtour(), SCIPcreateConsSuperindicator(), SCIPcreateConsSymresack(), SCIPcreateConsVarbound(), SCIPcreateConsXor(), SCIPcreateSymbreakCons(), SCIPgetConsCopy(), SCIPparseCons(), and SCIPsetConsSeparated().

◆ SCIP_DECL_SEPACOPY()

static SCIP_DECL_SEPACOPY ( sepaCopyFlower  )
static

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

Definition at line 1338 of file sepa_flower.c.

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

◆ SCIP_DECL_SEPAFREE()

static SCIP_DECL_SEPAFREE ( sepaFreeFlower  )
static

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

Definition at line 1352 of file sepa_flower.c.

References NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPsepaGetData(), and SCIPsepaSetData().

◆ SCIP_DECL_SEPAINIT()

static SCIP_DECL_SEPAINIT ( sepaInitFlower  )
static

Initialization method of separator (called after problem was transformed).

Definition at line 1369 of file sepa_flower.c.

References SCIP_OKAY, and SCIPsepaGetData().

◆ SCIP_DECL_SEPAEXITSOL()

static SCIP_DECL_SEPAEXITSOL ( sepaExitsolFlower  )
static

solving process deinitialization method of separator (called before branch and bound process data is freed)

Definition at line 1384 of file sepa_flower.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetSubscipDepth(), SCIPhypergraphFree(), and SCIPsepaGetData().

◆ SCIP_DECL_SEPAEXECLP()

static SCIP_DECL_SEPAEXECLP ( sepaExeclpFlower  )
static

LP solution separation method of separator.

Definition at line 1404 of file sepa_flower.c.

References NULL, SCIP_CALL, SCIP_OKAY, and separate().

◆ SCIP_DECL_SEPAEXECSOL()

static SCIP_DECL_SEPAEXECSOL ( sepaExecsolFlower  )
static

arbitrary primal solution separation method of separator

Definition at line 1414 of file sepa_flower.c.

References SCIP_CALL, SCIP_OKAY, and separate().