flower-inequality separator
Definition in file sepa_flower.c.
#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 | |
| 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) | |
| static SCIP_RETCODE | separateStandard (SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, int maxnsepa, SCIP_RESULT *presult) |
| separate missing inequalities from the standard relaxation | |
| 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. | |
| 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) |
| #define SEPA_NAME "flower" |
Definition at line 42 of file sepa_flower.c.
| #define SEPA_DESC "flower cut separator" |
Definition at line 43 of file sepa_flower.c.
| #define SEPA_PRIORITY 100000 |
Definition at line 44 of file sepa_flower.c.
| #define SEPA_FREQ 1 |
Definition at line 45 of file sepa_flower.c.
| #define SEPA_MAXBOUNDDIST 1.0 |
Definition at line 46 of file sepa_flower.c.
| #define SEPA_USESSUBSCIP FALSE |
does the separator use a secondary SCIP instance?
Definition at line 47 of file sepa_flower.c.
| #define SEPA_DELAY FALSE |
should separation method be delayed if other separators found cuts?
Definition at line 48 of file sepa_flower.c.
| #define DEFAULT_MIN_OVERLAPS 1 |
Definition at line 50 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_SCAN_AND TRUE |
Definition at line 51 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_SCAN_PRODUCT FALSE |
Definition at line 52 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_MAX_STANDARD 0 |
Definition at line 53 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_MAX_ONEFLOWER 10000000 |
Definition at line 54 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_MAX_TWOFLOWER 10000000 |
Definition at line 55 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_DELAY_STANDARD FALSE |
Definition at line 56 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_MAX_USELESS_ONEFLOWER 1 |
Number of useless separation rounds after which we stop separating.
Definition at line 57 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
| #define DEFAULT_MAX_USELESS_TWOFLOWER 1 |
Number of useless separation rounds after which we stop separating.
Definition at line 58 of file sepa_flower.c.
Referenced by SCIPincludeSepaFlower().
|
static |
constructs the hypergraph from transformed problem
| scip | SCIP data structure. |
| sepadata | Sepadata. |
Definition at line 135 of file sepa_flower.c.
References assert(), c, constructHypergraph(), FALSE, i, NULL, nvars, SCIP_CALL, SCIP_ERROR, SCIP_EXPRITER_DFS, SCIP_EXPRITER_ENTEREXPR, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPconshdlrGetConss(), SCIPconshdlrGetNConss(), SCIPcreateClock(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPexpriterSetStagesDFS(), SCIPfindConshdlr(), SCIPfreeBlockMemoryArray, SCIPfreeClock(), SCIPfreeExpriter(), SCIPgetClockTime(), SCIPgetCoefExprProduct(), SCIPgetExprAuxVarNonlinear(), SCIPgetExprNonlinear(), SCIPgetMessagehdlr(), SCIPgetNVars(), SCIPgetNVarsAnd(), SCIPgetResultantAnd(), SCIPgetVarsAnd(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), SCIPhypergraphAddEdge(), SCIPhypergraphAddVertex(), SCIPhypergraphComputeOverlaps(), SCIPhypergraphComputeOverlapsEdges(), SCIPhypergraphComputeVerticesEdges(), SCIPhypergraphCreate(), SCIPhypergraphGetNEdges(), SCIPhypergraphGetNOverlaps(), SCIPhypergraphGetNVertices(), SCIPhypergraphIsValid(), SCIPisExprProduct(), SCIPisLT(), SCIPmessagePrintInfo(), SCIPreallocBlockMemoryArray, SCIPstartClock(), SCIPvarGetLbGlobal(), sepadata, and vars.
Referenced by constructHypergraph(), and separate().
|
static |
| scip | SCIP data structure. |
| sepa | Separator. |
| sol | Solution to be separated. |
Definition at line 340 of file sepa_flower.c.
References assert(), i, MAX, MIN, NULL, prepareSeparation(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcreateClock(), SCIPdebugMsg, SCIPfeastol(), SCIPfreeClock(), SCIPgetClockTime(), SCIPgetLPObjval(), SCIPgetSolVal(), SCIPhypergraphEdgeData(), SCIPhypergraphEdgeSize(), SCIPhypergraphEdgesOverlapsBeyond(), SCIPhypergraphEdgesOverlapsFirst(), SCIPhypergraphEdgesOverlapsGetAtIndex(), SCIPhypergraphEdgeVertices(), SCIPhypergraphGetNEdges(), SCIPhypergraphGetNOverlaps(), SCIPhypergraphGetNVertices(), SCIPhypergraphOverlapData(), SCIPhypergraphOverlapSize(), SCIPhypergraphOverlapVertices(), SCIPhypergraphVertexData(), SCIPisGE(), SCIPsepaGetData(), SCIPsolGetOrigObj(), SCIPstartClock(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), sepadata, and sol.
Referenced by prepareSeparation(), and separate().
|
static |
add a generated cut row to the cut pool (for the root node) or as a row (otherwise)
| scip | SCIP datastructure. |
| sol | Solution. |
| row | Cutting plane. |
| pnumseparated | Pointer to store number of separated cuts. |
| presult | Pointer to store result. |
| padded | Pointer for storing whether it was added. |
Definition at line 471 of file sepa_flower.c.
References addCut(), assert(), FALSE, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_SEPARATED, SCIPaddPoolCut(), SCIPaddRow(), SCIPgetDepth(), SCIPisCutEfficacious(), sol, and TRUE.
|
static |
separate missing inequalities from the standard relaxation
| scip | SCIP datastructure. |
| sepa | Separator. |
| sol | Solution to be separated. |
| maxnsepa | Maximum number of separated inequalities. |
| presult | Pointer to store result. |
Definition at line 514 of file sepa_flower.c.
References addCut(), assert(), FALSE, i, 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(), sepadata, separateStandard(), sol, TRUE, and vars.
Referenced by separate(), and separateStandard().
|
static |
| scip | SCIP data structure. |
| sepa | Separator. |
| sol | Solution to be separated. |
| maxnsepa | Maximum number of separated inequalities. |
| presult | Pointer to store result. |
Definition at line 721 of file sepa_flower.c.
References addCut(), assert(), FALSE, i, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPcreateClock(), SCIPcreateRowSepa(), SCIPdebugMessage, SCIPflushRowExtensions(), SCIPfreeClock(), SCIPgetClockTime(), SCIPgetDepth(), SCIPhypergraphEdgeData(), SCIPhypergraphEdgeSize(), SCIPhypergraphEdgesOverlapsBeyond(), SCIPhypergraphEdgesOverlapsFirst(), SCIPhypergraphEdgesOverlapsGetAtIndex(), SCIPhypergraphEdgeVertices(), SCIPhypergraphGetNEdges(), SCIPhypergraphOverlapData(), SCIPhypergraphOverlapSize(), SCIPhypergraphOverlapVertices(), SCIPhypergraphVertexData(), SCIPinfinity(), SCIPisEfficacious(), SCIPreleaseRow(), SCIPsepaGetData(), SCIPsnprintf(), SCIPstartClock(), sepadata, separateOneFlower(), sol, and TRUE.
Referenced by separate(), and separateOneFlower().
|
static |
| scip | SCIP datastructure. |
| sepa | Separator. |
| sol | Solution to be separated. |
| maxnsepa | Maximum number of separated inequalities. |
| presult | Pointer to store result. |
Definition at line 1033 of file sepa_flower.c.
References addCut(), assert(), FALSE, i, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPcreateClock(), SCIPcreateRowSepa(), SCIPdebugMessage, SCIPflushRowExtensions(), SCIPfreeClock(), SCIPgetClockTime(), SCIPgetDepth(), SCIPhypergraphEdgeData(), SCIPhypergraphEdgeSize(), SCIPhypergraphEdgesOverlapsBeyond(), SCIPhypergraphEdgesOverlapsFirst(), SCIPhypergraphEdgesOverlapsGetAtIndex(), SCIPhypergraphEdgeVertices(), SCIPhypergraphGetNEdges(), SCIPhypergraphOverlapData(), SCIPhypergraphOverlapsDisjoint(), SCIPhypergraphOverlapSize(), SCIPhypergraphOverlapVertices(), SCIPhypergraphVertexData(), SCIPinfinity(), SCIPisEfficacious(), SCIPreleaseRow(), SCIPsepaGetData(), SCIPsnprintf(), SCIPstartClock(), sepadata, separateTwoFlower(), sol, and TRUE.
Referenced by separate(), and separateTwoFlower().
|
static |
Main separation function.
| scip | SCIP data structure. |
| sepa | Separator. |
| sol | Solution to be separated (or NULL for the LP solution). |
| result | Pointer for storing the result. |
Definition at line 1219 of file sepa_flower.c.
References assert(), constructHypergraph(), NULL, prepareSeparation(), result, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, SCIPdebugMsg, SCIPgetCurrentNode(), SCIPgetNRuns(), SCIPgetSubscipDepth(), SCIPhypergraphFree(), SCIPhypergraphGetNOverlaps(), SCIPsepaGetData(), sepadata, separateOneFlower(), separateStandard(), separateTwoFlower(), and sol.
Referenced by SCIP_DECL_SEPAEXECLP(), and SCIP_DECL_SEPAEXECSOL().
|
static |
copy method for separator plugins (called when SCIP copies plugins)
Definition at line 1336 of file sepa_flower.c.
References assert(), NULL, SCIP_CALL, SCIP_DECL_SEPACOPY, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STRINGEQ, SCIPincludeSepaFlower(), SCIPsepaGetName(), and SEPA_NAME.
|
static |
Destructor of separator to free user data (called when SCIP is exiting).
Definition at line 1351 of file sepa_flower.c.
References assert(), NULL, SCIP_DECL_SEPAFREE, SCIP_OKAY, SCIPfreeBlockMemory, SCIPsepaGetData(), SCIPsepaSetData(), and sepadata.
|
static |
Initialization method of separator (called after problem was transformed).
Definition at line 1368 of file sepa_flower.c.
References assert(), SCIP_DECL_SEPAINIT, SCIP_OKAY, SCIPsepaGetData(), and sepadata.
|
static |
solving process deinitialization method of separator (called before branch and bound process data is freed)
Definition at line 1383 of file sepa_flower.c.
References assert(), NULL, SCIP_CALL, SCIP_DECL_SEPAEXITSOL, SCIP_OKAY, SCIPgetSubscipDepth(), SCIPhypergraphFree(), SCIPsepaGetData(), and sepadata.
|
static |
LP solution separation method of separator.
Definition at line 1403 of file sepa_flower.c.
References NULL, result, SCIP_CALL, SCIP_DECL_SEPAEXECLP, SCIP_OKAY, and separate().
|
static |
arbitrary primal solution separation method of separator
Definition at line 1413 of file sepa_flower.c.
References result, SCIP_CALL, SCIP_DECL_SEPAEXECSOL, SCIP_OKAY, separate(), and sol.