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
196 for(
c = 0;
c < *nnlpcands; ++
c )
216 (*nlpcands)[
c] = (*nlpcands)[*nnlpcands];
217 (*nlpcandssol)[
c] = (*nlpcandssol)[*nnlpcands];
218 (*nlpcandsfrac)[
c] = (*nlpcandsfrac)[*nnlpcands];
226 for(
c = 0;
c < *nnlpcands; ++
c )
229 (*nlpcandsfrac)[
c] *= 100.0;
272 assert(covercomputed == (varincover !=
NULL));
282 for(
c = 0;
c < nnlpcands; ++
c )
296 frac = nlpcandsfrac[
c];
340 else if(
frac < 0.01 )
355 bestobjgain = objgain;
368 else if(
frac < 0.5 )
386 else if(
frac < 0.01 )
449 *bestcandmayround =
TRUE;
453 for(
c = 0;
c < nnlpcands; ++
c )
472 frac = nlpcandsfrac[
c];
494 if( score < bestscore )
548 bestnviolrows = INT_MAX;
552 for(
c = 0;
c < nnlpcands; ++
c )
568 frac = nlpcandsfrac[
c];
611 else if(
frac < 0.01 )
641 roundup = (nlocksdown > nlocksup);
644 roundup = (nlocksdown == nlocksup);
668 else if(
frac < 0.01 )
728 assert(pscostdown >= 0.0 && pscostup >= 0.0);
737 else if( rounddir == +1 )
763 (*pscostquot) *= 1000.0;
767 (*pscostquot) *= 1000.0;
814 for(
c = 0;
c < nnlpcands; ++
c )
830 frac = nlpcandsfrac[
c];
939 for(
c = 0;
c < nnlpcands; ++
c )
955 solval = nlpcandssol[
c];
956 frac = nlpcandsfrac[
c];
970 roundup = (solval < bestsolval);
1002 else if(
frac < 0.01 )
1017 bestobjgain = objgain;
1040 else if(
frac < 0.01 )
1099 assert(covercomputed == (varincover !=
NULL));
1106 for(
c = 0;
c < npseudocands; ++
c )
1124 lpsol = pseudocandslpsol[
c];
1125 nlpsol = pseudocandsnlpsol[
c];
1137 if( mayround && !(*bestcandmayround) )
1147 floorval =
MIN(lpsolfloor,nlpsolfloor);
1148 ceilval =
MAX(lpsolceil,nlpsolceil);
1155 frac = 0.33*(lpsol-floorval) + 0.67*(nlpsol-floorval);
1159 boundval =
MIN(lpsolfloor,nlpsolfloor);
1165 boundval =
MAX(nlpsolceil,lpsolceil);
1172 midval = (nlpsol+lpsol)/2.0;
1193 else if(
frac < 0.01 )
1205 if(
frac < bestfrac || (*bestcandmayround && !mayround) )
1209 *bestcandmayround =
FALSE;
1211 *bestboundval = boundval;
1217 *bestboundval -= 0.5;
1219 *bestboundval += 0.5;
1255 if( subvar ==
NULL )
1299 SCIP_CALL(
SCIPcopyConsCompression(
scip, subscip, varmap,
NULL,
"undercoversub",
NULL,
NULL, 0,
FALSE,
FALSE,
FALSE,
1303 for(
c = 0;
c < ncovervars;
c++)
1388 cutoffbound =
MIN(upperbound, cutoffbound);
1399 for(
c = 0;
c < nsubsols && !(*success); ++
c )
1694 int avgnnlpiterations;
1695 int maxnnlpiterations;
1705 int lastnlpsolvedepth;
1719 if( nodeinfeasible )
1754 maxnnlpiterations =
heurdata->maxnlpiterabs;
1758 if(
heurdata->nnlpiterations >= maxnnlpiterations )
1767 if( npseudocands == 0 )
1782 .iterlimit = maxnnlpiterations -
heurdata->nnlpiterations,
1816 assert(nnlpcands <= npseudocands);
1826 if( nnlpcands == 0 )
1843 SCIPdebugMsg(
scip,
" -> solution of first NLP was integral, feasible, and good enough\n");
1875 if(
heurdata->maxdiveubquotnosol > 0.0 )
1880 if(
heurdata->maxdiveavgquotnosol > 0.0 )
1888 if(
heurdata->maxdiveubquot > 0.0 )
1893 if(
heurdata->maxdiveavgquot > 0.0 )
1910 backtrackdepth = -1;
1911 backtrackvar =
NULL;
1912 backtrackvarval = 0.0;
1913 backtrackroundup =
FALSE;
1915 pseudocandsnlpsol =
NULL;
1916 pseudocandslpsol =
NULL;
1918 covercomputed =
FALSE;
1959 for(
c = 0;
c < ncovervars;
c++ )
2018 lastnlpsolvedepth = 0;
2022 startnnlpcands = nnlpcands;
2023 solvesubmip =
heurdata->solvesubmip;
2026 && (nfeasnlps < heurdata->maxfeasnlps
2027 || nnlpcands <= startnnlpcands -
divedepth/2
2044 bestcandmayround =
TRUE;
2047 updatepscost =
TRUE;
2059 bestboundval = nlpcandssol[
bestcand];
2068 bestboundval = nlpcandssol[
bestcand];
2077 bestboundval = nlpcandssol[
bestcand];
2086 bestboundval = nlpcandssol[
bestcand];
2096 assert(backtrackdepth > 0 || nnlpcands <= npseudocands);
2107 updatepscost =
FALSE;
2115 bestboundval = nlpcandssol[
bestcand];
2129 if( (
var ==
NULL || bestcandmayround) && backtrackdepth == -1 )
2174 SCIPdebugMsg(
scip,
"Selected variable <%s> already fixed to [%g,%g] (solval: %.9f), diving aborted \n",
2181 SCIPdebugMsg(
scip,
"selected variable's <%s> solution value is outside the domain [%g,%g] (solval: %.9f), diving aborted\n",
2188 if( backtrackroundup )
2190 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2198 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2206 backtrackdepth = -1;
2222 SCIPdebugMsg(
scip,
"Selected variable <%s> already fixed to [%g,%g] (solval: %.9f), diving aborted \n",
2229 SCIPdebugMsg(
scip,
"selected variable's <%s> solution value is outside the domain [%g,%g] (solval: %.9f), diving aborted\n",
2239 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, round=%u, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2247 if( backtrackdepth == -1 || (
divedepth - lastnlpsolvedepth == (
int)(
MIN(fixquot * nnlpcands, nlpbranchcands)/2.0)) )
2251 backtrackvarval = bestboundval;
2252 backtrackroundup =
FALSE;
2258 SCIPdebugMsg(
scip,
" dive %d/%d, NLP iter %d/%d: var <%s>, round=%u, sol=%g, oldbounds=[%g,%g], newbounds=[%g,%g]\n",
2266 if( backtrackdepth == -1 || (
divedepth - lastnlpsolvedepth == (
int)(
MIN(fixquot * nnlpcands, nlpbranchcands)/2.0)) )
2270 backtrackvarval = bestboundval;
2271 backtrackroundup =
TRUE;
2299 if( !
cutoff && solvesubmip && covercomputed &&
2300 (
heurdata->nfixedcovervars == ncovervars ||
2305 solvesubmip =
FALSE;
2307 assert(probingdepth >= 1);
2310 if(
heurdata->nfixedcovervars != ncovervars )
2313 for(
c = 0;
c < ncovervars && !
cutoff ;
c++ )
2325 nlpsolval =
MIN(nlpsolval,ub);
2326 nlpsolval =
MAX(nlpsolval,lb);
2433 if( !solvenlp && !
cutoff )
2435 solvenlp = (lastnlpsolvedepth <
divedepth - fixquot * nnlpcands);
2439 for(
c = 0;
c < nnlpcands; ++
c )
2447 if(
c == nnlpcands )
2455 if( !
cutoff && solvenlp )
2481 "Error while solving NLP in nlpdiving heuristic; NLP solve terminated with code <%d>\n", termstat);
2506 backtrackdepth = -1;
2524 if( backtrackdepth == -1 )
2548 updatepscost =
FALSE;
2584 || nnlpcands <= startnnlpcands -
divedepth/2
2647 for(
c = 0;
c < ncovervars;
c++ )
2656 if( nlpstartsol !=
NULL )
2688 if( covervars !=
NULL )
2735 eventExecNlpdiving,
NULL) );
2745 "minimal relative depth to start diving",
2749 "maximal relative depth to start diving",
2752 "heuristics/" HEUR_NAME "/maxnlpiterabs",
2753 "minimial absolute number of allowed NLP iterations",
2756 "heuristics/" HEUR_NAME "/maxnlpiterrel",
2757 "additional allowed number of NLP iterations relative to successfully found solutions",
2760 "heuristics/" HEUR_NAME "/maxdiveubquot",
2761 "maximal quotient (curlowerbound - lowerbound)/(cutoffbound - lowerbound) where diving is performed (0.0: no limit)",
2764 "heuristics/" HEUR_NAME "/maxdiveavgquot",
2765 "maximal quotient (curlowerbound - lowerbound)/(avglowerbound - lowerbound) where diving is performed (0.0: no limit)",
2768 "heuristics/" HEUR_NAME "/maxdiveubquotnosol",
2769 "maximal UBQUOT when no solution was found yet (0.0: no limit)",
2772 "heuristics/" HEUR_NAME "/maxdiveavgquotnosol",
2773 "maximal AVGQUOT when no solution was found yet (0.0: no limit)",
2777 "maximal number of NLPs with feasible solution to solve during one dive",
2781 "use one level of backtracking if infeasibility is encountered?",
2785 "should the LP relaxation be solved before the NLP relaxation?",
2788 "heuristics/" HEUR_NAME "/preferlpfracs",
2789 "prefer variables that are also fractional in LP solution?",
2793 "heuristic will not run if less then this percentage of calls succeeded (0.0: no limit)",
2797 "percentage of fractional variables that should be fixed before the next NLP solve",
2801 "should variables in a minimal cover be preferred?",
2805 "should a sub-MIP be solved if all cover variables are fixed?",
2809 "should the NLP solver stop early if it converges slow?",
2813 "which point should be used as starting point for the NLP solver? ('n'one, last 'f'easible, from dive's'tart)",
2817 "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)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNContVars(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 SCIPgetNContImplVars(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_HEURTIMING SCIPheurGetTimingmask(SCIP_HEUR *heur)
SCIP_Longint SCIPheurGetNSolsFound(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurInitsol(SCIP *scip, SCIP_HEUR *heur,)
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur,)
void SCIPheurSetTimingmask(SCIP_HEUR *heur, SCIP_HEURTIMING timingmask)
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurExitsol(SCIP *scip, 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)
BMS_BLKMEM * SCIPblkmem(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_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
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
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_HEURINITSOL(x)
#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_HEUREXITSOL(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
unsigned int SCIP_HEURTIMING
#define SCIP_HEURTIMING_NONE
@ SCIP_VARTYPE_CONTINUOUS