Adaptive heuristic to schedule LNS and diving heuristics.
Definition in file heur_scheduler.c.
#include "blockmemshell/memory.h"
#include "scip/cons_linear.h"
#include "scip/heur_scheduler.h"
#include "scip/heuristics.h"
#include "scip/pub_bandit_epsgreedy.h"
#include "scip/pub_bandit_exp3.h"
#include "scip/pub_bandit_exp3ix.h"
#include "scip/pub_bandit.h"
#include "scip/pub_bandit_ucb.h"
#include "scip/pub_cons.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_select.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/scip_bandit.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nodesel.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_randnumgen.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_table.h"
#include "scip/scip_timing.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | Heur_Stats |
struct | NH_FixingRate |
struct | SolveFreq |
struct | Nh |
struct | Diving_Heur |
struct | data_mutation |
struct | data_crossover |
struct | data_dins |
struct | data_trustregion |
struct | SolveLimits |
struct | VarPrio |
Functions | |
static SCIP_RETCODE | resetFixingRate (SCIP *scip, NH_FIXINGRATE *fixingrate) |
static void | updateFixingRateIncrement (NH_FIXINGRATE *fx) |
static void | increaseFixingRate (NH_FIXINGRATE *fx) |
static void | decreaseFixingRate (NH_FIXINGRATE *fx) |
static void | updateFixingRate (NH *neighborhood, SCIP_STATUS subscipstatus, HEUR_STATS *runstats) |
static void | resetCurrentNeighborhood (SCIP_HEURDATA *heurdata) |
static void | resetTargetNodeLimit (SCIP_HEURDATA *heurdata) |
static SCIP_RETCODE | heurStatsReset (SCIP *scip, HEUR_STATS *stats, SCIP_Bool usediving) |
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 SCIP_RETCODE | schedulerFreeNeighborhood (SCIP *scip, NH **neighborhood) |
static SCIP_RETCODE | neighborhoodInit (SCIP *scip, NH *neighborhood) |
static SCIP_RETCODE | neighborhoodExit (SCIP *scip, NH *neighborhood) |
static SCIP_RETCODE | transferSolution (SCIP *subscip, SCIP_EVENTDATA *eventdata) |
static SCIP_RETCODE | schedulerFreeDivingHeur (SCIP *scip, DIVING_HEUR **divingheur) |
static | SCIP_DECL_EVENTEXEC (eventExecScheduler) |
static void | initRunStats (SCIP *scip, HEUR_STATS *stats) |
static void | updateRunStats (HEUR_STATS *stats, SCIP *subscip) |
static int | getHistIndex (SCIP_STATUS subscipstatus) |
static void | printNeighborhoodStatistics (SCIP *scip, SCIP_HEURDATA *heurdata, FILE *file) |
static void | printDivingHeurStatistics (SCIP *scip, SCIP_HEURDATA *heurdata, FILE *file) |
static void | updateHeurStatsDiving (HEUR_STATS *runstats, DIVING_HEUR *divingheur) |
static void | updateHeurStatsLNS (HEUR_STATS *runstats, NH *neighborhood, SCIP_STATUS *subscipstatus) |
static | SCIP_DECL_SORTINDCOMP (sortIndCompScheduler) |
static SCIP_Real | getVariableRedcostScore (SCIP *scip, SCIP_VAR *var, SCIP_Real refsolval, SCIP_Bool uselocalredcost) |
static SCIP_Real | getVariablePscostScore (SCIP *scip, SCIP_VAR *var, SCIP_Real refsolval, SCIP_Bool uselocallpsol) |
static void | tryAdd2variableBuffer (SCIP *scip, SCIP_VAR *var, SCIP_Real val, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, SCIP_Bool integer) |
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) |
static SCIP_RETCODE | createBandit (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Real *priorities, unsigned int initseed) |
static | SCIP_DECL_HEURCOPY (heurCopyScheduler) |
static SCIP_RETCODE | neighborhoodGetRefsol (SCIP *scip, NH *neighborhood, SCIP_SOL **solptr) |
static SCIP_RETCODE | LNSUnfixVariables (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, int ntargetfixings, SCIP_Bool *success) |
static SCIP_RETCODE | neighborhoodFixVariables (SCIP *scip, SCIP_HEURDATA *heurdata, NH *neighborhood, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings, SCIP_RESULT *result) |
static SCIP_RETCODE | neighborhoodChangeSubscip (SCIP *sourcescip, SCIP *targetscip, NH *neighborhood, SCIP_VAR **targetvars, int *ndomchgs, int *nchgobjs, int *naddedconss, SCIP_Bool *success) |
static SCIP_RETCODE | setLimits (SCIP *subscip, SOLVELIMITS *solvelimits) |
static SCIP_RETCODE | determineLimits (SCIP *scip, SCIP_HEUR *heur, int selection, SOLVELIMITS *solvelimits, SCIP_Bool *runagain) |
static SCIP_Real | getReward (SCIP *scip, SCIP_HEURDATA *heurdata, int selection, HEUR_STATS *runstats, SCIP_STATUS subscipstatus) |
static SCIP_RETCODE | setupSubScip (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SOLVELIMITS *solvelimits, SCIP_HEUR *heur, SCIP_Bool objchgd) |
static void | initSolveFreq (SOLVEFREQ *solvefreqdata) |
static void | updateSolveFreqIncrement (SOLVEFREQ *solvefreqdata) |
static void | increaseSolveFreq (SOLVEFREQ *solvefreqdata) |
static void | decreaseSolveFreq (SOLVEFREQ *solvefreqdata) |
static void | updateSolveFreq (DIVING_HEUR *divingheur, HEUR_STATS *stats) |
static SCIP_RETCODE | includeDivingHeurs (SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata) |
static SCIP_RETCODE | selectHeuristic (SCIP *scip, SCIP_HEURDATA *heurdata, int *selection) |
static SCIP_RETCODE | updateSelectionStrategy (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Real reward, int selection) |
static SCIP_RETCODE | executeDivingHeuristic (SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_RESULT *result) |
static SCIP_RETCODE | executeLNSHeuristic (SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_STATUS *subscipstatus, SCIP_RESULT *result) |
static SCIP_RETCODE | executeHeuristic (SCIP *scip, SCIP_HEUR *heur, int selection, HEUR_STATS *runstats, SCIP_STATUS *subscipstatus, SCIP_RESULT *result) |
static SCIP_RETCODE | reinitBandit (SCIP *scip, SCIP_HEURDATA *heurdata, int nactions) |
static SCIP_RETCODE | initRest (SCIP *scip, SCIP_HEUR *heur) |
static | SCIP_DECL_HEUREXEC (heurExecScheduler) |
static | DECL_VARFIXINGS (varFixingsRens) |
static | DECL_CHANGESUBSCIP (changeSubscipRens) |
static SCIP_RETCODE | fixMatchingSolutionValues (SCIP *scip, SCIP_SOL **sols, int nsols, SCIP_VAR **vars, int nvars, SCIP_VAR **varbuf, SCIP_Real *valbuf, int *nfixings) |
static | DECL_VARFIXINGS (varFixingsRins) |
static | DECL_NHINIT (nhInitCrossover) |
static | DECL_NHEXIT (nhExitCrossover) |
static | DECL_NHFREE (nhFreeCrossover) |
static | DECL_VARFIXINGS (varFixingsCrossover) |
static | DECL_NHREFSOL (nhRefsolCrossover) |
static | DECL_NHINIT (nhInitMutation) |
static | DECL_NHEXIT (nhExitMutation) |
static | DECL_VARFIXINGS (varFixingsMutation) |
static SCIP_RETCODE | addLocalBranchingConstraint (SCIP *sourcescip, SCIP *targetscip, SCIP_VAR **subvars, int distance, SCIP_Bool *success, int *naddedconss) |
static | DECL_CHANGESUBSCIP (changeSubscipLocalbranching) |
static | DECL_CHANGESUBSCIP (changeSubscipProximity) |
static | DECL_CHANGESUBSCIP (changeSubscipZeroobjective) |
static void | computeIntegerVariableBoundsDins (SCIP *scip, SCIP_VAR *var, SCIP_Real *lbptr, SCIP_Real *ubptr) |
static | DECL_VARFIXINGS (varFixingsDins) |
static | DECL_CHANGESUBSCIP (changeSubscipDins) |
static | DECL_NHFREE (nhFreeDins) |
static | DECL_NHFREE (nhFreeTrustregion) |
static | DECL_CHANGESUBSCIP (changeSubscipTrustregion) |
static | DECL_NHREFSOL (nhRefsolIncumbent) |
static | DECL_NHDEACTIVATE (nhDeactivateDiscreteVars) |
static | DECL_NHDEACTIVATE (nhDeactivateBinVars) |
static | DECL_NHDEACTIVATE (nhDeactivateObjVars) |
static SCIP_RETCODE | includeNeighborhoods (SCIP *scip, SCIP_HEURDATA *heurdata) |
static | SCIP_DECL_HEURINIT (heurInitScheduler) |
static | SCIP_DECL_HEURINITSOL (heurInitsolScheduler) |
static | SCIP_DECL_HEUREXIT (heurExitScheduler) |
static | SCIP_DECL_HEURFREE (heurFreeScheduler) |
static | SCIP_DECL_TABLEOUTPUT (tableOutputNeighborhood) |
SCIP_RETCODE | SCIPincludeHeurScheduler (SCIP *scip) |
#define HEUR_NAME "scheduler" |
Definition at line 76 of file heur_scheduler.c.
#define HEUR_DESC "Adaptive heuristic to schedule LNS and diving heuristics" |
Definition at line 77 of file heur_scheduler.c.
#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS |
Definition at line 78 of file heur_scheduler.c.
#define HEUR_PRIORITY -30000 |
Definition at line 79 of file heur_scheduler.c.
#define HEUR_FREQ -1 |
Definition at line 80 of file heur_scheduler.c.
#define HEUR_FREQOFS 0 |
Definition at line 81 of file heur_scheduler.c.
#define HEUR_MAXDEPTH -1 |
Definition at line 82 of file heur_scheduler.c.
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 83 of file heur_scheduler.c.
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 84 of file heur_scheduler.c.
#define NNEIGHBORHOODS 9 |
Definition at line 86 of file heur_scheduler.c.
#define DIVINGHEURS_INITIALSIZE 10 |
Definition at line 87 of file heur_scheduler.c.
Referenced by includeDivingHeurs().
#define DEFAULT_NODESQUOT 0.1 |
Definition at line 92 of file heur_scheduler.c.
#define DEFAULT_NODESQUOTMIN 0.0 |
Definition at line 93 of file heur_scheduler.c.
#define DEFAULT_NODESOFFSET 500LL |
Definition at line 94 of file heur_scheduler.c.
#define DEFAULT_NSOLSLIM 3 |
Definition at line 95 of file heur_scheduler.c.
#define DEFAULT_MINNODES 50LL |
Definition at line 96 of file heur_scheduler.c.
#define DEFAULT_MAXNODES 500LL |
Definition at line 97 of file heur_scheduler.c.
#define DEFAULT_WAITINGNODES 0LL |
number of nodes since last incumbent solution that the heuristic should wait
Definition at line 98 of file heur_scheduler.c.
#define DEFAULT_INITLNSNODELIMIT 50 |
Definition at line 99 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_INITDIVINGNODELIMIT 500LL |
Definition at line 100 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_TARGETNODEFACTOR 1.05 |
Definition at line 101 of file heur_scheduler.c.
#define LRATEMIN 0.01 |
lower bound for learning rate for target nodes and minimum improvement
Definition at line 102 of file heur_scheduler.c.
#define LPLIMFAC 4.0 |
Definition at line 103 of file heur_scheduler.c.
#define DEFAULT_INITDURINGROOT FALSE |
Definition at line 104 of file heur_scheduler.c.
#define DEFAULT_MAXCALLSSAMESOL -1 |
number of allowed executions of the heuristic on the same incumbent solution
Definition at line 105 of file heur_scheduler.c.
#define DEFAULT_HEURTIMELIMIT 60.0 |
time limit for a single heuristic run
Definition at line 106 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_BESTSOLWEIGHT 1 |
Definition at line 111 of file heur_scheduler.c.
#define DEFAULT_BANDITALGO 'i' |
the default bandit algorithm: (u)pper confidence bounds, (e)xp.3, epsilon (g)reedy, exp.3-(i)x
Definition at line 112 of file heur_scheduler.c.
#define DEFAULT_RESETWEIGHTS FALS |
should the bandit algorithms be reset when a new problem is read?
Definition at line 113 of file heur_scheduler.c.
#define DEFAULT_SUBSCIPRANDSEEDS FALSE |
should random seeds of sub-SCIPs be altered to increase diversification?
Definition at line 114 of file heur_scheduler.c.
#define DEFAULT_FIXTOL 0.1 |
tolerance by which the fixing rate may be missed without generic fixing
Definition at line 115 of file heur_scheduler.c.
#define DEFAULT_UNFIXTOL 0.1 |
tolerance by which the fixing rate may be exceeded without generic unfixing
Definition at line 116 of file heur_scheduler.c.
#define DEFAULT_BETA 0.0 |
default reward offset between 0 and 1 at every observation for exp3
Definition at line 117 of file heur_scheduler.c.
#define DEFAULT_NSELECTIONS 5 |
number of heuristics picked by the scheduler in one call (-1: number of controlled heuristics, 0: until new incumbent is found)
Definition at line 118 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_USEREDCOST TRUE |
should reduced cost scores be used for variable priorization?
Definition at line 123 of file heur_scheduler.c.
#define DEFAULT_USEPSCOST TRUE |
should pseudo cost scores be used for variable priorization?
Definition at line 124 of file heur_scheduler.c.
#define DEFAULT_USEDISTANCES TRUE |
should distances from fixed variables be used for variable priorization
Definition at line 125 of file heur_scheduler.c.
#define DEFAULT_USELOCALREDCOST FALSE |
should local reduced costs be used for generic (un)fixing?
Definition at line 126 of file heur_scheduler.c.
#define DEFAULT_EFFORTREWARDWEIGHT 0.2 |
Definition at line 131 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_SOLREWARDWEIGHT 0.3 |
Definition at line 132 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_QUALREWARDWEIGHT 0.3 |
Definition at line 133 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_CONFLICTREWARDWEIGHT 0.2 |
Definition at line 134 of file heur_scheduler.c.
Referenced by SCIPincludeHeurScheduler().
#define DEFAULT_EPS 0.4685844 |
increase exploration in epsilon-greedy bandit algorithm
Definition at line 140 of file heur_scheduler.c.
#define DEFAULT_ALPHA 0.0016 |
parameter to increase the confidence width in UCB
Definition at line 141 of file heur_scheduler.c.
#define DEFAULT_GAMMA 0.07041455 |
default weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution for exp3
Definition at line 142 of file heur_scheduler.c.
#define SOLVEFREQ_DECAY 0.75 |
geometric decay for solving freq adjustments
Definition at line 147 of file heur_scheduler.c.
Referenced by updateSolveFreqIncrement().
#define SOLVEFREQ_STARTINC 0.2 |
initial increment value for solving frequency
Definition at line 148 of file heur_scheduler.c.
Referenced by initSolveFreq().
#define MAXSOLVEFREQ 0.3 |
maximal solving frequency
Definition at line 149 of file heur_scheduler.c.
Referenced by initSolveFreq().
#define MINSOLVEFREQ 0.05 |
minimal solving frequency
Definition at line 150 of file heur_scheduler.c.
Referenced by initSolveFreq().
#define FIXINGRATE_DECAY 0.75 |
geometric decay for fixing rate adjustments
Definition at line 155 of file heur_scheduler.c.
#define FIXINGRATE_STARTINC 0.2 |
initial increment value for fixing rate
Definition at line 156 of file heur_scheduler.c.
#define DEFAULT_USESUBSCIPHEURS FALSE |
should the heuristic activate other sub-SCIP heuristics during its search?
Definition at line 157 of file heur_scheduler.c.
#define DEFAULT_COPYCUTS FALSE |
should cutting planes be copied to the sub-SCIP?
Definition at line 158 of file heur_scheduler.c.
#define DEFAULT_SEED 113 |
Definition at line 161 of file heur_scheduler.c.
#define MUTATIONSEED 121 |
Definition at line 162 of file heur_scheduler.c.
#define CROSSOVERSEED 321 |
Definition at line 163 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_RENS 0.3 |
Definition at line 166 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_RENS 0.9 |
Definition at line 167 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_RENS TRUE |
Definition at line 168 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_RENS -1100000 |
Definition at line 170 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_RINS 0.3 |
Definition at line 172 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_RINS 0.9 |
Definition at line 173 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_RINS TRUE |
Definition at line 174 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_RINS -1101000 |
Definition at line 176 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_MUTATION 0.3 |
Definition at line 178 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_MUTATION 0.9 |
Definition at line 179 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_MUTATION TRUE |
Definition at line 180 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_MUTATION -1103010 |
Definition at line 182 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_LOCALBRANCHING 0.3 |
Definition at line 184 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_LOCALBRANCHING 0.9 |
Definition at line 185 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_LOCALBRANCHING TRUE |
Definition at line 186 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_LOCALBRANCHING -1102000 |
Definition at line 188 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_PROXIMITY 0.3 |
Definition at line 190 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_PROXIMITY 0.9 |
Definition at line 191 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_PROXIMITY TRUE |
Definition at line 192 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_PROXIMITY -2000000 |
Definition at line 194 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_CROSSOVER 0.3 |
Definition at line 196 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_CROSSOVER 0.9 |
Definition at line 197 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_CROSSOVER TRUE |
Definition at line 198 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_CROSSOVER -1104000 |
Definition at line 200 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE 0.3 |
Definition at line 202 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE 0.9 |
Definition at line 203 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_ZEROOBJECTIVE TRUE |
Definition at line 204 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_ZEROOBJECTIVE 100 |
Definition at line 206 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_DINS 0.3 |
Definition at line 208 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_DINS 0.9 |
Definition at line 209 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_DINS TRUE |
Definition at line 210 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_DINS -1105000 |
Definition at line 212 of file heur_scheduler.c.
#define DEFAULT_MINFIXINGRATE_TRUSTREGION 0.3 |
Definition at line 214 of file heur_scheduler.c.
#define DEFAULT_MAXFIXINGRATE_TRUSTREGION 0.9 |
Definition at line 215 of file heur_scheduler.c.
#define DEFAULT_ACTIVE_TRUSTREGION FALSE |
Definition at line 216 of file heur_scheduler.c.
#define DEFAULT_PRIORITY_TRUSTREGION -1102010 |
Definition at line 218 of file heur_scheduler.c.
#define DEFAULT_NSOLS_CROSSOVER 2 |
parameter for the number of solutions that crossover should combine
Definition at line 221 of file heur_scheduler.c.
#define DEFAULT_NPOOLSOLS_DINS 5 |
number of pool solutions where binary solution values must agree
Definition at line 222 of file heur_scheduler.c.
#define DEFAULT_VIOLPENALTY_TRUSTREGION 100.0 |
the penalty for violating the trust region
Definition at line 223 of file heur_scheduler.c.
#define EVENTHDLR_NAME "Scheduler" |
Definition at line 226 of file heur_scheduler.c.
#define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic" |
Definition at line 227 of file heur_scheduler.c.
#define SCIP_EVENTTYPE_SCHEDULER (SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND | SCIP_EVENTTYPE_BESTSOLFOUND) |
Definition at line 228 of file heur_scheduler.c.
Referenced by executeLNSHeuristic(), and SCIP_DECL_EVENTEXEC().
#define TABLE_NAME_NEIGHBORHOOD "scheduler" |
Definition at line 231 of file heur_scheduler.c.
#define TABLE_DESC_NEIGHBORHOOD "scheduler heuristics statistics" |
Definition at line 232 of file heur_scheduler.c.
#define TABLE_POSITION_NEIGHBORHOOD 12500 |
the position of the statistics table
Definition at line 233 of file heur_scheduler.c.
#define TABLE_EARLIEST_STAGE_NEIGHBORHOOD SCIP_STAGE_TRANSFORMED |
output of the statistics table is only printed from this stage onwards
Definition at line 234 of file heur_scheduler.c.
#define DECL_VARFIXINGS | ( | x | ) |
callback to collect variable fixings of neighborhood
Definition at line 265 of file heur_scheduler.c.
#define DECL_CHANGESUBSCIP | ( | x | ) |
callback for subproblem changes other than variable fixings
this callback can be used to further modify the subproblem by changes other than variable fixings. Typical modifications include restrictions of variable domains, the formulation of additional constraints, or changed objective coefficients.
The callback should set the success
pointer to indicate whether it was successful with its modifications or not.
Definition at line 282 of file heur_scheduler.c.
#define DECL_NHINIT | ( | x | ) |
optional initialization callback for neighborhoods when a new problem is read
Definition at line 294 of file heur_scheduler.c.
#define DECL_NHEXIT | ( | x | ) |
deinitialization callback for neighborhoods when exiting a problem
Definition at line 300 of file heur_scheduler.c.
#define DECL_NHFREE | ( | x | ) |
deinitialization callback for neighborhoods before SCIP is freed
Definition at line 306 of file heur_scheduler.c.
#define DECL_NHREFSOL | ( | x | ) |
callback function to return a feasible reference solution for further fixings
The reference solution should be stored in the solptr
. The result
pointer can be used to indicate either
Definition at line 319 of file heur_scheduler.c.
#define DECL_NHDEACTIVATE | ( | x | ) |
callback function to deactivate neighborhoods on problems where they are irrelevant
Definition at line 327 of file heur_scheduler.c.
#define NHISTENTRIES 7 |
Definition at line 344 of file heur_scheduler.c.
fixing rate data structure
Definition at line 251 of file heur_scheduler.c.
typedef struct Heur_Stats HEUR_STATS |
diving heuristic solving frequency data structure heuristic statistics data structure
Definition at line 253 of file heur_scheduler.c.
typedef struct Diving_Heur DIVING_HEUR |
diving heuristic data structure
Definition at line 257 of file heur_scheduler.c.
enum HistIndex |
sub-SCIP status code enumerator
Definition at line 333 of file heur_scheduler.c.
|
static |
Reset target fixing rate
scip | SCIP data structure |
fixingrate | heuristic fixing rate |
Definition at line 562 of file heur_scheduler.c.
References assert(), FIXINGRATE_STARTINC, NH_FixingRate::increment, NH_FixingRate::maxfixingrate, NULL, SCIP_OKAY, and NH_FixingRate::targetfixingrate.
Referenced by SCIP_DECL_HEURINIT().
|
static |
update increment for fixing rate
fx | fixing rate |
Definition at line 579 of file heur_scheduler.c.
References FIXINGRATE_DECAY, NH_FixingRate::increment, LRATEMIN, and MAX.
Referenced by updateFixingRate().
|
static |
increase fixing rate
decrease also the rate by which the target fixing rate is adjusted
fx | fixing rate |
Definition at line 592 of file heur_scheduler.c.
References NH_FixingRate::increment, NH_FixingRate::maxfixingrate, MIN, and NH_FixingRate::targetfixingrate.
Referenced by updateFixingRate().
|
static |
decrease fixing rate
decrease also the rate by which the target fixing rate is adjusted
fx | fixing rate |
Definition at line 605 of file heur_scheduler.c.
References NH_FixingRate::increment, MAX, NH_FixingRate::minfixingrate, and NH_FixingRate::targetfixingrate.
Referenced by updateFixingRate().
|
static |
update fixing rate based on the results of the current run
neighborhood | neighborhood |
subscipstatus | status of the sub-SCIP run |
runstats | run statistics for this run |
Definition at line 615 of file heur_scheduler.c.
References decreaseFixingRate(), Nh::fixingrate, increaseFixingRate(), Heur_Stats::nbestsolsfound, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_DUALLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_PRIMALLIMIT, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TERMINATE, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, and updateFixingRateIncrement().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
reset the currently active neighborhood
Definition at line 662 of file heur_scheduler.c.
References assert(), heurdata, and NULL.
Referenced by executeLNSHeuristic(), and SCIP_DECL_HEURINITSOL().
|
static |
reset target node limit
heurdata | heuristic data |
Definition at line 673 of file heur_scheduler.c.
References heurdata.
Referenced by reinitBandit(), and SCIP_DECL_HEURINITSOL().
|
static |
Reset neighborhood statistics
scip | SCIP data structure |
stats | heuristic statistics |
usediving | TRUE if the statistics belong to a diving heuristic |
Definition at line 682 of file heur_scheduler.c.
References assert(), BMSclearMemoryArray, Heur_Stats::divingdepth, Heur_Stats::execclock, Heur_Stats::nbacktracks, Heur_Stats::nbestsolsfound, Heur_Stats::nconflicts, Heur_Stats::nfixings, NHISTENTRIES, Heur_Stats::nprobnodes, Heur_Stats::nruns, Heur_Stats::nrunsbestsol, Heur_Stats::nsolsfound, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPresetClock(), Heur_Stats::setupclock, Heur_Stats::statushist, and Heur_Stats::usednodes.
Referenced by includeDivingHeurs(), and SCIP_DECL_HEURINIT().
|
static |
create a neighborhood of the specified name and include it into the scheduler heuristic
scip | SCIP data structure |
heurdata | heuristic data of the scheduler heuristic |
neighborhood | pointer to store the neighborhood |
name | name for this neighborhood |
minfixingrate | default value for minfixingrate parameter of this neighborhood |
maxfixingrate | default value for maxfixingrate parameter of this neighborhood |
active | default value for active parameter of this neighborhood |
priority | priority for heuristic in rootnode |
Definition at line 716 of file heur_scheduler.c.
References active, assert(), BMSduplicateMemoryArray, DECL_CHANGESUBSCIP, DECL_NHDEACTIVATE, DECL_NHEXIT, DECL_NHFREE, DECL_NHINIT, DECL_NHREFSOL, DECL_VARFIXINGS, heurdata, NULL, paramname, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddBoolParam(), SCIPaddRealParam(), SCIPallocBlockMemory, SCIPcreateClock(), SCIPsnprintf(), and TRUE.
Referenced by includeNeighborhoods().
|
static |
release all data and free neighborhood
scip | SCIP data structure |
neighborhood | pointer to neighborhood that should be freed |
Definition at line 781 of file heur_scheduler.c.
References assert(), BMSfreeMemoryArray, Nh::name, NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeClock(), NH_Stats::setupclock, and Nh::stats.
Referenced by SCIP_DECL_HEURFREE().
|
static |
initialize neighborhood specific data
scip | SCIP data structure |
neighborhood | neighborhood to initialize |
Definition at line 812 of file heur_scheduler.c.
References assert(), NULL, SCIP_CALL, and SCIP_OKAY.
Referenced by SCIP_DECL_HEURINIT().
|
static |
deinitialize neighborhood specific data
scip | SCIP data structure |
neighborhood | neighborhood to initialize |
Definition at line 831 of file heur_scheduler.c.
References assert(), NULL, SCIP_CALL, and SCIP_OKAY.
Referenced by SCIP_DECL_HEUREXIT().
|
static |
creates a new solution for the original problem by copying the solution of the subproblem
subscip | SCIP data structure of the subproblem |
eventdata | event handler data |
Definition at line 849 of file heur_scheduler.c.
References assert(), FALSE, Heur_Stats::nbestsolsfound, Heur_Stats::newupperbound, Heur_Stats::nsolsfound, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBestSol(), SCIPgetUpperbound(), SCIPtranslateSubSol(), SCIPtrySolFree(), and TRUE.
Referenced by SCIP_DECL_EVENTEXEC().
|
static |
release all data and free diving heuristic
scip | SCIP data structure |
divingheur | pointer to diving heuristic that should be freed |
Definition at line 900 of file heur_scheduler.c.
References assert(), Heur_Stats::execclock, NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeClock(), Heur_Stats::setupclock, Diving_Heur::solvefreqdata, and Diving_Heur::stats.
Referenced by SCIP_DECL_HEURFREE().
|
static |
execution callback of the event handler
transfer new solutions or interrupt the solving process manually
Definition at line 929 of file heur_scheduler.c.
References assert(), EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_LPSOLVED, SCIP_EVENTTYPE_SCHEDULER, SCIP_EVENTTYPE_SOLFOUND, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPdebugMsg, SCIPeventGetType(), SCIPeventhdlrGetName(), SCIPgetNLPs(), SCIPinterruptSolve(), and transferSolution().
|
static |
initialize heuristic statistics before the next run
scip | SCIP data structure |
stats | run statistics |
Definition at line 963 of file heur_scheduler.c.
References Heur_Stats::divingdepth, Heur_Stats::nbacktracks, Heur_Stats::nbestsolsfound, Heur_Stats::nconflicts, Heur_Stats::newupperbound, Heur_Stats::nfixings, Heur_Stats::nprobnodes, Heur_Stats::nsolsfound, Heur_Stats::oldupperbound, SCIPgetUpperbound(), and Heur_Stats::usednodes.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
update run stats after the sub SCIP was solved
stats | run statistics |
subscip | sub-SCIP instance, or NULL |
Definition at line 982 of file heur_scheduler.c.
References NULL, SCIPgetNNodes(), SCIPisTransformed(), and Heur_Stats::usednodes.
Referenced by executeLNSHeuristic().
|
static |
get the histogram index for this status
subscipstatus | sub-SCIP status |
Definition at line 996 of file heur_scheduler.c.
References HIDX_INFEAS, HIDX_NODELIM, HIDX_OPT, HIDX_OTHER, HIDX_SOLLIM, HIDX_STALLNODE, HIDX_USR, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, and SCIP_STATUS_USERINTERRUPT.
Referenced by updateHeurStatsLNS().
|
static |
print neighborhood statistics
scip | SCIP data structure |
heurdata | heuristic data |
file | file handle, or NULL for standard out |
Definition at line 1022 of file heur_scheduler.c.
References Nh::fixingrate, heurdata, HIDX_INFEAS, HIDX_NODELIM, HIDX_OPT, HIDX_OTHER, HIDX_SOLLIM, HIDX_STALLNODE, HIDX_USR, i, Nh::name, NH_Stats::nbestsolsfound, NHISTENTRIES, NH_Stats::nruns, NH_Stats::nsolsfound, NULL, SCIP_LONGINT_FORMAT, SCIP_Real, SCIPgetClockTime(), SCIPgetConfidenceBoundUcb(), SCIPgetProbabilityExp3(), SCIPgetProbabilityExp3IX(), SCIPgetWeightsEpsgreedy(), SCIPinfoMessage(), NH_Stats::setupclock, Nh::stats, NH_Stats::statushist, NH_FixingRate::targetfixingrate, and NH_Stats::usednodes.
Referenced by SCIP_DECL_TABLEOUTPUT().
|
static |
print diving heuristic statistics
scip | SCIP data structure |
heurdata | heuristic data |
file | file handle, or NULL for standard out |
Definition at line 1097 of file heur_scheduler.c.
References SolveFreq::currentsolvefreq, Diving_Heur::diveset, Heur_Stats::execclock, heurdata, i, Heur_Stats::nbestsolsfound, Diving_Heur::nodelimit, Heur_Stats::nprobnodes, Heur_Stats::nruns, Heur_Stats::nsolsfound, NULL, SCIP_LONGINT_FORMAT, SCIP_Real, SCIPdivesetGetName(), SCIPgetClockTime(), SCIPgetConfidenceBoundUcb(), SCIPgetProbabilityExp3(), SCIPgetProbabilityExp3IX(), SCIPgetWeightsEpsgreedy(), SCIPinfoMessage(), Heur_Stats::setupclock, Diving_Heur::solvefreqdata, and Diving_Heur::stats.
Referenced by SCIP_DECL_TABLEOUTPUT().
|
static |
update the statistics of the diving heuristic based on the heuristic run
runstats | run statistics |
divingheur | the selected diving heuristic or NULL if LNS was used |
Definition at line 1165 of file heur_scheduler.c.
References assert(), DEFAULT_BESTSOLWEIGHT, Heur_Stats::nbacktracks, Heur_Stats::nbestsolsfound, Heur_Stats::nconflicts, Heur_Stats::nprobnodes, Heur_Stats::nruns, Heur_Stats::nrunsbestsol, Heur_Stats::nsolsfound, NULL, and Diving_Heur::stats.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
update the statistics of LNS heuristic based on the heuristic run
runstats | run statistics |
neighborhood | the selected neighborhood or NULL if diving was used |
subscipstatus | status of the sub-SCIP solve or NULL if diving was used |
Definition at line 1194 of file heur_scheduler.c.
References assert(), DEFAULT_BESTSOLWEIGHT, getHistIndex(), Heur_Stats::nbestsolsfound, Heur_Stats::nruns, Heur_Stats::nrunsbestsol, Heur_Stats::nsolsfound, NULL, Nh::stats, Heur_Stats::statushist, and Heur_Stats::usednodes.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
sort callback for variable pointers using the ALNS variable prioritization
the variable prioritization works hierarchically as follows. A variable a has the higher priority over b iff
Definition at line 1237 of file heur_scheduler.c.
References assert(), VarPrio::distances, NULL, VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::usedistances, VarPrio::usepscost, and VarPrio::useredcost.
|
static |
Compute the reduced cost score for this variable in the reference solution
scip | SCIP data structure |
var | the variable for which the score should be computed |
refsolval | solution value in reference solution |
uselocalredcost | should local reduced costs be used for generic (un)fixing? |
Definition at line 1306 of file heur_scheduler.c.
References assert(), MAX, NULL, REALABS, SCIP_Bool, SCIP_LPSOLSTAT_OPTIMAL, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPgetLPSolstat(), SCIPgetVarRedcost(), SCIPhasCurrentNodeLP(), SCIPinfinity(), SCIPisDualfeasNegative(), SCIPisDualfeasPositive(), SCIPisDualfeasZero(), SCIPisFeasIntegral(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPvarGetBestRootRedcost(), SCIPvarGetBestRootSol(), SCIPvarGetLPSol(), SCIPvarGetStatus(), and var.
Referenced by LNSFixMoreVariables(), and LNSUnfixVariables().
|
static |
get the pseudo cost score of this variable with respect to the reference solution
scip | SCIP data structure |
var | the variable for which the score should be computed |
refsolval | solution value in reference solution |
uselocallpsol | should local LP solution be used? |
Definition at line 1359 of file heur_scheduler.c.
References assert(), NULL, SCIP_Bool, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPgetVarPseudocostVal(), SCIPisEQ(), SCIPvarGetLPSol(), SCIPvarGetRootSol(), SCIPvarGetStatus(), and var.
Referenced by LNSFixMoreVariables(), and LNSUnfixVariables().
|
static |
add variable and solution value to buffer data structure for variable fixings. The method checks if the value still lies within the variable bounds. The value stays unfixed otherwise.
scip | SCIP data structure |
var | (source) SCIP variable that should be added to the buffer |
val | fixing value for this variable |
varbuf | variable buffer to store variables that should be fixed |
valbuf | value buffer to store fixing values |
nfixings | pointer to number of fixed buffer variables, will be increased by 1 |
integer | is this an integer variable? |
Definition at line 1388 of file heur_scheduler.c.
References assert(), SCIP_Bool, SCIP_Real, SCIPfloor(), SCIPgetNVars(), SCIPisFeasIntegral(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), and var.
Referenced by DECL_VARFIXINGS(), DECL_VARFIXINGS(), DECL_VARFIXINGS(), fixMatchingSolutionValues(), and LNSFixMoreVariables().
|
static |
fix additional variables found in feasible reference solution if the ones that the neighborhood found were not enough
use not always the best solution for the values, but a reference solution provided by the neighborhood itself
scip | SCIP data structure |
heurdata | heuristic data of the Scheduler neighborhood |
refsol | feasible reference solution for more variable fixings |
varbuf | buffer array to store variables to fix |
valbuf | buffer array to store fixing values |
nfixings | pointer to store the number of fixings |
ntargetfixings | number of required target fixings |
success | pointer to store whether the target fixings have been successfully reached |
Definition at line 1426 of file heur_scheduler.c.
References assert(), b, BMSclearMemoryArray, VarPrio::distances, FALSE, getVariablePscostScore(), getVariableRedcostScore(), heurdata, MIN, nbinvars, nintvars, NULL, nvars, VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetRandnumgen(), SCIPfreeBufferArray, SCIPgetSolVals(), SCIPgetVarsData(), SCIPrandomGetReal(), SCIPselectInd(), SCIPvarGetLbGlobal(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvariablegraphBreadthFirst(), TRUE, tryAdd2variableBuffer(), VarPrio::usedistances, VarPrio::usepscost, VarPrio::useredcost, var, and vars.
Referenced by neighborhoodFixVariables().
|
static |
create the bandit algorithm for the heuristic depending on the user parameter
scip | SCIP data structure |
heurdata | heuristic data structure |
priorities | call priorities for active neighborhoods |
initseed | initial random seed |
Definition at line 1592 of file heur_scheduler.c.
References FALSE, heurdata, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIPcreateBanditEpsgreedy(), SCIPcreateBanditExp3(), SCIPcreateBanditExp3IX(), SCIPcreateBanditUcb(), and SCIPerrorMessage.
Referenced by reinitBandit(), and SCIP_DECL_HEURINITSOL().
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 1638 of file heur_scheduler.c.
References assert(), HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurScheduler().
|
static |
query neighborhood for a reference solution for further fixings
scip | SCIP data structure |
neighborhood | neighborhood data structure |
solptr | solution pointer |
Definition at line 1652 of file heur_scheduler.c.
References assert(), NULL, result, SCIP_CALL, SCIP_DIDNOTFIND, and SCIP_OKAY.
Referenced by neighborhoodFixVariables().
|
static |
unfix some of the variables because there are too many fixed
a variable is ideally unfixed if it is close to other unfixed variables and fixing it has a high reduced cost impact
scip | SCIP data structure |
heurdata | heuristic data of neighborhood |
varbuf | buffer array to store variables to fix |
valbuf | buffer array to store fixing values |
nfixings | pointer to store the number of fixings |
ntargetfixings | number of required target fixings |
success | pointer to store whether the target fixings have been successfully reached |
Definition at line 1683 of file heur_scheduler.c.
References assert(), BMSclearMemoryArray, VarPrio::distances, FALSE, getVariablePscostScore(), getVariableRedcostScore(), heurdata, i, NULL, nvars, VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetRandnumgen(), SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNVars(), SCIPgetVars(), SCIPrandomGetReal(), SCIPselectDownInd(), SCIPvarGetProbindex(), SCIPvariablegraphBreadthFirst(), TRUE, VarPrio::usedistances, VarPrio::usepscost, VarPrio::useredcost, and vars.
Referenced by neighborhoodFixVariables().
|
static |
call variable fixing callback for this neighborhood and orchestrate additional variable fixings, if necessary
scip | SCIP data structure |
heurdata | heuristic data of the scheduler neighborhood |
neighborhood | neighborhood data structure |
varbuf | buffer array to keep variables that should be fixed |
valbuf | buffer array to keep fixing values |
nfixings | pointer to store the number of variable fixings |
result | pointer to store the result of the fixing operation |
Definition at line 1830 of file heur_scheduler.c.
References assert(), FALSE, Nh::fixingrate, heurdata, LNSFixMoreVariables(), LNSUnfixVariables(), MAX, MIN, neighborhoodGetRefsol(), NULL, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPdebugMsg, SCIPgetNBinVars(), SCIPgetNIntVars(), and NH_FixingRate::targetfixingrate.
Referenced by executeLNSHeuristic().
|
static |
change the sub-SCIP by restricting variable domains, changing objective coefficients, or adding constraints
sourcescip | source SCIP data structure |
targetscip | target SCIP data structure |
neighborhood | neighborhood |
targetvars | array of target SCIP variables aligned with source SCIP variables |
ndomchgs | pointer to store the number of variable domain changes |
nchgobjs | pointer to store the number of changed objective coefficients |
naddedconss | pointer to store the number of added constraints |
success | pointer to store whether the sub-SCIP has been successfully modified |
Definition at line 1927 of file heur_scheduler.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and TRUE.
Referenced by executeLNSHeuristic().
|
static |
set sub-SCIP solving limits
subscip | SCIP data structure |
solvelimits | pointer to solving limits data structure |
Definition at line 1967 of file heur_scheduler.c.
References assert(), SolveLimits::memorylimit, SolveLimits::nodelimit, NULL, SCIP_CALL, SCIP_OKAY, SCIPsetLongintParam(), SCIPsetRealParam(), SolveLimits::stallnodes, and SolveLimits::timelimit.
Referenced by setupSubScip().
|
static |
determine limits for a sub-SCIP
scip | SCIP data structure |
heur | this heuristic |
selection | index of selected neighborhood |
solvelimits | pointer to solving limits data structure |
runagain | can we solve another sub-SCIP with these limits |
Definition at line 1987 of file heur_scheduler.c.
References assert(), FALSE, heurdata, SolveLimits::memorylimit, SolveLimits::nodelimit, NULL, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPdebugMsg, SCIPgetBoolParam(), SCIPgetMemExternEstim(), SCIPgetMemUsed(), SCIPgetRealParam(), SCIPheurGetData(), SCIPisInfinity(), selection, SolveLimits::stallnodes, and SolveLimits::timelimit.
Referenced by executeLNSHeuristic().
|
static |
Calculate reward based on the selected reward measure
scip | SCIP data structure |
heurdata | heuristic data of the scheduler neighborhood |
selection | index of selected heuristic |
runstats | run statistics |
subscipstatus | status of the sub-SCIP if LNS was used |
Definition at line 2034 of file heur_scheduler.c.
References assert(), Heur_Stats::divingdepth, heurdata, MIN, Heur_Stats::nbestsolsfound, Heur_Stats::nconflicts, Heur_Stats::newupperbound, Heur_Stats::oldupperbound, SCIP_Real, SCIP_STATUS_TIMELIMIT, SCIPgetLowerbound(), SCIPisEQ(), SCIPisInfinity(), selection, and Heur_Stats::usednodes.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
set up the sub-SCIP parameters, objective cutoff, and solution limits
scip | SCIP data structure |
subscip | sub-SCIP data structure |
subvars | array of sub-SCIP variables in the order of the main SCIP |
solvelimits | pointer to solving limits data structure |
heur | this heuristic |
objchgd | did the objective change between the source and the target SCIP? |
Definition at line 2112 of file heur_scheduler.c.
References assert(), cutoff, FALSE, heurdata, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIPaddCoefLinear(), SCIPaddCons(), SCIPcreateConsLinear(), SCIPfindBranchrule(), SCIPfindNodesel(), SCIPgetNVars(), SCIPgetUpperbound(), SCIPgetVars(), SCIPheurGetData(), SCIPheurGetNCalls(), SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisParamFixed(), SCIPreleaseCons(), SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetIntParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsumepsilon(), SCIPvarGetObj(), setLimits(), TRUE, and vars.
Referenced by executeLNSHeuristic().
|
static |
initialize solving frequency
solvefreqdata | diving heuristic solving freq data |
Definition at line 2236 of file heur_scheduler.c.
References assert(), SolveFreq::currentsolvefreq, SolveFreq::increment, MAXSOLVEFREQ, SolveFreq::maxsolvefreq, MINSOLVEFREQ, SolveFreq::minsolvefreq, NULL, and SOLVEFREQ_STARTINC.
Referenced by includeDivingHeurs().
|
static |
update increment for solving frequency
solvefreqdata | diving heuristic solving freq data |
Definition at line 2253 of file heur_scheduler.c.
References SolveFreq::increment, LRATEMIN, MAX, and SOLVEFREQ_DECAY.
Referenced by updateSolveFreq().
|
static |
increase solving frequency
decrease also the rate by which the solving frequency is adjusted
solvefreqdata | diving heuristic solving freq data |
Definition at line 2266 of file heur_scheduler.c.
References SolveFreq::currentsolvefreq, SolveFreq::increment, SolveFreq::maxsolvefreq, and MIN.
Referenced by updateSolveFreq().
|
static |
decrease solving frequency
decrease also the rate by which the solving frequency is adjusted
solvefreqdata | diving heuristic solving freq data |
Definition at line 2279 of file heur_scheduler.c.
References SolveFreq::currentsolvefreq, SolveFreq::increment, MAX, and SolveFreq::minsolvefreq.
Referenced by updateSolveFreq().
|
static |
update solve frequency for diving heuristics
divingheur | diving heuristic |
stats | run statistics for this run |
Definition at line 2289 of file heur_scheduler.c.
References decreaseSolveFreq(), increaseSolveFreq(), Diving_Heur::nodelimit, Heur_Stats::nprobnodes, Heur_Stats::nsolsfound, Diving_Heur::solvefreqdata, and updateSolveFreqIncrement().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
find publicly available divesets and store them
scip | SCIP data structure |
heur | the heuristic |
heurdata | heuristic data |
Definition at line 2305 of file heur_scheduler.c.
References assert(), diveset, Diving_Heur::diveset, DIVINGHEURS_INITIALSIZE, Heur_Stats::execclock, h, heurdata, heurStatsReset(), initSolveFreq(), Diving_Heur::nodelimit, NULL, Diving_Heur::priority, Diving_Heur::rootnodepriority, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcreateClock(), SCIPdebugMsg, SCIPdivesetGetName(), SCIPdivesetIsPublic(), SCIPgetHeurs(), SCIPgetNHeurs(), SCIPheurGetDivesets(), SCIPheurGetNDivesets(), SCIPheurGetPriority(), SCIPreallocBlockMemoryArray, Heur_Stats::setupclock, Diving_Heur::solvefreqdata, Diving_Heur::stats, and TRUE.
Referenced by initRest().
|
static |
select a heuristic depending on the selected bandit algorithm
scip | SCIP data structure |
heurdata | heuristic data of the scheduler heuristic |
selection | pointer to store the selected heuristic index |
Definition at line 2378 of file heur_scheduler.c.
References assert(), heurdata, NULL, SCIP_CALL, SCIP_OKAY, SCIPbanditSelect(), and selection.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
update selection strategy with observed reward for future draws
scip | SCIP data structure |
heurdata | heuristic data of the scheduler heuristic |
reward | measured reward |
selection | the heuristic index that was chosen |
Definition at line 2414 of file heur_scheduler.c.
References assert(), heurdata, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbanditUpdate(), SCIPdebugMsg, and selection.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
execute diving heuristic
scip | SCIP data structure |
heur | scheduler heuristic |
selection | the heuristic index that was chosen |
runstats | statistics of the call to selection |
result | pointer to store the result of the heuristic call |
Definition at line 2438 of file heur_scheduler.c.
References assert(), SolveFreq::currentsolvefreq, diveset, Diving_Heur::diveset, Heur_Stats::execclock, FALSE, heurdata, MAX, Heur_Stats::nbacktracks, Heur_Stats::nbestsolsfound, Heur_Stats::nconflicts, Heur_Stats::newupperbound, Diving_Heur::nodelimit, Heur_Stats::nprobnodes, Heur_Stats::nsolsfound, NULL, Heur_Stats::oldupperbound, result, SCIP_CALL, SCIP_DIVECONTEXT_SCHEDULER, SCIP_OKAY, SCIPdebugMsg, SCIPdivesetGetName(), SCIPdivesetGetNBacktracks(), SCIPdivesetGetNConflicts(), SCIPdivesetGetNProbingNodes(), SCIPdivesetGetNSols(), SCIPgetBestSol(), SCIPgetNBestSolsFound(), SCIPgetNSols(), SCIPgetUpperbound(), SCIPheurGetData(), SCIPperformGenericDivingAlgorithm(), SCIPsolIsOriginal(), SCIPstartClock(), SCIPstopClock(), selection, and Diving_Heur::solvefreqdata.
Referenced by executeHeuristic().
|
static |
execute LNS heuristic
scip | SCIP data structure |
heur | scheduler heuristic |
selection | the heuristic index that was chosen |
runstats | statistics of the call to selection |
subscipstatus | pointer to store status of the sub-SCIP solve |
result | pointer to store the result of the heuristic call |
Definition at line 2510 of file heur_scheduler.c.
References assert(), determineLimits(), EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, heurdata, Nh::name, Heur_Stats::nbestsolsfound, neighborhoodChangeSubscip(), neighborhoodFixVariables(), Heur_Stats::nfixings, NH_Stats::nfixings, SolveLimits::nodelimit, NH_Stats::nruns, Heur_Stats::nsolsfound, NULL, nvars, Heur_Stats::oldupperbound, resetCurrentNeighborhood(), result, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_EVENTTYPE_SCHEDULER, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STATUS_UNKNOWN, SCIP_SUCCESS, SCIPABORT, SCIPallocBufferArray, SCIPblkmem(), SCIPcatchEvent(), SCIPcopyLargeNeighborhoodSearch(), SCIPcreate(), SCIPdebugMsg, SCIPfree(), SCIPfreeBufferArray, SCIPgetStatus(), SCIPgetUpperbound(), SCIPgetVarsData(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPincludeEventhdlrBasic(), SCIPpresolve(), SCIPprintStatistics(), SCIPsnprintf(), SCIPsolve(), SCIPstartClock(), SCIPstopClock(), SCIPtransformProb(), SCIPwarningMessage(), selection, NH_Stats::setupclock, setupSubScip(), Nh::stats, TRUE, updateRunStats(), Heur_Stats::usednodes, and vars.
Referenced by executeHeuristic().
|
static |
execute selected heuristic
scip | SCIP data structure |
heur | scheduler heuristic |
selection | the heuristic index that was chosen |
runstats | statistics of call to selection |
subscipstatus | pointer to store status of the sub-SCIP solve or NULL if diving was used |
result | pointer to store the result of the heuristic call |
Definition at line 2701 of file heur_scheduler.c.
References assert(), executeDivingHeuristic(), executeLNSHeuristic(), heurdata, NULL, result, SCIP_CALL, SCIP_OKAY, SCIPheurGetData(), and selection.
Referenced by SCIP_DECL_HEUREXEC().
|
static |
reinitialize bandit algorithm since the number of actions has changed
scip | SCIP data structure |
heurdata | heuristic data |
nactions | new number of actions |
Definition at line 2733 of file heur_scheduler.c.
References createBandit(), heurdata, i, NULL, resetTargetNodeLimit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBandit(), SCIPfreeBufferArray, and SCIPgetNVars().
Referenced by initRest().
|
static |
initializes everything that was missing because diving heuristics were not proccessed by SCIP yet. In particular, the function adds diving heuristics to heurdata, heurdata->maxdivingnodelimit, heurdata->maxlnsnodelimit and heurdata->sortedindices if heurdata->defaultroot is set to TRUE
scip | SCIP data structure |
heur | scheduler heuristic |
Definition at line 2775 of file heur_scheduler.c.
References heurdata, i, includeDivingHeurs(), reinitBandit(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPheurGetData(), and SCIPsortRealInt().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
execution method of primal heuristic
Definition at line 2834 of file heur_scheduler.c.
References assert(), executeHeuristic(), FALSE, getReward(), HEUR_NAME, heurdata, initRest(), initRunStats(), Heur_Stats::nbestsolsfound, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_STATUS_UNKNOWN, SCIPallocBuffer, SCIPdebugMsg, SCIPfreeBuffer, SCIPgetBestSol(), SCIPgetCutoffbound(), SCIPgetDepth(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNNodes(), SCIPgetNSols(), SCIPhasCurrentNodeLP(), SCIPheurGetData(), SCIPheurGetName(), SCIPheurGetNCalls(), SCIPisGE(), SCIPisLPSolBasic(), SCIPsolGetNodenum(), selectHeuristic(), selection, TRUE, updateFixingRate(), updateHeurStatsDiving(), updateHeurStatsLNS(), updateSelectionStrategy(), and updateSolveFreq().
|
static |
callback to collect variable fixings of RENS
Definition at line 2985 of file heur_scheduler.c.
References assert(), Nh::fixingrate, frac, i, MIN, nbinvars, nintvars, NULL, result, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPallocBufferArray, SCIPfrac(), SCIPfreeBufferArray, SCIPgetLPSolstat(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPisFeasIntegral(), SCIPround(), SCIPsortDownRealInt(), SCIPvarGetLPSol(), SCIPvarIsBinary(), SCIPvarIsIntegral(), NH_FixingRate::targetfixingrate, TRUE, tryAdd2variableBuffer(), var, and vars.
|
static |
callback for RENS subproblem changes
Definition at line 3061 of file heur_scheduler.c.
References assert(), i, nbinvars, nintvars, NULL, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPfloor(), SCIPgetLPSolstat(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPisFeasIntegral(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, var, and vars.
|
static |
collect fixings by matching solution values in a collection of solutions for all binary and integer variables, or for a custom set of variables
scip | SCIP data structure |
sols | array of 2 or more solutions. It is okay for the array to contain one element equal to NULL to represent the current LP solution |
nsols | number of solutions in the array |
vars | variable array for which solution values must agree |
nvars | number of variables, or -1 for all binary and integer variables |
varbuf | buffer storage for variable fixings |
valbuf | buffer storage for fixing values |
nfixings | pointer to store the number of fixings |
Definition at line 3107 of file heur_scheduler.c.
References assert(), nbinvars, nintvars, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetNBinVars(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisEQ(), SCIPvarIsBinary(), SCIPvarIsIntegral(), TRUE, tryAdd2variableBuffer(), var, and vars.
Referenced by DECL_VARFIXINGS(), DECL_VARFIXINGS(), and DECL_VARFIXINGS().
|
static |
callback to collect variable fixings of RINS
Definition at line 3173 of file heur_scheduler.c.
References assert(), fixMatchingSolutionValues(), nbinvars, nintvars, NULL, result, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_SOLORIGIN_ORIGINAL, SCIP_SUCCESS, SCIPgetBestSol(), SCIPgetLPSolstat(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPsolGetOrigin(), and vars.
|
static |
initialization callback for crossover when a new problem is read
Definition at line 3221 of file heur_scheduler.c.
References assert(), Nh::crossover, CROSSOVERSEED, Nh::data, NULL, data_crossover::rng, SCIP_CALL, SCIP_OKAY, SCIPcreateRandom(), SCIPfreeRandom(), SCIPgetNVars(), data_crossover::selsol, and TRUE.
|
static |
deinitialization callback for crossover when exiting a problem
Definition at line 3240 of file heur_scheduler.c.
References assert(), Nh::crossover, Nh::data, NULL, data_crossover::rng, SCIP_OKAY, and SCIPfreeRandom().
|
static |
deinitialization callback for crossover before SCIP is freed
Definition at line 3255 of file heur_scheduler.c.
References assert(), Nh::crossover, Nh::data, NULL, SCIP_OKAY, and SCIPfreeBlockMemory.
|
static |
callback to collect variable fixings of crossover
Definition at line 3265 of file heur_scheduler.c.
References assert(), Nh::crossover, Nh::data, fixMatchingSolutionValues(), data_crossover::nsols, NULL, result, data_crossover::rng, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNSols(), SCIPgetSols(), SCIPrandomGetInt(), and data_crossover::selsol.
|
static |
callback for crossover reference solution
Definition at line 3346 of file heur_scheduler.c.
References Nh::crossover, Nh::data, NULL, result, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, and data_crossover::selsol.
|
static |
initialization callback for mutation when a new problem is read
Definition at line 3367 of file heur_scheduler.c.
References assert(), Nh::data, Nh::mutation, MUTATIONSEED, NULL, data_mutation::rng, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcreateRandom(), SCIPgetNVars(), and TRUE.
|
static |
deinitialization callback for mutation when exiting a problem
Definition at line 3385 of file heur_scheduler.c.
References assert(), Nh::data, Nh::mutation, NULL, data_mutation::rng, SCIP_OKAY, SCIPfreeBlockMemory, and SCIPfreeRandom().
|
static |
callback to collect variable fixings of mutation
Definition at line 3402 of file heur_scheduler.c.
References assert(), Nh::data, Nh::fixingrate, i, Nh::mutation, nbinvars, nintvars, NULL, nvars, result, data_mutation::rng, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPrandomGetInt(), SCIPswapPointers(), NH_FixingRate::targetfixingrate, TRUE, tryAdd2variableBuffer(), and vars.
|
static |
add local branching constraint
sourcescip | source SCIP data structure |
targetscip | target SCIP data structure |
subvars | array of sub SCIP variables in same order as source SCIP variables |
distance | right hand side of the local branching constraint |
success | pointer to store of a local branching constraint has been successfully added |
naddedconss | pointer to increase the number of added constraints |
Definition at line 3480 of file heur_scheduler.c.
References assert(), FALSE, i, MAX, nbinvars, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsBasicLinear(), SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetNBinVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPinfinity(), SCIPisEQ(), SCIPreleaseCons(), TRUE, and vars.
Referenced by DECL_CHANGESUBSCIP(), and DECL_CHANGESUBSCIP().
|
static |
callback for local branching subproblem changes
Definition at line 3546 of file heur_scheduler.c.
References addLocalBranchingConstraint(), SCIP_CALL, SCIP_OKAY, and SCIPgetNBinVars().
|
static |
callback for proximity subproblem changes
Definition at line 3556 of file heur_scheduler.c.
References i, nbinvars, newobj, nintvars, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgVarObj(), SCIPgetBestSol(), SCIPgetSolVal(), SCIPgetVarsData(), TRUE, and vars.
|
static |
callback for zeroobjective subproblem changes
Definition at line 3608 of file heur_scheduler.c.
References assert(), FALSE, i, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPchgVarObj(), SCIPconshdlrGetNActiveConss(), SCIPfindConshdlr(), SCIPgetNObjVars(), SCIPgetVarsData(), TRUE, and vars.
|
static |
compute tightened bounds for integer variables depending on how much the LP and the incumbent solution values differ
scip | SCIP data structure of the original problem |
var | the variable for which bounds should be computed |
lbptr | pointer to store the lower bound in the DINS sub-SCIP |
ubptr | pointer to store the upper bound in the DINS sub-SCIP |
Definition at line 3648 of file heur_scheduler.c.
References assert(), MAX, MIN, REALABS, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetBestSol(), SCIPgetSolVal(), SCIPisFeasEQ(), SCIPvarGetLbGlobal(), SCIPvarGetLPSol(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and var.
Referenced by DECL_CHANGESUBSCIP(), and DECL_VARFIXINGS().
|
static |
callback to collect variable fixings of DINS
Definition at line 3722 of file heur_scheduler.c.
References assert(), BMScopyMemoryArray, computeIntegerVariableBoundsDins(), Nh::data, Nh::dins, fixMatchingSolutionValues(), MIN, nbinvars, nintvars, data_dins::npoolsols, NULL, result, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPallocBufferArray, SCIPcreateSol(), SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetLPSolstat(), SCIPgetNSols(), SCIPgetSols(), SCIPgetVarsData(), SCIPisFeasIntegral(), SCIPsetSolVal(), SCIPvarGetRootSol(), TRUE, tryAdd2variableBuffer(), and vars.
|
static |
callback for DINS subproblem changes
Definition at line 3803 of file heur_scheduler.c.
References addLocalBranchingConstraint(), computeIntegerVariableBoundsDins(), nbinvars, nintvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPgetNBinVars(), SCIPgetVarsData(), TRUE, and vars.
|
static |
deinitialization callback for DINS before SCIP is freed
Definition at line 3839 of file heur_scheduler.c.
References assert(), Nh::data, Nh::dins, NULL, SCIP_OKAY, and SCIPfreeBlockMemory.
|
static |
deinitialization callback for trustregion before SCIP is freed
Definition at line 3850 of file heur_scheduler.c.
References assert(), Nh::data, NULL, SCIP_OKAY, SCIPfreeBlockMemory, and Nh::trustregion.
|
static |
add trust region neighborhood constraint and auxiliary objective variable
Definition at line 3861 of file heur_scheduler.c.
References Nh::data, SCIP_CALL, SCIP_OKAY, SCIPaddTrustregionNeighborhoodConstraint(), Nh::trustregion, and data_trustregion::violpenalty.
|
static |
callback that returns the incumbent solution as a reference point
Definition at line 3880 of file heur_scheduler.c.
References assert(), NULL, result, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, and SCIPgetBestSol().
|
static |
callback function that deactivates a neighborhood on problems with no discrete variables
Definition at line 3900 of file heur_scheduler.c.
References assert(), NULL, SCIP_OKAY, SCIPgetNBinVars(), and SCIPgetNIntVars().
|
static |
callback function that deactivates a neighborhood on problems with no binary variables
Definition at line 3913 of file heur_scheduler.c.
References assert(), NULL, SCIP_OKAY, and SCIPgetNBinVars().
|
static |
callback function that deactivates a neighborhood on problems with no objective variables
Definition at line 3926 of file heur_scheduler.c.
References assert(), NULL, SCIP_OKAY, and SCIPgetNObjVars().
|
static |
include all neighborhoods
scip | SCIP data structure |
heurdata | heuristic data of the scheduler heuristic |
Definition at line 3940 of file heur_scheduler.c.
References Nh::crossover, Nh::data, DEFAULT_ACTIVE_CROSSOVER, DEFAULT_ACTIVE_DINS, DEFAULT_ACTIVE_LOCALBRANCHING, DEFAULT_ACTIVE_MUTATION, DEFAULT_ACTIVE_PROXIMITY, DEFAULT_ACTIVE_RENS, DEFAULT_ACTIVE_RINS, DEFAULT_ACTIVE_TRUSTREGION, DEFAULT_ACTIVE_ZEROOBJECTIVE, DEFAULT_MAXFIXINGRATE_CROSSOVER, DEFAULT_MAXFIXINGRATE_DINS, DEFAULT_MAXFIXINGRATE_LOCALBRANCHING, DEFAULT_MAXFIXINGRATE_MUTATION, DEFAULT_MAXFIXINGRATE_PROXIMITY, DEFAULT_MAXFIXINGRATE_RENS, DEFAULT_MAXFIXINGRATE_RINS, DEFAULT_MAXFIXINGRATE_TRUSTREGION, DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE, DEFAULT_MINFIXINGRATE_CROSSOVER, DEFAULT_MINFIXINGRATE_DINS, DEFAULT_MINFIXINGRATE_LOCALBRANCHING, DEFAULT_MINFIXINGRATE_MUTATION, DEFAULT_MINFIXINGRATE_PROXIMITY, DEFAULT_MINFIXINGRATE_RENS, DEFAULT_MINFIXINGRATE_RINS, DEFAULT_MINFIXINGRATE_TRUSTREGION, DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE, DEFAULT_NPOOLSOLS_DINS, DEFAULT_NSOLS_CROSSOVER, DEFAULT_PRIORITY_CROSSOVER, DEFAULT_PRIORITY_DINS, DEFAULT_PRIORITY_LOCALBRANCHING, DEFAULT_PRIORITY_MUTATION, DEFAULT_PRIORITY_PROXIMITY, DEFAULT_PRIORITY_RENS, DEFAULT_PRIORITY_RINS, DEFAULT_PRIORITY_TRUSTREGION, DEFAULT_PRIORITY_ZEROOBJECTIVE, DEFAULT_VIOLPENALTY_TRUSTREGION, Nh::dins, FALSE, HEUR_NAME, heurdata, data_dins::npoolsols, data_crossover::nsols, NULL, data_crossover::rng, schedulerIncludeNeighborhood(), SCIP_CALL, SCIP_OKAY, SCIP_REAL_MAX, SCIPaddIntParam(), SCIPaddRealParam(), SCIPallocBlockMemory, TRUE, Nh::trustregion, and data_trustregion::violpenalty.
Referenced by SCIPincludeHeurScheduler().
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 4031 of file heur_scheduler.c.
References assert(), FALSE, Nh::fixingrate, heurdata, heurStatsReset(), i, neighborhoodInit(), NULL, resetFixingRate(), SCIP_CALL, SCIP_OKAY, SCIPcreateSol(), SCIPfreeBlockMemoryArray, SCIPheurGetData(), and Nh::stats.
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 4075 of file heur_scheduler.c.
References Nh::active, assert(), createBandit(), heurdata, i, NULL, resetCurrentNeighborhood(), resetTargetNodeLimit(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetNActions(), SCIPfreeBandit(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPheurGetData(), SCIPresetBandit(), SCIPsortRealInt(), and SCIPswapPointers().
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 4195 of file heur_scheduler.c.
References assert(), heurdata, i, neighborhoodExit(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeSol(), and SCIPheurGetData().
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 4222 of file heur_scheduler.c.
References assert(), heurdata, i, NNEIGHBORHOODS, NULL, schedulerFreeDivingHeur(), schedulerFreeNeighborhood(), SCIP_CALL, SCIP_OKAY, SCIPfreeBandit(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPheurGetData().
|
static |
output method of statistics table to output file stream 'file'
Definition at line 4270 of file heur_scheduler.c.
References assert(), HEUR_NAME, heurdata, NULL, printDivingHeurStatistics(), printNeighborhoodStatistics(), SCIP_OKAY, SCIPfindHeur(), and SCIPheurGetData().