76#define HEUR_NAME "scheduler"
77#define HEUR_DESC "Adaptive heuristic to schedule LNS and diving heuristics"
78#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS
79#define HEUR_PRIORITY -30000
82#define HEUR_MAXDEPTH -1
83#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE
84#define HEUR_USESSUBSCIP TRUE
86#define NNEIGHBORHOODS 9
87#define DIVINGHEURS_INITIALSIZE 10
92#define DEFAULT_NODESQUOT 0.1
93#define DEFAULT_NODESQUOTMIN 0.0
94#define DEFAULT_NODESOFFSET 500LL
95#define DEFAULT_NSOLSLIM 3
96#define DEFAULT_MINNODES 50LL
97#define DEFAULT_MAXNODES 500LL
98#define DEFAULT_WAITINGNODES 0LL
99#define DEFAULT_INITLNSNODELIMIT 50
100#define DEFAULT_INITDIVINGNODELIMIT 500LL
101#define DEFAULT_TARGETNODEFACTOR 1.05
104#define DEFAULT_INITDURINGROOT FALSE
105#define DEFAULT_MAXCALLSSAMESOL -1
106#define DEFAULT_HEURTIMELIMIT 60.0
111#define DEFAULT_BESTSOLWEIGHT 1
112#define DEFAULT_BANDITALGO 'i'
113#define DEFAULT_RESETWEIGHTS FALSE
114#define DEFAULT_SUBSCIPRANDSEEDS FALSE
115#define DEFAULT_FIXTOL 0.1
116#define DEFAULT_UNFIXTOL 0.1
117#define DEFAULT_BETA 0.0
118#define DEFAULT_NSELECTIONS 5
123#define DEFAULT_USEREDCOST TRUE
124#define DEFAULT_USEPSCOST TRUE
125#define DEFAULT_USEDISTANCES TRUE
126#define DEFAULT_USELOCALREDCOST FALSE
131#define DEFAULT_EFFORTREWARDWEIGHT 0.2
132#define DEFAULT_SOLREWARDWEIGHT 0.3
133#define DEFAULT_QUALREWARDWEIGHT 0.3
134#define DEFAULT_CONFLICTREWARDWEIGHT 0.2
140#define DEFAULT_EPS 0.4685844
141#define DEFAULT_ALPHA 0.0016
142#define DEFAULT_GAMMA 0.07041455
147#define SOLVEFREQ_DECAY 0.75
148#define SOLVEFREQ_STARTINC 0.2
149#define MAXSOLVEFREQ 0.3
150#define MINSOLVEFREQ 0.05
155#define FIXINGRATE_DECAY 0.75
156#define FIXINGRATE_STARTINC 0.2
157#define DEFAULT_USESUBSCIPHEURS FALSE
158#define DEFAULT_COPYCUTS FALSE
161#define DEFAULT_SEED 113
162#define MUTATIONSEED 121
163#define CROSSOVERSEED 321
166#define DEFAULT_MINFIXINGRATE_RENS 0.3
167#define DEFAULT_MAXFIXINGRATE_RENS 0.9
168#define DEFAULT_ACTIVE_RENS TRUE
170#define DEFAULT_PRIORITY_RENS -1100000
172#define DEFAULT_MINFIXINGRATE_RINS 0.3
173#define DEFAULT_MAXFIXINGRATE_RINS 0.9
174#define DEFAULT_ACTIVE_RINS TRUE
176#define DEFAULT_PRIORITY_RINS -1101000
178#define DEFAULT_MINFIXINGRATE_MUTATION 0.3
179#define DEFAULT_MAXFIXINGRATE_MUTATION 0.9
180#define DEFAULT_ACTIVE_MUTATION TRUE
182#define DEFAULT_PRIORITY_MUTATION -1103010
184#define DEFAULT_MINFIXINGRATE_LOCALBRANCHING 0.3
185#define DEFAULT_MAXFIXINGRATE_LOCALBRANCHING 0.9
186#define DEFAULT_ACTIVE_LOCALBRANCHING TRUE
188#define DEFAULT_PRIORITY_LOCALBRANCHING -1102000
190#define DEFAULT_MINFIXINGRATE_PROXIMITY 0.3
191#define DEFAULT_MAXFIXINGRATE_PROXIMITY 0.9
192#define DEFAULT_ACTIVE_PROXIMITY TRUE
194#define DEFAULT_PRIORITY_PROXIMITY -2000000
196#define DEFAULT_MINFIXINGRATE_CROSSOVER 0.3
197#define DEFAULT_MAXFIXINGRATE_CROSSOVER 0.9
198#define DEFAULT_ACTIVE_CROSSOVER TRUE
200#define DEFAULT_PRIORITY_CROSSOVER -1104000
202#define DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE 0.3
203#define DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE 0.9
204#define DEFAULT_ACTIVE_ZEROOBJECTIVE TRUE
206#define DEFAULT_PRIORITY_ZEROOBJECTIVE 100
208#define DEFAULT_MINFIXINGRATE_DINS 0.3
209#define DEFAULT_MAXFIXINGRATE_DINS 0.9
210#define DEFAULT_ACTIVE_DINS TRUE
212#define DEFAULT_PRIORITY_DINS -1105000
214#define DEFAULT_MINFIXINGRATE_TRUSTREGION 0.3
215#define DEFAULT_MAXFIXINGRATE_TRUSTREGION 0.9
216#define DEFAULT_ACTIVE_TRUSTREGION FALSE
218#define DEFAULT_PRIORITY_TRUSTREGION -1102010
221#define DEFAULT_NSOLS_CROSSOVER 2
222#define DEFAULT_NPOOLSOLS_DINS 5
223#define DEFAULT_VIOLPENALTY_TRUSTREGION 100.0
226#define EVENTHDLR_NAME "Scheduler"
227#define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic"
228#define SCIP_EVENTTYPE_SCHEDULER (SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND | SCIP_EVENTTYPE_BESTSOLFOUND)
231#define TABLE_NAME_NEIGHBORHOOD "scheduler"
232#define TABLE_DESC_NEIGHBORHOOD "scheduler heuristics statistics"
233#define TABLE_POSITION_NEIGHBORHOOD 12500
234#define TABLE_EARLIEST_STAGE_NEIGHBORHOOD SCIP_STAGE_TRANSFORMED
265 #define DECL_VARFIXINGS(x) SCIP_RETCODE x ( \
271 SCIP_RESULT* result \
282#define DECL_CHANGESUBSCIP(x) SCIP_RETCODE x ( \
286 SCIP_VAR** subvars, \
294#define DECL_NHINIT(x) SCIP_RETCODE x ( \
300#define DECL_NHEXIT(x) SCIP_RETCODE x ( \
306#define DECL_NHFREE(x) SCIP_RETCODE x ( \
319#define DECL_NHREFSOL(x) SCIP_RETCODE x ( \
323 SCIP_RESULT* result \
327#define DECL_NHDEACTIVATE(x) SCIP_RETCODE x (\
329 SCIP_Bool* deactivate \
344#define NHISTENTRIES 7
457 SCIP_Longint waitingnodes;
458 SCIP_Longint firstcallthissol;
466 SCIP_Bool resetweights;
467 SCIP_Bool initduringroot;
469 SCIP_Bool defaultroot;
470 SCIP_Real heurtimelimit;
472 SCIP_Real exp3_gamma;
474 SCIP_Real epsgreedy_eps;
475 SCIP_Bool epsgreedy_usemod;
479 SCIP_Real solrewardweight;
480 SCIP_Real effortrewardweight;
481 SCIP_Real qualrewardweight;
482 SCIP_Real conflictrewardweight;
488 SCIP_Longint initdivingnodelimit;
489 SCIP_Longint maxdivingnodelimit;
492 SCIP_Longint nodesoffset;
493 SCIP_Longint maxnodes;
494 SCIP_Longint targetnodes;
495 SCIP_Longint minnodes;
498 SCIP_Real nodesquotmin;
500 SCIP_Real targetnodefactor;
504 int nactiveneighborhoods;
505 int ninitneighborhoods;
508 int currneighborhood;
510 SCIP_Bool usesubscipheurs;
511 SCIP_Bool subsciprandseeds;
513 int initlnsnodelimit;
515 SCIP_Bool useredcost;
516 SCIP_Bool usedistances;
518 SCIP_Bool uselocalredcost;
527 SCIP_Longint nodelimit;
625 switch (subscipstatus)
721 SCIP_Real minfixingrate,
722 SCIP_Real maxfixingrate,
749 (*neighborhood)->changesubscip = changesubscip;
750 (*neighborhood)->varfixings = varfixings;
751 (*neighborhood)->nhinit = nhinit;
752 (*neighborhood)->nhexit = nhexit;
753 (*neighborhood)->nhfree = nhfree;
754 (*neighborhood)->nhrefsol = nhrefsol;
755 (*neighborhood)->nhdeactivate = nhdeactivate;
757 (*neighborhood)->rootnodepriority = priority;
762 &(*neighborhood)->fixingrate.minfixingrate,
TRUE, minfixingrate, 0.0, 1.0,
NULL,
NULL) );
765 &(*neighborhood)->fixingrate.maxfixingrate,
TRUE, maxfixingrate, 0.0, 1.0,
NULL,
NULL) );
771 &(*neighborhood)->priority,
TRUE, 1.0, 1e-2, 1.0,
NULL,
NULL) );
790 nhptr = *neighborhood;
796 if( nhptr->nhfree !=
NULL )
805 *neighborhood =
NULL;
821 if( neighborhood->nhinit !=
NULL )
839 if( neighborhood->nhexit !=
NULL )
868 sourcescip = eventdata->sourcescip;
869 subvars = eventdata->subvars;
870 heur = eventdata->heur;
871 runstats = eventdata->runstats;
873 assert(sourcescip != subscip);
909 divingheurptr = *divingheur;
1000 switch (subscipstatus)
1032 SCIPinfoMessage(
scip, file,
"LNS (Scheduler) : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %4s %4s %4s %4s %4s %4s %4s %4s\n",
1033 "Calls",
"SetupTime",
"SolveTime",
"SolveNodes",
"Sols",
"Best",
"Exp3",
"Exp3-IX",
"EpsGreedy",
"UCB",
"TgtFixRate",
1034 "Opt",
"Inf",
"Node",
"Stal",
"Sol",
"Usr",
"Othr",
"Actv");
1043 SCIP_Real epsgreedyweight;
1045 neighborhood =
heurdata->neighborhoods[
i];
1057 epsgreedyweight = -1.0;
1105 SCIPinfoMessage(
scip, file,
"Diving (Scheduler) : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s \n",
1106 "Calls",
"SetupTime",
"SolveTime",
"SolveNodes",
"Sols",
"Best",
"Exp3",
"Exp3-IX",
"EpsGreedy",
"UCB",
"LPResolveQuot",
"MaxDiveDepth");
1115 SCIP_Real epsgreedyweight;
1129 epsgreedyweight = -1.0;
1174 stats = divingheur->
stats;
1204 stats = &neighborhood->
stats;
1267 else if( dist1 > dist2 )
1309 SCIP_Real refsolval,
1310 SCIP_Bool uselocalredcost
1313 SCIP_Real bestbound;
1323 if( ! uselocalredcost )
1348 score = redcost * (refsolval - bestbound);
1351 if( ! uselocalredcost )
1352 score =
MAX(score, 0.0);
1362 SCIP_Real refsolval,
1363 SCIP_Bool uselocallpsol
1411 varbuf[*nfixings] =
var;
1412 valbuf[*nfixings] = val;
1439 SCIP_Real* redcostscores;
1440 SCIP_Real* pscostscores;
1447 SCIP_Real* randscores;
1469 if( ntargetfixings >= nbinintvars )
1473 nvarstoadd = ntargetfixings - *nfixings;
1474 if( nvarstoadd == 0 )
1507 for(
b = 0;
b < *nfixings; ++
b )
1515 if( probindex < nbinintvars )
1516 isfixed[probindex] =
TRUE;
1523 for(
b = 0;
b < nbinintvars; ++
b )
1538 unfixedvars[nunfixedvars] =
var;
1539 perm[nunfixedvars] = nunfixedvars;
1543 solvals[nunfixedvars] = solvals[
b];
1544 distances[nunfixedvars] = distances[
b];
1559 nvarstoadd =
MIN(nunfixedvars, nvarstoadd);
1562 if( nvarstoadd < nunfixedvars )
1563 SCIPselectInd(perm, sortIndCompScheduler, &varprio, nvarstoadd, nunfixedvars);
1566 for(
b = 0;
b < nvarstoadd; ++
b )
1568 int permindex = perm[
b];
1570 assert(permindex < nunfixedvars);
1595 SCIP_Real* priorities,
1596 unsigned int initseed
1607 heurdata->ucb_alpha, nactions, initseed) );
1663 if( neighborhood->nhrefsol !=
NULL )
1694 SCIP_Real* redcostscores;
1695 SCIP_Real* pscostscores;
1696 SCIP_Real* randscores;
1699 SCIP_Real* valbufcpy;
1700 SCIP_Bool* isfixedvar;
1704 int* fixeddistances;
1714 if( nbinintvars == 0 )
1737 for(
i = 0;
i < *nfixings; ++
i )
1743 isfixedvar[probindex] =
TRUE;
1749 for(
i = 0;
i < nbinintvars; ++
i )
1751 if( ! isfixedvar[
i] )
1752 unfixedvars[nunfixed++] =
vars[
i];
1762 for(
i = 0;
i < *nfixings; ++
i )
1765 if( probindex >= 0 )
1766 fixeddistances[
i] = distances[probindex];
1776 for(
i = 0;
i < *nfixings; ++
i )
1779 SCIP_Real fixval = valbuf[
i];
1800 SCIPselectDownInd(perm, sortIndCompScheduler, &varprio, ntargetfixings, *nfixings);
1803 for(
i = 0;
i < ntargetfixings; ++
i )
1805 valbuf[
i] = valbufcpy[perm[
i]];
1806 varbuf[
i] = varbufcpy[perm[
i]];
1809 *nfixings = ntargetfixings;
1857 if( neighborhood->varfixings !=
NULL )
1859 SCIP_CALL( neighborhood->varfixings(
scip, neighborhood, varbuf, valbuf, nfixings,
result) );
1864 else if( ntargetfixings == 0 )
1875 nminfixings =
MAX(nminfixings, 0);
1877 nmaxfixings =
MIN(nmaxfixings, nbinintvars);
1879 SCIPdebugMsg(
scip,
"Neighborhood Fixings/Target: %d / %d <= %d <= %d\n",*nfixings, nminfixings, ntargetfixings, nmaxfixings);
1891 if( refsol !=
NULL )
1905 SCIPdebugMsg(
scip,
"After additional fixings: %d / %d\n",*nfixings, ntargetfixings);
1907 else if( (SCIP_Real)(*nfixings) > nmaxfixings )
1915 SCIPdebugMsg(
scip,
"Unfixed variables, fixed variables remaining: %d\n", ntargetfixings);
1953 if( neighborhood->changesubscip !=
NULL )
1955 SCIP_CALL( neighborhood->changesubscip(sourcescip, targetscip, neighborhood, targetvars, ndomchgs, nchgobjs, naddedconss, success) );
1996 SCIP_Bool avoidmemout;
2021 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Not enough memory or time left.\n");
2042 SCIP_Real totalreward;
2043 SCIP_Real effortsaved;
2044 SCIP_Real bestsolreward;
2045 SCIP_Real closedgapreward;
2046 SCIP_Real conflictreward;
2052 effortsaved =
MIN(1.0, (SCIP_Real) runstats->
usednodes / (SCIP_Real)
heurdata->maxlnsnodelimit);
2053 effortsaved = (1.0 - effortsaved);
2059 assert(effortsaved >= 0.0 && effortsaved <= 1.0);
2067 conflictreward = 0.0;
2068 else if(
heurdata->maxnconflicts > 0 )
2071 conflictreward = 1.0;
2074 conflictreward = 0.0;
2075 assert(conflictreward >= 0.0 && conflictreward <= 1.0);
2084 bestsolreward = 1.0;
2091 closedgapreward = 1.0;
2097 bestsolreward = 0.0;
2098 closedgapreward = 0.0;
2102 totalreward =
heurdata->effortrewardweight * effortsaved +
heurdata->solrewardweight * bestsolreward
2103 +
heurdata->qualrewardweight * closedgapreward +
heurdata->conflictrewardweight * conflictreward;
2104 totalreward =
MIN( totalreward, 1.0);
2105 assert(totalreward >= 0.0 && totalreward <= 1.0);
2135#ifdef SCHEDULER_SUBSCIPOUTPUT
2358 int newsize = 2 *
heurdata->divingheurssize;
2360 heurdata->divingheurssize = newsize;
2453 divingheurs =
heurdata->divingheurs;
2496 SCIPdebugMsg(
scip,
"Finished executing diving heuristic %s (idx: %d) with %lld sols (%lld best sols), %lld conflicts, %lld backtracks and %lld probing nodes \n",
2586 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Not enough variables fixed.\n");
2602 SCIP_CALL(
SCIPcopyLargeNeighborhoodSearch(
scip, subscip, varmapf, probnamesuffix, varbuf, valbuf, nfixings,
FALSE,
heurdata->copycuts, &success,
NULL) );
2605 for( v = 0; v <
nvars; ++v )
2618 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Problems with creating subproblem.\n");
2626 eventdata.nodelimit = solvelimits.
nodelimit;
2627 eventdata.lplimfac =
heurdata->lplimfac;
2628 eventdata.heur = heur;
2629 eventdata.sourcescip =
scip;
2630 eventdata.subvars = subvars;
2631 eventdata.runstats = runstats;
2648 SCIPwarningMessage(
scip,
"Error while presolving subproblem in Scheduler heuristic; sub-SCIP terminated with code <%d>\n", retcode);
2658#ifdef SCHEDULER_SUBSCIPOUTPUT
2670 if( subscip !=
NULL )
2687 SCIPdebugMsg(
scip,
"Finished executing LNS heuristic %s (idx: %d) with %lld sols (%lld best sols) and %lld nodes used.\n",
2739 SCIP_Real* priorities;
2741 unsigned int initseed;
2748 priorities[
i] =
heurdata->divingheurs[
i]->priority;
2749 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
2781 SCIP_Real* priorities;
2802 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
2813 for(
i = 0;
i < nheurs; ++
i )
2847 SCIPdebugMsg(
scip,
"Calling heurExecScheduler: depth %d sols %d inf %u node %lld \n",
2860 if( nodeinfeasible )
2883 if(
heurdata->maxcallssamesol != -1 )
2885 SCIP_Longint samesollimit;
2916 heurdata->nskippedcalls = (int) floor(exp(0.1 * (SCIP_Real)
heurdata->nfailedcalls)) - 1;
2991 int *fracidx =
NULL;
3035 fracidx[nfracs++] =
i;
3080 if( subvars[
i] ==
NULL )
3085 SCIP_Real newlb =
SCIPfloor(sourcescip, lpsolval);
3086 SCIP_Real newub = newlb + 1.0;
3137 nvars = nbinintvars;
3143 for( v = 0; v <
nvars; ++v )
3154 for( s = 1; s < nsols; ++s )
3196 if( incumbent ==
NULL )
3210 sols[1] = incumbent;
3281 nsols = data->
nsols;
3305 if( lastdraw == nsols )
3310 for( s = 0; s < nsols; ++s )
3311 sols[s] = scipsols[s];
3319 assert(nsols < lastdraw);
3325 sols[nsols - 1] = scipsols[nextdraw];
3327 lastdraw = nextdraw;
3415 SCIP_Real targetfixingrate;
3429 if( nbinintvars == 0 )
3433 if( incumbentsol ==
NULL )
3437 ntargetfixings = (int)(targetfixingrate * nbinintvars) + 1;
3440 if( nbinintvars <= ntargetfixings )
3449 for(
i = 0; *nfixings < ntargetfixings &&
i < nbinintvars; ++
i )
3452 assert(randint < nbinintvars);
3462 assert(
i == nbinintvars || *nfixings == ntargetfixings);
3469 if( *nfixings == ntargetfixings )
3494 SCIP_Real* consvals;
3507 if( referencesol ==
NULL )
3511 rhs =
MAX(rhs, 2.0);
3519 if( subvars[
i] ==
NULL )
3571 if( referencesol ==
NULL )
3580 if( subvars[
i] ==
NULL )
3594 if( subvars[
i] ==
NULL )
3634 if( subvars[
i] ==
NULL )
3675 if(
REALABS(lpsol - mipsol) >= 0.5 )
3683 range = 2 * lpsol - mipsol;
3685 if( mipsol >= lpsol )
3688 *lbptr =
MAX(*lbptr, range);
3699 *ubptr =
MIN(*ubptr, range);
3709 *lbptr =
MAX(*lbptr, lbglobal);
3710 *ubptr =
MIN(*ubptr, ubglobal);
3715 *lbptr =
MAX(mipsol, lbglobal);
3716 *ubptr =
MIN(mipsol, ubglobal);
3763 nsols = nmipsols + 2;
3767 sols[1] = rootlpsol;
3819 if( subvars[v] ==
NULL )
3960 varFixingsRens, changeSubscipRens,
NULL,
NULL,
NULL,
NULL, nhDeactivateDiscreteVars) );
3965 varFixingsRins,
NULL,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateDiscreteVars) );
3970 varFixingsMutation,
NULL, nhInitMutation, nhExitMutation,
NULL, nhRefsolIncumbent, nhDeactivateDiscreteVars) );
3975 NULL, changeSubscipLocalbranching,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateBinVars) );
3980 varFixingsCrossover,
NULL,
3981 nhInitCrossover, nhExitCrossover, nhFreeCrossover, nhRefsolCrossover, nhDeactivateDiscreteVars) );
3994 NULL, changeSubscipProximity,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateBinVars) );
3999 NULL, changeSubscipZeroobjective,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateObjVars) );
4004 varFixingsDins, changeSubscipDins,
NULL,
NULL, nhFreeDins, nhRefsolIncumbent, nhDeactivateBinVars) );
4011 "number of pool solutions where binary solution values must agree",
4017 NULL, changeSubscipTrustregion,
NULL,
NULL, nhFreeTrustregion, nhRefsolIncumbent, nhDeactivateBinVars) );
4023 "the penalty for each change in the binary variables from the candidate solution",
4079 SCIP_Real* priorities;
4080 unsigned int initseed;
4092 for(
i =
heurdata->nneighborhoods - 1;
i >= 0; --
i )
4095 SCIP_Bool deactivate;
4100 if( deactivate || ! neighborhood->
active )
4102 if(
heurdata->nactiveneighborhoods - 1 >
i )
4117 priorities[
i] =
heurdata->divingheurs[
i]->priority;
4120 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
4126 priorities[
i] = 1.0;
4141 SCIP_Real* initpriorities;
4148 for(
i = 0;
i < nheurs; ++
i )
4244 for( j = 0; j <
heurdata->ndiving; ++j )
4343 "maximum number of nodes to regard in the subproblem",
4347 "offset added to the nodes budget",
4351 "minimum number of nodes required to start a sub-SCIP",
4355 "number of nodes since last incumbent solution that the heuristic should wait",
4359 "initial node limit for LNS heuristics",
4363 "initial node limit for diving heuristics",
4367 "fraction of nodes compared to the main SCIP for budget computation",
4371 "lower bound fraction of nodes compared to the main SCIP for budget computation",
4375 "limit on the number of improving solutions in a sub-SCIP call",
4379 "the bandit algorithm: (u)pper confidence bounds, (e)xp.3, epsilon (g)reedy, exp.3-(i)x",
4383 "weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution for exp3",
4387 "reward offset between 0 and 1 at every observation for Exp.3",
4391 "parameter to increase the confidence width in UCB",
4395 "distances from fixed variables be used for variable prioritization",
4399 "should reduced cost scores be used for variable prioritization?",
4403 "should pseudo cost scores be used for variable priorization?",
4407 "should local reduced costs be used for generic (un)fixing?",
4411 "should the heuristic activate other sub-SCIP heuristics during its search?",
4415 "factor by which target node number is eventually increased",
4419 "initial random seed for bandit algorithms and random decisions by neighborhoods",
4423 "number of allowed executions of the heuristic on the same incumbent solution (-1: no limit, 0: number of active neighborhoods)",
4427 "increase exploration in epsilon-greedy bandit algorithm",
4431 "TRUE if modified version of the epsilon-greedy bandit algorithm should be used",
4435 "weight by how much finding a new incumbent is rewarded in reward function",
4439 "weight by how much effort is rewarded in reward function",
4443 "weight by how much quality of a new incumbent is rewarded in reward function",
4447 "weight by how much number of conflicts found by diving is rewarded in reward function",
4451 "should the bandit algorithms be reset when a new problem is read?",
4455 "should random seeds of sub-SCIPs be altered to increase diversification?",
4459 "should cutting planes be copied to the sub-SCIP?",
4463 "tolerance by which the fixing rate may be missed without generic fixing",
4467 "tolerance by which the fixing rate may be exceeded without generic unfixing",
4471 "time limit for a single heuristic run",
4475 "should the heuristic be executed multiple times during the root node?",
4479 "should the default priorities be used at the root node?",
4483 "number of heuristics picked by the scheduler in one call (-1: number of controlled heuristics, 0: until new incumbent is found)",
static GRAPHNODE ** active
Constraint handler for linear constraints in their most general form, .
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPtranslateSubSol(SCIP *scip, SCIP *subscip, SCIP_SOL *subsol, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_SOL **newsol)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
int SCIPgetNObjVars(SCIP *scip)
int SCIPgetNIntVars(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)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNBinVars(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)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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 SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
void SCIPswapPointers(void **pointer1, void **pointer2)
SCIP_RETCODE SCIPincludeHeurScheduler(SCIP *scip)
SCIP_RETCODE SCIPresetBandit(SCIP *scip, SCIP_BANDIT *bandit, SCIP_Real *priorities, unsigned int seed)
SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
SCIP_Real SCIPgetProbabilityExp3IX(SCIP_BANDIT *exp3ix, int action)
SCIP_Real * SCIPgetWeightsEpsgreedy(SCIP_BANDIT *epsgreedy)
SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
SCIP_RETCODE SCIPcreateBanditExp3(SCIP *scip, SCIP_BANDIT **exp3, SCIP_Real *priorities, SCIP_Real gammaparam, SCIP_Real beta, int nactions, unsigned int initseed)
SCIP_RETCODE SCIPcreateBanditEpsgreedy(SCIP *scip, SCIP_BANDIT **epsgreedy, SCIP_Real *priorities, SCIP_Real eps, SCIP_Bool usemodification, SCIP_Bool preferrecent, SCIP_Real decayfactor, int avglim, int nactions, unsigned int initseed)
SCIP_Real SCIPgetConfidenceBoundUcb(SCIP_BANDIT *ucb, int action)
SCIP_RETCODE SCIPcreateBanditExp3IX(SCIP *scip, SCIP_BANDIT **exp3ix, SCIP_Real *priorities, int nactions, unsigned int initseed)
SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
SCIP_RETCODE SCIPcreateBanditUcb(SCIP *scip, SCIP_BANDIT **ucb, SCIP_Real *priorities, SCIP_Real alpha, int nactions, unsigned int initseed)
SCIP_RETCODE SCIPfreeBandit(SCIP *scip, SCIP_BANDIT **bandit)
SCIP_Real SCIPgetProbabilityExp3(SCIP_BANDIT *exp3, int action)
SCIP_BRANCHRULE * SCIPfindBranchrule(SCIP *scip, const char *name)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPdivesetIsPublic(SCIP_DIVESET *diveset)
SCIP_Longint SCIPdivesetGetNBacktracks(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
SCIP_Longint SCIPdivesetGetNSols(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
SCIP_Longint SCIPdivesetGetNConflicts(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
const char * SCIPdivesetGetName(SCIP_DIVESET *diveset)
SCIP_Longint SCIPdivesetGetNProbingNodes(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
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 SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
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_HEUR ** SCIPgetHeurs(SCIP *scip)
int SCIPheurGetPriority(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurInitsol(SCIP *scip, SCIP_HEUR *heur,)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur,)
int SCIPgetNHeurs(SCIP *scip)
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
SCIP_HEUR * SCIPfindHeur(SCIP *scip, const char *name)
int SCIPheurGetNDivesets(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur,)
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur,)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_DIVESET ** SCIPheurGetDivesets(SCIP_HEUR *heur)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
SCIP_Bool SCIPisLPSolBasic(SCIP *scip)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBuffer(scip, ptr)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPallocBuffer(scip, ptr)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_NODESEL * SCIPfindNodesel(SCIP *scip, const char *name)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_SOLORIGIN SCIPsolGetOrigin(SCIP_SOL *sol)
SCIP_Longint SCIPsolGetNodenum(SCIP_SOL *sol)
int SCIPgetNSols(SCIP *scip)
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
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_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_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Longint SCIPgetNBestSolsFound(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_RETCODE SCIPaddTrustregionNeighborhoodConstraint(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **subvars, SCIP_Real violpenalty)
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_TABLE * SCIPfindTable(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_RETCODE SCIPcreateClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_RETCODE SCIPresetClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstopClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPfreeClock(SCIP *scip, SCIP_CLOCK **clck)
SCIP_Real SCIPgetClockTime(SCIP *scip, SCIP_CLOCK *clck)
SCIP_RETCODE SCIPstartClock(SCIP *scip, SCIP_CLOCK *clck)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisDualfeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfrac(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisDualfeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPvariablegraphBreadthFirst(SCIP *scip, SCIP_VGRAPH *vargraph, SCIP_VAR **startvars, int nstartvars, int *distances, int maxdistance, int maxvars, int maxbinintvars)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
void SCIPselectInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int k, int len)
void SCIPselectDownInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int k, int len)
void SCIPsortRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
static SCIP_DIVESET * diveset
SCIPcreateSol(scip, &heurdata->sol, heur))
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPperformGenericDivingAlgorithm(scip, diveset, heurdata->sol, heur, result, nodeinfeasible, lpiterlimit, -1, -1.0, SCIP_DIVECONTEXT_ADAPTIVE))
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
static void tryAdd2variableBuffer(SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, SCIP_Bool integer)
static SCIP_Real getReward(SCIP *scip, SCIP_HEURDATA *heurdata, int selection, HEUR_STATS *runstats, SCIP_STATUS subscipstatus)
static SCIP_RETCODE includeDivingHeurs(SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
#define DEFAULT_ACTIVE_MUTATION
#define DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE
static void printDivingHeurStatistics(SCIP *scip, SCIP_HEURDATA *heurdata, FILE *file)
static SCIP_RETCODE initRest(SCIP *scip, SCIP_HEUR *heur)
#define TABLE_POSITION_NEIGHBORHOOD
#define DEFAULT_NODESQUOT
static void increaseFixingRate(NH_FIXINGRATE *fx)
#define DEFAULT_MAXCALLSSAMESOL
static SCIP_RETCODE updateSelectionStrategy(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Real reward, int selection)
#define DECL_NHDEACTIVATE(x)
#define DEFAULT_PRIORITY_RENS
#define DEFAULT_ACTIVE_PROXIMITY
#define DEFAULT_NODESQUOTMIN
#define DEFAULT_MINFIXINGRATE_DINS
#define DEFAULT_ACTIVE_RINS
#define TABLE_NAME_NEIGHBORHOOD
static void initRunStats(SCIP *scip, HEUR_STATS *stats)
static SCIP_RETCODE neighborhoodGetRefsol(SCIP *scip, NH *neighborhood, SCIP_SOL **solptr)
#define DEFAULT_USEREDCOST
static void decreaseFixingRate(NH_FIXINGRATE *fx)
static void decreaseSolveFreq(SOLVEFREQ *solvefreqdata)
static SCIP_RETCODE executeLNSHeuristic(SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_STATUS *subscipstatus, SCIP_RESULT *result)
static void updateFixingRate(NH *neighborhood, SCIP_STATUS subscipstatus, HEUR_STATS *runstats)
#define SCIP_EVENTTYPE_SCHEDULER
#define DEFAULT_SOLREWARDWEIGHT
static void updateRunStats(HEUR_STATS *stats, SCIP *subscip)
#define FIXINGRATE_STARTINC
#define DEFAULT_MAXFIXINGRATE_RENS
#define DEFAULT_PRIORITY_PROXIMITY
static void resetTargetNodeLimit(SCIP_HEURDATA *heurdata)
#define SOLVEFREQ_STARTINC
static SCIP_RETCODE neighborhoodInit(SCIP *scip, NH *neighborhood)
#define DEFAULT_ACTIVE_TRUSTREGION
#define DEFAULT_MINFIXINGRATE_RENS
#define DEFAULT_MAXFIXINGRATE_DINS
#define DEFAULT_MINFIXINGRATE_RINS
#define DEFAULT_PRIORITY_ZEROOBJECTIVE
#define DEFAULT_INITLNSNODELIMIT
#define DEFAULT_WAITINGNODES
#define DEFAULT_HEURTIMELIMIT
#define DEFAULT_NODESOFFSET
#define TABLE_DESC_NEIGHBORHOOD
#define DECL_CHANGESUBSCIP(x)
#define DEFAULT_EFFORTREWARDWEIGHT
#define DEFAULT_RESETWEIGHTS
static SCIP_RETCODE selectHeuristic(SCIP *scip, SCIP_HEURDATA *heurdata, int *selection)
#define DEFAULT_QUALREWARDWEIGHT
#define DEFAULT_MAXFIXINGRATE_MUTATION
#define TABLE_EARLIEST_STAGE_NEIGHBORHOOD
static void increaseSolveFreq(SOLVEFREQ *solvefreqdata)
#define DEFAULT_USELOCALREDCOST
#define DEFAULT_CONFLICTREWARDWEIGHT
#define DEFAULT_MAXFIXINGRATE_TRUSTREGION
#define DIVINGHEURS_INITIALSIZE
#define DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE
#define DEFAULT_ACTIVE_RENS
static SCIP_RETCODE schedulerIncludeNeighborhood(SCIP *scip, SCIP_HEURDATA *heurdata, NH **neighborhood, const char *name, SCIP_Real minfixingrate, SCIP_Real maxfixingrate, SCIP_Bool active, int priority, DECL_VARFIXINGS((*varfixings)), DECL_CHANGESUBSCIP((*changesubscip)), DECL_NHINIT((*nhinit)), DECL_NHEXIT((*nhexit)), DECL_NHFREE((*nhfree)), DECL_NHREFSOL((*nhrefsol)),)
static void initSolveFreq(SOLVEFREQ *solvefreqdata)
static void updateFixingRateIncrement(NH_FIXINGRATE *fx)
#define DEFAULT_INITDIVINGNODELIMIT
#define DEFAULT_MINFIXINGRATE_CROSSOVER
static SCIP_RETCODE addLocalBranchingConstraint(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **subvars, int distance, SCIP_Bool *success, int *naddedconss)
#define DEFAULT_ACTIVE_ZEROOBJECTIVE
#define DEFAULT_MINFIXINGRATE_LOCALBRANCHING
#define DEFAULT_PRIORITY_CROSSOVER
#define DEFAULT_NSELECTIONS
static SCIP_RETCODE setLimits(SCIP *subscip, SOLVELIMITS *solvelimits)
#define DEFAULT_INITDURINGROOT
static SCIP_RETCODE executeHeuristic(SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_STATUS *subscipstatus, SCIP_RESULT *result)
#define DEFAULT_VIOLPENALTY_TRUSTREGION
static SCIP_RETCODE resetFixingRate(SCIP *scip, NH_FIXINGRATE *fixingrate)
#define DEFAULT_ACTIVE_LOCALBRANCHING
static SCIP_RETCODE fixMatchingSolutionValues(SCIP *scip, SCIP_SOL **sols, int nsols, SCIP_VAR **vars, int nvars, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings)
#define DEFAULT_PRIORITY_MUTATION
#define DEFAULT_PRIORITY_RINS
static SCIP_Real getVariablePscostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real refsolval, SCIP_Bool uselocallpsol)
static int getHistIndex(SCIP_STATUS subscipstatus)
#define DEFAULT_ACTIVE_DINS
#define DEFAULT_PRIORITY_TRUSTREGION
static void updateSolveFreqIncrement(SOLVEFREQ *solvefreqdata)
#define DEFAULT_MAXFIXINGRATE_LOCALBRANCHING
#define DEFAULT_SUBSCIPRANDSEEDS
#define DEFAULT_NPOOLSOLS_DINS
static void computeIntegerVariableBoundsDins(SCIP *scip, SCIP_VAR *var, SCIP_Real *lbptr, SCIP_Real *ubptr)
#define DEFAULT_MAXFIXINGRATE_RINS
static SCIP_RETCODE includeNeighborhoods(SCIP *scip, SCIP_HEURDATA *heurdata)
#define DEFAULT_MINFIXINGRATE_MUTATION
static SCIP_RETCODE LNSUnfixVariables(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, int ntargetfixings, SCIP_Bool *success)
#define DEFAULT_TARGETNODEFACTOR
#define DEFAULT_MAXFIXINGRATE_CROSSOVER
#define DEFAULT_NSOLS_CROSSOVER
#define DEFAULT_USEDISTANCES
static SCIP_RETCODE reinitBandit(SCIP *scip, SCIP_HEURDATA *heurdata, int nactions)
static void updateHeurStatsLNS(HEUR_STATS *runstats, NH *neighborhood, SCIP_STATUS *subscipstatus)
static void resetCurrentNeighborhood(SCIP_HEURDATA *heurdata)
static SCIP_Real getVariableRedcostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real refsolval, SCIP_Bool uselocalredcost)
static void updateSolveFreq(DIVING_HEUR *divingheur, HEUR_STATS *stats)
static SCIP_RETCODE schedulerFreeDivingHeur(SCIP *scip, DIVING_HEUR **divingheur)
static void updateHeurStatsDiving(HEUR_STATS *runstats, DIVING_HEUR *divingheur)
static SCIP_RETCODE schedulerFreeNeighborhood(SCIP *scip, NH **neighborhood)
static SCIP_RETCODE neighborhoodExit(SCIP *scip, NH *neighborhood)
#define DEFAULT_ACTIVE_CROSSOVER
static SCIP_RETCODE executeDivingHeuristic(SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_RESULT *result)
#define DEFAULT_USESUBSCIPHEURS
#define DEFAULT_PRIORITY_DINS
static void printNeighborhoodStatistics(SCIP *scip, SCIP_HEURDATA *heurdata, FILE *file)
static SCIP_RETCODE setupSubScip(SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SOLVELIMITS *solvelimits, SCIP_HEUR *heur, SCIP_Bool objchgd)
static SCIP_RETCODE determineLimits(SCIP *scip, SCIP_HEUR *heur, int selection, SOLVELIMITS *solvelimits, SCIP_Bool *runagain)
#define DEFAULT_MAXFIXINGRATE_PROXIMITY
static SCIP_RETCODE neighborhoodChangeSubscip(SCIP *sourcescip, SCIP *targetscip, NH *neighborhood, SCIP_VAR **targetvars, int *ndomchgs, int *nchgobjs, int *naddedconss, SCIP_Bool *success)
#define DECL_VARFIXINGS(x)
#define DEFAULT_PRIORITY_LOCALBRANCHING
static SCIP_RETCODE heurStatsReset(SCIP *scip, HEUR_STATS *stats, SCIP_Bool usediving)
#define DEFAULT_MINFIXINGRATE_TRUSTREGION
#define DEFAULT_BESTSOLWEIGHT
#define DEFAULT_BANDITALGO
static SCIP_RETCODE LNSFixMoreVariables(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_SOL *refsol, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, int ntargetfixings, SCIP_Bool *success)
#define DEFAULT_MINFIXINGRATE_PROXIMITY
static SCIP_RETCODE createBandit(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Real *priorities, unsigned int initseed)
static SCIP_RETCODE neighborhoodFixVariables(SCIP *scip, SCIP_HEURDATA *heurdata, NH *neighborhood, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, SCIP_RESULT *result)
#define DEFAULT_USEPSCOST
static SCIP_RETCODE transferSolution(SCIP *subscip, SCIP_EVENTDATA *eventdata)
Adaptive heuristic to schedule LNS and diving heuristics.
methods commonly used by primal heuristics
static const char * paramname[]
memory allocation routines
#define BMSduplicateMemoryArray(ptr, source, num)
#define BMSclearMemory(ptr)
#define BMSfreeMemoryArray(ptr)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSclearMemoryArray(ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for bandit algorithms
public methods for the epsilon greedy bandit selector
public methods for Exp.3-IX
public methods for UCB bandit selection
public methods for managing constraints
public methods for managing events
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
methods for selecting (weighted) k-medians
public methods for primal CIP solutions
public methods for problem variables
public methods for bandit algorithms
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
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 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 random numbers
public methods for solutions
public methods for querying solving statistics
public methods for statistics table plugins
public methods for timing
public methods for the branch-and-bound tree
public methods for SCIP variables
SOLVEFREQ * solvefreqdata
int statushist[NHISTENTRIES]
SCIP_Longint nbestsolsfound
SCIP_Real targetfixingrate
int statushist[NHISTENTRIES]
SCIP_Longint nbestsolsfound
DECL_CHANGESUBSCIP((*changesubscip))
union Nh::@134264243327243237357224041227301111216002025114 data
DATA_CROSSOVER * crossover
DECL_NHDEACTIVATE((*nhdeactivate))
DATA_TRUSTREGION * trustregion
DECL_VARFIXINGS((*varfixings))
DECL_NHREFSOL((*nhrefsol))
SCIP_Real currentsolvefreq
unsigned int usedistances
SCIP_Real * redcostscores
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_BESTSOLFOUND
#define SCIP_EVENTTYPE_SOLFOUND
#define SCIP_EVENTTYPE_LPSOLVED
#define SCIP_DECL_HEURINITSOL(x)
#define SCIP_DECL_HEURCOPY(x)
struct SCIP_HeurData SCIP_HEURDATA
#define SCIP_DECL_HEURINIT(x)
#define SCIP_DECL_HEUREXIT(x)
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_HEUREXEC(x)
@ SCIP_DIVECONTEXT_SCHEDULER
#define SCIP_DECL_SORTINDCOMP(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_SOLORIGIN_ORIGINAL
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_PRIMALLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
enum SCIP_Status SCIP_STATUS
#define SCIP_DECL_TABLEOUTPUT(x)