All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cons_knapsack.h File Reference Detailed DescriptionConstraint handler for knapsack constraints of the form , x binary and . This constraint handler handles a special type of linear constraints, namely knapsack constraints. A knapsack constraint has the form
with non-negative integer coefficients , integer right-hand side , and binary variables . Definition in file cons_knapsack.h. #include "scip/scip.h" Go to the source code of this file. Function Documentation
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.
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 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().
separates lifted valid inequalities for given knapsack problem 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(). |