All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
heur_twoopt.c File Reference Detailed Descriptionprimal heuristic to improve incumbent solution by flipping pairs of variables Definition in file heur_twoopt.c. Go to the source code of this file.
Macro Definition Documentation
Definition at line 28 of file heur_twoopt.c. Referenced by SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), SCIP_DECL_HEURINITSOL(), and SCIPincludeHeurTwoopt().
Definition at line 29 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 30 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 31 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 32 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 33 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 34 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
Definition at line 36 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
does the heuristic use a secondary SCIP instance? Definition at line 37 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
optional integer optimization is applied by default Definition at line 40 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
default number of nodes to wait after current best solution before calling heuristic Definition at line 41 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
default percentage by which two variables have to match in their LP-row set to be associated as pair by heuristic Definition at line 42 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
default number of slave candidates for a master variable Definition at line 44 of file heur_twoopt.c. Referenced by SCIPincludeHeurTwoopt().
the default array size for temporary arrays Definition at line 45 of file heur_twoopt.c. Referenced by optimize(). Typedef DocumentationDefinition at line 105 of file heur_twoopt.c. Definition at line 113 of file heur_twoopt.c. Enumeration Type Documentation
Definition at line 100 of file heur_twoopt.c.
Definition at line 107 of file heur_twoopt.c. Function Documentation
tries to switch the values of two binary or integer variables and checks feasibility with respect to the LP.
Definition at line 123 of file heur_twoopt.c. References NULL, SCIP_OKAY, SCIP_Real, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), SCIProwGetLhs(), SCIProwGetLPPos(), SCIProwGetRhs(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE. Referenced by optimize(). compare two variables with respect to their columns. Columns are treated as {0,1} vector, where every nonzero entry is treated as '1', and compared to each other lexicographically. I.e. var1 is < var2 if the corresponding column of var2 has the smaller single nonzero index of the two columns. This comparison costs O(constraints) in the worst case
Definition at line 219 of file heur_twoopt.c. References NULL, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIProwGetIndex(), and SCIPvarGetCol(). Referenced by SCIP_DECL_SORTPTRCOMP().
implements a comparator to compare two variables with respect to their column entries Definition at line 262 of file heur_twoopt.c. References varColCompare().
checks if two given variables are contained in common LP rows, returns true if variables share the necessary percentage (matchingrate) of rows.
Definition at line 271 of file heur_twoopt.c. References FALSE, MAX, NULL, SCIP_Real, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPisFeasLE(), SCIProwGetIndex(), SCIPvarGetCol(), and TRUE. Referenced by innerPresolve().
determines a bound by which the absolute solution value of two integer variables can be shifted at most. the criterion is the maintenance of feasibility of any global LP row. first implementation only considers shifting proportion 1:1, i.e. if master value is shifted by a certain integer value k downwards, the value of slave is simultaneously shifted by k upwards.
Definition at line 363 of file heur_twoopt.c. References DIRECTION_DOWN, DIRECTION_UP, FALSE, MIN, NULL, SCIP_Bool, SCIP_Real, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPdebugMessage, SCIPfeasFloor(), SCIPgetSolVal(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIProwGetIndex(), SCIProwGetLhs(), SCIProwGetLPPos(), SCIProwGetName(), SCIProwGetRhs(), SCIProwIsLocal(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), and TRUE. Referenced by optimize().
disposes variable with no heuristic relevancy, e.g., due to a fixed solution value, from its neighborhood block. The affected neighborhood block is reduced by 1.
Definition at line 586 of file heur_twoopt.c. References NULL. Referenced by optimize().
realizes the presolve independently from type of variables it's applied to
Definition at line 602 of file heur_twoopt.c. References checkConstraintMatching(), MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPduplicateBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPreallocBlockMemoryArray, and SCIPsortPtr(). Referenced by presolveTwoOpt().
initializes the required structures for execution of heuristic. If objective coefficient functions are not all equal, each Binary and Integer variables are sorted into heuristic-specific arrays with respect to their lexicographical column order, where every zero in a column is interpreted as zero and every nonzero as '1'. After the sorting, the variables are compared with respect to user parameter matchingrate and the heuristic specific blocks are determined.
Definition at line 700 of file heur_twoopt.c. References innerPresolve(), MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIPgetVarsData(), SCIPheurSetData(), SCIPstatisticMessage, and TRUE. Referenced by SCIP_DECL_HEUREXEC().
copy method for primal heuristic plugins (called when SCIP copies plugins) Definition at line 787 of file heur_twoopt.c. References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurTwoopt().
destructor of primal heuristic to free user data (called when SCIP is exiting) Definition at line 801 of file heur_twoopt.c. References HEUR_NAME, NULL, SCIP_OKAY, SCIPfreeMemory, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
initialization method of primal heuristic (called after problem was transformed) Definition at line 821 of file heur_twoopt.c. References FALSE, HEUR_NAME, NULL, SCIP_OKAY, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
Definition at line 880 of file heur_twoopt.c. References DEFAULT_ARRAYSIZE, determineBound(), DIRECTION_DOWN, DIRECTION_NONE, DIRECTION_UP, disposeVariable(), FALSE, MIN, NULL, OPTTYPE_BINARY, OPTTYPE_INTEGER, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetRandomInt(), SCIPgetSolVal(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLT(), SCIPisZero(), SCIPreallocBufferArray, SCIPsetSolVal(), SCIPsortRealPtrPtrInt(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), shiftValues(), and TRUE. Referenced by SCIP_DECL_HEUREXEC().
deinitialization method of primal heuristic (called before transformed problem is freed) Definition at line 1249 of file heur_twoopt.c. References NULL, SCIP_OKAY, SCIP_Real, SCIPfreeBlockMemoryArray, SCIPheurGetData(), SCIPheurSetData(), and SCIPstatisticMessage.
solving process initialization method of primal heuristic (called when branch and bound process is about to begin) Definition at line 1342 of file heur_twoopt.c. References FALSE, HEUR_NAME, NULL, SCIP_OKAY, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed) Definition at line 1375 of file heur_twoopt.c. References HEUR_NAME, NULL, SCIP_OKAY, SCIPfreeBlockMemoryArray, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
execution method of primal heuristic Definition at line 1439 of file heur_twoopt.c. References FALSE, MIN, NULL, optimize(), OPTTYPE_BINARY, OPTTYPE_INTEGER, presolveTwoOpt(), SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPchgVarLbDive(), SCIPchgVarUbDive(), SCIPcolSort(), SCIPcreateSolCopy(), SCIPdebug, SCIPdebugMessage, SCIPendDive(), SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetBestSol(), SCIPgetLPColsData(), SCIPgetLPRowsData(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNLPIterations(), SCIPgetNLPRows(), SCIPgetNNodes(), SCIPgetNVars(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPgetVarLbDive(), SCIPgetVars(), SCIPgetVarUbDive(), SCIPhasCurrentNodeLP(), SCIPheurGetData(), SCIPheurGetName(), SCIPisFeasEQ(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLT(), SCIPlinkLPSol(), SCIPprintRow(), SCIPprintSol(), SCIProwGetLhs(), SCIProwGetLPPos(), SCIProwGetRhs(), SCIProwIsLocal(), SCIPsolGetHeur(), SCIPsolGetIndex(), SCIPsolGetNodenum(), SCIPsolIsOriginal(), SCIPsolSetHeur(), SCIPsolveDiveLP(), SCIPstartDive(), SCIPstatisticMessage, SCIPtrySol(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPwarningMessage(), and TRUE.
creates the twoopt primal heuristic and includes it in SCIP
Definition at line 1740 of file heur_twoopt.c. References DEFAULT_INTOPT, DEFAULT_MATCHINGRATE, DEFAULT_MAXNSLAVES, DEFAULT_WAITINGNODES, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPincludeHeurBasic(), SCIPsetHeurCopy(), SCIPsetHeurExit(), SCIPsetHeurExitsol(), SCIPsetHeurFree(), SCIPsetHeurInit(), SCIPsetHeurInitsol(), and TRUE. Referenced by SCIP_DECL_HEURCOPY(), and SCIPincludeDefaultPlugins(). |