Detailed Descriptionflow cover cuts separator Definition in file sepa_flowcover.c. #include <assert.h> #include <string.h> #include "scip/sepa_flowcover.h" #include "scip/cons_knapsack.h" #include "scip/pub_misc.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 32 of file sepa_flowcover.c.
Definition at line 33 of file sepa_flowcover.c.
Definition at line 34 of file sepa_flowcover.c.
Definition at line 35 of file sepa_flowcover.c.
Definition at line 36 of file sepa_flowcover.c.
does the separator use a secondary SCIP instance? Definition at line 37 of file sepa_flowcover.c.
should separation method be delayed, if other separators found cuts? Definition at line 38 of file sepa_flowcover.c.
maximal number of separation rounds per node (-1: unlimited) Definition at line 40 of file sepa_flowcover.c.
maximal number of separation rounds in the root node (-1: unlimited) Definition at line 41 of file sepa_flowcover.c.
maximal number of rows to separate flow cover cuts for per separation round (-1: unlimited) Definition at line 42 of file sepa_flowcover.c.
maximal number of rows to separate flow cover cuts for per separation round in the root (-1: unlimited) Definition at line 45 of file sepa_flowcover.c.
maximal number of consecutive fails to generate a cut per separation round (-1: unlimited) Definition at line 48 of file sepa_flowcover.c.
maximal number of consecutive fails to generate a cut per separation round in the root (-1: unlimited) Definition at line 51 of file sepa_flowcover.c.
maximal number of flow cover cuts separated per separation round Definition at line 54 of file sepa_flowcover.c.
maximal number of flow cover cuts separated per separation round in the root Definition at line 55 of file sepa_flowcover.c.
maximal slack of rows to separate flow cover cuts for Definition at line 56 of file sepa_flowcover.c.
maximal slack of rows to separate flow cover cuts for in the root Definition at line 57 of file sepa_flowcover.c.
weight of slack in the scoring of the rows Definition at line 58 of file sepa_flowcover.c.
maximal density of rows to separate flow cover cuts for Definition at line 59 of file sepa_flowcover.c.
should generated cuts be removed from the LP if they are no longer tight? Definition at line 60 of file sepa_flowcover.c.
cut generation heuristic: maximal number of different deltas to try Definition at line 61 of file sepa_flowcover.c.
should flow cover cuts be separated for 0-1 single node flow set with reversed arcs in addition? Definition at line 62 of file sepa_flowcover.c.
Definition at line 64 of file sepa_flowcover.c. Referenced by constructSNFRelaxation(), and cutGenerationHeuristic().
Definition at line 65 of file sepa_flowcover.c. Referenced by constructSNFRelaxation(), cutGenerationHeuristic(), getBoundsForSubstitution(), and separateCuts().
Definition at line 66 of file sepa_flowcover.c. Referenced by separateCuts().
Definition at line 68 of file sepa_flowcover.c. Referenced by cutGenerationHeuristic().
Definition at line 69 of file sepa_flowcover.c. Referenced by cutGenerationHeuristic().
Definition at line 70 of file sepa_flowcover.c. Referenced by cutGenerationHeuristic().
Definition at line 71 of file sepa_flowcover.c. Referenced by getFlowCover().
Definition at line 72 of file sepa_flowcover.c. Referenced by getFlowCover().
Definition at line 73 of file sepa_flowcover.c. Referenced by getFlowCover().
Definition at line 74 of file sepa_flowcover.c. Referenced by getFlowCover().
Definition at line 75 of file sepa_flowcover.c. Referenced by getFlowCover().
maximal length of base inequality Definition at line 77 of file sepa_flowcover.c. Referenced by cutGenerationHeuristic().
maximal absolute coefficient in variable bounds used for snf relaxation Definition at line 78 of file sepa_flowcover.c. Referenced by getClosestVlb(), and getClosestVub().
maximal value of normal bounds used for snf relaxation Definition at line 79 of file sepa_flowcover.c. Referenced by getClosestLb(), and getClosestUb(). Function Documentation
get LP solution value and index of variable lower bound (with binary variable) which is closest to the current LP solution value of a given variable; candidates have to meet certain criteria in order to ensure the nonnegativity of the variable upper bound imposed on the real variable in the 0-1 single node flow relaxation associated with the given variable
Definition at line 121 of file sepa_flowcover.c. References FALSE, getClosestVub(), MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGT(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPvarGetNVlbs(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarIsActive(), SCIPvarIsBinary(), and TRUE. Referenced by constructSNFRelaxation().
get LP solution value and index of variable upper bound (with binary variable) which is closest to the current LP solution value of a given variable; candidates have to meet certain criteria in order to ensure the nonnegativity of the variable upper bound imposed on the real variable in the 0-1 single node flow relaxation associated with the given variable
Definition at line 239 of file sepa_flowcover.c. References FALSE, getClosestLb(), MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), SCIPvarIsBinary(), and TRUE. Referenced by constructSNFRelaxation(), and getClosestVlb().
return global or local lower bound of given variable whichever is closer to the variables current LP solution value
Definition at line 352 of file sepa_flowcover.c. References getClosestUb(), MAXBOUND, NULL, SCIP_Bool, SCIP_Real, SCIPinfinity(), SCIPisGT(), SCIPvarGetLbGlobal(), and SCIPvarGetLbLocal(). Referenced by constructSNFRelaxation(), getBoundsForSubstitution(), and getClosestVub().
return global or local upper bound of given variable whichever is closer to the variables current LP solution value
Definition at line 385 of file sepa_flowcover.c. References constructSNFRelaxation(), MAXBOUND, NULL, SCIP_Real, SCIPinfinity(), SCIPisLT(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal(). Referenced by constructSNFRelaxation(), getBoundsForSubstitution(), and getClosestLb().
construct a 0-1 single node flow relaxation (with some additional simple constraints) of a mixed integer set corresponding to the given row lhs <= a * x + const <= rhs; depending on the given values rowweight and scale the mixed integer set which should be used is defined by the mixed integer constraint a * (x,y) <= rhs - const if (rowweight = 1, scale = 1) or (rowweight = -1, scale = -1, rhs < infinity)
Definition at line 425 of file sepa_flowcover.c. References ALLOWLOCAL, BMSclearMemoryArray, BOUNDSWITCH, FALSE, getClosestLb(), getClosestUb(), getClosestVlb(), getClosestVub(), NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPcolGetVar(), SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetNLPNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIPsolveKnapsackApproximatelyLT(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsBinary(), and TRUE. Referenced by getClosestUb(), and separateCuts().
solve knapsack problem in maximization form with "<" constraint approximately by greedy; if needed, one can provide arrays to store all selected items and all not selected items
Definition at line 1017 of file sepa_flowcover.c. References isIntegralScalar(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasGE(), SCIPisFeasLT(), SCIPisInfinity(), and SCIPsortDownRealRealRealInt(). Referenced by constructSNFRelaxation(), and getFlowCover().
checks, whether the given scalar scales the given value to an integral number with error in the given bounds
Definition at line 1089 of file sepa_flowcover.c. References getIntegralVal(), SCIP_Longint, SCIP_Real, and SCIPrelDiff(). Referenced by getFlowCover(), and SCIPsolveKnapsackApproximatelyLT().
get integral number with error in the bounds which corresponds to given value scaled by a given scalar; should be used in connection with isIntegralScalar()
Definition at line 1114 of file sepa_flowcover.c. References buildFlowCover(), SCIP_Longint, SCIP_Real, and SCIPrelDiff(). Referenced by getFlowCover(), and isIntegralScalar().
build the flow cover which corresponds to the given exact or approximate solution of KP^SNF; given unfinished flow cover contains variables which have been fixed in advance
Definition at line 1143 of file sepa_flowcover.c. References getFlowCover(), NULL, and SCIP_Real. Referenced by getFlowCover(), and getIntegralVal().
get a flow cover (C1, C2) for a given 0-1 single node flow set {(x,y) in {0,1}^n x R^n : sum_{j in N1} y_j - sum_{j in N2} y_j <= b, 0 <= y_j <= u_j x_j}, i.e., get sets C1 subset N1 and C2 subset N2 with sum_{j in C1} u_j - sum_{j in C2} u_j = b + lambda and lambda > 0
Definition at line 1219 of file sepa_flowcover.c. References BMSclearMemoryArray, buildFlowCover(), FALSE, getIntegralVal(), getL1L2(), isIntegralScalar(), MAXDELTA, MAXDNOM, MAXDYNPROGSPACE, MAXSCALE, MIN, MINDELTA, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIPallocBufferArray, SCIPcalcIntegralScalar(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisIntegral(), SCIPsolveKnapsackApproximatelyLT(), SCIPsolveKnapsackExactly(), and TRUE. Referenced by buildFlowCover(), and separateCuts().
for a given flow cover and a given value of delta, choose L1 subset N1 \ C1 and L2 subset N2 \ C2 by comparison such that the violation of the resulting c-MIRFCI is maximized.
Definition at line 1600 of file sepa_flowcover.c. References getBoundsForSubstitution(), NULL, SCIP_Real, SCIPdebugMessage, SCIPfloor(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), SCIPisGE(), SCIPisGT(), and SCIPisSumLE(). Referenced by cutGenerationHeuristic(), and getFlowCover().
get for all problem variables with nonzero coefficient in current row the bound which should be used for the substitution routine in the c-MIR routine; this bound depends on the bound used for each variable to get associated variable in transformed problem
Definition at line 1707 of file sepa_flowcover.c. References ALLOWLOCAL, getClosestLb(), getClosestUb(), NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_OKAY, SCIP_Real, SCIPisInfinity(), SCIPvarGetProbindex(), SCIPvarIsBinary(), and storeCutInArrays(). Referenced by cutGenerationHeuristic(), and getL1L2().
stores nonzero elements of dense coefficient vector as sparse vector, and calculates activity and norm
Definition at line 1811 of file sepa_flowcover.c. References addCut(), MAX, NULL, REALABS, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPerrorMessage, and SCIPisZero(). Referenced by addCut(), and getBoundsForSubstitution().
adds given cut to LP if violated
Definition at line 1919 of file sepa_flowcover.c. References calcEfficacy(), FALSE, MAKECONTINTEGRAL, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddPoolCut(), SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPcreateEmptyRowSepa(), SCIPdebug, SCIPdebugMessage, SCIPepsilon(), SCIPfreeBufferArray, SCIPgetCutEfficacy(), SCIPgetNLPs(), SCIPgetRowMaxCoef(), SCIPgetRowMinCoef(), SCIPinfinity(), SCIPisCutEfficacious(), SCIPisEfficacious(), SCIPisPositive(), SCIPmakeRowIntegral(), SCIPprintRow(), SCIPreleaseRow(), SCIProwChgRank(), SCIProwGetRank(), SCIPsnprintf(), SCIPsumepsilon(), storeCutInArrays(), and TRUE. Referenced by cutGenerationHeuristic(), and storeCutInArrays().
calculates efficacy of the given cut
Definition at line 2023 of file sepa_flowcover.c. References cutGenerationHeuristic(), MAX, NULL, and SCIP_Real. Referenced by addCut(), and cutGenerationHeuristic().
Definition at line 2044 of file sepa_flowcover.c. References addCut(), ALLOWLOCAL, BMScopyMemoryArray, BOUNDSWITCH, calcEfficacy(), FALSE, FIXINTEGRALRHS, getBoundsForSubstitution(), getL1L2(), MAX, MAXAGGRLEN, MAXFRAC, MIN, MINFRAC, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_SORTINDCOMP(), SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPallocBufferArray, SCIPcalcMIR(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPisEfficacious(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisFeasGT(), SCIPisFeasLE(), SCIPisInfinity(), SCIPisZero(), and TRUE. Referenced by calcEfficacy(), and separateCuts().
comparison method for scores of lp rows Definition at line 2330 of file sepa_flowcover.c. Referenced by cutGenerationHeuristic().
search and add flowcover cuts that separate the given primal solution
Definition at line 2350 of file sepa_flowcover.c. References ALLOWLOCAL, BMSclearMemoryArray, constructSNFRelaxation(), cutGenerationHeuristic(), DENSSCORE, FALSE, getFlowCover(), MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_SEPACOPY(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPallocBufferArray, SCIPdebug, SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetCharParam(), SCIPgetDepth(), SCIPgetLPRowsData(), SCIPgetNSepaRounds(), SCIPgetNVars(), SCIPgetObjNorm(), SCIPgetRowSolActivity(), SCIPgetSolVals(), SCIPgetVars(), SCIPisFeasGT(), SCIPisInfinity(), SCIPisLE(), SCIPisPositive(), SCIPisStopped(), SCIPprintRow(), SCIProwGetDualsol(), SCIProwGetLhs(), SCIProwGetLPPos(), SCIProwGetName(), SCIProwGetNLPNonz(), SCIProwGetNorm(), SCIProwGetRhs(), SCIProwIsLocal(), SCIPsepaGetData(), SCIPsepaGetNCallsAtNode(), SCIPsortInd(), and TRUE.
copy method for separator plugins (called when SCIP copies plugins) Definition at line 2697 of file sepa_flowcover.c. Referenced by separateCuts().
destructor of separator to free user data (called when SCIP is exiting) Definition at line 2711 of file sepa_flowcover.c.
LP solution separation method of separator Definition at line 2729 of file sepa_flowcover.c.
arbitrary primal solution separation method of separator Definition at line 2754 of file sepa_flowcover.c.
creates the flowcover separator and includes it in SCIP
Definition at line 2770 of file sepa_flowcover.c. Referenced by SCIPincludeDefaultPlugins(). |