75#if !defined(_WIN32) && !defined(_WIN64)
79#define HEUR_NAME "scheduler"
80#define HEUR_DESC "Adaptive heuristic to schedule LNS and diving heuristics"
81#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS
82#define HEUR_PRIORITY -30000
85#define HEUR_MAXDEPTH -1
86#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE
87#define HEUR_USESSUBSCIP TRUE
89#define NNEIGHBORHOODS 9
90#define DIVINGHEURS_INITIALSIZE 10
95#define DEFAULT_NODESQUOT 0.1
96#define DEFAULT_NODESQUOTMIN 0.0
97#define DEFAULT_NODESOFFSET 500LL
98#define DEFAULT_NSOLSLIM 3
99#define DEFAULT_MINNODES 50LL
100#define DEFAULT_MAXNODES 500LL
101#define DEFAULT_WAITINGNODES 0LL
102#define DEFAULT_INITLNSNODELIMIT 50
103#define DEFAULT_INITDIVINGNODELIMIT 500LL
104#define DEFAULT_TARGETNODEFACTOR 1.05
107#define DEFAULT_INITDURINGROOT FALSE
108#define DEFAULT_MAXCALLSSAMESOL -1
109#define DEFAULT_HEURTIMELIMIT 60.0
114#define DEFAULT_BESTSOLWEIGHT 1
115#define DEFAULT_BANDITALGO 'i'
116#define DEFAULT_RESETWEIGHTS FALSE
117#define DEFAULT_SUBSCIPRANDSEEDS FALSE
118#define DEFAULT_FIXTOL 0.1
119#define DEFAULT_UNFIXTOL 0.1
120#define DEFAULT_BETA 0.0
121#define DEFAULT_NSELECTIONS 5
126#define DEFAULT_USEREDCOST TRUE
127#define DEFAULT_USEPSCOST TRUE
128#define DEFAULT_USEDISTANCES TRUE
129#define DEFAULT_USELOCALREDCOST FALSE
134#define DEFAULT_EFFORTREWARDWEIGHT 0.2
135#define DEFAULT_SOLREWARDWEIGHT 0.3
136#define DEFAULT_QUALREWARDWEIGHT 0.3
137#define DEFAULT_CONFLICTREWARDWEIGHT 0.2
143#define DEFAULT_EPS 0.4685844
144#define DEFAULT_ALPHA 0.0016
145#define DEFAULT_GAMMA 0.07041455
150#define SOLVEFREQ_DECAY 0.75
151#define SOLVEFREQ_STARTINC 0.2
152#define MAXSOLVEFREQ 0.3
153#define MINSOLVEFREQ 0.05
158#define FIXINGRATE_DECAY 0.75
159#define FIXINGRATE_STARTINC 0.2
160#define DEFAULT_USESUBSCIPHEURS FALSE
161#define DEFAULT_COPYCUTS FALSE
164#define DEFAULT_SEED 113
165#define MUTATIONSEED 121
166#define CROSSOVERSEED 321
169#define DEFAULT_MINFIXINGRATE_RENS 0.3
170#define DEFAULT_MAXFIXINGRATE_RENS 0.9
171#define DEFAULT_ACTIVE_RENS TRUE
173#define DEFAULT_PRIORITY_RENS -1100000
175#define DEFAULT_MINFIXINGRATE_RINS 0.3
176#define DEFAULT_MAXFIXINGRATE_RINS 0.9
177#define DEFAULT_ACTIVE_RINS TRUE
179#define DEFAULT_PRIORITY_RINS -1101000
181#define DEFAULT_MINFIXINGRATE_MUTATION 0.3
182#define DEFAULT_MAXFIXINGRATE_MUTATION 0.9
183#define DEFAULT_ACTIVE_MUTATION TRUE
185#define DEFAULT_PRIORITY_MUTATION -1103010
187#define DEFAULT_MINFIXINGRATE_LOCALBRANCHING 0.3
188#define DEFAULT_MAXFIXINGRATE_LOCALBRANCHING 0.9
189#define DEFAULT_ACTIVE_LOCALBRANCHING TRUE
191#define DEFAULT_PRIORITY_LOCALBRANCHING -1102000
193#define DEFAULT_MINFIXINGRATE_PROXIMITY 0.3
194#define DEFAULT_MAXFIXINGRATE_PROXIMITY 0.9
195#define DEFAULT_ACTIVE_PROXIMITY TRUE
197#define DEFAULT_PRIORITY_PROXIMITY -2000000
199#define DEFAULT_MINFIXINGRATE_CROSSOVER 0.3
200#define DEFAULT_MAXFIXINGRATE_CROSSOVER 0.9
201#define DEFAULT_ACTIVE_CROSSOVER TRUE
203#define DEFAULT_PRIORITY_CROSSOVER -1104000
205#define DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE 0.3
206#define DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE 0.9
207#define DEFAULT_ACTIVE_ZEROOBJECTIVE TRUE
209#define DEFAULT_PRIORITY_ZEROOBJECTIVE 100
211#define DEFAULT_MINFIXINGRATE_DINS 0.3
212#define DEFAULT_MAXFIXINGRATE_DINS 0.9
213#define DEFAULT_ACTIVE_DINS TRUE
215#define DEFAULT_PRIORITY_DINS -1105000
217#define DEFAULT_MINFIXINGRATE_TRUSTREGION 0.3
218#define DEFAULT_MAXFIXINGRATE_TRUSTREGION 0.9
219#define DEFAULT_ACTIVE_TRUSTREGION FALSE
221#define DEFAULT_PRIORITY_TRUSTREGION -1102010
224#define DEFAULT_NSOLS_CROSSOVER 2
225#define DEFAULT_NPOOLSOLS_DINS 5
226#define DEFAULT_VIOLPENALTY_TRUSTREGION 100.0
229#define EVENTHDLR_NAME "Scheduler"
230#define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic"
231#define SCIP_EVENTTYPE_SCHEDULER (SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND | SCIP_EVENTTYPE_BESTSOLFOUND)
234#define TABLE_NAME_NEIGHBORHOOD "scheduler"
235#define TABLE_DESC_NEIGHBORHOOD "scheduler heuristics statistics"
236#define TABLE_POSITION_NEIGHBORHOOD 12500
237#define TABLE_EARLIEST_STAGE_NEIGHBORHOOD SCIP_STAGE_TRANSFORMED
268 #define DECL_VARFIXINGS(x) SCIP_RETCODE x ( \
274 SCIP_RESULT* result \
285#define DECL_CHANGESUBSCIP(x) SCIP_RETCODE x ( \
289 SCIP_VAR** subvars, \
297#define DECL_NHINIT(x) SCIP_RETCODE x ( \
303#define DECL_NHEXIT(x) SCIP_RETCODE x ( \
309#define DECL_NHFREE(x) SCIP_RETCODE x ( \
322#define DECL_NHREFSOL(x) SCIP_RETCODE x ( \
326 SCIP_RESULT* result \
330#define DECL_NHDEACTIVATE(x) SCIP_RETCODE x (\
332 SCIP_Bool* deactivate \
347#define NHISTENTRIES 7
460 SCIP_Longint waitingnodes;
461 SCIP_Longint firstcallthissol;
469 SCIP_Bool resetweights;
470 SCIP_Bool initduringroot;
472 SCIP_Bool defaultroot;
473 SCIP_Real heurtimelimit;
475 SCIP_Real exp3_gamma;
477 SCIP_Real epsgreedy_eps;
478 SCIP_Bool epsgreedy_usemod;
482 SCIP_Real solrewardweight;
483 SCIP_Real effortrewardweight;
484 SCIP_Real qualrewardweight;
485 SCIP_Real conflictrewardweight;
491 SCIP_Longint initdivingnodelimit;
492 SCIP_Longint maxdivingnodelimit;
495 SCIP_Longint nodesoffset;
496 SCIP_Longint maxnodes;
497 SCIP_Longint targetnodes;
498 SCIP_Longint minnodes;
501 SCIP_Real nodesquotmin;
503 SCIP_Real targetnodefactor;
507 int nactiveneighborhoods;
508 int ninitneighborhoods;
511 int currneighborhood;
513 SCIP_Bool usesubscipheurs;
514 SCIP_Bool subsciprandseeds;
516 int initlnsnodelimit;
518 SCIP_Bool useredcost;
519 SCIP_Bool usedistances;
521 SCIP_Bool uselocalredcost;
530 SCIP_Longint nodelimit;
628 switch (subscipstatus)
724 SCIP_Real minfixingrate,
725 SCIP_Real maxfixingrate,
752 (*neighborhood)->changesubscip = changesubscip;
753 (*neighborhood)->varfixings = varfixings;
754 (*neighborhood)->nhinit = nhinit;
755 (*neighborhood)->nhexit = nhexit;
756 (*neighborhood)->nhfree = nhfree;
757 (*neighborhood)->nhrefsol = nhrefsol;
758 (*neighborhood)->nhdeactivate = nhdeactivate;
760 (*neighborhood)->rootnodepriority = priority;
765 &(*neighborhood)->fixingrate.minfixingrate,
TRUE, minfixingrate, 0.0, 1.0,
NULL,
NULL) );
768 &(*neighborhood)->fixingrate.maxfixingrate,
TRUE, maxfixingrate, 0.0, 1.0,
NULL,
NULL) );
774 &(*neighborhood)->priority,
TRUE, 1.0, 1e-2, 1.0,
NULL,
NULL) );
793 nhptr = *neighborhood;
799 if( nhptr->nhfree !=
NULL )
808 *neighborhood =
NULL;
824 if( neighborhood->nhinit !=
NULL )
842 if( neighborhood->nhexit !=
NULL )
871 sourcescip = eventdata->sourcescip;
872 subvars = eventdata->subvars;
873 heur = eventdata->heur;
874 runstats = eventdata->runstats;
876 assert(sourcescip != subscip);
912 divingheurptr = *divingheur;
1003 switch (subscipstatus)
1035 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",
1036 "Calls",
"SetupTime",
"SolveTime",
"SolveNodes",
"Sols",
"Best",
"Exp3",
"Exp3-IX",
"EpsGreedy",
"UCB",
"TgtFixRate",
1037 "Opt",
"Inf",
"Node",
"Stal",
"Sol",
"Usr",
"Othr",
"Actv");
1046 SCIP_Real epsgreedyweight;
1048 neighborhood =
heurdata->neighborhoods[
i];
1060 epsgreedyweight = -1.0;
1108 SCIPinfoMessage(
scip, file,
"Diving (Scheduler) : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s \n",
1109 "Calls",
"SetupTime",
"SolveTime",
"SolveNodes",
"Sols",
"Best",
"Exp3",
"Exp3-IX",
"EpsGreedy",
"UCB",
"LPResolveQuot",
"MaxDiveDepth");
1118 SCIP_Real epsgreedyweight;
1132 epsgreedyweight = -1.0;
1177 stats = divingheur->
stats;
1207 stats = &neighborhood->
stats;
1270 else if( dist1 > dist2 )
1312 SCIP_Real refsolval,
1313 SCIP_Bool uselocalredcost
1316 SCIP_Real bestbound;
1326 if( ! uselocalredcost )
1351 score = redcost * (refsolval - bestbound);
1354 if( ! uselocalredcost )
1355 score =
MAX(score, 0.0);
1365 SCIP_Real refsolval,
1366 SCIP_Bool uselocallpsol
1414 varbuf[*nfixings] =
var;
1415 valbuf[*nfixings] = val;
1442 SCIP_Real* redcostscores;
1443 SCIP_Real* pscostscores;
1450 SCIP_Real* randscores;
1472 if( ntargetfixings >= nbinintvars )
1476 nvarstoadd = ntargetfixings - *nfixings;
1477 if( nvarstoadd == 0 )
1510 for(
b = 0;
b < *nfixings; ++
b )
1518 if( probindex < nbinintvars )
1519 isfixed[probindex] =
TRUE;
1526 for(
b = 0;
b < nbinintvars; ++
b )
1541 unfixedvars[nunfixedvars] =
var;
1542 perm[nunfixedvars] = nunfixedvars;
1546 solvals[nunfixedvars] = solvals[
b];
1547 distances[nunfixedvars] = distances[
b];
1562 nvarstoadd =
MIN(nunfixedvars, nvarstoadd);
1565 if( nvarstoadd < nunfixedvars )
1566 SCIPselectInd(perm, sortIndCompScheduler, &varprio, nvarstoadd, nunfixedvars);
1569 for(
b = 0;
b < nvarstoadd; ++
b )
1571 int permindex = perm[
b];
1573 assert(permindex < nunfixedvars);
1598 SCIP_Real* priorities,
1599 unsigned int initseed
1610 heurdata->ucb_alpha, nactions, initseed) );
1666 if( neighborhood->nhrefsol !=
NULL )
1697 SCIP_Real* redcostscores;
1698 SCIP_Real* pscostscores;
1699 SCIP_Real* randscores;
1702 SCIP_Real* valbufcpy;
1703 SCIP_Bool* isfixedvar;
1707 int* fixeddistances;
1717 if( nbinintvars == 0 )
1740 for(
i = 0;
i < *nfixings; ++
i )
1746 isfixedvar[probindex] =
TRUE;
1752 for(
i = 0;
i < nbinintvars; ++
i )
1754 if( ! isfixedvar[
i] )
1755 unfixedvars[nunfixed++] =
vars[
i];
1765 for(
i = 0;
i < *nfixings; ++
i )
1768 if( probindex >= 0 )
1769 fixeddistances[
i] = distances[probindex];
1779 for(
i = 0;
i < *nfixings; ++
i )
1782 SCIP_Real fixval = valbuf[
i];
1803 SCIPselectDownInd(perm, sortIndCompScheduler, &varprio, ntargetfixings, *nfixings);
1806 for(
i = 0;
i < ntargetfixings; ++
i )
1808 valbuf[
i] = valbufcpy[perm[
i]];
1809 varbuf[
i] = varbufcpy[perm[
i]];
1812 *nfixings = ntargetfixings;
1860 if( neighborhood->varfixings !=
NULL )
1862 SCIP_CALL( neighborhood->varfixings(
scip, neighborhood, varbuf, valbuf, nfixings,
result) );
1867 else if( ntargetfixings == 0 )
1878 nminfixings =
MAX(nminfixings, 0);
1880 nmaxfixings =
MIN(nmaxfixings, nbinintvars);
1882 SCIPdebugMsg(
scip,
"Neighborhood Fixings/Target: %d / %d <= %d <= %d\n",*nfixings, nminfixings, ntargetfixings, nmaxfixings);
1894 if( refsol !=
NULL )
1908 SCIPdebugMsg(
scip,
"After additional fixings: %d / %d\n",*nfixings, ntargetfixings);
1910 else if( (SCIP_Real)(*nfixings) > nmaxfixings )
1918 SCIPdebugMsg(
scip,
"Unfixed variables, fixed variables remaining: %d\n", ntargetfixings);
1956 if( neighborhood->changesubscip !=
NULL )
1958 SCIP_CALL( neighborhood->changesubscip(sourcescip, targetscip, neighborhood, targetvars, ndomchgs, nchgobjs, naddedconss, success) );
1999 SCIP_Bool avoidmemout;
2024 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Not enough memory or time left.\n");
2045 SCIP_Real totalreward;
2046 SCIP_Real effortsaved;
2047 SCIP_Real bestsolreward;
2048 SCIP_Real closedgapreward;
2049 SCIP_Real conflictreward;
2055 effortsaved =
MIN(1.0, (SCIP_Real) runstats->
usednodes / (SCIP_Real)
heurdata->maxlnsnodelimit);
2056 effortsaved = (1.0 - effortsaved);
2062 assert(effortsaved >= 0.0 && effortsaved <= 1.0);
2070 conflictreward = 0.0;
2071 else if(
heurdata->maxnconflicts > 0 )
2074 conflictreward = 1.0;
2077 conflictreward = 0.0;
2078 assert(conflictreward >= 0.0 && conflictreward <= 1.0);
2087 bestsolreward = 1.0;
2094 closedgapreward = 1.0;
2100 bestsolreward = 0.0;
2101 closedgapreward = 0.0;
2105 totalreward =
heurdata->effortrewardweight * effortsaved +
heurdata->solrewardweight * bestsolreward
2106 +
heurdata->qualrewardweight * closedgapreward +
heurdata->conflictrewardweight * conflictreward;
2107 totalreward =
MIN( totalreward, 1.0);
2108 assert(totalreward >= 0.0 && totalreward <= 1.0);
2138#ifdef SCHEDULER_SUBSCIPOUTPUT
2361 int newsize = 2 *
heurdata->divingheurssize;
2363 heurdata->divingheurssize = newsize;
2456 divingheurs =
heurdata->divingheurs;
2499 SCIPdebugMsg(
scip,
"Finished executing diving heuristic %s (idx: %d) with %lld sols (%lld best sols), %lld conflicts, %lld backtracks and %lld probing nodes \n",
2589 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Not enough variables fixed.\n");
2605 SCIP_CALL(
SCIPcopyLargeNeighborhoodSearch(
scip, subscip, varmapf, probnamesuffix, varbuf, valbuf, nfixings,
FALSE,
heurdata->copycuts, &success,
NULL) );
2608 for( v = 0; v <
nvars; ++v )
2621 SCIPdebugMsg(
scip,
"Aborting LNS heuristic call: Problems with creating subproblem.\n");
2629 eventdata.nodelimit = solvelimits.
nodelimit;
2630 eventdata.lplimfac =
heurdata->lplimfac;
2631 eventdata.heur = heur;
2632 eventdata.sourcescip =
scip;
2633 eventdata.subvars = subvars;
2634 eventdata.runstats = runstats;
2651 SCIPwarningMessage(
scip,
"Error while presolving subproblem in Scheduler heuristic; sub-SCIP terminated with code <%d>\n", retcode);
2661#ifdef SCHEDULER_SUBSCIPOUTPUT
2673 if( subscip !=
NULL )
2690 SCIPdebugMsg(
scip,
"Finished executing LNS heuristic %s (idx: %d) with %lld sols (%lld best sols) and %lld nodes used.\n",
2742 SCIP_Real* priorities;
2744 unsigned int initseed;
2751 priorities[
i] =
heurdata->divingheurs[
i]->priority;
2752 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
2784 SCIP_Real* priorities;
2805 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
2816 for(
i = 0;
i < nheurs; ++
i )
2850 SCIPdebugMsg(
scip,
"Calling heurExecScheduler: depth %d sols %d inf %u node %lld \n",
2863 if( nodeinfeasible )
2886 if(
heurdata->maxcallssamesol != -1 )
2888 SCIP_Longint samesollimit;
2919 heurdata->nskippedcalls = (int) floor(exp(0.1 * (SCIP_Real)
heurdata->nfailedcalls)) - 1;
2994 int *fracidx =
NULL;
3038 fracidx[nfracs++] =
i;
3083 if( subvars[
i] ==
NULL )
3088 SCIP_Real newlb =
SCIPfloor(sourcescip, lpsolval);
3089 SCIP_Real newub = newlb + 1.0;
3140 nvars = nbinintvars;
3146 for( v = 0; v <
nvars; ++v )
3157 for( s = 1; s < nsols; ++s )
3199 if( incumbent ==
NULL )
3213 sols[1] = incumbent;
3284 nsols = data->
nsols;
3308 if( lastdraw == nsols )
3313 for( s = 0; s < nsols; ++s )
3314 sols[s] = scipsols[s];
3322 assert(nsols < lastdraw);
3328 sols[nsols - 1] = scipsols[nextdraw];
3330 lastdraw = nextdraw;
3418 SCIP_Real targetfixingrate;
3432 if( nbinintvars == 0 )
3436 if( incumbentsol ==
NULL )
3440 ntargetfixings = (int)(targetfixingrate * nbinintvars) + 1;
3443 if( nbinintvars <= ntargetfixings )
3452 for(
i = 0; *nfixings < ntargetfixings &&
i < nbinintvars; ++
i )
3455 assert(randint < nbinintvars);
3465 assert(
i == nbinintvars || *nfixings == ntargetfixings);
3472 if( *nfixings == ntargetfixings )
3497 SCIP_Real* consvals;
3510 if( referencesol ==
NULL )
3514 rhs =
MAX(rhs, 2.0);
3522 if( subvars[
i] ==
NULL )
3574 if( referencesol ==
NULL )
3583 if( subvars[
i] ==
NULL )
3597 if( subvars[
i] ==
NULL )
3637 if( subvars[
i] ==
NULL )
3678 if(
REALABS(lpsol - mipsol) >= 0.5 )
3686 range = 2 * lpsol - mipsol;
3688 if( mipsol >= lpsol )
3691 *lbptr =
MAX(*lbptr, range);
3702 *ubptr =
MIN(*ubptr, range);
3712 *lbptr =
MAX(*lbptr, lbglobal);
3713 *ubptr =
MIN(*ubptr, ubglobal);
3718 *lbptr =
MAX(mipsol, lbglobal);
3719 *ubptr =
MIN(mipsol, ubglobal);
3766 nsols = nmipsols + 2;
3770 sols[1] = rootlpsol;
3822 if( subvars[v] ==
NULL )
3963 varFixingsRens, changeSubscipRens,
NULL,
NULL,
NULL,
NULL, nhDeactivateDiscreteVars) );
3968 varFixingsRins,
NULL,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateDiscreteVars) );
3973 varFixingsMutation,
NULL, nhInitMutation, nhExitMutation,
NULL, nhRefsolIncumbent, nhDeactivateDiscreteVars) );
3978 NULL, changeSubscipLocalbranching,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateBinVars) );
3983 varFixingsCrossover,
NULL,
3984 nhInitCrossover, nhExitCrossover, nhFreeCrossover, nhRefsolCrossover, nhDeactivateDiscreteVars) );
3997 NULL, changeSubscipProximity,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateBinVars) );
4002 NULL, changeSubscipZeroobjective,
NULL,
NULL,
NULL, nhRefsolIncumbent, nhDeactivateObjVars) );
4007 varFixingsDins, changeSubscipDins,
NULL,
NULL, nhFreeDins, nhRefsolIncumbent, nhDeactivateBinVars) );
4014 "number of pool solutions where binary solution values must agree",
4020 NULL, changeSubscipTrustregion,
NULL,
NULL, nhFreeTrustregion, nhRefsolIncumbent, nhDeactivateBinVars) );
4026 "the penalty for each change in the binary variables from the candidate solution",
4082 SCIP_Real* priorities;
4083 unsigned int initseed;
4095 for(
i =
heurdata->nneighborhoods - 1;
i >= 0; --
i )
4098 SCIP_Bool deactivate;
4103 if( deactivate || ! neighborhood->
active )
4105 if(
heurdata->nactiveneighborhoods - 1 >
i )
4120 priorities[
i] =
heurdata->divingheurs[
i]->priority;
4123 for(
i = 0;
i <
heurdata->nactiveneighborhoods; ++
i )
4129 priorities[
i] = 1.0;
4144 SCIP_Real* initpriorities;
4151 for(
i = 0;
i < nheurs; ++
i )
4247 for( j = 0; j <
heurdata->ndiving; ++j )
4346 "maximum number of nodes to regard in the subproblem",
4350 "offset added to the nodes budget",
4354 "minimum number of nodes required to start a sub-SCIP",
4358 "number of nodes since last incumbent solution that the heuristic should wait",
4362 "initial node limit for LNS heuristics",
4366 "initial node limit for diving heuristics",
4370 "fraction of nodes compared to the main SCIP for budget computation",
4374 "lower bound fraction of nodes compared to the main SCIP for budget computation",
4378 "limit on the number of improving solutions in a sub-SCIP call",
4382 "the bandit algorithm: (u)pper confidence bounds, (e)xp.3, epsilon (g)reedy, exp.3-(i)x",
4386 "weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution for exp3",
4390 "reward offset between 0 and 1 at every observation for Exp.3",
4394 "parameter to increase the confidence width in UCB",
4398 "distances from fixed variables be used for variable prioritization",
4402 "should reduced cost scores be used for variable prioritization?",
4406 "should pseudo cost scores be used for variable priorization?",
4410 "should local reduced costs be used for generic (un)fixing?",
4414 "should the heuristic activate other sub-SCIP heuristics during its search?",
4418 "factor by which target node number is eventually increased",
4422 "initial random seed for bandit algorithms and random decisions by neighborhoods",
4426 "number of allowed executions of the heuristic on the same incumbent solution (-1: no limit, 0: number of active neighborhoods)",
4430 "increase exploration in epsilon-greedy bandit algorithm",
4434 "TRUE if modified version of the epsilon-greedy bandit algorithm should be used",
4438 "weight by how much finding a new incumbent is rewarded in reward function",
4442 "weight by how much effort is rewarded in reward function",
4446 "weight by how much quality of a new incumbent is rewarded in reward function",
4450 "weight by how much number of conflicts found by diving is rewarded in reward function",
4454 "should the bandit algorithms be reset when a new problem is read?",
4458 "should random seeds of sub-SCIPs be altered to increase diversification?",
4462 "should cutting planes be copied to the sub-SCIP?",
4466 "tolerance by which the fixing rate may be missed without generic fixing",
4470 "tolerance by which the fixing rate may be exceeded without generic unfixing",
4474 "time limit for a single heuristic run",
4478 "should the heuristic be executed multiple times during the root node?",
4482 "should the default priorities be used at the root node?",
4486 "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))
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)