cons_knapsack.c File Reference Detailed DescriptionConstraint handler for knapsack constraints of the form , x binary and . Definition in file cons_knapsack.c. #include <assert.h> #include <string.h> #include <limits.h> #include <stdio.h> #include <ctype.h> #include "scip/cons_knapsack.h" #include "scip/cons_linear.h" #include "scip/cons_logicor.h" #include "scip/cons_setppc.h" #include "scip/pub_misc.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 39 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSEXITSOL(), SCIP_DECL_LINCONSUPGD(), SCIPcreateConsKnapsack(), and SCIPseparateRelaxedKnapsack().
Definition at line 40 of file cons_knapsack.c.
priority of the constraint handler for separation Definition at line 41 of file cons_knapsack.c.
priority of the constraint handler for constraint enforcing Definition at line 42 of file cons_knapsack.c.
priority of the constraint handler for checking feasibility Definition at line 43 of file cons_knapsack.c.
frequency for separating cuts; zero means to separate only in the root node Definition at line 44 of file cons_knapsack.c.
frequency for propagating domains; zero means only preprocessing propagation Definition at line 45 of file cons_knapsack.c.
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only Definition at line 46 of file cons_knapsack.c.
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 49 of file cons_knapsack.c.
should separation method be delayed, if other separators found cuts? Definition at line 50 of file cons_knapsack.c.
should propagation method be delayed, if other propagators found reductions? Definition at line 51 of file cons_knapsack.c.
should the constraint handler be skipped, if no constraints are available? Definition at line 52 of file cons_knapsack.c.
Definition at line 54 of file cons_knapsack.c.
Definition at line 55 of file cons_knapsack.c.
Definition at line 57 of file cons_knapsack.c.
Definition at line 58 of file cons_knapsack.c.
priority of the constraint handler for upgrading of linear constraints Definition at line 60 of file cons_knapsack.c.
maximal number of items in knapsack where clique information is used Definition at line 66 of file cons_knapsack.c. Referenced by tightenWeights().
maximal number of items to store in the zero list in preprocessing Definition at line 67 of file cons_knapsack.c. Referenced by insertZerolist().
maximal allowed rounding distance for scaling in knapsack relaxation Definition at line 69 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
maximal allowed denominator in knapsack rational relaxation Definition at line 70 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
maximal allowed scaling factor in knapsack rational relaxation Definition at line 71 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
multiplier on separation frequency, how often knapsack cuts are separated Definition at line 73 of file cons_knapsack.c.
maximal number of separation rounds per node (-1: unlimited) Definition at line 74 of file cons_knapsack.c.
maximal number of separation rounds in the root node (-1: unlimited) Definition at line 75 of file cons_knapsack.c.
maximal number of cuts separated per separation round Definition at line 76 of file cons_knapsack.c.
maximal number of cuts separated per separation round in the root node Definition at line 77 of file cons_knapsack.c.
maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for separating knapsack cuts Definition at line 78 of file cons_knapsack.c.
should disaggregation of knapsack constraints be allowed in preprocessing? Definition at line 81 of file cons_knapsack.c.
should presolving try to simplify knapsacks Definition at line 82 of file cons_knapsack.c.
should negated clique information be used in solving process Definition at line 83 of file cons_knapsack.c.
maximal absolute coefficient in variable bounds used for knapsack relaxation Definition at line 85 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
should lifted minimal cover inequalities using superadditive up-lifting be separated in addition Definition at line 86 of file cons_knapsack.c. Referenced by SCIPseparateKnapsackCuts().
should hash table be used for detecting redundant constraints in advance Definition at line 88 of file cons_knapsack.c.
minimal size of hash table in linear constraint tables Definition at line 89 of file cons_knapsack.c. Referenced by detectRedundantConstraints().
should pairwise constraint comparison be performed in presolving? Definition at line 91 of file cons_knapsack.c.
number for minimal pairwise presolving comparisons Definition at line 92 of file cons_knapsack.c.
minimal gain per minimal pairwise presolving comparisons to repeat pairwise comparison round Definition at line 93 of file cons_knapsack.c.
should dual presolving steps be performed? Definition at line 96 of file cons_knapsack.c.
should presolving try to detect constraints parallel to the objective function defining an upper bound and prevent these constraints from entering the LP Definition at line 97 of file cons_knapsack.c.
should presolving try to detect constraints parallel to the objective function defining a lower bound and prevent these constraints from entering the LP Definition at line 102 of file cons_knapsack.c.
maximal size for which LEWI are iteratively separated by reducing the feasible set Definition at line 108 of file cons_knapsack.c. Referenced by getFeasibleSet().
should GUB information be used for separation? Definition at line 110 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
memory growing value for GUB constraint array Definition at line 111 of file cons_knapsack.c.
should GNC1 GUB conss without F vars be split into GOC1 and GR GUB conss? Definition at line 112 of file cons_knapsack.c.
Definition at line 942 of file cons_knapsack.c. Referenced by SCIPsolveKnapsackExactly().
calculates a partition of the given set of binary variables into cliques; afterwards the output array contains one value for each variable, such that two variables got the same value iff they were assigned to the same clique; the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of the preceding variables was assigned to clique i-1; note: in contrast to SCIPcalcCliquePartition(), variables with LP value 1 are put into trivial cliques (with one variable) and for the remaining variables, a partition with a small number of cliques is constructed Definition at line 2089 of file cons_knapsack.c. Referenced by GUBsetCalcCliquePartition().
Definition at line 9704 of file cons_knapsack.c. Typedef Documentation
Definition at line 218 of file cons_knapsack.c.
Definition at line 230 of file cons_knapsack.c.
Definition at line 242 of file cons_knapsack.c.
Definition at line 252 of file cons_knapsack.c.
Definition at line 264 of file cons_knapsack.c. Enumeration Type Documentation
status of GUB constraint Definition at line 221 of file cons_knapsack.c.
status of variable in GUB constraint Definition at line 233 of file cons_knapsack.c. Function Documentation
comparison method for two sorting key pairs Definition at line 272 of file cons_knapsack.c.
creates event data
Definition at line 291 of file cons_knapsack.c.
frees event data
Definition at line 309 of file cons_knapsack.c.
sorts items in knapsack with nonincreasing weights
Definition at line 323 of file cons_knapsack.c. Referenced by prepareCons(), preprocessConstraintPairs(), propagateCons(), and tightenWeights().
calculates a partition of the variables into cliques
Definition at line 423 of file cons_knapsack.c. Referenced by detectRedundantVars(), propagateCons(), and tightenWeights().
installs rounding locks for the given variable in the given knapsack constraint
Definition at line 453 of file cons_knapsack.c.
removes rounding locks for the given variable in the given knapsack constraint
Definition at line 467 of file cons_knapsack.c.
catches bound change events for variables in knapsack
Definition at line 481 of file cons_knapsack.c. Referenced by consdataCreate().
drops bound change events for variables in knapsack
Definition at line 508 of file cons_knapsack.c.
ensures, that vars and vals arrays can store at least num entries
Definition at line 535 of file cons_knapsack.c.
creates knapsack constraint data
Definition at line 573 of file cons_knapsack.c. References catchEvents(), consdataFree(), FALSE, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPgetTransformedVars(), SCIPisTransformed(), SCIPreallocBlockMemoryArray, SCIPvarGetLbLocal(), SCIPvarGetProbvar(), and SCIPvarGetStatus(). Referenced by SCIPcreateConsKnapsack().
frees knapsack constraint data
Definition at line 698 of file cons_knapsack.c. Referenced by consdataCreate().
changes a single weight in knapsack constraint data
Definition at line 748 of file cons_knapsack.c. Referenced by deleteRedundantVars(), dualWeightsTightening(), simplifyInequalities(), and tightenWeights().
creates LP row corresponding to knapsack constraint
Definition at line 786 of file cons_knapsack.c.
adds linear relaxation of knapsack constraint to the LP
Definition at line 814 of file cons_knapsack.c. Referenced by separateCons().
checks knapsack constraint for feasibility of given solution: returns TRUE iff constraint is feasible
Definition at line 849 of file cons_knapsack.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPincConsAge(), SCIPinfoMessage(), SCIPisFeasGT(), SCIPisHugeValue(), SCIPprintCons(), SCIPresetConsAge(), SCIProwIsInLP(), SCIPvarIsBinary(), and TRUE. Referenced by separateCons().
solves knapsack problem in maximization form exactly using dynamic programming; if needed, one can provide arrays to store all selected items and all not selected items
Definition at line 949 of file cons_knapsack.c. References FALSE, IDX, MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_NOMEMORY, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPcalcGreComDiv(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPfreeMemoryArray, SCIPsolveKnapsackApproximately(), SCIPsortDownRealIntLong(), SCIPsortDownRealLongRealInt(), and TRUE. Referenced by dualPresolving(), getFlowCover(), and getHighestCapacityUsage().
solves knapsack problem in maximization form approximately by solving the LP-relaxation of the problem using Dantzig's method and rounding down the solution; if needed, one can provide arrays to store all selected items and all not selected items
Definition at line 1492 of file cons_knapsack.c. References checkSolveKnapsack(), NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealLongRealInt(). Referenced by getCover(), and SCIPsolveKnapsackExactly().
returns, whether the the arrays transweights, transprofits and items are sorted such that p_1 / w_1 >= p_2 / w_2 >= ... >= p_n / w_n and these arrays are not changed
Definition at line 1563 of file cons_knapsack.c. References FALSE, GUBconsCreate(), SCIP_GUBSet::gubconss, SCIP_GUBCons::gubvars, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_Real, SCIPdebugMessage, SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPvarGetName(), and TRUE. Referenced by getCover(), and SCIPsolveKnapsackApproximately().
creates an empty GUB constraint
Definition at line 1678 of file cons_knapsack.c. Referenced by checkSolveKnapsack(), getLiftingSequenceGUB(), and GUBsetCreate().
frees GUB constraint
Definition at line 1699 of file cons_knapsack.c. Referenced by GUBsetMoveVar().
adds variable to given GUB constraint
Definition at line 1719 of file cons_knapsack.c. Referenced by GUBsetCreate(), and GUBsetMoveVar().
deletes variable from its current GUB constraint
Definition at line 1754 of file cons_knapsack.c. Referenced by GUBsetMoveVar().
moves variable from current GUB constraint to a different existing (nonempty) GUB constraint
Definition at line 1791 of file cons_knapsack.c. References GUBconsAddVar(), GUBconsDelVar(), GUBconsFree(), SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, SCIP_GUBSet::gubconsstatus, GUBsetSwapVars(), SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPvarGetName(). Referenced by getLiftingSequenceGUB().
swaps two variables in the same GUB constraint
Definition at line 1882 of file cons_knapsack.c. Referenced by getLiftingSequenceGUB(), and GUBsetMoveVar().
initializes partition of knapsack variables into nonoverlapping trivial GUB constraints (GUB with one variable)
Definition at line 1922 of file cons_knapsack.c. References GUBconsAddVar(), GUBconsCreate(), GUBCONSSTATUS_UNINITIAL, GUBsetFree(), GUBVARSTATUS_CAPACITYEXCEEDED, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPallocMemory. Referenced by SCIPseparateKnapsackCuts().
frees GUB set data structure
Definition at line 1972 of file cons_knapsack.c. Referenced by GUBsetCreate(), and SCIPseparateKnapsackCuts().
checks whether GUB set data structure is consistent
Definition at line 2006 of file cons_knapsack.c.
Definition at line 2091 of file cons_knapsack.c. References GUBsetGetCliquePartition(), MAXNCLIQUEVARSCOMP, MIN, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisFeasEQ(), SCIPsortIntInt(), SCIPvarGetNCliques(), SCIPvarIsActive(), SCIPvarsGetProbvarBinary(), SCIPvarsHaveCommonClique(), and TRUE.
constructs sophisticated partition of knapsack variables into non-overlapping GUBs; current partition uses trivial GUBs
Definition at line 2250 of file cons_knapsack.c. Referenced by GUBsetCalcCliquePartition(), and SCIPseparateKnapsackCuts().
gets a most violated cover C ( ) for a given knapsack constraint taking into consideration the following fixing: , if and , if , if one exists.
Definition at line 2347 of file cons_knapsack.c. References checkMinweightidx(), checkSolveKnapsack(), FALSE, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPisFeasEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisFeasPositive(), SCIPsolveKnapsackApproximately(), SCIPtightenVarUb(), SCIPvarIsBinary(), and TRUE. Referenced by SCIPseparateKnapsackCuts().
checks if minweightidx is set correctly
Definition at line 2578 of file cons_knapsack.c. References FALSE, getPartitionCovervars(), NULL, SCIP_Longint, SCIP_Real, and TRUE. Referenced by getCover(), and makeCoverMinimal().
gets partition of minimal cover , i.e. and , with not empty; chooses partition as follows and
Definition at line 2621 of file cons_knapsack.c. References changePartitionCovervars(), NULL, SCIP_Longint, SCIPisFeasGT(), SCIPisGE(), and SCIPisLT(). Referenced by checkMinweightidx(), separateSequLiftedExtendedWeightInequality(), and separateSequLiftedMinimalCoverInequality().
changes given partition (C_1,C_2) of minimal cover C, if |C1| = 1, by moving one and two (if possible) variables from C2 to C1 if |C1| = 1 and |C1| = 0, respectively.
Definition at line 2670 of file cons_knapsack.c. References changePartitionFeasiblesetvars(), SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealInt(). Referenced by getPartitionCovervars(), and separateSequLiftedMinimalCoverInequality().
changes given partition (C_1,C_2) of feasible set C, if |C1| = 1, by moving one variable from C2 to C1
Definition at line 2710 of file cons_knapsack.c. References getPartitionNoncovervars(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealInt(). Referenced by changePartitionCovervars(), and separateSequLiftedExtendedWeightInequality().
gets partition of where is a minimal cover, i.e. and ; chooses partition as follows and
Definition at line 2751 of file cons_knapsack.c. References getLiftingSequence(), NULL, SCIP_Longint, SCIP_Real, SCIPisFeasEQ(), and SCIPisFeasGT(). Referenced by changePartitionFeasiblesetvars(), separateSequLiftedExtendedWeightInequality(), and separateSequLiftedMinimalCoverInequality().
sorts variables in F, C_2, and R according to the second level lifting sequence that will be used in the sequential lifting procedure
Definition at line 2799 of file cons_knapsack.c. References getLiftingSequenceGUB(), NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBufferArray, SCIPfreeMemoryArray, SCIPsortDownPtrInt(), and SCIPsortDownRealInt(). Referenced by getPartitionNoncovervars(), separateSequLiftedExtendedWeightInequality(), and separateSequLiftedMinimalCoverInequality().
categorizies GUBs of knapsack GUB partion into GOC1, GNC1, GF, GC2, and GR and computes a lifting sequence of the GUBs for the sequential GUB wise lifting procedure
Definition at line 2885 of file cons_knapsack.c. References BMSclearMemoryArray, enlargeMinweights(), FALSE, GUBconsCreate(), SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, SCIP_GUBSet::gubconsstatus, GUBCONSSTATUS_BELONGSTOSET_GC2, GUBCONSSTATUS_BELONGSTOSET_GF, GUBCONSSTATUS_BELONGSTOSET_GNC1, GUBCONSSTATUS_BELONGSTOSET_GOC1, GUBCONSSTATUS_BELONGSTOSET_GR, GUBCONSSTATUS_UNINITIAL, GUBsetMoveVar(), GUBsetSwapVars(), SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBCons::gubvarssize, SCIP_GUBCons::gubvarsstatus, GUBVARSTATUS_BELONGSTOSET_C1, GUBVARSTATUS_BELONGSTOSET_C2, GUBVARSTATUS_BELONGSTOSET_F, GUBVARSTATUS_BELONGSTOSET_R, GUBVARSTATUS_CAPACITYEXCEEDED, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBuffer, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBuffer, SCIPfreeBufferArray, SCIPfreeMemoryArray, SCIPsortDownPtrInt(), SCIPsortDownRealInt(), SCIPsortRealInt(), and TRUE. Referenced by getLiftingSequence(), and separateSequLiftedMinimalCoverInequality().
enlarges minweight table to at least the given length
Definition at line 3405 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPreallocBufferArray, and sequentialUpAndDownLifting(). Referenced by getLiftingSequenceGUB(), sequentialUpAndDownLifting(), and sequentialUpAndDownLiftingGUB().
lifts given inequality sum_{j in M_1} x_j <= alpha_0 valid for S^0 = { x in {0,1}^|M_1| : sum_{j in M_1} a_j x_j <= a_0 - sum_{j in M_2} a_j } to a valid inequality sum_{j in M_1} x_j + sum_{j in F} alpha_j x_j + sum_{j in M_2} alpha_j x_j + sum_{j in R} alpha_j x_j <= alpha_0 + sum_{j in M_2} alpha_j for S = { x in {0,1}^|N| : sum_{j in N} a_j x_j <= a_0 }; uses sequential up-lifting for the variables in F, sequential down-lifting for the variable in M_2, and sequential up-lifting for the variables in R; procedure can be used to strengthen minimal cover inequalities and extended weight inequalities.
Definition at line 3455 of file cons_knapsack.c. References BMSclearMemoryArray, enlargeMinweights(), MIN, NULL, safeAddMinweightsGUB(), SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasEQ(), SCIPisFeasGT(), and SCIPsortRealInt(). Referenced by enlargeMinweights(), separateSequLiftedExtendedWeightInequality(), and separateSequLiftedMinimalCoverInequality().
adds two minweight values in a safe way, i.e,, ensures no overflow
Definition at line 3833 of file cons_knapsack.c. References computeMinweightsGUB(), SCIP_Longint, and SCIP_LONGINT_MAX. Referenced by sequentialUpAndDownLifting(), and sequentialUpAndDownLiftingGUB().
computes minweights table for lifting with GUBs by combining unfished and fished tables
Definition at line 3852 of file cons_knapsack.c. Referenced by safeAddMinweightsGUB(), and sequentialUpAndDownLiftingGUB().
lifts given inequality sum_{j in C_1} x_j <= alpha_0 valid for S^0 = { x in {0,1}^|C_1| : sum_{j in C_1} a_j x_j <= a_0 - sum_{j in C_2} a_j; sum_{j in Q_i} x_j <= 1, forall i in I } to a valid inequality sum_{j in C_1} x_j + sum_{j in F} alpha_j x_j + sum_{j in C_2} alpha_j x_j + sum_{j in R} alpha_j x_j <= alpha_0 + sum_{j in C_2} alpha_j for S = { x in {0,1}^|N| : sum_{j in N} a_j x_j <= a_0; sum_{j in Q_i} x_j <= 1, forall i in I }; uses sequential up-lifting for the variables in GUB constraints in gubconsGFC1, sequential down-lifting for the variables in GUB constraints in gubconsGC2, and sequential up-lifting for the variabels in GUB constraints in gubconsGR.
Definition at line 3904 of file cons_knapsack.c. References BMSclearMemoryArray, computeMinweightsGUB(), enlargeMinweights(), SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconsstatus, GUBCONSSTATUS_BELONGSTOSET_GC2, GUBCONSSTATUS_BELONGSTOSET_GF, GUBCONSSTATUS_BELONGSTOSET_GNC1, GUBCONSSTATUS_BELONGSTOSET_GOC1, GUBCONSSTATUS_BELONGSTOSET_GR, SCIP_GUBCons::gubvars, SCIP_GUBCons::gubvarsstatus, GUBVARSTATUS_BELONGSTOSET_C1, GUBVARSTATUS_BELONGSTOSET_C2, GUBVARSTATUS_BELONGSTOSET_F, GUBVARSTATUS_BELONGSTOSET_R, GUBVARSTATUS_CAPACITYEXCEEDED, MIN, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_GUBSet::nvars, safeAddMinweightsGUB(), SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasEQ(), and superadditiveUpLifting(). Referenced by separateSequLiftedMinimalCoverInequality().
lifts given minimal cover inequality
valid for
to a valid inequality
for
uses superadditive up-lifting for the variables in .
Definition at line 4636 of file cons_knapsack.c. References BMSclearMemoryArray, MAX, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsortDownRealInt(), SCIPsortRealInt(), and separateSequLiftedMinimalCoverInequality(). Referenced by separateSupLiftedMinimalCoverInequality(), and sequentialUpAndDownLiftingGUB().
separates lifted minimal cover inequalities using sequential up- and down-lifting and GUB information, if wanted, for given knapsack problem
Definition at line 4767 of file cons_knapsack.c. References changePartitionCovervars(), FALSE, getLiftingSequence(), getLiftingSequenceGUB(), getPartitionCovervars(), getPartitionNoncovervars(), MAX, MIN, SCIP_GUBSet::ngubconss, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetNCutsFound(), SCIPconsIsLocal(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowSepa(), SCIPcreateEmptyRowUnspec(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisCutEfficacious(), SCIPisEfficacious(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsepaGetName(), SCIPsepaGetNCutsFound(), SCIPsnprintf(), separateSequLiftedExtendedWeightInequality(), sequentialUpAndDownLifting(), sequentialUpAndDownLiftingGUB(), sqrt(), and TRUE. Referenced by SCIPseparateKnapsackCuts(), and superadditiveUpLifting().
separates lifted extended weight inequalities using sequential up- and down-lifting for given knapsack problem
Definition at line 5001 of file cons_knapsack.c. References changePartitionFeasiblesetvars(), FALSE, getLiftingSequence(), getPartitionCovervars(), getPartitionNoncovervars(), MAX, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetNCutsFound(), SCIPconsIsLocal(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowSepa(), SCIPcreateEmptyRowUnspec(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisCutEfficacious(), SCIPisEfficacious(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsepaGetName(), SCIPsepaGetNCutsFound(), SCIPsnprintf(), separateSupLiftedMinimalCoverInequality(), sequentialUpAndDownLifting(), sqrt(), and TRUE. Referenced by getFeasibleSet(), and separateSequLiftedMinimalCoverInequality().
separates lifted minimal cover inequalities using superadditive up-lifting for given knapsack problem
Definition at line 5168 of file cons_knapsack.c. References FALSE, makeCoverMinimal(), MAX, NULL, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCut(), SCIPaddVarToRow(), SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetNCutsFound(), SCIPconsIsLocal(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowSepa(), SCIPcreateEmptyRowUnspec(), SCIPflushRowExtensions(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisCutEfficacious(), SCIPisEfficacious(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsepaGetName(), SCIPsepaGetNCutsFound(), SCIPsnprintf(), sqrt(), superadditiveUpLifting(), and TRUE. Referenced by SCIPseparateKnapsackCuts(), and separateSequLiftedExtendedWeightInequality().
converts given cover C to a minimal cover by removing variables in the reverse order in which the variables were chosen to be in C, i.e. in the order of non-increasing (1 - x*_j)/a_j, if the transformed separation problem was used to find C and in the order of non-increasing (1 - x*_j), if the modified transformed separation problem was used to find C; note that all variables with x*_j = 1 will be removed last
Definition at line 5282 of file cons_knapsack.c. References checkMinweightidx(), getFeasibleSet(), NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPsortPtrInt(). Referenced by SCIPseparateKnapsackCuts(), and separateSupLiftedMinimalCoverInequality().
converts given initial cover C_init to a feasible set by removing variables in the reverse order in which they were chosen to be in C_init: non-increasing (1 - x*_j)/a_j, if transformed separation problem was used to find C_init non-increasing (1 - x*_j), if modified transformed separation problem was used to find C_init. separates lifted extended weight inequalities using sequential up- and down-lifting for this feasible set and all subsequent feasible sets.
Definition at line 5425 of file cons_knapsack.c. References FALSE, MAXCOVERSIZEITERLEWI, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasGE(), SCIPisFeasLE(), SCIPseparateKnapsackCuts(), SCIPsortRealInt(), and separateSequLiftedExtendedWeightInequality(). Referenced by makeCoverMinimal(), and SCIPseparateKnapsackCuts().
separates different classes of valid inequalities for the 0-1 knapsack problem
Definition at line 5524 of file cons_knapsack.c. References FALSE, getCover(), getFeasibleSet(), GUBsetCreate(), GUBsetFree(), GUBsetGetCliquePartition(), makeCoverMinimal(), SCIP_GUBSet::ngubconss, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPgetSolVals(), SCIPincConsAge(), SCIPseparateRelaxedKnapsack(), SCIPvarGetName(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), TRUE, and USESUPADDLIFT. Referenced by getFeasibleSet(), SCIPseparateRelaxedKnapsack(), and separateCons().
Definition at line 5741 of file cons_knapsack.c. References BMSclearMemoryArray, CONSHDLR_NAME, DEFAULT_USEGUBS, FALSE, KNAPSACKRELAX_MAXDELTA, KNAPSACKRELAX_MAXDNOM, KNAPSACKRELAX_MAXSCALE, MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcalcIntegralScalar(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMessage, SCIPdebugPrintCons, SCIPdebugPrintf, SCIPepsilon(), SCIPfeasFloor(), SCIPfindConshdlr(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetNContVars(), SCIPgetNegatedVar(), SCIPgetNVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPreallocMemoryArray, SCIPseparateKnapsackCuts(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsActive(), SCIPvarIsBinary(), separateCons(), and TRUE. Referenced by addCut(), and SCIPseparateKnapsackCuts().
separates given knapsack constraint
Definition at line 6169 of file cons_knapsack.c. References addCoef(), addRelaxation(), checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, and SCIPseparateKnapsackCuts(). Referenced by SCIPseparateRelaxedKnapsack().
adds coefficient to constraint data
Definition at line 6211 of file cons_knapsack.c. Referenced by applyFixings(), and separateCons().
deletes coefficient at given position from constraint data
Definition at line 6293 of file cons_knapsack.c. Referenced by applyFixings(), deleteRedundantVars(), dualWeightsTightening(), prepareCons(), and simplifyInequalities().
removes all items with weight zero from knapsack constraint
Definition at line 6489 of file cons_knapsack.c. Referenced by tightenWeights().
Definition at line 6513 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSDELVARS().
replaces multiple occurrences of a variable or its negation by a single coefficient
Definition at line 6555 of file cons_knapsack.c. Referenced by applyFixings(), simplifyInequalities(), and tightenWeights().
in case the knapsack constraint is independent of every else, solve the knapsack problem (exactly) and apply the fixings (dual reductions)
Definition at line 6698 of file cons_knapsack.c. References checkParallelObjective(), FALSE, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPsolveKnapsackExactly(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetObj(), SCIPvarGetProbvarBinary(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), and TRUE.
check if the knapsack constraint is parallel to objective function; if so update the cutoff bound and avoid that the constraint enters the LP by setting the initial and separated flag to FALSE
Definition at line 6839 of file cons_knapsack.c. Referenced by dualPresolving().
sort the variables and weights w.r.t. the clique partition; thereby ensure the current order of the variables when a weight of one variable is greater or equal another weight and both variables are in the same cliques
Definition at line 6990 of file cons_knapsack.c. References BMSclearMemoryArray, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, and SCIPfreeBufferArray. Referenced by propagateCons().
propagation method for knapsack constraints
Definition at line 7114 of file cons_knapsack.c. References BMSclearMemoryArray, calcCliquepartition(), FALSE, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictBinvar(), SCIPallocBufferArray, SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetStage(), SCIPincConsAge(), SCIPinferBinvarCons(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPinRepropagation(), SCIPisConflictAnalysisApplicable(), SCIPresetConsAge(), SCIPvarGetIndex(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), sortItems(), stableSort(), TRUE, and upgradeCons(). Referenced by stableSort().
all but one variable fit into the knapsack constraint, so we can upgrade this constraint to an logicor constraint containing all negated variables of this knapsack constraint
Definition at line 7558 of file cons_knapsack.c. Referenced by detectRedundantVars(), dualWeightsTightening(), and propagateCons().
delete redundant variables i.e. 5x1 + 5x2 + 5x3 + 2x4 + 1x5 <= 13 => x4, x5 always fits into the knapsack, so we can delete them i.e. 5x1 + 5x2 + 5x3 + 2x4 + 1x5 <= 8 and we have the cliqueinformation (x1,x2,x3) is a clique => x4, x5 always fits into the knapsack, so we can delete them i.e. 5x1 + 5x2 + 5x3 + 1x4 + 1x5 <= 6 and we have the cliqueinformation (x1,x2,x3) is a clique and (x4,x5) too => we create the set partitioning constraint x4 + x5 <= 1 and delete them in this knapsack
Definition at line 7630 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), detectRedundantVars(), NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPcalcCliquePartition(), SCIPcalcGreComDiv(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPreleaseCons(), and SCIPsnprintf(). Referenced by detectRedundantVars().
Definition at line 7881 of file cons_knapsack.c. References calcCliquepartition(), deleteRedundantVars(), FALSE, normalizeWeights(), NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPfreeBufferArray, SCIPreleaseCons(), SCIPsnprintf(), TRUE, and upgradeCons(). Referenced by deleteRedundantVars(), and simplifyInequalities().
divides weights by their greatest common divisor and divides capacity by the same value, rounding down the result
Definition at line 8070 of file cons_knapsack.c. Referenced by detectRedundantVars(), and dualWeightsTightening().
dual weights tightening for knapsack constraints
Definition at line 8142 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), FALSE, MIN, normalizeWeights(), NULL, SCIP_GUBSet::nvars, prepareCons(), SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_OKAY, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdelCons(), SCIPreleaseCons(), TRUE, and upgradeCons(). Referenced by simplifyInequalities().
fixes variables with weights bigger than the capacity and delete redundant constraints, also sort weights
Definition at line 8995 of file cons_knapsack.c. References delCoefPos(), NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPdelCons(), SCIPfixVar(), SCIPisHugeValue(), simplifyInequalities(), and sortItems(). Referenced by dualWeightsTightening(), and simplifyInequalities().
tries to simplify weights and delete redundant variables in knapsack a^Tx <= capacity
Definition at line 9112 of file cons_knapsack.c. References applyFixings(), consdataChgWeight(), delCoefPos(), detectRedundantVars(), dualWeightsTightening(), FALSE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, prepareCons(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPcalcGreComDiv(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPisHugeValue(), and SCIPvarGetName(). Referenced by prepareCons().
deletes all fixed variables from knapsack constraint, and replaces variables with binary representatives
Definition at line 9420 of file cons_knapsack.c. References addCoef(), delCoefPos(), FALSE, insertZerolist(), mergeMultiples(), NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPerrorMessage, SCIPflattenVarAggregationGraph(), SCIPfloor(), SCIPgetBinvarRepresentative(), SCIPgetNegatedVar(), SCIPisFeasEQ(), SCIPisIntegral(), SCIPisNegative(), SCIPvarGetLbGlobal(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetNegatedVar(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarIsNegated(), and TRUE. Referenced by SCIP_DECL_CONSEXITPRE(), and simplifyInequalities().
inserts an element into the list of binary zero implications
Definition at line 9630 of file cons_knapsack.c. References FALSE, MAX_ZEROITEMS_SIZE, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPgetNContVars(), SCIPgetNVars(), SCIPreallocBufferArray, and TRUE. Referenced by applyFixings().
applies rule (3) of the weight tightening procedure, which can lift other variables into the knapsack: (3) for a clique C let C(xi == v) := C \ {j: xi == v -> xj == 0}), let cliqueweightsum(xi == v) := sum(W(C(xi == v))) if cliqueweightsum(xi == v) < capacity:
Definition at line 9716 of file cons_knapsack.c. Referenced by tightenWeights().
tightens item weights and capacity in presolving: given a knapsack sum(wi*xi) <= capacity (1) let weightsum := sum(wi) if weightsum - wi < capacity:
Definition at line 10296 of file cons_knapsack.c. References addNegatedCliques(), calcCliquepartition(), consdataChgWeight(), FALSE, MAX, MAX_USECLIQUES_SIZE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, removeZeroWeights(), SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIPaddCons(), SCIPallocBufferArray, SCIPcalcCliquePartition(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), sortItems(), tightenWeightsLift(), and TRUE.
adds negated cliques of the knapsack constraint to the global clique table
Definition at line 10870 of file cons_knapsack.c. Referenced by tightenWeights().
adds cliques of the knapsack constraint to the global clique table
Definition at line 11078 of file cons_knapsack.c.
gets the key of the given element Definition at line 11311 of file cons_knapsack.c.
returns TRUE iff both keys are equal; two constraints are equal if they have the same variables and the same coefficients Definition at line 11321 of file cons_knapsack.c.
returns the hash value of the key Definition at line 11364 of file cons_knapsack.c.
compares each constraint with all other constraints for possible redundancy and removes or changes constraint accordingly; in contrast to preprocessConstraintPairs(), it uses a hash table
Definition at line 11408 of file cons_knapsack.c. References HASHSIZE_KNAPSACKCONS, MAX, NULL, preprocessConstraintPairs(), SCIP_CALL, SCIP_OKAY, SCIPcalcHashtableSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelCons(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPhashtableRemove(), SCIPhashtableRetrieve(), SCIPupdateConsFlags(), and TRUE.
compares constraint with all prior constraints for possible redundancy or aggregation, and removes or changes constraint accordingly
Definition at line 11532 of file cons_knapsack.c. References createNormalizedKnapsack(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPisGT(), SCIPisLT(), SCIPupdateConsFlags(), sortItems(), and TRUE. Referenced by detectRedundantConstraints().
creates and captures a knapsack constraint out of a linear inequality
Definition at line 11726 of file cons_knapsack.c. References NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_DECL_LINCONSUPGD(), SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, SCIPcreateConsKnapsack(), SCIPfeasFloor(), SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPisFeasIntegral(), and SCIPisInfinity(). Referenced by preprocessConstraintPairs(), and SCIP_DECL_LINCONSUPGD().
tries to upgrade a linear constraint into a knapsack constraint Definition at line 11821 of file cons_knapsack.c. References CONSHDLR_NAME, createNormalizedKnapsack(), NULL, SCIP_CALL, SCIP_DECL_CONSHDLRCOPY(), SCIP_OKAY, SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), and SCIPdebugMessage. Referenced by createNormalizedKnapsack().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 11859 of file cons_knapsack.c. Referenced by SCIP_DECL_LINCONSUPGD().
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 11875 of file cons_knapsack.c.
initialization method of constraint handler (called after problem was transformed) Definition at line 11893 of file cons_knapsack.c.
deinitialization method of constraint handler (called before transformed problem is freed) Definition at line 11916 of file cons_knapsack.c.
presolving initialization method of constraint handler (called when presolving is about to begin) Definition at line 11935 of file cons_knapsack.c.
presolving deinitialization method of constraint handler (called after presolving has been finished) Definition at line 11983 of file cons_knapsack.c. References applyFixings(), NULL, SCIP_CALL, SCIP_DECL_CONSEXITSOL(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPconsIsDeleted(), and SCIPfreeMemoryArrayNull.
solving process deinitialization method of constraint handler (called before branch and bound process data is freed) Definition at line 12027 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), and SCIPreleaseRow(). Referenced by SCIP_DECL_CONSEXITPRE().
frees specific constraint data Definition at line 12051 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSEXITSOL().
transforms constraint data into data belonging to the transformed problem Definition at line 12071 of file cons_knapsack.c.
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 12108 of file cons_knapsack.c.
separation method of constraint handler for LP solutions Definition at line 12125 of file cons_knapsack.c.
separation method of constraint handler for arbitrary primal solutions Definition at line 12199 of file cons_knapsack.c.
constraint enforcing method of constraint handler for LP solutions Definition at line 12260 of file cons_knapsack.c.
constraint enforcing method of constraint handler for pseudo solutions Definition at line 12313 of file cons_knapsack.c.
feasibility check method of constraint handler for integral solutions Definition at line 12334 of file cons_knapsack.c.
domain propagation method of constraint handler Definition at line 12355 of file cons_knapsack.c.
presolving method of constraint handler Definition at line 12401 of file cons_knapsack.c.
propagation conflict resolving method of constraint handler Definition at line 12615 of file cons_knapsack.c.
variable rounding lock method of constraint handler Definition at line 12698 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_DECL_CONSDELVARS(), SCIP_OKAY, and SCIPaddVarLocks().
variable deletion method of constraint handler Definition at line 12717 of file cons_knapsack.c. References NULL, performVarDeletions(), SCIP_CALL, SCIP_DECL_CONSPRINT(), and SCIP_OKAY. Referenced by SCIP_DECL_CONSLOCK().
constraint display method of constraint handler Definition at line 12733 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSDELVARS().
constraint copying method of constraint handler Definition at line 12759 of file cons_knapsack.c.
constraint parsing method of constraint handler Definition at line 12795 of file cons_knapsack.c.
constraint method of constraint handler which returns the variables (if possible) Definition at line 12895 of file cons_knapsack.c. References BMScopyMemoryArray, NULL, SCIP_DECL_CONSGETNVARS(), SCIP_OKAY, SCIPconsGetData(), and TRUE.
constraint method of constraint handler which returns the number of variables (if possible) Definition at line 12917 of file cons_knapsack.c. References NULL, and SCIPeventGetType(). Referenced by SCIP_DECL_CONSGETVARS().
execution method of bound change event handler Definition at line 12936 of file cons_knapsack.c.
creates the handler for knapsack constraints and includes it in SCIP
Definition at line 13000 of file cons_knapsack.c. Referenced by SCIPincludeDefaultPlugins().
creates and captures a knapsack constraint
Definition at line 13130 of file cons_knapsack.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicKnapsack(), SCIPerrorMessage, and SCIPfindConshdlr(). Referenced by createAndAddLinearCons(), createCapacityRestriction(), createNormalizedKnapsack(), and SCIPcreateConsBasicKnapsack().
creates and captures a knapsack constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsKnapsack(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
Definition at line 13198 of file cons_knapsack.c. References FALSE, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddCoefKnapsack(), SCIPcreateConsKnapsack(), and TRUE. Referenced by SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsKnapsack().
adds new item to knapsack constraint
Definition at line 13217 of file cons_knapsack.c. Referenced by addCoefTerm(), createCapacityRestriction(), SCIP_DECL_SOLVECUMULATIVE(), SCIPaddCoefPseudoboolean(), and SCIPcreateConsBasicKnapsack().
gets the capacity of the knapsack constraint
Definition at line 13238 of file cons_knapsack.c. References NULL, SCIP_Longint, SCIPABORT, SCIPchgCapacityKnapsack(), SCIPconsGetData(), and SCIPerrorMessage. Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsSides(), SCIP_DECL_READERWRITE(), SCIPmatrixCreate(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
changes capacity of the knapsack constraint
Definition at line 13262 of file cons_knapsack.c. References NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPerrorMessage, SCIPgetNVarsKnapsack(), and SCIPgetStage(). Referenced by SCIPgetCapacityKnapsack(). gets the number of items in the knapsack constraint
Definition at line 13291 of file cons_knapsack.c. References NULL, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetVarsKnapsack(). Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsNVars(), getLinearConsVarsData(), SCIP_DECL_READERWRITE(), SCIPchgCapacityKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective(). gets the array of variables in the knapsack constraint; the user must not modify this array!
Definition at line 13312 of file cons_knapsack.c. References NULL, SCIP_Longint, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetWeightsKnapsack(). Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsVarsData(), SCIP_DECL_READERWRITE(), SCIPgetNVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of weights in the knapsack constraint; the user must not modify this array!
Definition at line 13333 of file cons_knapsack.c. References NULL, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, and SCIPgetDualsolKnapsack(). Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsVarsData(), SCIP_DECL_READERWRITE(), SCIPgetVarsKnapsack(), SCIPmatrixCreate(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints(). gets the dual solution of the knapsack constraint in the current LP
Definition at line 13354 of file cons_knapsack.c. References NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetDualfarkasKnapsack(), and SCIProwGetDualsol(). Referenced by SCIPgetWeightsKnapsack(). gets the dual Farkas value of the knapsack constraint in the current infeasible LP
Definition at line 13378 of file cons_knapsack.c. References NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPerrorMessage, SCIPgetRowKnapsack(), and SCIProwGetDualfarkas(). Referenced by SCIPgetDualsolKnapsack(). returns the linear relaxation of the given knapsack constraint; may return NULL if no LP row was yet created; the user must not modify the row!
Definition at line 13404 of file cons_knapsack.c. References NULL, SCIPABORT, SCIPconsGetData(), and SCIPerrorMessage. Referenced by SCIPgetDualfarkasKnapsack(). |