heur_shiftandpropagate.c
Go to the documentation of this file.
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 30 #define HEUR_DESC "Pre-root heuristic to expand an auxiliary branch-and-bound tree and apply propagation techniques" 43 #define DEFAULT_ONLYWITHOUTSOL TRUE /**< Should heuristic only be executed if no primal solution was found, yet? */ 44 #define DEFAULT_NPROPROUNDS 10 /**< The default number of propagation rounds for each propagation used */ 46 #define DEFAULT_CUTOFFBREAKER 15 /**< fixed maximum number of allowed cutoffs before the heuristic stops */ 50 #define DEFAULT_COLLECTSTATS TRUE /**< should variable statistics be collected during probing? */ 51 #define DEFAULT_STOPAFTERFEASIBLE TRUE /**< Should the heuristic stop calculating optimal shift values when no more rows are violated? */ 53 #define DEFAULT_SELECTBEST FALSE /**< should the heuristic choose the best candidate in every round? (set to FALSE for static order)? */ 54 #define DEFAULT_MAXCUTOFFQUOT 0.0 /**< maximum percentage of allowed cutoffs before stopping the heuristic */ 55 #define SORTKEYS "nrtuv"/**< options sorting key: (n)orms down, norms (u)p, (v)iolated rows decreasing, 57 #define DEFAULT_NOZEROFIXING FALSE /**< should variables with a zero shifting value be delayed instead of being fixed? */ 58 #define DEFAULT_FIXBINLOCKS TRUE /**< should binary variables with no locks in one direction be fixed to that direction? */ 59 #define DEFAULT_BINLOCKSFIRST FALSE /**< should binary variables with no locks be preferred in the ordering? */ 60 #define DEFAULT_NORMALIZE TRUE /**< should coefficients and left/right hand sides be normalized by max row coeff? */ 61 #define DEFAULT_UPDATEWEIGHTS FALSE /**< should row weight be increased every time the row is violated? */ 62 #define DEFAULT_IMPLISCONTINUOUS TRUE /**< should implicit integer variables be treated as continuous variables? */ 80 SCIP_Bool onlywithoutsol; /**< Should heuristic only be executed if no primal solution was found, yet? */ 83 int cutoffbreaker; /**< the number of cutoffs before heuristic execution is stopped, or -1 for no 87 SCIP_Real maxcutoffquot; /**< maximum percentage of allowed cutoffs before stopping the heuristic */ 92 SCIP_Bool stopafterfeasible; /**< Should the heuristic stop calculating optimal shift values when no 95 SCIP_Bool nozerofixing; /**< should variables with a zero shifting value be delayed instead of being fixed? */ 96 SCIP_Bool fixbinlocks; /**< should binary variables with no locks in one direction be fixed to that direction? */ 97 SCIP_Bool binlocksfirst; /**< should binary variables with no locks be preferred in the ordering? */ 98 SCIP_Bool normalize; /**< should coefficients and left/right hand sides be normalized by max row coeff? */ 100 SCIP_Bool impliscontinuous; /**< should implicit integer variables be treated as continuous variables? */ 101 SCIP_Bool selectbest; /**< should the heuristic choose the best candidate in every round? (set to FALSE for static order)? */ 114 { 119 }; 132 TRANSFORMSTATUS* transformstatus; /**< information about transform status of every discrete variable */ 136 SCIP_Real* upperbounds; /**< the upper bounds of every non-continuous variable after transformation*/ 137 SCIP_Real* transformshiftvals; /**< values by which original discrete variable bounds were shifted */ 163 /** returns whether a given variable is counted as discrete, depending on the parameter impliscontinuous */ 170 return SCIPvarIsIntegral(var) && (SCIPvarGetType(var) != SCIP_VARTYPE_IMPLINT || !impliscontinuous); 173 /** returns whether a given column is counted as discrete, depending on the parameter impliscontinuous */ 180 return SCIPcolIsIntegral(col) && (!impliscontinuous || SCIPvarGetType(SCIPcolGetVar(col)) != SCIP_VARTYPE_IMPLINT); 389 /* if both lower and upper bound are -infinity and infinity, resp., this is reflected by a free transform status. 390 * If the lower bound is already zero, this is reflected by identity transform status. In both cases, none of the 419 /* determine the upper bound for this variable in heuristic transformation (lower bound is implicit; always 0) */ 460 SCIPdebugMessage("Variable <%s> at colpos %d transformed. LB <%g> --> <%g>, UB <%g> --> <%g>\n", 464 /** initializes copy of the original coefficient matrix and applies heuristic specific adjustments: normalizing row 465 * vectors, transforming variable domains such that lower bound is zero, and relaxing continuous variables. 576 SCIPdebugMessage(" %s : lhs=%g, rhs=%g, maxval=%g \n", SCIProwGetName(row), matrix->lhs[i], matrix->rhs[i], maxval); 582 /* modify the lhs and rhs w.r.t to the rows constant and normalize by 1-norm, i.e divide the lhs and rhs by the 596 * Maxval may be zero if the constraint contains no variables but is modifiable, hence not redundant 607 /* in case of empty rows with a 0 < lhs <= 0.0 or 0.0 <= rhs < 0 we deduce the infeasibility of the problem */ 608 if( nrowlpnonz == 0 && (SCIPisFeasPositive(scip, matrix->lhs[i]) || SCIPisFeasNegative(scip, matrix->rhs[i])) ) 663 /* loop over all rows with nonzero coefficients in the column, transform them and add them to the heuristic matrix */ 714 SCIPdebugMessage("Matrix initialized for %d discrete variables with %d cols, %d rows and %d nonzero entries\n", 793 if( violatedrowpos[rowindex] == -1 && (SCIPisFeasGT(scip, matrix->lhs[rowindex], 0.0) || SCIPisFeasLT(scip, matrix->rhs[rowindex], 0.0)) ) 806 else if( violatedrowpos[rowindex] >= 0 && SCIPisFeasLE(scip, matrix->lhs[rowindex], 0.0) && SCIPisFeasGE(scip, matrix->rhs[rowindex], 0.0) ) 855 /* check if we requested an update for a single variable, or if we want to (re)-initialize the whole violation info */ 886 checkRowViolation(scip, matrix, rowpos, violatedrows, violatedrowpos, nviolatedrows, rowweights, updateweights); 888 assert((violatedrowpos[rowpos] == -1 && SCIPisFeasGE(scip, matrix->rhs[rowpos], 0.0) && SCIPisFeasLE(scip, matrix->lhs[rowpos], 0.0)) 889 || (violatedrowpos[rowpos] >= 0 &&(SCIPisFeasLT(scip, matrix->rhs[rowpos], 0.0) || SCIPisFeasGT(scip, matrix->lhs[rowpos], 0.0)))); 911 /* check if original variable has different bounds and transform solution value correspondingly */ 927 * @todo if there is already an incumbent solution, try considering the objective cutoff as additional constraint */ 990 /* for a feasible row, determine the minimum integer value within the bounds of the variable by which it has to be 1000 * i.e. a positive coefficient for a "<="-constraint, a negative coefficient for a ">="-constraint. 1007 /* if the variable has no lock in the current row, it can still help to increase the slack of this row; 1015 /* check if the least violating shift lies within variable bounds and set corresponding array values */ 1028 /* for a violated row, determine the minimum integral value within the bounds of the variable by which it has to be 1037 /* if coefficient has the right sign to make row feasible, determine the minimum integer to shift variable 1045 /* check if the minimum feasibility recovery shift lies within variable bounds and set corresponding array 1062 /* in case that the variable cannot affect the feasibility of any row, in particular it cannot violate 1078 /* best shifting step is calculated by summing up the violation changes for each relevant step and 1079 * taking the one which leads to the minimum sum. This sum measures the balance of feasibility recovering and 1081 * note, the sums for smaller steps have to be taken into account for all bigger steps, i.e., the sums can be 1088 /* if we reached the last entry for the current step value, we have finished computing its sum and 1103 /** updates transformation of a given variable by taking into account current local bounds. if the bounds have changed 1104 * since last update, updating the heuristic specific upper bound of the variable, its current transformed solution value 1181 assert(SCIPisFeasLE(scip, ABS(lb), ABS(ub)) || matrix->transformstatus[varindex] == TRANSFORMSTATUS_NEG); 1187 SCIPerrorMessage("Error: Invalid variable status <%d> in shift and propagagate heuristic, aborting!\n"); 1191 /* if the bound, by which the variable was shifted, has changed, deltashift is different from zero, which requires 1204 /* go through rows, update the rows w.r.t. the influence of the changed transformation of the variable */ 1221 checkViolations(scip, matrix, varindex, violatedrows, violatedrowpos, nviolatedrows, heurdata->rowweights, heurdata->updateweights); 1232 { 1316 " SHIFTANDPROPAGATE PROBING : %d probings, %" SCIP_LONGINT_FORMAT " domain reductions, ncutoffs: %d , LP iterations: %" SCIP_LONGINT_FORMAT " \n ", 1326 /** initialization method of primal heuristic(called after problem was transformed). We only need this method for 1493 /* copy and sort the columns by their variable types (binary before integer before implicit integer before continuous) */ 1500 /* we have to collect the number of different variable types before we start probing since during probing variable 1523 /* save the position of this column in the array such that it can be accessed as the "true" column position */ 1538 /* this should always be fulfilled becase we perform shift and propagate only at the root node */ 1550 SCIP_CALL( initMatrix(scip, matrix, heurdata, colposs, heurdata->normalize, &nmaxrows, heurdata->relax, &initialized, &infeasible) ); 1562 /* the number of discrete LP column variables can be less than the actual number of variables, if, e.g., there 1567 SCIPdebugMessage("Not all discrete variables are in the current LP. Shiftandpropagate execution terminated.\n"); 1616 checkViolations(scip, matrix, -1, violatedrows, violatedrowpos, &nviolatedrows, heurdata->rowweights, heurdata->updateweights); 1627 /* sort variables w.r.t. the sorting key parameter. Sorting is indirect, all matrix column data 1696 SCIPdebugMessage("Variables sorted (upwards) w.r.t their number of currently infeasible rows!\n"); 1705 SCIPpermuteIntArray(&permutation[nbinvars], nbinvars - 1, ndiscvars - nbinvars - 1, &heurdata->randseed); 1755 /* if c reaches nbinwithoutlocks, then all binary variables without locks were sorted to the beginning of the array */ 1765 while( SCIPvarIsBinary(var) && (SCIPvarGetNLocksUp(var) == 0 || SCIPvarGetNLocksDown(var) == 0) ) 1781 while( !SCIPvarIsBinary(binvar) || (SCIPvarGetNLocksUp(binvar) > 0 && SCIPvarGetNLocksDown(binvar) > 0) ) 1802 assert((c < nbinwithoutlocks) == (SCIPvarIsBinary(SCIPcolGetVar(heurdata->lpcols[permutation[c]])) 1826 SCIP_CALL( SCIPcatchVarEvent(scip, var, EVENTTYPE_SHIFTANDPROPAGATE, eventhdlr, eventdatas[c], NULL) ); 1834 SCIPdebugMessage("SHIFT_AND_PROPAGATE heuristic starts main loop with %d violations and %d remaining variables!\n", 1839 /* loop over variables, shift them according to shifting criteria and try to reduce the global infeasibility */ 1890 SCIP_CALL( updateTransformation(scip, matrix, heurdata, permutedvarindex,lb, ub, violatedrows, violatedrowpos, 1911 /* check whether the variable is binary and has no locks in one direction, so that we want to fix it to the 1914 if( heurdata->fixbinlocks && SCIPvarIsBinary(var) && (SCIPvarGetNLocksUp(var) == 0 || SCIPvarGetNLocksDown(var) == 0) ) 1926 /* only apply the computationally expensive best shift selection, if there is a violated row left */ 1930 SCIP_CALL( getOptimalShiftingValue(scip, matrix, permutedvarindex, 1, heurdata->rowweights, steps, violationchange, 1942 SCIP_CALL( getOptimalShiftingValue(scip, matrix, permutedvarindex, -1, heurdata->rowweights, steps, violationchange, 1957 /* if zero optimal shift values are forbidden by the user parameter, delay the variable by marking it suspicious */ 1973 /* if propagation is enabled, fix the variable to the new solution value and propagate the fixation 1978 /* this assert should be always fulfilled because we run this heuristic at the root node only and do not 1987 SCIPdebugMessage(" Shift %g(%g originally) is optimal, propagate solution\n", optimalshiftvalue, origsolval); 1992 SCIPdebugMessage("Propagation finished! <%" SCIP_LONGINT_FORMAT "> domain reductions %s, <%d> probing depth\n", ndomredsfound, cutoff ? "CUTOFF" : "", 2005 if( heurdata->cutoffbreaker >= 0 && ncutoffs >= ((heurdata->maxcutoffquot * SCIPgetProbingDepth(scip)) + heurdata->cutoffbreaker) ) 2017 /* this assert should be always fulfilled because we run this heuristic at the root node only and do not 2022 /* if the variable upper and lower bound are equal to the solution value to which we tried to fix the variable, 2023 * we are trapped at an infeasible node and break; this can only happen due to an intermediate global bound change of the variable, 2026 if( SCIPisFeasEQ(scip, SCIPvarGetUbLocal(var), origsolval) && SCIPisFeasEQ(scip, SCIPvarGetLbLocal(var), origsolval) ) 2033 /* if the variable were to be set to one of its bounds, repropagate by tightening this bound by 1.0 2046 /* if the variable were to be set to one of its bounds, repropagate by tightening this bound by 1.0 2059 /* if the tightened bound again leads to a cutoff, both subproblems are proven infeasible and the heuristic 2067 /* since repropagation was successful, we indicate that this variable led to a cutoff in one direction */ 2083 SCIPdebugMessage(" Suspicious variable! Postponed from pos <%d> to position <%d>\n", c, lastindexofsusp); 2100 SCIPdebugMessage("Heuristic finished with %d remaining violations and %d remaining variables!\n", 2103 /* if constructed solution might be feasible, go through the queue of suspicious variables and set the solution 2121 /* update the transformation of the variable, since the bound might have changed after the last update. */ 2123 SCIP_CALL( updateTransformation(scip, matrix, heurdata, permutedvarindex, SCIPvarGetLbLocal(var), 2126 /* retransform the solution value from the heuristic transformed space, set the solution value accordingly */ 2132 SCIP_CALL( SCIPfixVarProbing(scip, var, origsolval) ); /* only to ensure that some assertions can be made later */ 2134 SCIPdebugMessage(" Remaining variable <%s> set to <%g>; %d Violations\n", SCIPvarGetName(var), origsolval, 2166 SCIPdebugMessage(" -> old LP iterations: %" SCIP_LONGINT_FORMAT "\n", SCIPgetNLPIterations(scip)); 2169 * errors in the LP solver should not kill the overall solving process, if the LP is just needed for a heuristic. 2170 * hence in optimized mode, the return code is caught and a warning is printed, only in debug mode, SCIP will stop. 2178 SCIPwarningMessage(scip, "Error while solving LP in SHIFTANDPROPAGATE heuristic; LP solve terminated with code <%d>\n", 2186 SCIPdebugMessage(" -> new LP iterations: %" SCIP_LONGINT_FORMAT "\n", SCIPgetNLPIterations(scip)); 2209 /* @todo: maybe bounds don't need to be checked, in this case put an assert concerning stored ?????????? */ 2217 SCIPstatisticMessage(" Shiftandpropagate solution value: %16.9g \n", SCIPgetSolOrigObj(scip, sol)); 2238 SCIP_CALL( SCIPdropVarEvent(scip, var, EVENTTYPE_SHIFTANDPROPAGATE, eventhdlr, eventdatas[c], -1) ); 2313 SCIP_CALL( updateTransformation(scip, matrix, eventhdlrdata->heurdata, colpos, lb, ub, eventhdlrdata->violatedrows, 2363 SCIP_CALL( SCIPaddIntParam(scip, "heuristics/" HEUR_NAME "/nproprounds", "The number of propagation rounds used for each propagation", 2365 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/relax", "Should continuous variables be relaxed?", 2367 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/probing", "Should domains be reduced by probing?", 2369 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/onlywithoutsol", "Should heuristic only be executed if no primal solution was found, yet?", 2371 SCIP_CALL( SCIPaddIntParam(scip, "heuristics/" HEUR_NAME "/cutoffbreaker", "The number of cutoffs before heuristic stops", 2373 SCIP_CALL( SCIPaddCharParam(scip, "heuristics/" HEUR_NAME "/sortkey", "the key for variable sorting: (n)orms down, norms (u)p, (v)iolations down, viola(t)ions up, or (r)andom", 2375 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/sortvars", "Should variables be sorted for the heuristic?", 2377 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/" HEUR_NAME "/collectstats", "should variable statistics be collected during probing?", 2379 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/stopafterfeasible", "Should the heuristic stop calculating optimal shift values when no more rows are violated?", 2381 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/preferbinaries", "Should binary variables be shifted first?", 2383 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/nozerofixing", "should variables with a zero shifting value be delayed instead of being fixed?", 2385 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/fixbinlocks", "should binary variables with no locks in one direction be fixed to that direction?", 2387 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/binlocksfirst", "should binary variables with no locks be preferred in the ordering?", 2389 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/normalize", "should coefficients and left/right hand sides be normalized by max row coeff?", 2391 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/updateweights", "should row weight be increased every time the row is violated?", 2393 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/impliscontinuous", "should implicit integer variables be treated as continuous variables?", 2395 SCIP_CALL( SCIPaddBoolParam(scip, "heuristics/shiftandpropagate/selectbest", "should the heuristic choose the best candidate in every round? (set to FALSE for static order)?", 2397 SCIP_CALL( SCIPaddRealParam(scip, "heuristics/" HEUR_NAME "/maxcutoffquot", "maximum percentage of allowed cutoffs before stopping the heuristic", void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len) SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff) Definition: scip.c:32788 Definition: type_result.h:33 Definition: type_result.h:47 preroot heuristic that alternatingly fixes variables and propagates domains Definition: struct_scip.h:53 static void relaxVar(SCIP *scip, SCIP_VAR *var, CONSTRAINTMATRIX *matrix, SCIP_Bool normalize) Definition: heur_shiftandpropagate.c:258 SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy))) Definition: scip.c:7297 SCIP_RETCODE SCIPbacktrackProbing(SCIP *scip, int probingdepth) Definition: scip.c:32250 void SCIPwarningMessage(SCIP *scip, const char *formatstr,...) Definition: scip.c:1248 SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41920 static SCIP_DECL_HEUREXEC(heurExecShiftandpropagate) Definition: heur_shiftandpropagate.c:1394 Definition: heur_shiftandpropagate.c:118 Definition: struct_var.h:196 SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val) Definition: scip.c:34843 SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, unsigned int timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata) Definition: scip.c:7252 SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound) Definition: scip.c:32552 static SCIP_DECL_EVENTEXEC(eventExecShiftandpropagate) Definition: heur_shiftandpropagate.c:2281 static void freeMatrix(SCIP *scip, CONSTRAINTMATRIX **matrix) Definition: heur_shiftandpropagate.c:722 SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata) Definition: scip.c:7778 Definition: type_var.h:53 void SCIPsortDownIntInt(int *intarray1, int *intarray2, int len) void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len) SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols) Definition: scip.c:26672 Definition: struct_lp.h:123 Definition: struct_sol.h:50 SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3547 SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3573 static SCIP_DECL_HEUREXIT(heurExitShiftandpropagate) Definition: heur_shiftandpropagate.c:1301 SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos) Definition: scip.c:36622 static SCIP_Bool varIsDiscrete(SCIP_VAR *var, SCIP_Bool impliscontinuous) Definition: heur_shiftandpropagate.c:166 Definition: type_result.h:35 void SCIPsortIntInt(int *intarray1, int *intarray2, int len) static void transformVariable(SCIP *scip, CONSTRAINTMATRIX *matrix, SCIP_HEURDATA *heurdata, int colpos) Definition: heur_shiftandpropagate.c:361 static SCIP_Bool colIsDiscrete(SCIP_COL *col, SCIP_Bool impliscontinuous) Definition: heur_shiftandpropagate.c:176 #define EVENTTYPE_SHIFTANDPROPAGATE Definition: heur_shiftandpropagate.c:67 SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur) Definition: scip.c:34002 static SCIP_RETCODE initMatrix(SCIP *scip, CONSTRAINTMATRIX *matrix, SCIP_HEURDATA *heurdata, int *colposs, SCIP_Bool normalize, int *nmaxrows, SCIP_Bool relax, SCIP_Bool *initialized, SCIP_Bool *infeasible) Definition: heur_shiftandpropagate.c:469 SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41907 Definition: type_var.h:42 Definition: type_retcode.h:33 SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows) Definition: scip.c:26750 void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len) SCIP_EVENTHDLRDATA * SCIPeventhdlrGetData(SCIP_EVENTHDLR *eventhdlr) Definition: event.c:288 static SCIP_DECL_HEURINIT(heurInitShiftandpropagate) Definition: heur_shiftandpropagate.c:1331 SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41946 Definition: struct_heur.h:75 void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata) Definition: heur.c:1068 Definition: type_lp.h:34 public data structures and miscellaneous methods Definition: type_var.h:55 Definition: heur_shiftandpropagate.c:116 SCIP_RETCODE SCIPincludeHeurShiftandpropagate(SCIP *scip) Definition: heur_shiftandpropagate.c:2325 Definition: type_var.h:54 Definition: struct_lp.h:189 SCIP_RETCODE SCIPfixVarProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval) Definition: scip.c:32415 static void getColumnData(CONSTRAINTMATRIX *matrix, int colindex, SCIP_Real **valpointer, int **indexpointer, int *ncolvals) Definition: heur_shiftandpropagate.c:225 static void checkRowViolation(SCIP *scip, CONSTRAINTMATRIX *matrix, int rowindex, int *violatedrows, int *violatedrowpos, int *nviolatedrows, int *rowweights, SCIP_Bool updateweights) Definition: heur_shiftandpropagate.c:770 SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit))) Definition: scip.c:7345 SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit))) Definition: scip.c:7329 SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos) Definition: scip.c:36668 static void checkViolations(SCIP *scip, CONSTRAINTMATRIX *matrix, int colidx, int *violatedrows, int *violatedrowpos, int *nviolatedrows, int *rowweights, SCIP_Bool updateweights) Definition: heur_shiftandpropagate.c:835 static SCIP_DECL_HEURCOPY(heurCopyShiftandpropagate) Definition: heur_shiftandpropagate.c:1380 static SCIP_Real retransformVariable(SCIP *scip, CONSTRAINTMATRIX *matrix, SCIP_VAR *var, int varindex, SCIP_Real solvalue) Definition: heur_shiftandpropagate.c:896 static SCIP_RETCODE updateTransformation(SCIP *scip, CONSTRAINTMATRIX *matrix, SCIP_HEURDATA *heurdata, int varindex, SCIP_Real lb, SCIP_Real ub, int *violatedrows, int *violatedrowpos, int *nviolatedrows) Definition: heur_shiftandpropagate.c:1109 const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr) Definition: event.c:278 static void getRowData(CONSTRAINTMATRIX *matrix, int rowindex, SCIP_Real **valpointer, SCIP_Real *lhs, SCIP_Real *rhs, int **indexpointer, int *nrowvals) Definition: heur_shiftandpropagate.c:186 SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:32352 SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41933 SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree))) Definition: scip.c:7313 Definition: heur_shiftandpropagate.c:117 SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3657 SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound) Definition: scip.c:32318 void SCIPpermuteIntArray(int *array, int begin, int end, unsigned int *randseed) Definition: misc.c:7855 SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file) Definition: scip.c:28334 static SCIP_DECL_SORTPTRCOMP(heurSortColsShiftandpropagate) Definition: heur_shiftandpropagate.c:1232 SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2) Definition: scip.c:41959 Definition: heur_shiftandpropagate.c:119 Definition: type_lp.h:33 Definition: type_retcode.h:43 Definition: objbranchrule.h:33 SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: scip.c:3629 static SCIP_DECL_HEURFREE(heurFreeShiftandpropagate) Definition: heur_shiftandpropagate.c:1355 SCIP_RETCODE SCIPtrySol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored) Definition: scip.c:36217 Definition: struct_event.h:185 static SCIP_RETCODE getOptimalShiftingValue(SCIP *scip, CONSTRAINTMATRIX *matrix, int varindex, int direction, int *rowweights, SCIP_Real *steps, int *violationchange, SCIP_Real *beststep, int *rowviolations) Definition: heur_shiftandpropagate.c:930 SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros) Definition: scip.c:35397 Definition: type_var.h:56 |