68#define HEUR_NAME "nlpdiving"
69#define HEUR_DESC "NLP diving heuristic that chooses fixings w.r.t. the fractionalities"
70#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_DIVING
71#define HEUR_PRIORITY -1003010
74#define HEUR_MAXDEPTH -1
75#define HEUR_TIMING SCIP_HEURTIMING_AFTERLPPLUNGE
76#define HEUR_USESSUBSCIP FALSE
79#define EVENTHDLR_NAME "Nlpdiving"
80#define EVENTHDLR_DESC "bound change event handler for " HEUR_NAME " heuristic"
87#define DEFAULT_MINRELDEPTH 0.0
88#define DEFAULT_MAXRELDEPTH 1.0
89#define DEFAULT_MAXNLPITERABS 200
90#define DEFAULT_MAXNLPITERREL 10
91#define DEFAULT_MAXDIVEUBQUOT 0.8
93#define DEFAULT_MAXDIVEAVGQUOT 0.0
95#define DEFAULT_MAXDIVEUBQUOTNOSOL 0.1
96#define DEFAULT_MAXDIVEAVGQUOTNOSOL 0.0
97#define DEFAULT_MINSUCCQUOT 0.1
98#define DEFAULT_MAXFEASNLPS 10
99#define DEFAULT_FIXQUOT 0.2
100#define DEFAULT_BACKTRACK TRUE
101#define DEFAULT_LP FALSE
102#define DEFAULT_PREFERLPFRACS FALSE
103#define DEFAULT_PREFERCOVER TRUE
104#define DEFAULT_SOLVESUBMIP FALSE
105#define DEFAULT_NLPSTART 's'
106#define DEFAULT_VARSELRULE 'd'
109#define DEFAULT_NLPFASTFAIL TRUE
110#define DEFAULT_RANDSEED 97
195 for(
c = 0;
c < *nnlpcands; ++
c )
215 (*nlpcands)[
c] = (*nlpcands)[*nnlpcands];
216 (*nlpcandssol)[
c] = (*nlpcandssol)[*nnlpcands];
217 (*nlpcandsfrac)[
c] = (*nlpcandsfrac)[*nnlpcands];
225 for(
c = 0;
c < *nnlpcands; ++
c )
228 (*nlpcandsfrac)[
c] *= 100.0;
271 assert(covercomputed == (varincover !=
NULL));
281 for(
c = 0;
c < nnlpcands; ++
c )
295 frac = nlpcandsfrac[
c];
339 else if(
frac < 0.01 )
354 bestobjgain = objgain;
367 else if(
frac < 0.5 )
385 else if(
frac < 0.01 )
448 *bestcandmayround =
TRUE;
452 for(
c = 0;
c < nnlpcands; ++
c )
471 frac = nlpcandsfrac[
c];
493 if( score < bestscore )
547 bestnviolrows = INT_MAX;
551 for(
c = 0;
c < nnlpcands; ++
c )
567 frac = nlpcandsfrac[
c];
610 else if(
frac < 0.01 )
640 roundup = (nlocksdown > nlocksup);
643 roundup = (nlocksdown == nlocksup);
667 else if(
frac < 0.01 )
727 assert(pscostdown >= 0.0 && pscostup >= 0.0);
736 else if( rounddir == +1 )
762 (*pscostquot) *= 1000.0;
766 (*pscostquot) *= 1000.0;
813 for(
c = 0;
c < nnlpcands; ++
c )
829 frac = nlpcandsfrac[
c];
938 for(
c = 0;
c < nnlpcands; ++
c )
954 solval = nlpcandssol[
c];
955 frac = nlpcandsfrac[
c];
969 roundup = (solval < bestsolval);
1001 else if(
frac < 0.01 )
1016 bestobjgain = objgain;
1039 else if(
frac < 0.01 )
1098 assert(covercomputed == (varincover !=
NULL));
1105 for(
c = 0;
c < npseudocands; ++
c )
1123 lpsol = pseudocandslpsol[
c];
1124 nlpsol = pseudocandsnlpsol[
c];
1136 if( mayround && !(*bestcandmayround) )
1146 floorval =
MIN(lpsolfloor,nlpsolfloor);
1147 ceilval =
MAX(lpsolceil,nlpsolceil);
1154 frac = 0.33*(lpsol-floorval) + 0.67*(nlpsol-floorval);
1158 boundval =
MIN(lpsolfloor,nlpsolfloor);
1164 boundval =
MAX(nlpsolceil,lpsolceil);
1171 midval = (nlpsol+lpsol)/2.0;
1192 else if(
frac < 0.01 )
1204 if(
frac < bestfrac || (*bestcandmayround && !mayround) )
1208 *bestcandmayround =
FALSE;
1210 *bestboundval = boundval;
1216 *bestboundval -= 0.5;
1218 *bestboundval += 0.5;
1254 if( subvar ==
NULL )
1298 SCIP_CALL(
SCIPcopyConsCompression(
scip, subscip, varmap,
NULL,
"undercoversub",
NULL,
NULL, 0,
FALSE,
FALSE,
FALSE,
1302 for(
c = 0;
c < ncovervars;
c++)
1387 cutoffbound =
MIN(upperbound, cutoffbound);
1398 for(
c = 0;
c < nsubsols && !(*success); ++
c )
1646 int avgnnlpiterations;
1647 int maxnnlpiterations;
1657 int lastnlpsolvedepth;
1666 backtrackdepth = -1;
1667 backtrackvar =
NULL;
1668 backtrackvarval = 0.0;
1669 backtrackroundup =
FALSE;
1671 pseudocandsnlpsol =
NULL;
1672 pseudocandslpsol =
NULL;
1684 if( nodeinfeasible )
1723 maxnnlpiterations =
heurdata->maxnlpiterabs;
1727 if(
heurdata->nnlpiterations >= maxnnlpiterations )
1736 if( npseudocands == 0 )
1752 .iterlimit = maxnnlpiterations -
heurdata->nnlpiterations,
1786 assert(nnlpcands <= npseudocands);
1796 if( nnlpcands == 0 )
1813 SCIPdebugMsg(
scip,
" -> solution of first NLP was integral, feasible, and good enough\n");
1845 if(
heurdata->maxdiveubquotnosol > 0.0 )
1850 if(
heurdata->maxdiveavgquotnosol > 0.0 )
1858 if(
heurdata->maxdiveubquot > 0.0 )
1863 if(
heurdata->maxdiveavgquot > 0.0 )
1878 covercomputed =
FALSE;
1919 for(
c = 0;
c < ncovervars;
c++ )
1978 lastnlpsolvedepth = 0;
1982 startnnlpcands = nnlpcands;
1983 solvesubmip =
heurdata->solvesubmip;
1986 && (nfeasnlps < heurdata->maxfeasnlps
1987 || nnlpcands <= startnnlpcands -
divedepth/2
2004 bestcandmayround =
TRUE;
2007 updatepscost =
TRUE;
2019 bestboundval = nlpcandssol[
bestcand];
2028 bestboundval = nlpcandssol[
bestcand];
2037 bestboundval = nlpcandssol[
bestcand];
2046 bestboundval = nlpcandssol[
bestcand];
2056 assert(backtrackdepth > 0 || nnlpcands <= npseudocands);
2067 updatepscost =
FALSE;
2075 bestboundval = nlpcandssol[
bestcand];
2089 if( (
var ==
NULL || bestcandmayround) && backtrackdepth == -1 )
2134 SCIPdebugMsg(
scip,
"Selected variable <%s> already fixed to [%g,%g] (solval: %.9f), diving aborted \n",
2141 SCIPdebugMsg(
scip,
"selected variable's <%s> solution value is outside the domain [%g,%g] (solval: %.9f), diving aborted\n",
2148 if( backtrackroundup )
2150 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2158 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2166 backtrackdepth = -1;
2182 SCIPdebugMsg(
scip,
"Selected variable <%s> already fixed to [%g,%g] (solval: %.9f), diving aborted \n",
2189 SCIPdebugMsg(
scip,
"selected variable's <%s> solution value is outside the domain [%g,%g] (solval: %.9f), diving aborted\n",
2199 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, round=%u, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2207 if( backtrackdepth == -1 || (
divedepth - lastnlpsolvedepth == (
int)(
MIN(fixquot * nnlpcands, nlpbranchcands)/2.0)) )
2211 backtrackvarval = bestboundval;
2212 backtrackroundup =
FALSE;
2218 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, round=%u, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2226 if( backtrackdepth == -1 || (
divedepth - lastnlpsolvedepth == (
int)(
MIN(fixquot * nnlpcands, nlpbranchcands)/2.0)) )
2230 backtrackvarval = bestboundval;
2231 backtrackroundup =
TRUE;
2259 if( !
cutoff && solvesubmip && covercomputed &&
2260 (
heurdata->nfixedcovervars == ncovervars ||
2265 solvesubmip =
FALSE;
2267 assert(probingdepth >= 1);
2270 if(
heurdata->nfixedcovervars != ncovervars )
2273 for(
c = 0;
c < ncovervars && !
cutoff ;
c++ )
2285 nlpsolval =
MIN(nlpsolval,ub);
2286 nlpsolval =
MAX(nlpsolval,lb);
2391 if( !solvenlp && !
cutoff )
2393 solvenlp = (lastnlpsolvedepth <
divedepth - fixquot * nnlpcands);
2397 for(
c = 0;
c < nnlpcands; ++
c )
2405 if(
c == nnlpcands )
2413 if( !
cutoff && solvenlp )
2439 "Error while solving NLP in nlpdiving heuristic; NLP solve terminated with code <%d>\n", termstat);
2464 backtrackdepth = -1;
2482 if( backtrackdepth == -1 )
2506 updatepscost =
FALSE;
2542 || nnlpcands <= startnnlpcands -
divedepth/2
2605 for(
c = 0;
c < ncovervars;
c++ )
2614 if( nlpstartsol !=
NULL )
2646 if( covervars !=
NULL )
2690 eventExecNlpdiving,
NULL) );
2700 "minimal relative depth to start diving",
2704 "maximal relative depth to start diving",
2707 "heuristics/" HEUR_NAME "/maxnlpiterabs",
2708 "minimial absolute number of allowed NLP iterations",
2711 "heuristics/" HEUR_NAME "/maxnlpiterrel",
2712 "additional allowed number of NLP iterations relative to successfully found solutions",
2715 "heuristics/" HEUR_NAME "/maxdiveubquot",
2716 "maximal quotient (curlowerbound - lowerbound)/(cutoffbound - lowerbound) where diving is performed (0.0: no limit)",
2719 "heuristics/" HEUR_NAME "/maxdiveavgquot",
2720 "maximal quotient (curlowerbound - lowerbound)/(avglowerbound - lowerbound) where diving is performed (0.0: no limit)",
2723 "heuristics/" HEUR_NAME "/maxdiveubquotnosol",
2724 "maximal UBQUOT when no solution was found yet (0.0: no limit)",
2727 "heuristics/" HEUR_NAME "/maxdiveavgquotnosol",
2728 "maximal AVGQUOT when no solution was found yet (0.0: no limit)",
2732 "maximal number of NLPs with feasible solution to solve during one dive",
2736 "use one level of backtracking if infeasibility is encountered?",
2740 "should the LP relaxation be solved before the NLP relaxation?",
2743 "heuristics/" HEUR_NAME "/preferlpfracs",
2744 "prefer variables that are also fractional in LP solution?",
2748 "heuristic will not run if less then this percentage of calls succeeded (0.0: no limit)",
2752 "percentage of fractional variables that should be fixed before the next NLP solve",
2756 "should variables in a minimal cover be preferred?",
2760 "should a sub-MIP be solved if all cover variables are fixed?",
2764 "should the NLP solver stop early if it converges slow?",
2768 "which point should be used as starting point for the NLP solver? ('n'one, last 'f'easible, from dive's'tart)",
2772 "which variable selection should be used? ('f'ractionality, 'c'oefficient, 'p'seudocost, 'g'uided, 'd'ouble, 'v'eclen)",
#define SCIP_PROBINGSCORE_PENALTYRATIO
#define SCIP_MAXTREEDEPTH
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPcopyConsCompression(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_RETCODE SCIPcheckCopyLimits(SCIP *sourcescip, SCIP_Bool *success)
SCIP_RETCODE SCIPcopyLimits(SCIP *sourcescip, SCIP *targetscip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
int SCIPgetNIntVars(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNBinVars(SCIP *scip)
SCIP_Bool SCIPisObjIntegral(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_Real SCIPgetLocalLowerbound(SCIP *scip)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
#define SCIPdebugMsgPrint
SCIP_RETCODE SCIPcomputeCoverUndercover(SCIP *scip, int *coversize, SCIP_VAR **cover, SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Real objlimit, SCIP_Bool globalbounds, SCIP_Bool onlyconvexify, SCIP_Bool coverand, SCIP_Bool coverbd, SCIP_Bool coverind, SCIP_Bool covernl, char coveringobj, SCIP_Bool *success)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
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)
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)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
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)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)
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)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPincludeHeurNlpdiving(SCIP *scip)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Real SCIPeventGetOldbound(SCIP_EVENT *event)
SCIP_VAR * SCIPeventGetVar(SCIP_EVENT *event)
SCIP_Real SCIPeventGetNewbound(SCIP_EVENT *event)
SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur,)
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
SCIP_Longint SCIPheurGetNSolsFound(SCIP_HEUR *heur)
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur,)
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur,)
SCIP_Real SCIPheurGetTime(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur,)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_Longint SCIPgetLastDivenode(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
int SCIPgetNNlpis(SCIP *scip)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_NLPSOLSTAT SCIPgetNLPSolstat(SCIP *scip)
#define SCIPsolveNLP(...)
SCIP_Real SCIPgetNLPObjval(SCIP *scip)
SCIP_RETCODE SCIPgetNLPFracVars(SCIP *scip, SCIP_VAR ***fracvars, SCIP_Real **fracvarssol, SCIP_Real **fracvarsfrac, int *nfracvars, int *npriofracvars)
SCIP_RETCODE SCIPsetNLPInitialGuessSol(SCIP *scip, SCIP_SOL *sol)
SCIP_NLPTERMSTAT SCIPgetNLPTermstat(SCIP *scip)
SCIP_RETCODE SCIPgetNLPStatistics(SCIP *scip, SCIP_NLPSTATISTICS *statistics)
SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)
int SCIPgetProbingDepth(SCIP *scip)
SCIP_RETCODE SCIPchgVarUbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPchgVarLbProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_RETCODE SCIPbacktrackProbing(SCIP *scip, int probingdepth)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPnewProbingNode(SCIP *scip)
SCIP_RETCODE SCIPsolveProbingLP(SCIP *scip, int itlim, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPcreateNLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
int SCIPgetNSols(SCIP *scip)
SCIP_RETCODE SCIPunlinkSol(SCIP *scip, SCIP_SOL *sol)
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPlinkNLPSol(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIProundSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *success)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_RETCODE SCIPtrySol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Longint SCIPgetNSolsFound(SCIP *scip)
int SCIPgetMaxDepth(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Real SCIPgetAvgLowerbound(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Bool SCIPisUbBetter(SCIP *scip, SCIP_Real newub, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLbBetter(SCIP *scip, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Real oldub)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPvarGetNLPSol(SCIP_VAR *var)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
void SCIPenableVarHistory(SCIP *scip)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
#define DEFAULT_MAXDIVEUBQUOT
#define DEFAULT_MAXDIVEAVGQUOT
#define DEFAULT_BACKTRACK
#define DEFAULT_MAXDIVEUBQUOTNOSOL
#define DEFAULT_MAXRELDEPTH
#define DEFAULT_MAXDIVEAVGQUOTNOSOL
#define DEFAULT_MINRELDEPTH
static SCIP_LPSOLSTAT lpsolstat
assert(minobj< SCIPgetCutoffbound(scip))
#define DEFAULT_MAXNLPITERREL
static SCIP_RETCODE chooseCoefVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **nlpcands, SCIP_Real *nlpcandssol, SCIP_Real *nlpcandsfrac, int nnlpcands, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
static SCIP_RETCODE chooseGuidedVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **nlpcands, SCIP_Real *nlpcandssol, SCIP_Real *nlpcandsfrac, int nnlpcands, SCIP_SOL *bestsol, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
static void calcPscostQuot(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR *var, SCIP_Real primsol, SCIP_Real frac, int rounddir, SCIP_Real *pscostquot, SCIP_Bool *roundup, SCIP_Bool prefvar)
SCIPheurSetData(heur, NULL)
static SCIP_RETCODE chooseFracVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **nlpcands, SCIP_Real *nlpcandssol, SCIP_Real *nlpcandsfrac, int nnlpcands, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
static SCIP_RETCODE doSolveSubMIP(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **covervars, int ncovervars, SCIP_Bool *success)
static SCIP_RETCODE getNLPFracVars(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR ***nlpcands, SCIP_Real **nlpcandssol, SCIP_Real **nlpcandsfrac, int *nnlpcands)
#define DEFAULT_PREFERCOVER
static SCIP_RETCODE chooseDoubleVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **pseudocands, SCIP_Real *pseudocandsnlpsol, SCIP_Real *pseudocandslpsol, int npseudocands, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Real *bestboundval, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
#define DEFAULT_PREFERLPFRACS
static SCIP_RETCODE chooseVeclenVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **nlpcands, SCIP_Real *nlpcandssol, SCIP_Real *nlpcandsfrac, int nnlpcands, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
#define DEFAULT_MAXNLPITERABS
SCIPfreeSol(scip, &heurdata->sol))
static SCIP_RETCODE createNewSol(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_HASHMAP *varmap, SCIP_SOL *subsol, SCIP_Bool *success)
static SCIP_RETCODE choosePscostVar(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **nlpcands, SCIP_Real *nlpcandssol, SCIP_Real *nlpcandsfrac, int nnlpcands, SCIP_HASHMAP *varincover, SCIP_Bool covercomputed, int *bestcand, SCIP_Bool *bestcandmayround, SCIP_Bool *bestcandroundup)
#define DEFAULT_SOLVESUBMIP
static SCIP_RETCODE solveSubMIP(SCIP *scip, SCIP_HEUR *heur, SCIP_VAR **covervars, int ncovervars, SCIP_Bool *success)
#define DEFAULT_VARSELRULE
SCIPfreeRandom(scip, &heurdata->randnumgen)
#define DEFAULT_NLPFASTFAIL
#define DEFAULT_MAXFEASNLPS
#define DEFAULT_MINSUCCQUOT
SCIPcreateSol(scip, &heurdata->sol, heur))
NLP diving heuristic that chooses fixings w.r.t. the fractionalities.
SCIP_Bool bestcandroundup
SCIP_Bool bestcandmayroundup
SCIP_Bool bestcandmayrounddown
NLP local search primal heuristic using sub-SCIPs.
Undercover primal heuristic for MINLPs.
memory allocation routines
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing events
public methods for primal heuristics
public methods for message output
#define SCIPstatisticMessage
public data structures and miscellaneous methods
public methods for primal CIP solutions
public methods for problem variables
public methods for branching rule plugins and branching
public methods for problem copies
public methods for event handler plugins and event handlers
public methods for primal heuristic plugins and divesets
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for NLPI solver interfaces
public methods for node selector plugins
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for random numbers
public methods for solutions
public methods for querying solving statistics
public methods for timing
public methods for the branch-and-bound tree
public methods for SCIP variables
struct SCIP_Eventhdlr SCIP_EVENTHDLR
#define SCIP_EVENTTYPE_BOUNDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_LBCHANGED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
#define SCIP_DECL_HEURCOPY(x)
struct SCIP_HeurData SCIP_HEURDATA
struct SCIP_Heur SCIP_HEUR
#define SCIP_DECL_HEURINIT(x)
#define SCIP_DECL_HEUREXIT(x)
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_HEUREXEC(x)
enum SCIP_LPSolStat SCIP_LPSOLSTAT
@ SCIP_LPSOLSTAT_NOTSOLVED
@ SCIP_LPSOLSTAT_INFEASIBLE
@ SCIP_LPSOLSTAT_OBJLIMIT
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_RandNumGen SCIP_RANDNUMGEN
struct SCIP_NlpStatistics SCIP_NLPSTATISTICS
@ SCIP_NLPPARAM_FASTFAIL_CONSERVATIVE
@ SCIP_NLPPARAM_FASTFAIL_AGGRESSIVE
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
@ SCIP_NLPTERMSTAT_NUMERICERROR
@ SCIP_NLPTERMSTAT_LICENSEERROR
@ SCIP_NLPSOLSTAT_LOCINFEASIBLE
@ SCIP_NLPSOLSTAT_FEASIBLE
@ SCIP_NLPSOLSTAT_UNKNOWN
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
enum SCIP_Retcode SCIP_RETCODE