Adaptive large neighborhood search heuristic that orchestrates popular LNS heuristics.
Definition in file heur_alns.c.
#include <assert.h>
#include <string.h>
#include <strings.h>
#include "scip/heur_alns.h"
#include "scipdefplugins.h"
Go to the source code of this file.
Typedefs | |
typedef struct data_crossover | DATA_CROSSOVER |
typedef struct data_mutation | DATA_MUTATION |
typedef struct data_dins | DATA_DINS |
typedef struct NH_FixingRate | NH_FIXINGRATE |
typedef struct NH_Stats | NH_STATS |
typedef struct Nh | NH |
typedef struct VarPrio | VARPRIO |
typedef enum HistIndex | HISTINDEX |
typedef struct SolveLimits | SOLVELIMITS |
Enumerations | |
enum | HistIndex { HIDX_OPT = 0, HIDX_USR = 1, HIDX_NODELIM = 2, HIDX_STALLNODE = 3, HIDX_INFEAS = 4, HIDX_SOLLIM = 5, HIDX_OTHER = 6 } |
Functions | |
static SCIP_RETCODE | resetFixingRate (SCIP *scip, NH_FIXINGRATE *fixingrate) |
static void | resetCurrentNeighborhood (SCIP_HEURDATA *heurdata) |
static void | updateFixingRateIncrement (NH_FIXINGRATE *fx) |
static void | increaseFixingRate (NH_FIXINGRATE *fx) |
static void | decreaseFixingRate (NH_FIXINGRATE *fx) |
static void | updateFixingRate (SCIP *scip, NH *neighborhood, SCIP_STATUS subscipstatus, NH_STATS *runstats) |
static void | increaseTargetNodeLimit (SCIP_HEURDATA *heurdata) |
static void | decreaseTargetNodeLimit (SCIP_HEURDATA *heurdata) |
static void | resetTargetNodeLimit (SCIP_HEURDATA *heurdata) |
static void | updateTargetNodeLimit (SCIP_HEURDATA *heurdata, NH_STATS *runstats, SCIP_STATUS subscipstatus) |
static void | resetMinimumImprovement (SCIP_HEURDATA *heurdata) |
static void | increaseMinimumImprovement (SCIP_HEURDATA *heurdata) |
static void | decreaseMinimumImprovement (SCIP_HEURDATA *heurdata) |
static void | updateMinimumImprovement (SCIP_HEURDATA *heurdata, SCIP_STATUS subscipstatus, NH_STATS *runstats) |
static SCIP_RETCODE | neighborhoodStatsReset (SCIP *scip, NH_STATS *stats) |
static SCIP_RETCODE | alnsIncludeNeighborhood (SCIP *scip, SCIP_HEURDATA *heurdata, NH **neighborhood, const char *name, SCIP_Real minfixingrate, SCIP_Real maxfixingrate, SCIP_Bool active, SCIP_Real priority, DECL_VARFIXINGS((*varfixings)), DECL_CHANGESUBSCIP((*changesubscip)), DECL_NHINIT((*nhinit)), DECL_NHEXIT((*nhexit)), DECL_NHFREE((*nhfree)), DECL_NHREFSOL((*nhrefsol)), DECL_NHDEACTIVATE((*nhdeactivate))) |
static SCIP_RETCODE | alnsFreeNeighborhood (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_DECL_EVENTEXEC (eventExecAlns) |
static void | initRunStats (SCIP *scip, NH_STATS *stats) |
static void | updateRunStats (SCIP *scip, NH_STATS *stats, SCIP *subscip) |
static int | getHistIndex (SCIP_STATUS subscipstatus) |
static void | printNeighborhoodStatistics (SCIP *scip, SCIP_HEURDATA *heurdata, FILE *file) |
static void | updateNeighborhoodStats (SCIP *scip, NH_STATS *runstats, NH *neighborhood, SCIP_STATUS subscipstatus) |
static | SCIP_DECL_SORTINDCOMP (sortIndCompAlns) |
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) |
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 | neighborhoodGetRefsol (SCIP *scip, NH *neighborhood, SCIP_SOL **solptr) |
static SCIP_RETCODE | alnsFixMoreVariables (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 (heurCopyAlns) |
static SCIP_RETCODE | alnsUnfixVariables (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, SOLVELIMITS *solvelimits, SCIP_Bool *runagain) |
static SCIP_BANDIT * | getBandit (SCIP_HEURDATA *heurdata) |
static SCIP_RETCODE | selectNeighborhood (SCIP *scip, SCIP_HEURDATA *heurdata, int *neighborhoodidx) |
static SCIP_RETCODE | getReward (SCIP *scip, SCIP_HEURDATA *heurdata, NH_STATS *runstats, SCIP_Real *rewardptr) |
static SCIP_RETCODE | updateBanditAlgorithms (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Real reward, int neighborhoodidx) |
static SCIP_RETCODE | setupSubScip (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SOLVELIMITS *solvelimits, SCIP_HEUR *heur, SCIP_Bool objchgd) |
static | SCIP_DECL_HEUREXEC (heurExecAlns) |
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_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 (heurInitAlns) |
static | SCIP_DECL_HEURINITSOL (heurInitsolAlns) |
static | SCIP_DECL_HEUREXIT (heurExitAlns) |
static | SCIP_DECL_HEURFREE (heurFreeAlns) |
static | SCIP_DECL_TABLEOUTPUT (tableOutputNeighborhood) |
SCIP_RETCODE | SCIPincludeHeurAlns (SCIP *scip) |
#define HEUR_NAME "alns" |
Definition at line 32 of file heur_alns.c.
Referenced by SCIP_DECL_HEURCOPY(), SCIP_DECL_TABLEOUTPUT(), and SCIPincludeHeurAlns().
#define HEUR_DESC "Large neighborhood search heuristic that orchestrates the popular neighborhoods Local Branching, RINS, RENS, DINS etc." |
Definition at line 33 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_DISPCHAR 'L' |
Definition at line 34 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_PRIORITY -1100500 |
Definition at line 35 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_FREQ 20 |
Definition at line 36 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_FREQOFS 0 |
Definition at line 37 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_MAXDEPTH -1 |
Definition at line 38 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 39 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 40 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define NNEIGHBORHOODS 8 |
Definition at line 42 of file heur_alns.c.
Referenced by SCIP_DECL_HEUREXEC(), SCIP_DECL_HEURFREE(), and SCIPincludeHeurAlns().
#define DEFAULT_NODESQUOT 0.1 |
Definition at line 47 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_NODESOFFSET 500LL |
Definition at line 48 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_NSOLSLIM 3 |
Definition at line 49 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_MINNODES 50LL |
Definition at line 50 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_MAXNODES 5000LL |
Definition at line 51 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_WAITINGNODES 25LL |
number of nodes since last incumbent solution that the heuristic should wait
Definition at line 52 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_TARGETNODEFACTOR 1.5 |
Definition at line 53 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_STALLNODEFACTOR 0.25 |
Definition at line 54 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define LPLIMFAC 4.0 |
Definition at line 55 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_MINIMPROVELOW 0.0001 |
Definition at line 60 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_MINIMPROVEHIGH 0.1 |
Definition at line 61 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define MINIMPROVEFAC 1.5 |
Definition at line 62 of file heur_alns.c.
Referenced by decreaseMinimumImprovement(), and increaseMinimumImprovement().
#define DEFAULT_STARTMINIMPROVE 0.05 |
Definition at line 63 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_ADJUSTMINIMPROVE TRUE |
Definition at line 64 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_BESTSOLWEIGHT 1 |
Definition at line 69 of file heur_alns.c.
Referenced by updateNeighborhoodStats().
#define DEFAULT_BANDITALGO 'u' |
the default bandit algorithm: (u)pper confidence bounds, (e)xp.3, epsilon (g)reedy
Definition at line 70 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_GAMMA 0.2 |
default weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution for exp3
Definition at line 71 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_BETA 0.0 |
default reward offset between 0 and 1 at every observation for exp3
Definition at line 72 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_REWARDCONTROL 0.8 |
reward control to increase the weight of the simple solution indicator and decrease the weight of the closed gap reward
Definition at line 73 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_SCALEBYEFFORT TRUE |
should the reward be scaled by the effort?
Definition at line 74 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_EPS 0.5 |
increase exploration in epsilon-greedy bandit algorithm
Definition at line 75 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_RESETWEIGHTS TRUE |
should the bandit algorithms be reset when a new problem is read?
Definition at line 76 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_SUBSCIPRANDSEEDS FALSE |
should random seeds of sub-SCIPs be altered to increase diversification?
Definition at line 77 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_ALPHA 0.2 |
parameter to increase the confidence width in UCB
Definition at line 78 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_REWARDBASELINE 0.5 |
the reward baseline to separate successful and failed calls
Definition at line 79 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_FIXTOL 0.1 |
tolerance by which the fixing rate may be missed/exceeded without generic (unfixing)
Definition at line 80 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_USELOCALREDCOST FALSE |
should local reduced costs be used for generic (un)fixing?
Definition at line 81 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_USEREDCOST TRUE |
should reduced cost scores be used for variable priorization?
Definition at line 86 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_USEPSCOST TRUE |
should pseudo cost scores be used for variable priorization?
Definition at line 87 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_USEDISTANCES TRUE |
should distances from fixed variables be used for variable priorization
Definition at line 88 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_DOMOREFIXINGS TRUE |
should the ALNS heuristic do more fixings by itself based on variable prioritization until the target fixing rate is reached?
Definition at line 89 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_ADJUSTFIXINGRATE TRUE |
should the heuristic adjust the target fixing rate based on the success?
Definition at line 92 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define FIXINGRATE_DECAY 0.75 |
geometric decay for fixing rate adjustments
Definition at line 93 of file heur_alns.c.
Referenced by updateFixingRateIncrement().
#define FIXINGRATE_STARTINC 0.2 |
initial increment value for fixing rate
Definition at line 94 of file heur_alns.c.
Referenced by resetFixingRate().
#define DEFAULT_USESUBSCIPHEURS FALSE |
should the heuristic activate other sub-SCIP heuristics during its search?
Definition at line 95 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_COPYCUTS FALSE |
should cutting planes be copied to the sub-SCIP?
Definition at line 96 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DEFAULT_REWARDFILENAME "-" |
file name to store all rewards and the selection of the bandit
Definition at line 97 of file heur_alns.c.
Referenced by SCIP_DECL_HEURINIT(), and SCIPincludeHeurAlns().
#define DEFAULT_SEED 113 |
Definition at line 100 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define MUTATIONSEED 121 |
Definition at line 101 of file heur_alns.c.
Referenced by DECL_NHINIT().
#define CROSSOVERSEED 321 |
Definition at line 102 of file heur_alns.c.
Referenced by DECL_NHINIT().
#define DEFAULT_MINFIXINGRATE_RENS 0.3 |
Definition at line 105 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_RENS 0.7 |
Definition at line 106 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_RENS TRUE |
Definition at line 107 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_RENS 1.0 |
Definition at line 108 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_RINS 0.2 |
Definition at line 110 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_RINS 0.6 |
Definition at line 111 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_RINS TRUE |
Definition at line 112 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_RINS 1.0 |
Definition at line 113 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_MUTATION 0.4 |
Definition at line 115 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_MUTATION 0.9 |
Definition at line 116 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_MUTATION TRUE |
Definition at line 117 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_MUTATION 1.0 |
Definition at line 118 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_LOCALBRANCHING 0.0 |
Definition at line 120 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_LOCALBRANCHING 0.9 |
Definition at line 121 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_LOCALBRANCHING TRUE |
Definition at line 122 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_LOCALBRANCHING 1.0 |
Definition at line 123 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_PROXIMITY 0.0 |
Definition at line 125 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_PROXIMITY 0.9 |
Definition at line 126 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_PROXIMITY TRUE |
Definition at line 127 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_PROXIMITY 1.0 |
Definition at line 128 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_CROSSOVER 0.4 |
Definition at line 130 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_CROSSOVER 0.9 |
Definition at line 131 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_CROSSOVER TRUE |
Definition at line 132 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_CROSSOVER 1.0 |
Definition at line 133 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_ZEROOBJECTIVE 0.0 |
Definition at line 135 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_ZEROOBJECTIVE 0.9 |
Definition at line 136 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_ZEROOBJECTIVE TRUE |
Definition at line 137 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_ZEROOBJECTIVE 1.0 |
Definition at line 138 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MINFIXINGRATE_DINS 0.1 |
Definition at line 140 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_MAXFIXINGRATE_DINS 0.5 |
Definition at line 141 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_ACTIVE_DINS TRUE |
Definition at line 142 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_PRIORITY_DINS 1.0 |
Definition at line 143 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_NSOLS_CROSSOVER 2 |
parameter for the number of solutions that crossover should combine
Definition at line 145 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define DEFAULT_NPOOLSOLS_DINS 5 |
number of pool solutions where binary solution values must agree
Definition at line 146 of file heur_alns.c.
Referenced by includeNeighborhoods().
#define EVENTHDLR_NAME "Alns" |
Definition at line 149 of file heur_alns.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIP_DECL_HEUREXEC().
#define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic" |
Definition at line 150 of file heur_alns.c.
Referenced by SCIP_DECL_HEUREXEC().
#define SCIP_EVENTTYPE_ALNS (SCIP_EVENTTYPE_LPSOLVED | SCIP_EVENTTYPE_SOLFOUND | SCIP_EVENTTYPE_BESTSOLFOUND) |
Definition at line 151 of file heur_alns.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIP_DECL_HEUREXEC().
#define TABLE_NAME_NEIGHBORHOOD "neighborhood" |
Definition at line 154 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define TABLE_DESC_NEIGHBORHOOD "ALNS neighborhood statistics" |
Definition at line 155 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define TABLE_POSITION_NEIGHBORHOOD 12500 |
the position of the statistics table
Definition at line 156 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define TABLE_EARLIEST_STAGE_NEIGHBORHOOD SCIP_STAGE_TRANSFORMED |
output of the statistics table is only printed from this stage onwards
Definition at line 157 of file heur_alns.c.
Referenced by SCIPincludeHeurAlns().
#define DECL_VARFIXINGS | ( | x | ) |
callback to collect variable fixings of neighborhood
Definition at line 187 of file heur_alns.c.
Referenced by computeIntegerVariableBoundsDins(), DECL_NHEXIT(), DECL_NHFREE(), fixMatchingSolutionValues(), and SCIP_DECL_HEUREXEC().
#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 204 of file heur_alns.c.
Referenced by addLocalBranchingConstraint(), DECL_CHANGESUBSCIP(), and DECL_VARFIXINGS().
#define DECL_NHINIT | ( | x | ) |
optional initialization callback for neighborhoods when a new problem is read
Definition at line 215 of file heur_alns.c.
Referenced by DECL_NHREFSOL(), and DECL_VARFIXINGS().
#define DECL_NHEXIT | ( | x | ) |
deinitialization callback for neighborhoods when exiting a problem
Definition at line 221 of file heur_alns.c.
Referenced by DECL_NHINIT().
#define DECL_NHFREE | ( | x | ) |
deinitialization callback for neighborhoods before SCIP is freed
Definition at line 227 of file heur_alns.c.
Referenced by DECL_CHANGESUBSCIP(), and DECL_NHEXIT().
#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 240 of file heur_alns.c.
Referenced by DECL_NHFREE(), and DECL_VARFIXINGS().
#define DECL_NHDEACTIVATE | ( | x | ) |
callback function to deactivate neighborhoods on problems where they are irrelevant
Definition at line 248 of file heur_alns.c.
Referenced by DECL_NHDEACTIVATE(), and DECL_NHREFSOL().
#define NHISTENTRIES 7 |
Definition at line 265 of file heur_alns.c.
Referenced by neighborhoodStatsReset(), and printNeighborhoodStatistics().
typedef struct data_crossover DATA_CROSSOVER |
crossover neighborhood data structure
Definition at line 168 of file heur_alns.c.
typedef struct data_mutation DATA_MUTATION |
mutation neighborhood data structure
Definition at line 170 of file heur_alns.c.
dins neighborhood data structure
Definition at line 172 of file heur_alns.c.
typedef struct NH_FixingRate NH_FIXINGRATE |
Definition at line 174 of file heur_alns.c.
fixing rate data structure neighborhood statistics data structure
Definition at line 176 of file heur_alns.c.
neighborhood data structure
Definition at line 178 of file heur_alns.c.
Definition at line 184 of file heur_alns.c.
Definition at line 264 of file heur_alns.c.
typedef struct SolveLimits SOLVELIMITS |
Definition at line 409 of file heur_alns.c.
enum HistIndex |
sub-SCIP status code enumerator
Definition at line 254 of file heur_alns.c.
|
static |
Reset target fixing rate
scip | SCIP data structure |
fixingrate | heuristic fixing rate |
Definition at line 430 of file heur_alns.c.
References FIXINGRATE_STARTINC, NH_FixingRate::increment, NH_FixingRate::maxfixingrate, NH_FixingRate::minfixingrate, resetCurrentNeighborhood(), SCIP_OKAY, and NH_FixingRate::targetfixingrate.
Referenced by SCIP_DECL_HEURINIT().
|
static |
reset the currently active neighborhood
Definition at line 447 of file heur_alns.c.
References updateFixingRateIncrement().
Referenced by resetFixingRate(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_HEURINITSOL().
|
static |
update increment for fixing rate
fx | fixing rate |
Definition at line 458 of file heur_alns.c.
References FIXINGRATE_DECAY, increaseFixingRate(), NH_FixingRate::increment, and MAX.
Referenced by decreaseFixingRate(), increaseFixingRate(), and resetCurrentNeighborhood().
|
static |
increase fixing rate
decrease also the rate by which the target fixing rate is adjusted
fx | fixing rate |
Definition at line 472 of file heur_alns.c.
References decreaseFixingRate(), NH_FixingRate::increment, NH_FixingRate::maxfixingrate, NH_FixingRate::targetfixingrate, and updateFixingRateIncrement().
Referenced by updateFixingRate(), and updateFixingRateIncrement().
|
static |
decrease fixing rate
decrease also the rate by which the target fixing rate is adjusted
fx | fixing rate |
Definition at line 486 of file heur_alns.c.
References NH_FixingRate::increment, MAX, NH_FixingRate::minfixingrate, NH_FixingRate::targetfixingrate, updateFixingRate(), and updateFixingRateIncrement().
Referenced by increaseFixingRate(), and updateFixingRate().
|
static |
update fixing rate based on the results of the current run
scip | SCIP data structure |
neighborhood | neighborhood |
subscipstatus | status of the sub-SCIP run |
runstats | run statistics for this run |
Definition at line 497 of file heur_alns.c.
References decreaseFixingRate(), Nh::fixingrate, increaseFixingRate(), increaseTargetNodeLimit(), NH_Stats::nbestsolsfound, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, and SCIP_STATUS_USERINTERRUPT.
Referenced by decreaseFixingRate(), and SCIP_DECL_HEUREXEC().
|
static |
increase target node limit
heurdata | heuristic data |
Definition at line 539 of file heur_alns.c.
References decreaseTargetNodeLimit(), and SCIP_Longint.
Referenced by updateFixingRate(), and updateTargetNodeLimit().
|
static |
decrease target node limit
heurdata | heuristic data |
Definition at line 549 of file heur_alns.c.
References MAX, resetTargetNodeLimit(), and SCIP_Longint.
Referenced by increaseTargetNodeLimit(), and updateTargetNodeLimit().
|
static |
reset target node limit
heurdata | heuristic data |
Definition at line 559 of file heur_alns.c.
References updateTargetNodeLimit().
Referenced by decreaseTargetNodeLimit(), and SCIP_DECL_HEURINITSOL().
|
static |
update target node limit based on the current run results
heurdata | heuristic data |
runstats | statistics of the run |
subscipstatus | status of the sub-SCIP run |
Definition at line 568 of file heur_alns.c.
References decreaseTargetNodeLimit(), increaseTargetNodeLimit(), NH_Stats::nbestsolsfound, resetMinimumImprovement(), SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, and SCIP_STATUS_USERINTERRUPT.
Referenced by resetTargetNodeLimit(), and SCIP_DECL_HEUREXEC().
|
static |
reset the minimum improvement for the sub-SCIPs
heurdata | heuristic data |
Definition at line 605 of file heur_alns.c.
References increaseMinimumImprovement().
Referenced by SCIP_DECL_HEURINITSOL(), and updateTargetNodeLimit().
|
static |
increase minimum improvement for the sub-SCIPs
heurdata | heuristic data |
Definition at line 615 of file heur_alns.c.
References decreaseMinimumImprovement(), and MINIMPROVEFAC.
Referenced by resetMinimumImprovement(), and updateMinimumImprovement().
|
static |
decrease the minimum improvement for the sub-SCIPs
heurdata | heuristic data |
Definition at line 627 of file heur_alns.c.
References MAX, MINIMPROVEFAC, SCIPdebugMessage, and updateMinimumImprovement().
Referenced by increaseMinimumImprovement(), and updateMinimumImprovement().
|
static |
update the minimum improvement based on the status of the sub-SCIP
heurdata | heuristic data |
subscipstatus | status of the sub-SCIP run |
runstats | run statistics for this run |
Definition at line 640 of file heur_alns.c.
References decreaseMinimumImprovement(), increaseMinimumImprovement(), NH_Stats::nbestsolsfound, neighborhoodStatsReset(), SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, and SCIP_STATUS_USERINTERRUPT.
Referenced by decreaseMinimumImprovement(), and SCIP_DECL_HEUREXEC().
|
static |
Reset neighborhood statistics
scip | SCIP data structure |
stats | neighborhood statistics |
Definition at line 687 of file heur_alns.c.
References alnsIncludeNeighborhood(), BMSclearMemoryArray, NH_Stats::nbestsolsfound, NH_Stats::nfixings, NHISTENTRIES, NH_Stats::nruns, NH_Stats::nrunsbestsol, NH_Stats::nsolsfound, SCIP_CALL, SCIP_OKAY, SCIPresetClock(), NH_Stats::setupclock, NH_Stats::statushist, NH_Stats::submipclock, and NH_Stats::usednodes.
Referenced by SCIP_DECL_HEURINIT(), and updateMinimumImprovement().
|
static |
create a neighborhood of the specified name and include it into the ALNS heuristic
scip | SCIP data structure |
heurdata | heuristic data of the ALNS 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 | positive call priority to initialize bandit algorithms |
Definition at line 712 of file heur_alns.c.
References active, alnsFreeNeighborhood(), BMSduplicateMemoryArray, SCIP_ALLOC, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddRealParam(), SCIPallocBlockMemory, SCIPcreateClock(), SCIPsnprintf(), and TRUE.
Referenced by includeNeighborhoods(), and neighborhoodStatsReset().
|
static |
release all data and free neighborhood
scip | SCIP data structure |
neighborhood | pointer to neighborhood that should be freed |
Definition at line 775 of file heur_alns.c.
References BMSfreeMemoryArray, Nh::name, neighborhoodInit(), SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeClock(), NH_Stats::setupclock, Nh::stats, and NH_Stats::submipclock.
Referenced by alnsIncludeNeighborhood(), and SCIP_DECL_HEURFREE().
|
static |
initialize neighborhood specific data
scip | SCIP data structure |
neighborhood | neighborhood to initialize |
Definition at line 806 of file heur_alns.c.
References neighborhoodExit(), SCIP_CALL, and SCIP_OKAY.
Referenced by alnsFreeNeighborhood(), and SCIP_DECL_HEURINIT().
|
static |
deinitialize neighborhood specific data
scip | SCIP data structure |
neighborhood | neighborhood to initialize |
Definition at line 825 of file heur_alns.c.
References SCIP_CALL, SCIP_OKAY, and transferSolution().
Referenced by neighborhoodInit(), and 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 843 of file heur_alns.c.
References FALSE, NH_Stats::nbestsolsfound, NH_Stats::nsolsfound, SCIP_Bool, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcheckSol(), SCIPcreateSol(), SCIPfreeBufferArray, SCIPfreeSol(), SCIPgetBestSol(), SCIPgetCutoffbound(), SCIPgetNOrigVars(), SCIPgetSolTransObj(), SCIPgetSolVals(), SCIPgetVarsData(), SCIPsetSolVals(), SCIPtrySolFree(), and TRUE.
Referenced by neighborhoodExit(), and SCIP_DECL_EVENTEXEC().
|
static |
execution callback of the event handler
transfer new solutions or interrupt the solving process manually
Definition at line 935 of file heur_alns.c.
References EVENTHDLR_NAME, initRunStats(), SCIP_CALL, SCIP_EVENTTYPE_ALNS, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_LPSOLVED, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPdebugMsg, SCIPeventGetType(), SCIPeventhdlrGetName(), SCIPgetNLPs(), SCIPinterruptSolve(), and transferSolution().
Referenced by transferSolution().
initialize neighborhood statistics before the next run
scip | SCIP data structure |
stats | run statistics |
Definition at line 969 of file heur_alns.c.
References NH_Stats::nbestsolsfound, NH_Stats::nfixings, NH_Stats::nsolsfound, NH_Stats::oldupperbound, SCIPgetUpperbound(), updateRunStats(), and NH_Stats::usednodes.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIP_DECL_HEUREXEC().
update run stats after the sub SCIP was solved
scip | SCIP data structure |
stats | run statistics |
subscip | sub-SCIP instance, or NULL |
Definition at line 983 of file heur_alns.c.
References getHistIndex(), SCIPgetNNodes(), SCIPisTransformed(), and NH_Stats::usednodes.
Referenced by initRunStats(), and SCIP_DECL_HEUREXEC().
|
static |
get the histogram index for this status
subscipstatus | sub-SCIP status |
Definition at line 998 of file heur_alns.c.
References HIDX_INFEAS, HIDX_NODELIM, HIDX_OPT, HIDX_OTHER, HIDX_SOLLIM, HIDX_STALLNODE, HIDX_USR, printNeighborhoodStatistics(), SCIP_STATUS_INFEASIBLE, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, and SCIP_STATUS_USERINTERRUPT.
Referenced by updateNeighborhoodStats(), and updateRunStats().
|
static |
print neighborhood statistics
scip | SCIP data structure |
heurdata | heuristic data |
file | file handle, or NULL for standard out |
Definition at line 1023 of file heur_alns.c.
References Nh::fixingrate, HIDX_INFEAS, HIDX_NODELIM, HIDX_OPT, HIDX_OTHER, HIDX_SOLLIM, HIDX_STALLNODE, HIDX_USR, Nh::name, NH_Stats::nbestsolsfound, NHISTENTRIES, NH_Stats::nruns, NH_Stats::nsolsfound, SCIP_Real, SCIPgetClockTime(), SCIPgetConfidenceBoundUcb(), SCIPgetProbabilityExp3(), SCIPgetWeightsEpsgreedy(), SCIPinfoMessage(), NH_Stats::setupclock, Nh::stats, NH_Stats::statushist, NH_Stats::submipclock, NH_FixingRate::targetfixingrate, updateNeighborhoodStats(), and NH_Stats::usednodes.
Referenced by getHistIndex(), and SCIP_DECL_TABLEOUTPUT().
|
static |
update the statistics of the neighborhood based on the sub-SCIP run
scip | SCIP data structure |
runstats | run statistics |
neighborhood | the selected neighborhood |
subscipstatus | status of the sub-SCIP solve |
Definition at line 1091 of file heur_alns.c.
References DEFAULT_BESTSOLWEIGHT, getHistIndex(), NH_Stats::nbestsolsfound, NH_Stats::nruns, NH_Stats::nrunsbestsol, NH_Stats::nsolsfound, SCIP_DECL_SORTINDCOMP(), Nh::stats, NH_Stats::statushist, and NH_Stats::usednodes.
Referenced by printNeighborhoodStatistics(), and 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 1132 of file heur_alns.c.
References VarPrio::distances, getVariableRedcostScore(), VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::scip, SCIP_Real, SCIPisEQ(), SCIPisGT(), SCIPisLT(), VarPrio::usedistances, VarPrio::usepscost, and VarPrio::useredcost.
Referenced by updateNeighborhoodStats().
|
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 1208 of file heur_alns.c.
References getVariablePscostScore(), MAX, REALABS, SCIP_LPSOLSTAT_OPTIMAL, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPgetLPSolstat(), SCIPgetVarRedcost(), SCIPhasCurrentNodeLP(), SCIPinfinity(), SCIPisDualfeasNegative(), SCIPisDualfeasPositive(), SCIPisDualfeasZero(), SCIPisFeasIntegral(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPvarGetBestRootRedcost(), SCIPvarGetBestRootSol(), SCIPvarGetLPSol(), and SCIPvarGetStatus().
Referenced by alnsFixMoreVariables(), alnsUnfixVariables(), and SCIP_DECL_SORTINDCOMP().
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 |
Definition at line 1262 of file heur_alns.c.
References SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPgetVarPseudocostVal(), SCIPisEQ(), SCIPvarGetRootSol(), SCIPvarGetStatus(), and tryAdd2variableBuffer().
Referenced by alnsFixMoreVariables(), alnsUnfixVariables(), and getVariableRedcostScore().
|
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 1289 of file heur_alns.c.
References neighborhoodGetRefsol(), NH_Stats::nfixings, SCIPfloor(), SCIPgetNVars(), SCIPisFeasIntegral(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and SCIPvarIsIntegral().
Referenced by alnsFixMoreVariables(), DECL_VARFIXINGS(), fixMatchingSolutionValues(), and getVariablePscostScore().
|
static |
query neighborhood for a reference solution for further fixings
scip | SCIP data structure |
neighborhood | ALNS neighborhood data structure |
solptr | solution pointer |
Definition at line 1320 of file heur_alns.c.
References alnsFixMoreVariables(), SCIP_CALL, SCIP_DIDNOTFIND, and SCIP_OKAY.
Referenced by neighborhoodFixVariables(), and tryAdd2variableBuffer().
|
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 ALNS 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 1354 of file heur_alns.c.
References BMSclearMemoryArray, createBandit(), VarPrio::distances, FALSE, getVariablePscostScore(), getVariableRedcostScore(), NH_Stats::nfixings, VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetRandnumgen(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetSolVals(), SCIPgetVarsData(), SCIPrandomGetReal(), SCIPselectInd(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetUbGlobal(), SCIPvariablegraphBreadthFirst(), TRUE, tryAdd2variableBuffer(), VarPrio::usedistances, VarPrio::usepscost, and VarPrio::useredcost.
Referenced by neighborhoodFixVariables(), and neighborhoodGetRefsol().
|
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 1526 of file heur_alns.c.
References SCIP_CALL, SCIP_DECL_HEURCOPY(), SCIP_INVALIDDATA, SCIP_OKAY, SCIPcreateBanditEpsgreedy(), SCIPcreateBanditExp3(), SCIPcreateBanditUcb(), and SCIPerrorMessage.
Referenced by alnsFixMoreVariables(), and SCIP_DECL_HEURINITSOL().
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 1564 of file heur_alns.c.
References alnsUnfixVariables(), HEUR_NAME, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurAlns().
Referenced by createBandit().
|
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 the ALNS 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 1582 of file heur_alns.c.
References BMSclearMemoryArray, VarPrio::distances, FALSE, getVariablePscostScore(), getVariableRedcostScore(), neighborhoodFixVariables(), NH_Stats::nfixings, VarPrio::pscostscores, VarPrio::randscores, VarPrio::redcostscores, VarPrio::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetRandnumgen(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNVars(), SCIPgetVars(), SCIPrandomGetReal(), SCIPselectDownInd(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvariablegraphBreadthFirst(), TRUE, VarPrio::usedistances, VarPrio::usepscost, and VarPrio::useredcost.
Referenced by neighborhoodFixVariables(), and SCIP_DECL_HEURCOPY().
|
static |
call variable fixing callback for this neighborhood and orchestrate additional variable fixings, if necessary
scip | SCIP data structure |
heurdata | heuristic data of the ALNS 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 1729 of file heur_alns.c.
References alnsFixMoreVariables(), alnsUnfixVariables(), FALSE, Nh::fixingrate, neighborhoodChangeSubscip(), neighborhoodGetRefsol(), NH_Stats::nfixings, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPdebugMsg, SCIPgetNBinVars(), SCIPgetNIntVars(), and NH_FixingRate::targetfixingrate.
Referenced by alnsUnfixVariables(), and SCIP_DECL_HEUREXEC().
|
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 1811 of file heur_alns.c.
References FALSE, SCIP_CALL, SCIP_OKAY, setLimits(), and TRUE.
Referenced by neighborhoodFixVariables(), and SCIP_DECL_HEUREXEC().
|
static |
set sub-SCIP solving limits
subscip | SCIP data structure |
solvelimits | pointer to solving limits data structure |
Definition at line 1851 of file heur_alns.c.
References determineLimits(), SolveLimits::memorylimit, SolveLimits::nodelimit, SCIP_CALL, SCIP_OKAY, SCIPsetLongintParam(), SCIPsetRealParam(), SolveLimits::stallnodes, and SolveLimits::timelimit.
Referenced by neighborhoodChangeSubscip(), and setupSubScip().
|
static |
determine limits for a sub-SCIP
scip | SCIP data structure |
heur | this heuristic |
solvelimits | pointer to solving limits data structure |
runagain | can we solve another sub-SCIP with these limits |
Definition at line 1871 of file heur_alns.c.
References FALSE, getBandit(), SolveLimits::memorylimit, SolveLimits::nodelimit, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPgetMemExternEstim(), SCIPgetMemUsed(), SCIPgetNNodes(), SCIPgetRealParam(), SCIPgetSolvingTime(), SCIPheurGetData(), SCIPheurGetNBestSolsFound(), SCIPheurGetNCalls(), SCIPisInfinity(), SolveLimits::stallnodes, and SolveLimits::timelimit.
Referenced by SCIP_DECL_HEUREXEC(), and setLimits().
|
static |
return the bandit algorithm that should be used
heurdata | heuristic data of the ALNS neighborhood |
Definition at line 1931 of file heur_alns.c.
References selectNeighborhood().
Referenced by determineLimits(), selectNeighborhood(), and updateBanditAlgorithms().
|
static |
select a neighborhood depending on the selected bandit algorithm
scip | SCIP data structure |
heurdata | heuristic data of the ALNS neighborhood |
neighborhoodidx | pointer to store the selected neighborhood index |
Definition at line 1941 of file heur_alns.c.
References getBandit(), getReward(), SCIP_CALL, SCIP_OKAY, and SCIPbanditSelect().
Referenced by getBandit(), and SCIP_DECL_HEUREXEC().
|
static |
Calculate reward based on the selected reward measure
scip | SCIP data structure |
heurdata | heuristic data of the ALNS neighborhood |
runstats | run statistics |
rewardptr | pointer to store the computed reward |
Definition at line 1964 of file heur_alns.c.
References MAX, NH_Stats::nbestsolsfound, NH_Stats::nfixings, NH_Stats::oldupperbound, SCIP_OKAY, SCIP_Real, SCIPgetLowerbound(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetUpperbound(), SCIPisEQ(), SCIPisInfinity(), updateBanditAlgorithms(), and NH_Stats::usednodes.
Referenced by SCIP_DECL_HEUREXEC(), and selectNeighborhood().
|
static |
update internal bandit algorithm statistics for future draws
scip | SCIP data structure |
heurdata | heuristic data of the ALNS neighborhood |
reward | measured reward |
neighborhoodidx | the neighborhood that was chosen |
Definition at line 2043 of file heur_alns.c.
References getBandit(), SCIP_CALL, SCIP_OKAY, SCIPbanditUpdate(), SCIPdebugMsg, and setupSubScip().
Referenced by getReward(), and 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 2066 of file heur_alns.c.
References FALSE, SolveLimits::nodelimit, SCIP_CALL, SCIP_DECL_HEUREXEC(), SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIP_REAL_FORMAT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPfindBranchrule(), SCIPfindConshdlr(), SCIPfindNodesel(), SCIPfloor(), SCIPgetLowerbound(), SCIPgetNVars(), SCIPgetUpperbound(), SCIPgetVars(), SCIPheurGetData(), SCIPheurGetNCalls(), SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisObjIntegral(), SCIPisParamFixed(), SCIPreleaseCons(), SCIPretransformObj(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsumepsilon(), SCIPvarGetObj(), setLimits(), SolveLimits::stallnodes, SolveLimits::timelimit, and TRUE.
Referenced by SCIP_DECL_HEUREXEC(), and updateBanditAlgorithms().
|
static |
execution method of primal heuristic
Definition at line 2221 of file heur_alns.c.
References DECL_VARFIXINGS, determineLimits(), EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, getReward(), initRunStats(), Nh::name, neighborhoodChangeSubscip(), neighborhoodFixVariables(), NH_Stats::nfixings, NNEIGHBORHOODS, SolveLimits::nodelimit, NH_Stats::nruns, resetCurrentNeighborhood(), SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_EVENTTYPE_ALNS, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_STATUS_UNKNOWN, SCIP_SUCCESS, SCIPallocBufferArray, SCIPblkmem(), SCIPcatchEvent(), SCIPcopyLargeNeighborhoodSearch(), SCIPcreate(), SCIPdebugMsg, SCIPfree(), SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetNNodes(), SCIPgetNSols(), SCIPgetStatus(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPheurGetFreq(), SCIPincludeEventhdlrBasic(), SCIPisStopped(), SCIPprintStatistics(), SCIPsolGetNodenum(), SCIPsolve(), SCIPstartClock(), SCIPstopClock(), SCIPtransformProb(), selectNeighborhood(), NH_Stats::setupclock, setupSubScip(), Nh::stats, NH_Stats::submipclock, TRUE, updateBanditAlgorithms(), updateFixingRate(), updateMinimumImprovement(), updateNeighborhoodStats(), updateRunStats(), updateTargetNodeLimit(), and NH_Stats::usednodes.
Referenced by setupSubScip().
|
static |
callback to collect variable fixings of RENS
Definition at line 2587 of file heur_alns.c.
References DECL_CHANGESUBSCIP, NH_Stats::nfixings, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPgetLPSolstat(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPisFeasIntegral(), SCIPvarIsBinary(), SCIPvarIsIntegral(), TRUE, and tryAdd2variableBuffer().
|
static |
callback for RENS subproblem changes
Definition at line 2633 of file heur_alns.c.
References fixMatchingSolutionValues(), SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPfloor(), SCIPgetLPSolstat(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPisFeasIntegral(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
|
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 2676 of file heur_alns.c.
References DECL_VARFIXINGS, NH_Stats::nfixings, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetNBinVars(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisEQ(), SCIPvarIsBinary(), SCIPvarIsIntegral(), TRUE, and tryAdd2variableBuffer().
Referenced by DECL_CHANGESUBSCIP(), and DECL_VARFIXINGS().
|
static |
callback to collect variable fixings of RINS
Definition at line 2742 of file heur_alns.c.
References DECL_NHINIT, fixMatchingSolutionValues(), NH_Stats::nfixings, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_SOLORIGIN_ORIGINAL, SCIP_SUCCESS, SCIPgetBestSol(), SCIPgetLPSolstat(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), and SCIPsolGetOrigin().
|
static |
initialization callback for crossover when a new problem is read
Definition at line 2790 of file heur_alns.c.
References Nh::crossover, CROSSOVERSEED, Nh::data, DECL_NHEXIT, data_crossover::rng, SCIP_CALL, SCIP_OKAY, SCIPcreateRandom(), SCIPfreeRandom(), SCIPgetNVars(), and data_crossover::selsol.
|
static |
deinitialization callback for crossover when exiting a problem
Definition at line 2809 of file heur_alns.c.
References Nh::crossover, Nh::data, DECL_NHFREE, data_crossover::rng, SCIP_OKAY, and SCIPfreeRandom().
|
static |
deinitialization callback for crossover before SCIP is freed
Definition at line 2824 of file heur_alns.c.
References Nh::crossover, Nh::data, DECL_VARFIXINGS, SCIP_OKAY, and SCIPfreeBlockMemory.
|
static |
callback to collect variable fixings of crossover
Definition at line 2834 of file heur_alns.c.
References Nh::crossover, Nh::data, DECL_NHREFSOL, fixMatchingSolutionValues(), NH_Stats::nfixings, data_crossover::nsols, 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 2915 of file heur_alns.c.
References Nh::crossover, Nh::data, DECL_NHINIT, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, and data_crossover::selsol.
|
static |
initialization callback for mutation when a new problem is read
Definition at line 2936 of file heur_alns.c.
References Nh::data, DECL_NHEXIT, Nh::mutation, MUTATIONSEED, data_mutation::rng, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPcreateRandom(), and SCIPgetNVars().
|
static |
deinitialization callback for mutation when exiting a problem
Definition at line 2954 of file heur_alns.c.
References Nh::data, DECL_VARFIXINGS, Nh::mutation, data_mutation::rng, SCIP_OKAY, SCIPfreeBlockMemory, and SCIPfreeRandom().
|
static |
callback to collect variable fixings of mutation
Definition at line 2971 of file heur_alns.c.
References addLocalBranchingConstraint(), Nh::data, Nh::fixingrate, Nh::mutation, NH_Stats::nfixings, 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, and tryAdd2variableBuffer().
|
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 3049 of file heur_alns.c.
References DECL_CHANGESUBSCIP, FALSE, MAX, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsBasicLinear(), SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetNBinVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPinfinity(), SCIPisEQ(), SCIPreleaseCons(), and TRUE.
Referenced by DECL_CHANGESUBSCIP(), and DECL_VARFIXINGS().
|
static |
callback for local branching subproblem changes
Definition at line 3113 of file heur_alns.c.
References addLocalBranchingConstraint(), DECL_CHANGESUBSCIP, SCIP_CALL, SCIP_OKAY, and SCIPgetNBinVars().
|
static |
callback for proximity subproblem changes
Definition at line 3123 of file heur_alns.c.
References DECL_CHANGESUBSCIP, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgVarObj(), SCIPgetBestSol(), SCIPgetSolVal(), SCIPgetVarsData(), and TRUE.
|
static |
callback for zeroobjective subproblem changes
Definition at line 3166 of file heur_alns.c.
References computeIntegerVariableBoundsDins(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPchgVarObj(), SCIPgetNObjVars(), SCIPgetVarsData(), and TRUE.
|
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 3194 of file heur_alns.c.
References DECL_VARFIXINGS, MAX, REALABS, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetBestSol(), SCIPgetSolVal(), SCIPisFeasEQ(), SCIPvarGetLbGlobal(), SCIPvarGetLPSol(), SCIPvarGetType(), and SCIPvarGetUbGlobal().
Referenced by DECL_CHANGESUBSCIP(), and DECL_VARFIXINGS().
|
static |
callback to collect variable fixings of DINS
Definition at line 3269 of file heur_alns.c.
References BMScopyMemoryArray, computeIntegerVariableBoundsDins(), Nh::data, DECL_CHANGESUBSCIP, Nh::dins, fixMatchingSolutionValues(), NH_Stats::nfixings, data_dins::npoolsols, 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, and tryAdd2variableBuffer().
|
static |
callback for DINS subproblem changes
Definition at line 3350 of file heur_alns.c.
References addLocalBranchingConstraint(), computeIntegerVariableBoundsDins(), DECL_NHFREE, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPgetNBinVars(), SCIPgetVarsData(), and TRUE.
|
static |
deinitialization callback for DINS before SCIP is freed
Definition at line 3382 of file heur_alns.c.
References Nh::data, DECL_NHREFSOL, Nh::dins, SCIP_OKAY, and SCIPfreeBlockMemory.
|
static |
callback that returns the incumbent solution as a reference point
Definition at line 3393 of file heur_alns.c.
References DECL_NHDEACTIVATE, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, and SCIPgetBestSol().
|
static |
callback function that deactivates a neighborhood on problems with no discrete variables
Definition at line 3413 of file heur_alns.c.
References DECL_NHDEACTIVATE, SCIP_OKAY, SCIPgetNBinVars(), and SCIPgetNIntVars().
|
static |
callback function that deactivates a neighborhood on problems with no binary variables
Definition at line 3426 of file heur_alns.c.
References DECL_NHDEACTIVATE, SCIP_OKAY, and SCIPgetNBinVars().
|
static |
callback function that deactivates a neighborhood on problems with no objective variables
Definition at line 3439 of file heur_alns.c.
References includeNeighborhoods(), SCIP_OKAY, and SCIPgetNObjVars().
|
static |
include all neighborhoods
scip | SCIP data structure |
heurdata | heuristic data of the ALNS heuristic |
Definition at line 3453 of file heur_alns.c.
References alnsIncludeNeighborhood(), 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_ZEROOBJECTIVE, DEFAULT_MAXFIXINGRATE_CROSSOVER, DEFAULT_MAXFIXINGRATE_DINS, DEFAULT_MAXFIXINGRATE_LOCALBRANCHING, DEFAULT_MAXFIXINGRATE_MUTATION, DEFAULT_MAXFIXINGRATE_PROXIMITY, DEFAULT_MAXFIXINGRATE_RENS, DEFAULT_MAXFIXINGRATE_RINS, 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_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_ZEROOBJECTIVE, Nh::dins, data_dins::npoolsols, data_crossover::nsols, data_crossover::rng, SCIP_CALL, SCIP_DECL_HEURINIT(), SCIP_OKAY, SCIPaddIntParam(), SCIPallocBlockMemory, and TRUE.
Referenced by DECL_NHDEACTIVATE(), and SCIPincludeHeurAlns().
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 3531 of file heur_alns.c.
References DEFAULT_REWARDFILENAME, Nh::fixingrate, neighborhoodInit(), neighborhoodStatsReset(), resetFixingRate(), SCIP_CALL, SCIP_DECL_HEURINITSOL(), SCIP_FILECREATEERROR, SCIP_OKAY, SCIPdebugMsg, SCIPerrorMessage, SCIPheurGetData(), and Nh::stats.
Referenced by includeNeighborhoods().
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 3579 of file heur_alns.c.
References Nh::active, createBandit(), resetCurrentNeighborhood(), resetMinimumImprovement(), resetTargetNodeLimit(), SCIP_Bool, SCIP_CALL, SCIP_DECL_HEUREXIT(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbanditGetNActions(), SCIPfreeBandit(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPheurGetData(), SCIPresetBandit(), and SCIPswapPointers().
Referenced by SCIP_DECL_HEURINIT().
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 3659 of file heur_alns.c.
References neighborhoodExit(), SCIP_CALL, SCIP_DECL_HEURFREE(), SCIP_OKAY, and SCIPheurGetData().
Referenced by SCIP_DECL_HEURINITSOL().
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 3690 of file heur_alns.c.
References alnsFreeNeighborhood(), NNEIGHBORHOODS, SCIP_CALL, SCIP_DECL_TABLEOUTPUT(), SCIP_OKAY, SCIPfreeBandit(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, and SCIPheurGetData().
Referenced by SCIP_DECL_HEUREXIT().
|
static |
output method of statistics table to output file stream 'file'
Definition at line 3722 of file heur_alns.c.
References HEUR_NAME, printNeighborhoodStatistics(), SCIP_OKAY, SCIPfindHeur(), SCIPheurGetData(), and SCIPincludeHeurAlns().
Referenced by SCIP_DECL_HEURFREE().