All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 performVarDeletions(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSTRANS(), SCIP_DECL_EVENTEXEC(), SCIPaddCoefKnapsack(), SCIPchgCapacityKnapsack(), SCIPcreateConsKnapsack(), SCIPgetCapacityKnapsack(), SCIPgetDualfarkasKnapsack(), SCIPgetDualsolKnapsack(), SCIPgetNVarsKnapsack(), SCIPgetRowKnapsack(), SCIPgetVarsKnapsack(), SCIPgetWeightsKnapsack(), SCIPincludeConshdlrKnapsack(), and SCIPseparateRelaxedKnapsack().
Definition at line 40 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
priority of the constraint handler for separation Definition at line 41 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
priority of the constraint handler for constraint enforcing Definition at line 42 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
priority of the constraint handler for checking feasibility Definition at line 43 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
frequency for separating cuts; zero means to separate only in the root node Definition at line 44 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
frequency for propagating domains; zero means only preprocessing propagation Definition at line 45 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
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. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of presolving rounds the constraint handler participates in (-1: no limit) Definition at line 48 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should separation method be delayed, if other separators found cuts? Definition at line 49 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should propagation method be delayed, if other propagators found reductions? Definition at line 50 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should presolving method be delayed, if other presolvers found reductions? Definition at line 51 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should the constraint handler be skipped, if no constraints are available? Definition at line 52 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
Definition at line 54 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
Definition at line 56 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
Definition at line 57 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
priority of the constraint handler for upgrading of linear constraints Definition at line 59 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of items in knapsack where clique information is used Definition at line 65 of file cons_knapsack.c. Referenced by tightenWeights(), and tightenWeightsLift().
maximal number of items to store in the zero list in preprocessing Definition at line 66 of file cons_knapsack.c. Referenced by insertZerolist(), and tightenWeightsLift().
maximal allowed rounding distance for scaling in knapsack relaxation Definition at line 68 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
maximal allowed denominator in knapsack rational relaxation Definition at line 69 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
maximal allowed scaling factor in knapsack rational relaxation Definition at line 70 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
multiplier on separation frequency, how often knapsack cuts are separated Definition at line 72 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of separation rounds per node (-1: unlimited) Definition at line 73 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of separation rounds in the root node (-1: unlimited) Definition at line 74 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of cuts separated per separation round Definition at line 75 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal number of cuts separated per separation round in the root node Definition at line 76 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
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 77 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should disaggregation of knapsack constraints be allowed in preprocessing? Definition at line 79 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should presolving try to simplify knapsacks Definition at line 80 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
should negated clique information be used in solving process Definition at line 81 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal absolute coefficient in variable bounds used for knapsack relaxation Definition at line 83 of file cons_knapsack.c. Referenced by SCIPseparateRelaxedKnapsack().
should lifted minimal cover inequalities using superadditive up-lifting be separated in addition Definition at line 84 of file cons_knapsack.c. Referenced by SCIPseparateKnapsackCuts().
should hash table be used for detecting redundant constraints in advance Definition at line 86 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
minimal size of hash table in linear constraint tables Definition at line 87 of file cons_knapsack.c. Referenced by detectRedundantConstraints().
should pairwise constraint comparison be performed in presolving? Definition at line 89 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
number for minimal pairwise presolving comparisons Definition at line 90 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSPRESOL().
minimal gain per minimal pairwise presolving comparisons to repeat pairwise comparison round Definition at line 91 of file cons_knapsack.c. Referenced by SCIP_DECL_CONSPRESOL().
should dual presolving steps be performed? Definition at line 93 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
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 94 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
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 97 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack().
maximal size for which LEWI are iteratively separated by reducing the feasible set Definition at line 101 of file cons_knapsack.c. Referenced by getFeasibleSet().
should GUB information be used for separation? Definition at line 103 of file cons_knapsack.c. Referenced by SCIPincludeConshdlrKnapsack(), and SCIPseparateRelaxedKnapsack().
memory growing value for GUB constraint array Definition at line 104 of file cons_knapsack.c. Referenced by GUBconsAddVar(), GUBconsCreate(), and GUBconsDelVar().
should GNC1 GUB conss without F vars be split into GOC1 and GR GUB conss? Definition at line 105 of file cons_knapsack.c.
Definition at line 935 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 2082 of file cons_knapsack.c. Referenced by GUBsetCalcCliquePartition().
Definition at line 9612 of file cons_knapsack.c. Referenced by tightenWeightsLift(). Typedef Documentation
Definition at line 211 of file cons_knapsack.c.
Definition at line 223 of file cons_knapsack.c.
Definition at line 235 of file cons_knapsack.c.
Definition at line 245 of file cons_knapsack.c.
Definition at line 257 of file cons_knapsack.c. Enumeration Type Documentation
status of GUB constraint
Definition at line 214 of file cons_knapsack.c.
status of variable in GUB constraint
Definition at line 226 of file cons_knapsack.c. Function Documentation
comparison method for two sorting key pairs Definition at line 265 of file cons_knapsack.c.
creates event data
Definition at line 284 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory. Referenced by addCoef(), and catchEvents().
frees event data
Definition at line 302 of file cons_knapsack.c. References NULL, SCIP_OKAY, and SCIPfreeBlockMemory. Referenced by delCoefPos(), and dropEvents().
sorts items in knapsack with nonincreasing weights
Definition at line 316 of file cons_knapsack.c. References FALSE, NULL, SCIPsortDownLongPtrPtrIntInt(), SCIPsortPtrPtrIntInt(), and TRUE. Referenced by addCliques(), addNegatedCliques(), normalizeWeights(), prepareCons(), preprocessConstraintPairs(), propagateCons(), SCIP_DECL_HASHKEYVAL(), tightenWeights(), and tightenWeightsLift().
calculates a partition of the variables into cliques
Definition at line 416 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcCliquePartition(), SCIPcalcNegatedCliquePartition(), and TRUE. Referenced by addCliques(), addNegatedCliques(), detectRedundantVars(), propagateCons(), tightenWeights(), and tightenWeightsLift().
installs rounding locks for the given variable in the given knapsack constraint
Definition at line 446 of file cons_knapsack.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPlockVarCons(), and TRUE. Referenced by addCoef().
removes rounding locks for the given variable in the given knapsack constraint
Definition at line 460 of file cons_knapsack.c. References FALSE, SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), and TRUE. Referenced by delCoefPos().
catches bound change events for variables in knapsack
Definition at line 474 of file cons_knapsack.c. References eventdataCreate(), NULL, SCIP_CALL, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, and SCIPcatchVarEvent(). Referenced by consdataCreate().
drops bound change events for variables in knapsack
Definition at line 501 of file cons_knapsack.c. References eventdataFree(), NULL, SCIP_CALL, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, and SCIPdropVarEvent(). Referenced by consdataFree().
ensures, that vars and vals arrays can store at least num entries
Definition at line 528 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray. Referenced by addCoef().
creates knapsack constraint data
Definition at line 566 of file cons_knapsack.c. References catchEvents(), 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 SCIP_DECL_CONSTRANS(), and SCIPcreateConsKnapsack().
frees knapsack constraint data
Definition at line 691 of file cons_knapsack.c. References dropEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPreleaseRow(), and SCIPreleaseVar(). Referenced by SCIP_DECL_CONSDELETE().
changes a single weight in knapsack constraint data
Definition at line 741 of file cons_knapsack.c. References FALSE, NULL, SCIP_GUBSet::nvars, SCIP_Longint, and SCIPvarGetLbLocal(). Referenced by deleteRedundantVars(), dualWeightsTightening(), mergeMultiples(), normalizeWeights(), simplifyInequalities(), and tightenWeights().
creates LP row corresponding to knapsack constraint
Definition at line 779 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPflushRowExtensions(), and SCIPinfinity(). Referenced by addRelaxation().
adds linear relaxation of knapsack constraint to the LP
Definition at line 807 of file cons_knapsack.c. References createRelaxation(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMessage, SCIPprintRow(), and SCIProwIsInLP(). Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSINITLP(), and separateCons().
checks knapsack constraint for feasibility of given solution: returns TRUE iff constraint is feasible
Definition at line 842 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 SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and 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 942 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, 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 1485 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealLongRealInt(). Referenced by getCover().
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 1556 of file cons_knapsack.c. References FALSE, NULL, SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasLT(), and TRUE. Referenced by getCover().
creates an empty GUB constraint
Definition at line 1671 of file cons_knapsack.c. References GUBCONSGROWVALUE, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPallocMemory. Referenced by getLiftingSequenceGUB(), and GUBsetCreate().
frees GUB constraint
Definition at line 1692 of file cons_knapsack.c. References NULL, SCIP_OKAY, SCIPfreeBufferArray, and SCIPfreeMemory. Referenced by GUBsetFree(), and GUBsetMoveVar().
adds variable to given GUB constraint
Definition at line 1712 of file cons_knapsack.c. References GUBCONSGROWVALUE, SCIP_GUBCons::gubvars, SCIP_GUBCons::gubvarssize, SCIP_GUBCons::gubvarsstatus, GUBVARSTATUS_UNINITIAL, SCIP_GUBCons::ngubvars, NULL, SCIP_CALL, SCIP_OKAY, and SCIPreallocBufferArray. Referenced by GUBsetCreate(), and GUBsetMoveVar().
deletes variable from its current GUB constraint
Definition at line 1747 of file cons_knapsack.c. References GUBCONSGROWVALUE, SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBCons::gubvarssize, SCIP_GUBCons::gubvarsstatus, SCIP_GUBCons::ngubvars, NULL, SCIP_CALL, SCIP_OKAY, and SCIPreallocBufferArray. Referenced by GUBsetMoveVar().
moves variable from current GUB constraint to a different existing (nonempty) GUB constraint
Definition at line 1784 of file cons_knapsack.c. References GUBconsAddVar(), GUBconsDelVar(), GUBconsFree(), SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, SCIP_GUBSet::gubconsstatus, SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPvarGetName(). Referenced by getLiftingSequenceGUB(), and GUBsetGetCliquePartition().
swaps two variables in the same GUB constraint
Definition at line 1875 of file cons_knapsack.c. References SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBCons::gubvarsstatus, and NULL. Referenced by getLiftingSequenceGUB().
initializes partition of knapsack variables into nonoverlapping trivial GUB constraints (GUB with one variable)
Definition at line 1915 of file cons_knapsack.c. References GUBconsAddVar(), GUBconsCreate(), GUBCONSSTATUS_UNINITIAL, GUBVARSTATUS_CAPACITYEXCEEDED, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPallocMemory. Referenced by SCIPseparateKnapsackCuts().
frees GUB set data structure
Definition at line 1965 of file cons_knapsack.c. References GUBconsFree(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBufferArray, and SCIPfreeMemory. Referenced by SCIPseparateKnapsackCuts().
checks whether GUB set data structure is consistent
Definition at line 1999 of file cons_knapsack.c. References FALSE, SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBSet::ngubconss, SCIP_GUBCons::ngubvars, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPvarGetName(), SCIPvarGetProbvarBinary(), SCIPvarsHaveCommonClique(), and TRUE. Referenced by GUBsetGetCliquePartition().
Definition at line 2084 of file cons_knapsack.c. References MAXNCLIQUEVARSCOMP, MIN, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisFeasEQ(), SCIPsortIntInt(), SCIPvarGetNCliques(), SCIPvarIsActive(), SCIPvarsGetProbvarBinary(), SCIPvarsHaveCommonClique(), and TRUE. Referenced by GUBsetGetCliquePartition().
constructs sophisticated partion of knapsack variables into nonoverlapping GUBs; current partion uses trivial GUBs
Definition at line 2243 of file cons_knapsack.c. References SCIP_GUBSet::gubconss, SCIP_GUBSet::gubconssidx, GUBsetCalcCliquePartition(), GUBsetCheck(), GUBsetMoveVar(), SCIP_GUBCons::gubvars, SCIP_GUBSet::gubvarsidx, SCIP_GUBCons::ngubvars, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPfreeBufferArray. Referenced by 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 2340 of file cons_knapsack.c. References 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 2571 of file cons_knapsack.c. References FALSE, NULL, SCIP_Longint, and TRUE. Referenced by makeCoverMinimal().
gets partition of minimal cover , i.e. and , with not empty; chooses partition as follows and
Definition at line 2614 of file cons_knapsack.c. References NULL, SCIPisFeasGT(), SCIPisGE(), and SCIPisLT(). Referenced by 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 2663 of file cons_knapsack.c. References SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealInt(). Referenced by 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 2703 of file cons_knapsack.c. References SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, and SCIPsortDownRealInt(). Referenced by separateSequLiftedExtendedWeightInequality().
gets partition of where is a minimal cover, i.e. and ; chooses partition as follows and
Definition at line 2744 of file cons_knapsack.c. References NULL, SCIPisFeasEQ(), and SCIPisFeasGT(). Referenced by 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 2792 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBufferArray, SCIPfreeMemoryArray, SCIPsortDownPtrInt(), and SCIPsortDownRealInt(). Referenced by 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 2878 of file cons_knapsack.c. References BMSclearMemoryArray, 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_OKAY, SCIP_Real, SCIPallocBuffer, SCIPallocBufferArray, SCIPallocMemoryArray, SCIPfreeBuffer, SCIPfreeBufferArray, SCIPfreeMemoryArray, SCIPsortDownPtrInt(), SCIPsortDownRealInt(), SCIPsortRealInt(), and TRUE. Referenced by separateSequLiftedMinimalCoverInequality().
enlarges minweight table to at least the given length
Definition at line 3398 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_LONGINT_MAX, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBufferArray. Referenced by 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 3448 of file cons_knapsack.c. References BMSclearMemoryArray, enlargeMinweights(), MIN, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasEQ(), SCIPisFeasGT(), and SCIPsortRealInt(). Referenced by separateSequLiftedExtendedWeightInequality(), and separateSequLiftedMinimalCoverInequality().
adds two minweight values in a safe way, i.e,, ensures no overflow
Definition at line 3826 of file cons_knapsack.c. References SCIP_LONGINT_MAX. Referenced by computeMinweightsGUB(), and sequentialUpAndDownLiftingGUB().
computes minweights table for lifting with GUBs by combining unfished and fished tables
Definition at line 3845 of file cons_knapsack.c. References safeAddMinweightsGUB(), SCIP_Longint, and SCIP_LONGINT_MAX. Referenced by 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 3897 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, and SCIPisFeasEQ(). 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 4629 of file cons_knapsack.c. References BMSclearMemoryArray, MAX, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsortDownRealInt(), and SCIPsortRealInt(). Referenced by separateSupLiftedMinimalCoverInequality().
separates lifted minimal cover inequalities using sequential up- and down-lifting and GUB information, if wanted, for given knapsack problem
Definition at line 4760 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(), sequentialUpAndDownLifting(), sequentialUpAndDownLiftingGUB(), sqrt(), and TRUE. Referenced by SCIPseparateKnapsackCuts().
separates lifted extended weight inequalities using sequential up- and down-lifting for given knapsack problem
Definition at line 4994 of file cons_knapsack.c. References changePartitionFeasiblesetvars(), FALSE, getLiftingSequence(), getPartitionCovervars(), getPartitionNoncovervars(), MAX, NULL, 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(), sequentialUpAndDownLifting(), sqrt(), and TRUE. Referenced by getFeasibleSet().
separates lifted minimal cover inequalities using superadditive up-lifting for given knapsack problem
Definition at line 5161 of file cons_knapsack.c. References FALSE, MAX, NULL, 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(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPreleaseRow(), SCIPresetConsAge(), SCIPsepaGetName(), SCIPsepaGetNCutsFound(), SCIPsnprintf(), sqrt(), superadditiveUpLifting(), and TRUE. Referenced by SCIPseparateKnapsackCuts().
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 5275 of file cons_knapsack.c. References checkMinweightidx(), NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPsortPtrInt(). Referenced by SCIPseparateKnapsackCuts().
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 5418 of file cons_knapsack.c. References FALSE, MAXCOVERSIZEITERLEWI, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisFeasGE(), SCIPisFeasLE(), SCIPsortRealInt(), and separateSequLiftedExtendedWeightInequality(). Referenced by SCIPseparateKnapsackCuts().
separates different classes of valid inequalities for the 0-1 knapsack problem
Definition at line 5517 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(), SCIPvarGetName(), separateSequLiftedMinimalCoverInequality(), separateSupLiftedMinimalCoverInequality(), TRUE, and USESUPADDLIFT. Referenced by SCIPseparateRelaxedKnapsack(), and separateCons().
Definition at line 5730 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(), and TRUE. Referenced by addCut(), and separateCons().
separates given knapsack constraint
Definition at line 6148 of file cons_knapsack.c. References addRelaxation(), checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, and SCIPseparateKnapsackCuts(). Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
adds coefficient to constraint data
Definition at line 6190 of file cons_knapsack.c. References consdataEnsureVarsSize(), eventdataCreate(), FALSE, lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddVarToRow(), SCIPcaptureVar(), SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPgetBinvarRepresentative(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), and TRUE. Referenced by applyFixings(), SCIPaddCoefKnapsack(), and tightenWeightsLift().
deletes coefficient at given position from constraint data
Definition at line 6272 of file cons_knapsack.c. References eventdataFree(), FALSE, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIP_Real, SCIPaddVarToRow(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdropVarEvent(), SCIPreleaseVar(), SCIPvarGetLbLocal(), SCIPvarIsTransformed(), and unlockRounding(). Referenced by applyFixings(), deleteRedundantVars(), dualWeightsTightening(), mergeMultiples(), performVarDeletions(), prepareCons(), removeZeroWeights(), and simplifyInequalities().
removes all items with weight zero from knapsack constraint
Definition at line 6468 of file cons_knapsack.c. References delCoefPos(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData(). Referenced by tightenWeights().
Definition at line 6492 of file cons_knapsack.c. References CONSHDLR_NAME, delCoefPos(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), and SCIPvarIsDeleted(). Referenced by SCIP_DECL_CONSDELVARS().
replaces multiple occurrences of a variable or its negation by a single coefficient
Definition at line 6534 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_NEGATED, SCIPconsGetData(), SCIPdebugMessage, SCIPsortPtrPtrLongIntInt(), SCIPvarGetNegatedVar(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIPvarIsBinary(), and TRUE. Referenced by addCliques(), addNegatedCliques(), applyFixings(), SCIP_DECL_CONSPRESOL(), simplifyInequalities(), tightenWeights(), and tightenWeightsLift().
in case the knapsack constraint is independent of every else, solve the knapsack problem (exactly) and apply the fixings (dual reductions)
Definition at line 6677 of file cons_knapsack.c. References 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. Referenced by SCIP_DECL_CONSPRESOL().
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 6818 of file cons_knapsack.c. References FALSE, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsInitial(), SCIPconsIsSeparated(), SCIPcutoffbounddelta(), SCIPdebugMessage, SCIPgetCutoffbound(), SCIPgetNObjVars(), SCIPisEQ(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPsetConsEnforced(), SCIPsetConsInitial(), SCIPsetConsPropagated(), SCIPsetConsSeparated(), SCIPupdateCutoffbound(), SCIPupdateLocalLowerbound(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarIsNegated(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
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 6963 of file cons_knapsack.c. References BMSclearMemoryArray, NULL, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, and SCIPfreeBufferArray. Referenced by propagateCons().
propagation method for knapsack constraints
Definition at line 7087 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(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
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 7531 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLogicor(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdelCons(), SCIPfreeBufferArray, SCIPgetNegatedVars(), and SCIPreleaseCons(). Referenced by detectRedundantVars(), and dualWeightsTightening().
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 7603 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), 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(), SCIPsnprintf(), and TRUE. Referenced by detectRedundantVars().
Definition at line 7846 of file cons_knapsack.c. References calcCliquepartition(), deleteRedundantVars(), FALSE, 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 simplifyInequalities().
divides weights by their greatest common divisor and divides capacity by the same value, rounding down the result
Definition at line 8035 of file cons_knapsack.c. References consdataChgWeight(), NULL, SCIP_Longint, SCIPcalcGreComDiv(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), sortItems(), and TRUE. Referenced by dualWeightsTightening(), and SCIP_DECL_CONSPRESOL().
dual weights tightening for knapsack constraints
Definition at line 8107 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), FALSE, MIN, normalizeWeights(), NULL, SCIP_GUBSet::nvars, 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 8958 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(), and sortItems(). Referenced by simplifyInequalities().
tries to simplify weights and delete redundant variables in knapsack a^Tx <= capacity
Definition at line 9075 of file cons_knapsack.c. References consdataChgWeight(), delCoefPos(), detectRedundantVars(), dualWeightsTightening(), FALSE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, prepareCons(), SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPcalcGreComDiv(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPisHugeValue(), SCIPvarGetName(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
deletes all fixed variables from knapsack constraint, and replaces variables with binary representatives
Definition at line 9328 of file cons_knapsack.c. References addCoef(), delCoefPos(), FALSE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, 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 SCIP_DECL_CONSPRESOL().
inserts an element into the list of binary zero implications
Definition at line 9538 of file cons_knapsack.c. References FALSE, MAX_ZEROITEMS_SIZE, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPgetNContVars(), SCIPgetNVars(), SCIPreallocBufferArray, and TRUE. Referenced by tightenWeightsLift().
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 9624 of file cons_knapsack.c. References addCoef(), BMSclearMemoryArray, calcCliquepartition(), FALSE, insertZerolist(), MAX_CLIQUELENGTH, MAX_USECLIQUES_SIZE, MAX_ZEROITEMS_SIZE, mergeMultiples(), MIN, NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetNContVars(), SCIPgetNegatedVar(), SCIPgetNVars(), SCIPgetVars(), SCIPreallocMemoryArray, SCIPvarGetCliques(), SCIPvarGetImplTypes(), SCIPvarGetImplVars(), SCIPvarGetName(), SCIPvarGetNBinImpls(), SCIPvarGetNCliques(), SCIPvarGetProbindex(), SCIPvarGetProbvarBinary(), SCIPvarIsBinary(), sortItems(), and TRUE. 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 10248 of file cons_knapsack.c. References 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, 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. Referenced by SCIP_DECL_CONSPRESOL().
adds negated cliques of the knapsack constraint to the global clique table
Definition at line 10804 of file cons_knapsack.c. References BMSclearMemoryArray, calcCliquepartition(), FALSE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddClique(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPsortDownLongPtrInt(), SCIPvarGetName(), sortItems(), and TRUE. Referenced by addCliques().
adds cliques of the knapsack constraint to the global clique table
Definition at line 11012 of file cons_knapsack.c. References addNegatedCliques(), BMSclearMemoryArray, calcCliquepartition(), FALSE, mergeMultiples(), NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPaddClique(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPsortDownLongPtr(), SCIPvarGetName(), sortItems(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
gets the key of the given element Definition at line 11245 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 11255 of file cons_knapsack.c. References FALSE, NULL, SCIPconsGetData(), SCIPvarCompare(), and TRUE.
returns the hash value of the key Definition at line 11298 of file cons_knapsack.c. References NULL, SCIPconsGetData(), SCIPvarGetIndex(), and sortItems().
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 11342 of file cons_knapsack.c. References HASHSIZE_KNAPSACKCONS, MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcHashtableSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdelCons(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPhashtableInsert(), SCIPhashtableRemove(), SCIPhashtableRetrieve(), SCIPupdateConsFlags(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
compares constraint with all prior constraints for possible redundancy or aggregation, and removes or changes constraint accordingly
Definition at line 11465 of file cons_knapsack.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPisGT(), SCIPisLT(), SCIPupdateConsFlags(), sortItems(), and TRUE. Referenced by SCIP_DECL_CONSPRESOL().
creates and captures a knapsack constraint out of a linear inequality
Definition at line 11659 of file cons_knapsack.c. References NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPallocBufferArray, SCIPcreateConsKnapsack(), SCIPfeasFloor(), SCIPfreeBufferArray, SCIPgetNegatedVar(), SCIPisFeasIntegral(), and SCIPisInfinity(). Referenced by SCIP_DECL_LINCONSUPGD().
tries to upgrade a linear constraint into a knapsack constraint Definition at line 11754 of file cons_knapsack.c. References createNormalizedKnapsack(), NULL, SCIP_GUBSet::nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPdebugMessage, and SCIPisInfinity().
copy method for constraint handler plugins (called when SCIP copies plugins) Definition at line 11792 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrKnapsack(), and TRUE.
destructor of constraint handler to free constraint handler data (called when SCIP is exiting) Definition at line 11808 of file cons_knapsack.c. References NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrSetData(), and SCIPfreeMemory.
initialization method of constraint handler (called after problem was transformed) Definition at line 11826 of file cons_knapsack.c. References BMSclearMemoryArray, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, SCIPconshdlrGetData(), SCIPgetNContVars(), and SCIPgetNVars().
deinitialization method of constraint handler (called before transformed problem is freed) Definition at line 11849 of file cons_knapsack.c. References NULL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfreeMemoryArrayNull.
presolving initialization method of constraint handler (called when presolving is about to begin) Definition at line 11868 of file cons_knapsack.c. References BMSclearMemoryArray, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_OKAY, SCIPallocMemoryArray, SCIPconshdlrGetData(), SCIPgetNContVars(), and SCIPgetNVars().
presolving deinitialization method of constraint handler (called after presolving has been finished) Definition at line 11916 of file cons_knapsack.c. References applyFixings(), NULL, SCIP_CALL, 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 11960 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPreleaseRow().
frees specific constraint data Definition at line 11984 of file cons_knapsack.c. References consdataFree(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrGetName().
transforms constraint data into data belonging to the transformed problem Definition at line 12004 of file cons_knapsack.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), and SCIPgetStage().
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) Definition at line 12041 of file cons_knapsack.c. References addRelaxation(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and SCIPconsIsInitial().
separation method of constraint handler for LP solutions Definition at line 12058 of file cons_knapsack.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetSepaFreq(), SCIPdebugMessage, SCIPgetCutoffbound(), SCIPgetDepth(), SCIPgetLocalLowerbound(), SCIPgetLowerbound(), SCIPgetNLPBranchCands(), SCIPgetNSepaRounds(), SCIPisLE(), SCIPisStopped(), and separateCons().
separation method of constraint handler for arbitrary primal solutions Definition at line 12132 of file cons_knapsack.c. References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetSepaFreq(), SCIPdebugMessage, SCIPgetDepth(), SCIPgetNSepaRounds(), SCIPisStopped(), and separateCons().
constraint enforcing method of constraint handler for LP solutions Definition at line 12193 of file cons_knapsack.c. References addRelaxation(), checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPdebugMessage, and SCIPgetDepth().
constraint enforcing method of constraint handler for pseudo solutions Definition at line 12246 of file cons_knapsack.c. References checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, and TRUE.
feasibility check method of constraint handler for integral solutions Definition at line 12267 of file cons_knapsack.c. References checkCons(), SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, and SCIP_OKAY.
domain propagation method of constraint handler Definition at line 12288 of file cons_knapsack.c. References FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_STAGE_INITSOLVE, SCIPconsGetData(), SCIPconshdlrGetData(), and SCIPgetStage().
presolving method of constraint handler Definition at line 12334 of file cons_knapsack.c. References addCliques(), applyFixings(), checkParallelObjective(), detectRedundantConstraints(), dualPresolving(), FALSE, mergeMultiples(), MINGAINPERNMINCOMPARISONS, NMINCOMPARISONS, normalizeWeights(), NULL, preprocessConstraintPairs(), propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPisStopped(), simplifyInequalities(), tightenWeights(), and TRUE.
propagation conflict resolving method of constraint handler Definition at line 12541 of file cons_knapsack.c. References FALSE, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_SUCCESS, SCIPaddConflictBinvar(), SCIPconsGetData(), SCIPvarGetIndex(), SCIPvarGetLbAtIndex(), SCIPvarGetLbLocal(), and SCIPvarGetUbAtIndex().
variable rounding lock method of constraint handler Definition at line 12624 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocks(), and SCIPconsGetData().
variable deletion method of constraint handler Definition at line 12643 of file cons_knapsack.c. References NULL, performVarDeletions(), SCIP_CALL, and SCIP_OKAY.
constraint display method of constraint handler Definition at line 12659 of file cons_knapsack.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPinfoMessage(), SCIPwriteVarName(), and TRUE.
constraint copying method of constraint handler Definition at line 12685 of file cons_knapsack.c. References NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetName(), SCIPcopyConsLinear(), SCIPfreeBufferArray, SCIPgetCapacityKnapsack(), SCIPgetNVarsKnapsack(), SCIPgetVarsKnapsack(), SCIPgetWeightsKnapsack(), and SCIPinfinity().
constraint parsing method of constraint handler Definition at line 12721 of file cons_knapsack.c. References FALSE, NULL, SCIP_GUBSet::nvars, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_VERBLEVEL_MINIMAL, SCIPallocBufferArray, SCIPcalcMemGrowSize(), SCIPcreateConsKnapsack(), SCIPfreeBufferArray, SCIPparseVarName(), SCIPreallocBufferArray, SCIPverbMessage(), and TRUE.
constraint method of constraint handler which returns the variables (if possible) Definition at line 12821 of file cons_knapsack.c. References BMScopyMemoryArray, FALSE, NULL, SCIP_GUBSet::nvars, SCIP_OKAY, SCIPconsGetData(), and TRUE.
constraint method of constraint handler which returns the number of variables (if possible) Definition at line 12843 of file cons_knapsack.c. References NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
execution method of bound change event handler Definition at line 12862 of file cons_knapsack.c. References CONSHDLR_NAME, FALSE, NULL, SCIP_EVENTTYPE_IMPLADDED, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPeventGetType(), SCIPeventGetVar(), SCIPfindConshdlr(), SCIPvarGetProbvar(), SCIPvarGetStatus(), and TRUE.
creates the handler for knapsack constraints and includes it in SCIP
Definition at line 12926 of file cons_knapsack.c. References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPRESOL, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, DEFAULT_DETECTCUTOFFBOUND, DEFAULT_DETECTLOWERBOUND, DEFAULT_DISAGGREGATION, DEFAULT_DUALPRESOLVING, DEFAULT_MAXCARDBOUNDDIST, DEFAULT_MAXROUNDS, DEFAULT_MAXROUNDSROOT, DEFAULT_MAXSEPACUTS, DEFAULT_MAXSEPACUTSROOT, DEFAULT_NEGATEDCLIQUE, DEFAULT_PRESOLPAIRWISE, DEFAULT_PRESOLUSEHASHING, DEFAULT_SEPACARDFREQ, DEFAULT_SIMPLIFYINEQUALITIES, DEFAULT_USEGUBS, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, LINCONSUPGD_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPerrorMessage, SCIPfindConshdlr(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPincludeLinconsUpgrade(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrDelvars(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitpre(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE. Referenced by SCIP_DECL_CONSHDLRCOPY(), and SCIPincludeDefaultPlugins().
creates and captures a knapsack constraint
Definition at line 13056 of file cons_knapsack.c. References consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPerrorMessage, and SCIPfindConshdlr(). Referenced by createAndAddLinearCons(), createCapacityRestriction(), createNormalizedKnapsack(), SCIP_DECL_CONSPARSE(), SCIP_DECL_PRESOLEXEC(), 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 13124 of file cons_knapsack.c. References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsKnapsack(), and TRUE.
adds new item to knapsack constraint
Definition at line 13143 of file cons_knapsack.c. References addCoef(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by addCoefTerm(), createCapacityRestriction(), and SCIPaddCoefPseudoboolean().
gets the capacity of the knapsack constraint
Definition at line 13164 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsSides(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
changes capacity of the knapsack constraint
Definition at line 13188 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetStage(). gets the number of items in the knapsack constraint
Definition at line 13217 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsNVars(), getLinearConsVarsData(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), 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 13238 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsVarsData(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), 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 13259 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. Referenced by addKnapsackConstraints(), checkKnapsack(), getLinearConsVarsData(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_READERWRITE(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints(). gets the dual solution of the knapsack constraint in the current LP
Definition at line 13280 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIProwGetDualsol(). gets the dual Farkas value of the knapsack constraint in the current infeasible LP
Definition at line 13304 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIProwGetDualfarkas(). 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 13330 of file cons_knapsack.c. References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage. |