49 #define HEUR_NAME "gins" 50 #define HEUR_DESC "gins works on k-neighborhood in a variable-constraint graph" 51 #define HEUR_DISPCHAR 'K' 52 #define HEUR_PRIORITY -1103000 54 #define HEUR_FREQOFS 8 55 #define HEUR_MAXDEPTH -1 56 #define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE 57 #define HEUR_USESSUBSCIP TRUE 59 #define DEFAULT_NODESOFS 500 60 #define DEFAULT_MAXNODES 5000 61 #define DEFAULT_MINIMPROVE 0.01 62 #define DEFAULT_MINNODES 50 63 #define DEFAULT_MINFIXINGRATE 0.66 64 #define DEFAULT_NODESQUOT 0.15 65 #define DEFAULT_NWAITINGNODES 100 66 #define DEFAULT_USELPROWS FALSE 68 #define DEFAULT_COPYCUTS TRUE 70 #define DEFAULT_BESTSOLLIMIT 3 71 #define DEFAULT_FIXCONTVARS FALSE 72 #define DEFAULT_POTENTIAL 'r' 73 #define DEFAULT_MAXDISTANCE 3 75 #define DEFAULT_RANDSEED 71 76 #define DEFAULT_RELAXDENSECONSS FALSE 78 #define DEFAULT_USEROLLINGHORIZON TRUE 79 #define DEFAULT_ROLLHORIZONLIMFAC 0.4 82 #define NHISTOGRAMBINS 10 131 int sumneighborhoodvars;
132 int sumdiscneighborhoodvars;
143 #ifdef SCIP_STATISTIC 144 int consvarshist[NHISTOGRAMBINS];
145 int consdiscvarshist[NHISTOGRAMBINS];
146 int conscontvarshist[NHISTOGRAMBINS];
148 int nrelaxedconstraints;
166 #ifdef SCIP_STATISTIC 178 void addHistogramEntry(
186 assert(value <= basevalue);
189 index = (int)(ratio * NHISTOGRAMBINS);
203 assert(scip != NULL);
204 assert(rollinghorizon != NULL);
210 (*rollinghorizon)->distancessize = size;
211 (*rollinghorizon)->variablegraph = NULL;
212 (*rollinghorizon)->lastdistance = -1;
213 (*rollinghorizon)->niterations = 0;
214 (*rollinghorizon)->nused = 0;
227 assert(scip != NULL);
228 assert(rollinghorizon != NULL);
229 assert(*rollinghorizon != NULL);
231 if( (*rollinghorizon)->variablegraph != NULL )
256 return (rollinghorizon->
nused < maxnused);
275 if( distances[i] == -1 )
295 assert(scip != NULL);
296 assert(vars != NULL);
304 for( i = 0; i < nvars; ++i )
319 switch( heurdata->potential )
331 SCIPerrorMessage(
"Unknown potential computation %c specified\n", heurdata->potential);
332 referencepoint = 0.0;
341 potential += objdelta;
356 assert(distances != NULL);
357 assert(maxdistance >= 0);
386 nvarstofix = heurdata->fixcontvars ? nvars : nbinvars + nintvars;
390 for( i = 0; i < nvarstofix; i++ )
393 if( distances[i] == -1 || distances[i] > maxdistance )
407 else if(
SCIPisGT(scip, solval, ub) )
413 fixedvars[*nfixings] = vars[i];
414 fixedvals[*nfixings] = solval;
418 else if( rollinghorizon != NULL && i < nbinvars + nintvars && ! rollinghorizon->
used[i] )
420 ++rollinghorizon->
nused;
425 if( rollinghorizon != NULL )
442 int* choosevardistance
446 int nrelevantdistances;
455 nrelevantdistances = (heurdata->fixcontvars ? nvars : (nbinvars + nintvars));
468 assert(zeropos >= 0);
471 criticalidx = zeropos + (int)((1.0 - heurdata->minfixingrate) * nrelevantdistances);
472 criticalidx = MIN(criticalidx, nrelevantdistances - 1);
475 *choosevardistance = distancescopy[criticalidx];
481 if( criticalidx != nrelevantdistances - 1 && distancescopy[criticalidx + 1] == *choosevardistance )
482 (*choosevardistance)--;
485 heurdata->maxseendistance =
MAX(heurdata->maxseendistance, distancescopy[nrelevantdistances - 1]);
498 return heurdata->sumdiscneighborhoodvars / (
MAX(1.0, (
SCIP_Real)heurdata->nneighborhoods));
509 int* selvarmaxdistance
519 int nintegralvarsleft;
520 int nintegralvarsbound;
526 assert(vargraph != NULL);
527 assert(scip != NULL);
528 assert(heurdata != NULL);
529 assert(selvar != NULL);
542 nintegralvarsbound = (int)((1.0 - heurdata->minfixingrate) * (nbinvars + nintvars));
547 maxdistance = (heurdata->maxdistance == - 1 ? INT_MAX : heurdata->maxdistance);
549 nintegralvarsleft = nbinvars + nintvars;
553 for( v = nintegralvarsleft - 1; v >= 0; --v )
557 varscopy[v] = varscopy[nintegralvarsleft - 1];
564 searchlimit = MIN(searchlimit, 10);
567 while( nsearched < searchlimit && nintegralvarsleft > 0 )
571 int neighborhoodsize;
572 int ndiscvarsneighborhood;
573 int choosevardistance;
581 choosevar = varscopy[idx];
582 assert(choosevar != NULL);
586 varscopy[idx] = varscopy[nintegralvarsleft - 1];
595 SCIPdebugMsg(scip,
"No active variable left to perform breadth-first search\n");
608 if( heurdata->maxdistance != -1 )
610 choosevardistance = heurdata->maxdistance;
617 ndiscvarsneighborhood = 0;
618 neighborhoodsize = 0;
621 for( v = nvars - 1; v >= 0; --v )
629 neighborhood[neighborhoodsize++] = currvar;
633 ++ndiscvarsneighborhood;
638 if( ndiscvarsneighborhood >= nintegralvarsbound || ndiscvarsneighborhood <= 1 )
640 SCIPdebugMsg(scip,
"Too many or too few discrete variables in neighboorhood: %d (%d)\n",
641 ndiscvarsneighborhood, nbinvars + nintvars);
649 if( potential > maxpotential )
651 maxpotential = potential;
653 *selvarmaxdistance = choosevardistance;
658 for( v = nintegralvarsleft - 1; v >= 0; --v )
665 varscopy[v] = varscopy[nintegralvarsleft - 1];
670 heurdata->sumdiscneighborhoodvars += ndiscvarsneighborhood;
671 heurdata->sumneighborhoodvars += neighborhoodsize;
672 ++heurdata->nneighborhoods;
683 SCIPdebugMsg(scip,
"Stopping with maxpotential %15.9f and selected variable %s\n",
684 maxpotential, *selvar != NULL ?
SCIPvarGetName(*selvar) :
"none");
699 int* selvarmaxdistance
706 int minunuseddistance;
708 assert(scip != NULL);
709 assert(rollinghorizon != NULL);
710 assert(distances != NULL);
711 assert(selvar != NULL);
712 assert(selvarmaxdistance != NULL);
722 minunuseddistance = INT_MAX;
725 for( i = 0; i < nbinvars + nintvars && minunuseddistance > rollinghorizon->
lastdistance; ++i )
728 && rollinghorizon->
distances[i] < minunuseddistance && ! rollinghorizon->
used[i] )
730 minunuseddistance = rollinghorizon->
distances[i];
736 if( *selvar == NULL )
738 *selvarmaxdistance = 0;
748 if( *selvarmaxdistance == 0 )
751 rollinghorizon->
nused++;
755 }
while(
rollingHorizonRunAgain(scip, rollinghorizon, heurdata) && (*selvar == NULL || *selvarmaxdistance == 0) );
761 *selvarmaxdistance = MIN(*selvarmaxdistance, rollinghorizon->
lastmaxdistance);
790 int selvarmaxdistance;
792 assert(fixedvars != NULL);
793 assert(fixedvals != NULL);
794 assert(nfixings != NULL);
798 selvarmaxdistance = 0;
806 SCIPdebugMsg(scip,
"Creating variable constraint graph\n");
809 if( rollinghorizon != NULL )
831 if( rollinghorizon == NULL || rollinghorizon->
niterations == 0 )
836 if( selvar != NULL && rollinghorizon != NULL )
850 assert(selvar == NULL || selvarmaxdistance > 0);
857 SCIPdebugMsg(scip,
"Selected variable <%s> as central variable for a <%d>-neighborhood\n",
862 selvarmaxdistance, nfixings) );
864 fixthreshold = (int)(heurdata->minfixingrate * (heurdata->fixcontvars ? nvars : (nbinvars + nintvars)));
869 if( *nfixings < fixthreshold )
871 SCIPdebugMsg(scip,
"Fixed %d < %d variables in gins heuristic, stopping", *nfixings, fixthreshold);
877 if( rollinghorizon == NULL )
899 assert(scip != NULL);
900 assert(subscip != NULL);
901 assert(subvars != NULL);
902 assert(subsol != NULL);
933 SOLVELIMITS* solvelimits
936 assert(subscip != NULL);
937 assert(solvelimits != NULL);
951 SOLVELIMITS* solvelimits,
1037 cutoff = MIN(upperbound, cutoff);
1051 SOLVELIMITS* solvelimits,
1058 assert(scip != NULL);
1059 assert(heur != NULL);
1060 assert(solvelimits != NULL);
1061 assert(runagain != NULL);
1087 maxnnodes = (
SCIP_Longint)(maxnnodesr - 100.0 * heurdata->nsubmips);
1088 maxnnodes += heurdata->nodesofs;
1091 solvelimits->
nodelimit = maxnnodes - heurdata->usednodes;
1095 if( solvelimits->
nodelimit < heurdata->minnodes )
1109 heurdata->nfailures++;
1110 heurdata->nextnodenumber = (heurdata->nfailures <= 25
1115 #ifdef SCIP_STATISTIC 1122 return heurdata->sumneighborhoodvars / (
MAX(1.0, (
SCIP_Real)heurdata->nneighborhoods));
1127 void printHistogram(
1138 for( i = 0; i < NHISTOGRAMBINS; ++i )
1152 assert(scip != NULL);
1153 assert(heur != NULL);
1168 assert(heur != NULL);
1169 assert(scip != NULL);
1173 assert(heurdata != NULL);
1188 assert(heur != NULL);
1189 assert(scip != NULL);
1193 assert(heurdata != NULL);
1194 assert(heurdata->randnumgen == NULL);
1197 heurdata->usednodes = 0;
1199 heurdata->sumdiscneighborhoodvars = heurdata->sumneighborhoodvars = 0;
1200 heurdata->nneighborhoods = 0;
1201 heurdata->maxseendistance = 0;
1202 heurdata->nsubmips = 0;
1203 heurdata->nfailures = 0;
1204 heurdata->nextnodenumber = 0;
1206 #ifdef SCIP_STATISTIC 1207 resetHistogram(heurdata->conscontvarshist);
1208 resetHistogram(heurdata->consdiscvarshist);
1209 resetHistogram(heurdata->conscontvarshist);
1221 assert(heur != NULL);
1222 assert(scip != NULL);
1226 assert(heurdata != NULL);
1232 printHistogram(scip, heurdata->consvarshist,
"Constraint density histogram");
1233 printHistogram(scip, heurdata->conscontvarshist,
"Constraint continuous density histogram");
1234 printHistogram(scip, heurdata->consdiscvarshist,
"Constraint discrete density histogram");
1238 heurdata->randnumgen = NULL;
1260 SOLVELIMITS solvelimits;
1265 assert(heur != NULL);
1266 assert(scip != NULL);
1267 assert(result != NULL);
1271 assert(heurdata != NULL);
1316 if( heurdata->userollinghorizon )
1319 rollinghorizon = NULL;
1329 SCIPdebugMsg(scip,
"Could not create the subproblem -> skip call\n");
1342 ++heurdata->nsubmips;
1349 heurdata->uselprows, heurdata->copycuts, &success, NULL) );
1351 for( i = 0; i < nvars; i++ )
1385 for( i = 0; i < nsubsols && !success; ++i )
1398 runagain = (*result ==
SCIP_FOUNDSOL) && heurdata->userollinghorizon;
1401 assert(rollinghorizon != NULL);
1406 }
while( runagain );
1415 if( heurdata->userollinghorizon )
1440 heurdata->randnumgen = NULL;
1447 assert(heur != NULL);
1457 "number of nodes added to the contingent of the total nodes",
1461 "maximum number of nodes to regard in the subproblem",
1465 "minimum number of nodes required to start the subproblem",
1469 "number of nodes without incumbent change that heuristic should wait",
1473 "contingent of sub problem nodes in relation to the number of nodes of the original problem",
1477 "percentage of integer variables that have to be fixed",
1481 "factor by which " HEUR_NAME " should at least improve the incumbent",
1485 "should subproblem be created out of the rows in the LP rows?",
1489 "if uselprows == FALSE, should all active cuts from cutpool be copied to constraints in subproblem?",
1493 "should continuous variables outside the neighborhoods be fixed?",
1497 "limit on number of improving incumbent solutions in sub-CIP",
1501 "maximum distance to selected variable to enter the subproblem, or -1 to select the distance " 1502 "that best approximates the minimum fixing rate from below",
1506 "the reference point to compute the neighborhood potential: (r)oot or (p)seudo solution",
1510 "should the heuristic solve a sequence of sub-MIP's around the first selected variable",
1514 "should dense constraints (at least as dense as 1 - minfixingrate) be ignored by connectivity graph?",
1518 "limiting percentage for variables already used in sub-SCIPs to terminate rolling horizon approach",
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
static SCIP_Real heurdataAvgDiscreteNeighborhoodSize(SCIP_HEURDATA *heurdata)
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPgetNIntVars(SCIP *scip)
static SCIP_RETCODE rollingHorizonCreate(SCIP *scip, ROLLINGHORIZON **rollinghorizon)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPincludeHeurGins(SCIP *scip)
static void rollingHorizonStoreDistances(SCIP *scip, ROLLINGHORIZON *rollinghorizon, int *distances)
static SCIP_DECL_HEURCOPY(heurCopyGins)
#define DEFAULT_MAXDISTANCE
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
void SCIPvariableGraphFree(SCIP *scip, SCIP_VGRAPH **vargraph)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed)
#define SCIPallocClearBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit)))
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
int SCIPgetNOrigVars(SCIP *scip)
static SCIP_RETCODE selectNextVariable(SCIP *scip, SCIP_HEURDATA *heurdata, ROLLINGHORIZON *rollinghorizon, int *distances, SCIP_VAR **selvar, int *selvarmaxdistance)
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
static SCIP_RETCODE determineVariableFixings(SCIP *scip, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int *nfixings, SCIP_HEURDATA *heurdata, ROLLINGHORIZON *rollinghorizon, SCIP_Bool *success)
static SCIP_RETCODE setLimits(SCIP *subscip, SOLVELIMITS *solvelimits)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
int SCIPvarGetProbindex(SCIP_VAR *var)
#define DEFAULT_MINFIXINGRATE
struct SCIP_HeurData SCIP_HEURDATA
#define SCIPfreeBlockMemory(scip, ptr)
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)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_RETCODE SCIPcreate(SCIP **scip)
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
#define SCIPallocBlockMemory(scip, ptr)
static SCIP_RETCODE determineMaxDistance(SCIP *scip, SCIP_HEURDATA *heurdata, int *distances, int *choosevardistance)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
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)
#define DEFAULT_ROLLHORIZONLIMFAC
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPvariableGraphCreate(SCIP *scip, SCIP_VGRAPH **vargraph, SCIP_Bool relaxdenseconss, SCIP_Real relaxdensity, int *nrelaxedconstraints)
SCIP_RETCODE SCIPsolve(SCIP *scip)
const char * SCIPheurGetName(SCIP_HEUR *heur)
#define DEFAULT_FIXCONTVARS
#define DEFAULT_USEROLLINGHORIZON
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
static void updateFailureStatistic(SCIP *scip, SCIP_HEURDATA *heurdata)
SCIP_VGRAPH * variablegraph
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
const char * SCIPvarGetName(SCIP_VAR *var)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPmergeVariableStatistics(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **sourcevars, SCIP_VAR **targetvars, int nvars)
LNS heuristic that tries to delimit the search region to a neighborhood in the constraint graph...
static SCIP_RETCODE setupSubScip(SCIP *scip, SCIP *subscip, SOLVELIMITS *solvelimits, SCIP_HEUR *heur)
#define DEFAULT_RELAXDENSECONSS
SCIP_Real SCIPgetLowerbound(SCIP *scip)
#define DEFAULT_POTENTIAL
static SCIP_DECL_HEURFREE(heurFreeGins)
#define DEFAULT_NODESQUOT
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
static SCIP_DECL_HEUREXEC(heurExecGins)
SCIP_Bool SCIPsortedvecFindInt(int *intarray, int val, int len, int *pos)
#define DEFAULT_BESTSOLLIMIT
#define SCIPallocBufferArray(scip, ptr, num)
#define DEFAULT_USELPROWS
public data structures and miscellaneous methods
SCIP_RETCODE SCIPvariablegraphBreadthFirst(SCIP *scip, SCIP_VGRAPH *vargraph, SCIP_VAR **startvars, int nstartvars, int *distances, int maxdistance, int maxvars, int maxbinintvars)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
static SCIP_RETCODE selectInitialVariable(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VGRAPH *vargraph, int *distances, SCIP_VAR **selvar, int *selvarmaxdistance)
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)
static SCIP_Bool rollingHorizonRunAgain(SCIP *scip, ROLLINGHORIZON *rollinghorizon, SCIP_HEURDATA *heurdata)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
int SCIPgetNSols(SCIP *scip)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
int SCIPgetNBinVars(SCIP *scip)
SCIP_RETCODE SCIPsetCharParam(SCIP *scip, const char *name, char value)
static SCIP_DECL_HEURINIT(heurInitGins)
static SCIP_RETCODE determineLimits(SCIP *scip, SCIP_HEUR *heur, SOLVELIMITS *solvelimits, SCIP_Bool *runagain)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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_Longint SCIPgetMemUsed(SCIP *scip)
static SCIP_RETCODE createNewSol(SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_Bool *success)
#define DEFAULT_MINIMPROVE
static SCIP_RETCODE fixNonNeighborhoodVariables(SCIP *scip, SCIP_HEURDATA *heurdata, ROLLINGHORIZON *rollinghorizon, SCIP_SOL *sol, SCIP_VAR **vars, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int *distances, int maxdistance, int *nfixings)
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)
SCIP_RETCODE SCIPcopyLargeNeighborhoodSearch(SCIP *sourcescip, SCIP *subscip, SCIP_HASHMAP *varmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool uselprows, SCIP_Bool copycuts, SCIP_Bool *success, SCIP_Bool *valid)
SCIP_Bool SCIPisStopped(SCIP *scip)
void SCIPsortInt(int *intarray, int len)
static SCIP_DECL_HEUREXIT(heurExitGins)
static SCIP_Real getPotential(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_SOL *sol, SCIP_VAR **vars, int nvars)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE rollingHorizonFree(SCIP *scip, ROLLINGHORIZON **rollinghorizon)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
#define BMSclearMemoryArray(ptr, num)
#define DEFAULT_NWAITINGNODES
#define SCIP_CALL_ABORT(x)
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
static SCIP_Bool isVariableInNeighborhood(SCIP_VAR *var, int *distances, int maxdistance)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
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 SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint 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_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_Longint SCIPgetSolNodenum(SCIP *scip, SCIP_SOL *sol)