heur_shiftandpropagate.c File Reference Detailed Descriptionshiftandpropagate primal heuristic Definition in file heur_shiftandpropagate.c. #include <assert.h> #include <string.h> #include "scip/pub_misc.h" #include "scip/heur_shiftandpropagate.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 29 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEURCOPY(), and SCIPincludeHeurShiftandpropagate().
Definition at line 30 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 31 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 32 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 33 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 34 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 35 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 36 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
does the heuristic use a secondary SCIP instance? Definition at line 37 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
the heuristic row weight for inequalities Definition at line 39 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEUREXEC().
the heuristic row weight for equations Definition at line 40 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEUREXEC().
Should continuous variables be relaxed from the problem? Definition at line 41 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Is propagation of solution values enabled? Definition at line 42 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Should heuristic only be executed if no primal solution was found, yet? Definition at line 43 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
The default number of propagation rounds for each propagation used Definition at line 44 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
fixed maximum number of propagations Definition at line 45 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEUREXEC().
fixed maximum number of allowed cutoffs before the heuristic stops Definition at line 46 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
the default random seed for random number generation Definition at line 47 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEURINIT().
the default key for variable sorting Definition at line 48 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should variables be processed in sorted order? Definition at line 49 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should variable statistics be collected during probing? Definition at line 50 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Should the heuristic stop calculating optimal shift values when no more rows are violated? Definition at line 51 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Should binary variables be shifted first? Definition at line 52 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should the heuristic choose the best candidate in every round? (set to FALSE for static order)? Definition at line 53 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
maximum percentage of allowed cutoffs before stopping the heuristic Definition at line 54 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
options sorting key: (n)orms down, norms (u)p, (v)iolated rows decreasing, viola(t)ed rows increasing, or (r)andom Definition at line 55 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should variables with a zero shifting value be delayed instead of being fixed? Definition at line 58 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should binary variables with no locks in one direction be fixed to that direction? Definition at line 59 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should binary variables with no locks be preferred in the ordering? Definition at line 60 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should coefficients and left/right hand sides be normalized by max row coeff? Definition at line 61 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should row weight be increased every time the row is violated? Definition at line 62 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
should implicit integer variables be treated as continuous variables? Definition at line 63 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 65 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeHeurShiftandpropagate().
Definition at line 66 of file heur_shiftandpropagate.c. Referenced by SCIPincludeHeurShiftandpropagate().
Definition at line 67 of file heur_shiftandpropagate.c. Referenced by SCIP_DECL_HEUREXEC(). Typedef Documentation
Definition at line 121 of file heur_shiftandpropagate.c.
Definition at line 145 of file heur_shiftandpropagate.c. Enumeration Type Documentation
status of a variable in heuristic transformation Definition at line 114 of file heur_shiftandpropagate.c. Function Documentationreturns whether a given variable is counted as discrete, depending on the parameter impliscontinuous
Definition at line 166 of file heur_shiftandpropagate.c. References colIsDiscrete(), SCIP_Bool, SCIP_VARTYPE_IMPLINT, SCIPvarGetType(), and SCIPvarIsIntegral(). Referenced by initMatrix(), and SCIP_DECL_HEUREXEC(). returns whether a given column is counted as discrete, depending on the parameter impliscontinuous
Definition at line 176 of file heur_shiftandpropagate.c. References getRowData(), SCIP_VARTYPE_IMPLINT, SCIPcolGetVar(), SCIPcolIsIntegral(), and SCIPvarGetType(). Referenced by initMatrix(), and varIsDiscrete().
returns nonzero values and corresponding columns of given row
Definition at line 186 of file heur_shiftandpropagate.c. References getColumnData(), and NULL. Referenced by checkRowViolation(), colIsDiscrete(), and relaxVar().
returns nonzero values and corresponding rows of given column
Definition at line 225 of file heur_shiftandpropagate.c. References NULL, and relaxVar(). Referenced by checkViolations(), getOptimalShiftingValue(), getRowData(), transformVariable(), and updateTransformation().
relaxes a continuous variable from all its rows, which has influence on both the left and right hand side of the constraint.
Definition at line 258 of file heur_shiftandpropagate.c. References getRowData(), NULL, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPcolGetNLPNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPdebugMessage, SCIPgetRowMaxCoef(), SCIPinfinity(), SCIPisFeasGT(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIProwGetLPPos(), SCIProwGetName(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), and transformVariable(). Referenced by getColumnData(), and initMatrix().
transforms bounds of a given variable s.t. its lower bound equals zero afterwards. If the variable already has lower bound zero, the variable is not transformed, if not, the variable's bounds are changed w.r.t. the smaller absolute value of its bounds in order to avoid numerical inaccuracies. If both lower and upper bound of the variable differ from infinity, there are two cases. If |lb| <= |ub|, the bounds are shifted by -lb, else a new variable ub - x replaces x. The transformation is memorized by the transform status of the variable s.t. retransformation is possible.
Definition at line 361 of file heur_shiftandpropagate.c. References FALSE, getColumnData(), initMatrix(), NULL, SCIP_Bool, SCIP_Real, SCIPcolGetVar(), SCIPcolIsInLP(), SCIPdebugMessage, SCIPinfinity(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRANSFORMSTATUS_FREE, TRANSFORMSTATUS_LB, TRANSFORMSTATUS_NEG, and TRUE. Referenced by initMatrix(), relaxVar(), and updateTransformation().
initializes copy of the original coefficient matrix and applies heuristic specific adjustments: normalizing row vectors, transforming variable domains such that lower bound is zero, and relaxing continuous variables.
Definition at line 469 of file heur_shiftandpropagate.c. References colIsDiscrete(), FALSE, freeMatrix(), MAX, NULL, relaxVar(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocMemoryArray, SCIPcolGetLPPos(), SCIPcolGetNLPNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPcolGetVar(), SCIPdebug, SCIPdebugMessage, SCIPgetLPRowsData(), SCIPgetRowMaxCoef(), SCIPinfinity(), SCIPisFeasGT(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPprintRow(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetLPPos(), SCIProwGetName(), SCIProwGetNLPNonz(), SCIProwGetRhs(), SCIProwGetVals(), TRANSFORMSTATUS_NONE, transformVariable(), TRUE, and varIsDiscrete(). Referenced by SCIP_DECL_HEUREXEC(), and transformVariable().
frees all members of the heuristic matrix
Definition at line 722 of file heur_shiftandpropagate.c. References checkRowViolation(), NULL, SCIPfreeBuffer, and SCIPfreeMemoryArray. Referenced by initMatrix(), and SCIP_DECL_HEUREXEC().
updates the information about a row whenever violation status changes
Definition at line 770 of file heur_shiftandpropagate.c. References checkViolations(), getRowData(), NULL, SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), and SCIPisFeasLT(). Referenced by checkViolations(), and freeMatrix().
collects the necessary information about row violations for the zero-solution. That is, all solution values in heuristic transformation are zero.
Definition at line 835 of file heur_shiftandpropagate.c. References BMSclearMemoryArray, checkRowViolation(), getColumnData(), NULL, retransformVariable(), SCIP_Real, SCIPdebugMessage, SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), and SCIPisFeasLT(). Referenced by checkRowViolation(), SCIP_DECL_HEUREXEC(), and updateTransformation().
retransforms solution values of variables according to their transformation status
Definition at line 896 of file heur_shiftandpropagate.c. References getOptimalShiftingValue(), NULL, SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), TRANSFORMSTATUS_LB, TRANSFORMSTATUS_NEG, and TRANSFORMSTATUS_NONE. Referenced by checkViolations(), and SCIP_DECL_HEUREXEC().
determines the best shifting value of a variable
Definition at line 930 of file heur_shiftandpropagate.c. References FALSE, getColumnData(), NULL, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPfeasCeil(), SCIPfeasFloor(), SCIPinfinity(), SCIPisFeasGT(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisInfinity(), SCIPsortRealInt(), TRUE, and updateTransformation(). Referenced by retransformVariable(), and SCIP_DECL_HEUREXEC().
updates transformation of a given variable by taking into account current local bounds. if the bounds have changed since last update, updating the heuristic specific upper bound of the variable, its current transformed solution value and all affected rows is necessary.
Definition at line 1109 of file heur_shiftandpropagate.c. References checkViolations(), FALSE, getColumnData(), NULL, SCIP_Bool, SCIP_DECL_SORTPTRCOMP(), SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPdebugMessage, SCIPerrorMessage, SCIPinfinity(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisInfinity(), TRANSFORMSTATUS_FREE, TRANSFORMSTATUS_LB, TRANSFORMSTATUS_NEG, TRANSFORMSTATUS_NONE, transformVariable(), and TRUE. Referenced by getOptimalShiftingValue(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_HEUREXEC().
comparison method for columns; binary < integer < implicit < continuous variables Definition at line 1232 of file heur_shiftandpropagate.c. References NULL, SCIP_DECL_HEUREXIT(), SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPABORT, SCIPcolGetVar(), SCIPerrorMessage, and SCIPvarGetType(). Referenced by updateTransformation().
deinitialization method of primal heuristic(called before transformed problem is freed) Definition at line 1301 of file heur_shiftandpropagate.c. References NULL, SCIP_DECL_HEURINIT(), SCIP_OKAY, SCIPheurGetData(), SCIPstatistic, and SCIPstatisticMessage. Referenced by SCIP_DECL_SORTPTRCOMP().
initialization method of primal heuristic(called after problem was transformed). We only need this method for statistic mode of heuristic. Definition at line 1331 of file heur_shiftandpropagate.c. References DEFAULT_RANDSEED, NULL, SCIP_DECL_HEURFREE(), SCIP_LPSOLSTAT_NOTSOLVED, SCIP_OKAY, SCIPheurGetData(), and SCIPstatistic. Referenced by SCIP_DECL_HEUREXIT().
destructor of primal heuristic to free user data(called when SCIP is exiting) Definition at line 1355 of file heur_shiftandpropagate.c. References NULL, SCIP_DECL_HEURCOPY(), SCIP_OKAY, SCIPeventhdlrGetData(), SCIPfreeMemory, SCIPheurGetData(), and SCIPheurSetData(). Referenced by SCIP_DECL_HEURINIT().
copy method for primal heuristic plugins(called when SCIP copies plugins) Definition at line 1380 of file heur_shiftandpropagate.c. References HEUR_NAME, NULL, SCIP_CALL, SCIP_DECL_HEUREXEC(), SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurShiftandpropagate(). Referenced by SCIP_DECL_HEURFREE().
execution method of primal heuristic Definition at line 1394 of file heur_shiftandpropagate.c. References BMSclearMemoryArray, BMScopyMemoryArray, checkViolations(), DEFAULT_PROPBREAKER, DEFAULT_WEIGHT_EQUALITY, DEFAULT_WEIGHT_INEQUALITY, EVENTTYPE_SHIFTANDPROPAGATE, FALSE, freeMatrix(), getOptimalShiftingValue(), initMatrix(), NULL, retransformVariable(), SCIP_Bool, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPallocBuffer, SCIPallocBufferArray, SCIPbacktrackProbing(), SCIPcatchVarEvent(), SCIPchgVarLbProbing(), SCIPchgVarUbProbing(), SCIPcolGetLPPos(), SCIPcolGetVar(), SCIPconstructLP(), SCIPcreateSol(), SCIPdebug, SCIPdebugMessage, SCIPdisableVarHistory(), SCIPdropVarEvent(), SCIPenableVarHistory(), SCIPendProbing(), SCIPeventhdlrGetData(), SCIPfixVarProbing(), SCIPflushLP(), SCIPfreeBuffer, SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetBestSol(), SCIPgetDepth(), SCIPgetDepthLimit(), SCIPgetLPColsData(), SCIPgetLPSolstat(), SCIPgetNContVars(), SCIPgetNLPIterations(), SCIPgetNLPRows(), SCIPgetNVars(), SCIPgetProbingDepth(), SCIPgetSolOrigObj(), SCIPgetVars(), SCIPhasCurrentNodeLP(), SCIPheurGetData(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisLE(), SCIPisLPConstructed(), SCIPisStopped(), SCIPlinkLPSol(), SCIPnewProbingNode(), SCIPpermuteIntArray(), SCIPprintSol(), SCIPpropagateProbing(), SCIPsetSolVal(), SCIPsolSetHeur(), SCIPsolveProbingLP(), SCIPsortDownIntInt(), SCIPsortDownRealInt(), SCIPsortIntInt(), SCIPsortPtr(), SCIPsortRealInt(), SCIPstartProbing(), SCIPstatistic, SCIPstatisticMessage, SCIPtrySol(), SCIPvarGetCol(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), SCIPvarIsInLP(), SCIPvarIsIntegral(), SCIPwarningMessage(), TRANSFORMSTATUS_FREE, TRUE, updateTransformation(), and varIsDiscrete(). Referenced by SCIP_DECL_HEURCOPY().
event handler execution method for the heuristic which catches all events in which a lower or upper bound were tightened Definition at line 2281 of file heur_shiftandpropagate.c. References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcolGetVar(), SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPincludeHeurShiftandpropagate(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and updateTransformation(). Referenced by SCIP_DECL_HEUREXEC().
creates the shiftandpropagate primal heuristic and includes it in SCIP
Definition at line 2325 of file heur_shiftandpropagate.c. References DEFAULT_BINLOCKSFIRST, DEFAULT_COLLECTSTATS, DEFAULT_CUTOFFBREAKER, DEFAULT_FIXBINLOCKS, DEFAULT_IMPLISCONTINUOUS, DEFAULT_MAXCUTOFFQUOT, DEFAULT_NORMALIZE, DEFAULT_NOZEROFIXING, DEFAULT_NPROPROUNDS, DEFAULT_ONLYWITHOUTSOL, DEFAULT_PREFERBINARIES, DEFAULT_PROBING, DEFAULT_RELAX, DEFAULT_SELECTBEST, DEFAULT_SORTKEY, DEFAULT_SORTVARS, DEFAULT_STOPAFTERFEASIBLE, DEFAULT_UPDATEWEIGHTS, EVENTHDLR_DESC, EVENTHDLR_NAME, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPincludeEventhdlrBasic(), SCIPincludeHeurBasic(), SCIPsetHeurCopy(), SCIPsetHeurExit(), SCIPsetHeurFree(), SCIPsetHeurInit(), SORTKEYS, and TRUE. Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEURCOPY(), and SCIPincludeDefaultPlugins(). |