LKH.h
Go to the documentation of this file.
1 #ifndef _LKH_H
2 #define _LKH_H
3 
4 /*
5  * This header is used by almost all functions of the program. It defines
6  * macros and specifies data structures and function prototypes.
7  */
8 
9 #undef NDEBUG
10 #include <assert.h>
11 #include <ctype.h>
12 #include <float.h>
13 #include <limits.h>
14 #include <math.h>
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <string.h>
18 #include <time.h>
19 #include "GainType.h"
20 
21 /* Macro definitions */
22 
23 #define Fixed(a, b) ((a)->FixedTo1 == (b) || (a)->FixedTo2 == (b))
24 #define FixedOrCommon(a, b) (Fixed(a, b) || IsCommonEdge(a, b))
25 #define InBestTour(a, b) ((a)->BestSuc == (b) || (b)->BestSuc == (a))
26 #define InNextBestTour(a, b)\
27  ((a)->NextBestSuc == (b) || (b)->NextBestSuc == (a))
28 #define InInputTour(a, b) ((a)->InputSuc == (b) || (b)->InputSuc == (a))
29 #define InInitialTour(a, b)\
30  ((a)->InitialSuc == (b) || (b)->InitialSuc == (a))
31 #define Near(a, b)\
32  ((a)->BestSuc ? InBestTour(a, b) : (a)->Dad == (b) || (b)->Dad == (a))
33 
34 #define Link(a, b) { ((a)->Suc = (b))->Pred = (a); }
35 #define Follow(b, a)\
36  { Link((b)->Pred, (b)->Suc); Link(b, b); Link(b, (a)->Suc); Link(a, b); }
37 #define Precede(a, b)\
38  { Link((a)->Pred, (a)->Suc); Link(a, a); Link((b)->Pred, a); Link(a, b); }
39 #define SLink(a, b) { (a)->Suc = (b); (b)->Pred = (a); }
40 
41 enum Types { TSP, ATSP, SOP, HCP, CVRP, TOUR, HPP, GTSP, AGTSP };
46 };
50 };
54 };
55 
56 typedef struct Node Node;
57 typedef struct Candidate Candidate;
58 typedef struct Cluster Cluster;
59 typedef struct Segment Segment;
60 typedef struct SSegment SSegment;
61 typedef struct SwapRecord SwapRecord;
62 typedef Node *(*MoveFunction) (Node * t1, Node * t2, GainType * G0,
63  GainType * Gain);
64 typedef int (*CostFunction) (Node * Na, Node * Nb);
65 
66 /* The Node structure is used to represent nodes (cities) of the problem */
67 
68 struct Node {
69  int Id; /* Number of the node (1...Dimension) */
70  int Loc; /* Location of the node in the heap
71  (zero, if the node is not in the heap) */
72  int Rank; /* During the ascent, the priority of the node.
73  Otherwise, the ordinal number of the node in
74  the tour */
75  int V; /* During the ascent the degree of the node minus 2.
76  Otherwise, the variable is used to mark nodes */
77  int LastV; /* Last value of V during the ascent */
78  int Cost; /* "Best" cost of an edge emanating from the node */
79  int NextCost; /* During the ascent, the next best cost of an edge
80  emanating from the node */
81  int PredCost, /* The costs of the neighbor edges on the current tour */
82  SucCost;
83  int Pi; /* Pi-value of the node */
84  int BestPi; /* Currently best pi-value found during the ascent */
85  int Beta; /* Beta-value (used for computing alpha-values) */
86  int Subproblem; /* Number of the subproblem the node is part of */
87  int Sons; /* Number of sons in the minimum spanning tree */
88  int *C; /* A row in the cost matrix */
89  Node *Pred, *Suc; /* Predecessor and successor node in
90  the two-way list of nodes */
91  Node *OldPred, *OldSuc; /* Previous values of Pred and Suc */
92  Node *BestSuc, /* Best and next best successor node in the */
93  *NextBestSuc; /* currently best tour */
94  Node *Dad; /* Father of the node in the minimum 1-tree */
95  Node *Nearest; /* Nearest node (used in the greedy heuristics) */
96  Node *Next; /* Auxiliary pointer, usually to the next node in a list
97  of nodes (e.g., the list of "active" nodes) */
98  Node *Prev; /* Auxiliary pointer, usually to the previous node
99  in a list of nodes */
100  Node *Mark; /* Visited mark */
101  Node *FixedTo1, /* Pointers to the opposite end nodes of fixed edges. */
102  *FixedTo2; /* A maximum of two fixed edges can be incident
103  to a node */
104  Node *FixedTo1Saved, /* Saved values of FixedTo1 and FixedTo2 */
105  *FixedTo2Saved;
106  Node *Head; /* Head of a segment of common edges */
107  Node *Tail; /* Tail of a segment of common edges */
108  Node *InputSuc; /* Successor in the INPUT_TOUR file */
109  Node *InitialSuc; /* Successor in the INITIAL_TOUR file */
110  Node *SubproblemPred; /* Predecessor in the SUBPROBLEM_TOUR file */
111  Node *SubproblemSuc; /* Successor in the SUBPROBLEM_TOUR file */
112  Node *SubBestPred; /* The best predecessor node in a subproblem */
113  Node *SubBestSuc; /* The best successor node in a subproblem */
114  Node **MergeSuc; /* Successors in the MERGE_TOUR files */
115  Node *Added1, *Added2; /* Pointers to the opposite end nodes
116  of added edges in a submove */
117  Node *Deleted1, *Deleted2; /* Pointers to the opposite end nodes
118  of deleted edges in a submove */
119  Candidate *CandidateSet; /* Candidate array */
120  Candidate *BackboneCandidateSet; /* Backbone candidate array */
121  Segment *Parent; /* Parent segment of a node when the two-level
122  tree representation is used */
123  double X, Y, Z; /* Coordinates of the node */
124  double Xc, Yc, Zc; /* Converted coordinates */
125  char Axis; /* The axis partitioned when the node is part of a KDTree */
126  char OldPredExcluded, OldSucExcluded; /* Booleans used for indicating
127  whether one (or both) of the
128  adjoining nodes on the old tour
129  has been excluded */
130 };
131 
132 /* The Candidate structure is used to represent candidate edges */
133 
134 struct Candidate {
135  Node *To; /* The end node of the edge */
136  int Cost; /* Cost (distance) of the edge */
137  int Alpha; /* Its alpha-value */
138 };
139 
140 /* The Segment structure is used to represent the segments in the two-level
141  representation of tours */
142 
143 struct Segment {
144  char Reversed; /* Reversal bit */
145  Node *First, *Last; /* First and last node in the segment */
146  Segment *Pred, *Suc; /* Predecessor and successor in the two-way
147  list of segments */
148  int Rank; /* Ordinal number of the segment in the list */
149  int Size; /* Number of nodes in the segment */
150  SSegment *Parent; /* The parent super segment */
151 };
152 
153 struct SSegment {
154  char Reversed; /* Reversal bit */
155  Segment *First, *Last; /* The first and last node in the segment */
156  SSegment *Pred, *Suc; /* The predecessor and successor in the
157  two-way list of super segments */
158  int Rank; /* The ordinal number of the segment in the list */
159  int Size; /* The number of nodes in the segment */
160 };
161 
162 struct Cluster {
165  int Size;
166 };
167 
168 /* The SwapRecord structure is used to record 2-opt moves (swaps) */
169 
170 struct SwapRecord {
171  Node *t1, *t2, *t3, *t4; /* The 4 nodes involved in a 2-opt move */
172 };
173 
174 int AscentCandidates; /* Number of candidate edges to be associated
175  with each node during the ascent */
176 int BackboneTrials; /* Number of backbone trials in each run */
177 int Backtracking; /* Specifies whether backtracking is used for
178  the first move in a sequence of moves */
179 GainType BestCost; /* Cost of the tour in BestTour */
180 int *BestTour; /* Table containing best tour found */
181 GainType BetterCost; /* Cost of the tour stored in BetterTour */
182 int *BetterTour; /* Table containing the currently best tour
183  in a run */
184 int CacheMask; /* Mask for indexing the cache */
185 int *CacheVal; /* Table of cached distances */
186 int *CacheSig; /* Table of the signatures of cached
187  distances */
188 int CandidateFiles; /* Number of CANDIDATE_FILEs */
189 int *CostMatrix; /* Cost matrix */
190 int Dimension; /* Number of nodes in the problem */
191 int DimensionSaved; /* Saved value of Dimension */
192 double Excess; /* Maximum alpha-value allowed for any
193  candidate edge is set to Excess times the
194  absolute value of the lower bound of a
195  solution tour */
196 int ExtraCandidates; /* Number of extra neighbors to be added to
197  the candidate set of each node */
198 Node *FirstActive, *LastActive; /* First and last node in the list
199  of "active" nodes */
201 Node *FirstNode; /* First node in the list of nodes */
202 Segment *FirstSegment; /* A pointer to the first segment in the cyclic
203  list of segments */
204 SSegment *FirstSSegment; /* A pointer to the first super segment in
205  the cyclic list of segments */
206 int Gain23Used; /* Specifies whether Gain23 is used */
207 int GainCriterionUsed; /* Specifies whether L&K's gain criterion is
208  used */
209 int GTSPSets; /* Specifies the number of clusters in a GTSP instance */
210 int InitialPeriod; /* Length of the first period in the ascent */
211 int InitialStepSize; /* Initial step size used in the ascent */
212 double InitialTourFraction; /* Fraction of the initial tour to be
213  constructed by INITIAL_TOUR_FILE edges */
214 char *LastLine; /* Last input line */
215 double LowerBound; /* Lower bound found by the ascent */
216 int Kicks; /* Specifies the number of K-swap-kicks */
217 int KickType; /* Specifies K for a K-swap-kick */
218 int M; /* The M-value is used when solving an ATSP-
219  instance by transforming it to a
220  STSP-instance */
221 int MaxBreadth; /* The maximum number of candidate edges
222  considered at each level of the search for
223  a move */
224 int MaxCandidates; /* Maximum number of candidate edges to be
225  associated with each node */
226 int MaxMatrixDimension; /* Maximum dimension for an explicit cost matrix */
227 int MaxSwaps; /* Maximum number of swaps made during the
228  search for a move */
229 int MaxPopulationSize; /* The maximum size of the population */
230 int MaxTrials; /* Maximum number of trials in each run */
231 int MergeTourFiles; /* Number of MERGE_TOUR_FILEs */
232 int MoveType; /* Specifies the sequantial move type to be used
233  in local search. A value K >= 2 signifies
234  that a k-opt moves are tried for k <= K */
235 Node *NodeSet; /* Array of all nodes */
236 int Norm; /* Measure of a 1-tree's discrepancy from a tour */
237 int NonsequentialMoveType; /* Specifies the nonsequential move type to
238  be used in local search. A value
239  L >= 4 signifies that nonsequential
240  l-opt moves are tried for l <= L */
241 GainType Optimum; /* Known optimal tour length.
242  If StopAtOptimum is 1, a run will be
243  terminated as soon as a tour length
244  becomes equal this value */
245 int PatchingA; /* Specifies the maximum number of alternating
246  cycles to be used for patching disjunct cycles */
247 int PatchingC; /* Specifies the maximum number of disjoint cycles to be
248  patched (by one or more alternating cycles) */
249 int Precision; /* Internal precision in the representation of
250  transformed distances */
251 int PredSucCostAvailable; /* PredCost and SucCost are available */
252 unsigned *Rand; /* Table of random values */
253 int RestrictedSearch; /* Specifies whether the choice of the first
254  edge to be broken is restricted */
255 short Reversed; /* Boolean used to indicate whether a tour has
256  been reversed */
257 int Run; /* Current run number */
258 int Runs; /* Total number of runs */
259 unsigned Seed; /* Initial seed for random number generation */
260 int StopAtOptimum; /* Specifies whether a run will be terminated if
261  the tour length becomes equal to Optimum */
262 int Subgradient; /* Specifies whether the Pi-values should be
263  determined by subgradient optimization */
264 int SubproblemSize; /* Number of nodes in a subproblem */
265 int SubsequentMoveType; /* Specifies the move type to be used for all
266  moves following the first move in a sequence
267  of moves. The value K >= 2 signifies that a
268  K-opt move is to be used */
269 int SubsequentPatching; /* Species whether patching is used for
270  subsequent moves */
271 SwapRecord *SwapStack; /* Stack of SwapRecords */
272 int Swaps; /* Number of swaps made during a tentative move */
273 double TimeLimit; /* The time limit in seconds for each run */
274 int TraceLevel; /* Specifies the level of detail of the output
275  given during the solution process.
276  The value 0 signifies a minimum amount of
277  output. The higher the value is the more
278  information is given */
279 int Trial; /* Ordinal number of the current trial */
280 
281 /* The following variables are read by the functions ReadParameters and
282  ReadProblem: */
283 
298  ProblemType,
301 
306 
307 /* Function prototypes: */
308 
309 int Distance_1(Node * Na, Node * Nb);
310 int Distance_ATSP(Node * Na, Node * Nb);
311 int Distance_ATT(Node * Na, Node * Nb);
312 int Distance_CEIL_2D(Node * Na, Node * Nb);
313 int Distance_CEIL_3D(Node * Na, Node * Nb);
314 int Distance_EXPLICIT(Node * Na, Node * Nb);
315 int Distance_EUC_2D(Node * Na, Node * Nb);
316 int Distance_EUC_3D(Node * Na, Node * Nb);
317 int Distance_GEO(Node * Na, Node * Nb);
318 int Distance_GEOM(Node * Na, Node * Nb);
319 int Distance_GEO_MEEUS(Node * Na, Node * Nb);
320 int Distance_GEOM_MEEUS(Node * Na, Node * Nb);
321 int Distance_MAN_2D(Node * Na, Node * Nb);
322 int Distance_MAN_3D(Node * Na, Node * Nb);
323 int Distance_MAX_2D(Node * Na, Node * Nb);
324 int Distance_MAX_3D(Node * Na, Node * Nb);
325 int Distance_SPECIAL(Node * Na, Node * Nb);
326 int Distance_XRAY1(Node * Na, Node * Nb);
327 int Distance_XRAY2(Node * Na, Node * Nb);
328 
329 int D_EXPLICIT(Node * Na, Node * Nb);
330 int D_FUNCTION(Node * Na, Node * Nb);
331 
332 int C_EXPLICIT(Node * Na, Node * Nb);
333 int C_FUNCTION(Node * Na, Node * Nb);
334 
335 int c_ATT(Node * Na, Node *Nb);
336 int c_CEIL_2D(Node * Na, Node * Nb);
337 int c_CEIL_3D(Node * Na, Node * Nb);
338 int c_EUC_2D(Node * Na, Node * Nb);
339 int c_EUC_3D(Node * Na, Node * Nb);
340 int c_GEO(Node * Na, Node * Nb);
341 int c_GEOM(Node * Na, Node * Nb);
342 int c_GEO_MEEUS(Node * Na, Node * Nb);
343 int c_GEOM_MEEUS(Node * Na, Node * Nb);
344 
345 void AllocateStructures(void);
346 void eprintf(const char *fmt, ...);
347 int fscanint(FILE *f, int *v);
348 double GetTime(void);
349 void InitializeStatistics(void);
350 int IsCandidate(const Node * ta, const Node * tb);
351 void printff(char *fmt, ...);
352 void PrintParameters(void);
353 void PrintStatistics(void);
354 unsigned Random(void);
355 char *ReadLine(FILE * InputFile);
356 void ReadParameters(void);
357 int ReadPenalties(void);
358 void ReadProblem(void);
359 void ReadTour(char * FileName, FILE ** File);
360 void SRandom(unsigned seed);
361 void UpdateStatistics(GainType Cost, double Time);
362 void WriteCandidates(void);
363 void WriteTour(char * FileName, int * Tour, GainType Cost);
364 
365 #endif
Definition: LKH.h:44
int Rank
Definition: LKH.h:148
char * ProblemFileName
Definition: LKH.h:284
EdgeWeightTypes
Definition: LKH.h:43
Segment * FirstSegment
Definition: LKH.h:202
int D_EXPLICIT(Node *Na, Node *Nb)
Node * OldPred
Definition: LKH.h:91
Definition: LKH.h:51
int Trial
Definition: LKH.h:279
int IsCandidate(const Node *ta, const Node *tb)
Definition: IsCandidate.c:10
int Dimension
Definition: LKH.h:190
int Gain23Used
Definition: LKH.h:206
int Alpha
Definition: LKH.h:137
int fscanint(FILE *f, int *v)
Definition: fscanint.c:13
void ReadProblem(void)
Definition: ReadProblem.c:230
int NonsequentialMoveType
Definition: LKH.h:237
int PredSucCostAvailable
Definition: LKH.h:251
FILE * InputTourFile
Definition: LKH.h:302
Definition: LKH.h:41
Node * SubproblemPred
Definition: LKH.h:110
double InitialTourFraction
Definition: LKH.h:212
double Y
Definition: LKH.h:123
Segment * Last
Definition: LKH.h:155
CostFunction D
Definition: LKH.h:304
Node * Added1
Definition: LKH.h:115
void PrintStatistics(void)
Definition: Statistics.c:41
int MaxSwaps
Definition: LKH.h:227
Node * Prev
Definition: LKH.h:98
int ExtraCandidateSetType
Definition: LKH.h:290
Definition: LKH.h:44
int SubsequentMoveType
Definition: LKH.h:265
Definition: LKH.h:53
char * SubproblemTourFileName
Definition: LKH.h:284
Definition: LKH.h:47
int CandidateSetSymmetric
Definition: LKH.h:290
int Precision
Definition: LKH.h:249
Definition: LKH.h:41
int SubproblemSize
Definition: LKH.h:264
Definition: LKH.h:42
Definition: LKH.h:43
int CacheMask
Definition: LKH.h:184
char Reversed
Definition: LKH.h:154
Definition: LKH.h:45
int KMeansPartitioning
Definition: LKH.h:290
int Rank
Definition: LKH.h:72
Definition: LKH.h:45
int GTSPSets
Definition: LKH.h:209
char * LastLine
Definition: LKH.h:214
double Xc
Definition: LKH.h:124
int Kicks
Definition: LKH.h:216
Node * NextBestSuc
Definition: LKH.h:92
SSegment * FirstSSegment
Definition: LKH.h:204
int Subproblem
Definition: LKH.h:86
MoveFunction BestSubsequentMove
Definition: LKH.h:305
int LastV
Definition: LKH.h:77
int GainCriterionUsed
Definition: LKH.h:207
int Beta
Definition: LKH.h:85
int CoordType
Definition: LKH.h:290
void PrintParameters(void)
void printff(char *fmt,...)
Definition: printff.c:10
int Distance_MAN_2D(Node *Na, Node *Nb)
Definition: Distance.c:104
FILE * InitialTourFile
Definition: LKH.h:302
int Distance_GEOM_MEEUS(Node *Na, Node *Nb)
Definition: Distance.c:180
int SubproblemBorders
Definition: LKH.h:290
Node * t4
Definition: LKH.h:171
Node * Tail
Definition: LKH.h:107
Definition: LKH.h:41
Definition: LKH.h:68
Definition: LKH.h:41
int MaxCandidates
Definition: LKH.h:224
Definition: LKH.h:41
Node * Head
Definition: LKH.h:106
int RohePartitioning
Definition: LKH.h:290
int Id
Definition: LKH.h:69
char * EdgeWeightFormat
Definition: LKH.h:288
Definition: LKH.h:44
int WeightType
Definition: LKH.h:290
Definition: LKH.h:45
double X
Definition: LKH.h:123
int c_GEOM_MEEUS(Node *Na, Node *Nb)
Candidate * CandidateSet
Definition: LKH.h:119
EdgeWeightFormats
Definition: LKH.h:47
void WriteCandidates(void)
Definition: LKH.h:43
Definition: LKH.h:41
SSegment * Parent
Definition: LKH.h:150
int Distance_SPECIAL(Node *Na, Node *Nb)
char OldPredExcluded
Definition: LKH.h:126
Types
Definition: LKH.h:41
int BestPi
Definition: LKH.h:84
Definition: LKH.h:162
Definition: LKH.h:48
Definition: LKH.h:44
Node * Deleted2
Definition: LKH.h:117
Candidate * BackboneCandidateSet
Definition: LKH.h:120
Node * Nearest
Definition: LKH.h:95
double Yc
Definition: LKH.h:124
int PredCost
Definition: LKH.h:81
FILE ** MergeTourFile
Definition: LKH.h:302
int KCenterPartitioning
Definition: LKH.h:290
int * CacheSig
Definition: LKH.h:186
Node * FixedTo2
Definition: LKH.h:101
Node *(* MoveFunction)(Node *t1, Node *t2, GainType *G0, GainType *Gain)
Definition: LKH.h:62
int Size
Definition: LKH.h:159
int KickType
Definition: LKH.h:217
Node * SubBestSuc
Definition: LKH.h:113
CostFunction Distance
Definition: LKH.h:304
int * CostMatrix
Definition: LKH.h:189
int DelaunayPartitioning
Definition: LKH.h:290
Segment * Parent
Definition: LKH.h:121
int ReadPenalties(void)
Definition: ReadPenalties.c:19
int PatchingAExtended
Definition: LKH.h:290
SwapRecord * SwapStack
Definition: LKH.h:271
MoveFunction BestMove
Definition: LKH.h:305
Definition: LKH.h:44
int Distance_XRAY2(Node *Na, Node *Nb)
double Z
Definition: LKH.h:123
Definition: LKH.h:44
GainType Optimum
Definition: LKH.h:241
int MaxBreadth
Definition: LKH.h:221
Node * NodeSet
Definition: LKH.h:235
int SubproblemsCompressed
Definition: LKH.h:290
int MaxTrials
Definition: LKH.h:230
double LowerBound
Definition: LKH.h:215
char * OutputTourFileName
Definition: LKH.h:284
int Distance_ATT(Node *Na, Node *Nb)
Definition: Distance.c:24
Definition: LKH.h:47
int MergeTourFiles
Definition: LKH.h:231
Definition: LKH.h:41
Cluster * LastCluster
Definition: LKH.h:200
double Excess
Definition: LKH.h:192
int * CacheVal
Definition: LKH.h:185
int Distance_ATSP(Node *Na, Node *Nb)
Definition: Distance.c:14
int Loc
Definition: LKH.h:70
Definition: LKH.h:153
int Swaps
Definition: LKH.h:272
Node * Pred
Definition: LKH.h:89
Node * Dad
Definition: LKH.h:94
int PatchingA
Definition: LKH.h:245
Definition: LKH.h:53
int Rank
Definition: LKH.h:158
int ExtraCandidates
Definition: LKH.h:196
int c_CEIL_2D(Node *Na, Node *Nb)
Definition: LKH.h:41
int DelaunayPure
Definition: LKH.h:290
Node * InputSuc
Definition: LKH.h:108
int RestrictedSearch
Definition: LKH.h:253
Node * t1
Definition: LKH.h:171
Definition: LKH.h:52
Cluster * Next
Definition: LKH.h:164
Definition: LKH.h:43
int DimensionSaved
Definition: LKH.h:191
Node * Suc
Definition: LKH.h:89
GainType BetterCost
Definition: LKH.h:181
void ReadParameters(void)
Node * SubBestPred
Definition: LKH.h:112
char * DisplayDataType
Definition: LKH.h:288
Node ** MergeSuc
Definition: LKH.h:114
int NextCost
Definition: LKH.h:79
Node * FirstNode
Definition: LKH.h:201
int C_EXPLICIT(Node *Na, Node *Nb)
int Distance_CEIL_3D(Node *Na, Node *Nb)
Definition: Distance.c:36
FILE * ParameterFile
Definition: LKH.h:302
int * BetterTour
Definition: LKH.h:182
int Distance_XRAY1(Node *Na, Node *Nb)
int MoorePartitioning
Definition: LKH.h:290
int Distance_CEIL_2D(Node *Na, Node *Nb)
Definition: Distance.c:30
FILE * TourFile
Definition: LKH.h:302
Definition: LKH.h:143
Node * InitialSuc
Definition: LKH.h:109
int Distance_1(Node *Na, Node *Nb)
Definition: Distance.c:9
void AllocateStructures(void)
int c_EUC_2D(Node *Na, Node *Nb)
void InitializeStatistics(void)
Definition: Statistics.c:7
int TraceLevel
Definition: LKH.h:274
int c_EUC_3D(Node *Na, Node *Nb)
void eprintf(const char *fmt,...)
Definition: eprintf.c:8
Node * To
Definition: LKH.h:135
int c_GEOM(Node *Na, Node *Nb)
double Zc
Definition: LKH.h:124
Definition: LKH.h:51
int * C
Definition: LKH.h:88
Node * Mark
Definition: LKH.h:100
int Cost
Definition: LKH.h:78
Definition: LKH.h:51
char * PiFileName
Definition: LKH.h:284
int Subgradient
Definition: LKH.h:262
int Distance_GEOM(Node *Na, Node *Nb)
Definition: Distance.c:90
FILE * PiFile
Definition: LKH.h:302
Definition: LKH.h:43
Node * Last
Definition: LKH.h:145
int MaxPopulationSize
Definition: LKH.h:229
int Norm
Definition: LKH.h:236
int PatchingC
Definition: LKH.h:247
int V
Definition: LKH.h:75
int KarpPartitioning
Definition: LKH.h:290
SSegment * Suc
Definition: LKH.h:156
unsigned Seed
Definition: LKH.h:259
int c_CEIL_3D(Node *Na, Node *Nb)
int Runs
Definition: LKH.h:258
Node * FirstActive
Definition: LKH.h:198
int Sons
Definition: LKH.h:87
int Distance_GEO_MEEUS(Node *Na, Node *Nb)
Definition: Distance.c:167
char * TourFileName
Definition: LKH.h:284
Node * FixedTo1Saved
Definition: LKH.h:104
int StopAtOptimum
Definition: LKH.h:260
int Run
Definition: LKH.h:257
int Distance_EUC_2D(Node *Na, Node *Nb)
Definition: Distance.c:42
char * ReadLine(FILE *InputFile)
Definition: ReadLine.c:23
Node * Next
Definition: LKH.h:96
void ReadTour(char *FileName, FILE **File)
Definition: ReadProblem.c:1343
int Distance_MAX_3D(Node *Na, Node *Nb)
Definition: Distance.c:122
int SucCost
Definition: LKH.h:81
int InitialTourAlgorithm
Definition: LKH.h:290
Node * BestSuc
Definition: LKH.h:92
char OldSucExcluded
Definition: LKH.h:126
char * Name
Definition: LKH.h:288
int Distance_MAX_2D(Node *Na, Node *Nb)
Definition: Distance.c:115
char * ParameterFileName
Definition: LKH.h:284
int Distance_MAN_3D(Node *Na, Node *Nb)
Definition: Distance.c:109
char * Type
Definition: LKH.h:288
int Size
Definition: LKH.h:165
Cluster * FirstCluster
Definition: LKH.h:200
char * EdgeDataFormat
Definition: LKH.h:288
int ProblemType
Definition: LKH.h:290
double TimeLimit
Definition: LKH.h:273
int Pi
Definition: LKH.h:83
int Cost
Definition: LKH.h:136
Segment * Suc
Definition: LKH.h:146
int AscentCandidates
Definition: LKH.h:174
int SierpinskiPartitioning
Definition: LKH.h:290
int Distance_EUC_3D(Node *Na, Node *Nb)
Definition: Distance.c:48
int c_GEO(Node *Na, Node *Nb)
Definition: LKH.h:52
Node * FixedTo1
Definition: LKH.h:101
Node * OldSuc
Definition: LKH.h:91
Node * Deleted1
Definition: LKH.h:117
int PatchingARestricted
Definition: LKH.h:290
int InitialStepSize
Definition: LKH.h:211
char ** MergeTourFileName
Definition: LKH.h:284
int Backtracking
Definition: LKH.h:177
char Reversed
Definition: LKH.h:144
MoveFunction BacktrackMove
Definition: LKH.h:305
Definition: LKH.h:48
Definition: LKH.h:134
int PatchingCRestricted
Definition: LKH.h:290
FILE * SubproblemTourFile
Definition: LKH.h:302
void WriteTour(char *FileName, int *Tour, GainType Cost)
Definition: WriteTour.c:16
InitialTourAlgorithms
Definition: LKH.h:52
FILE * ProblemFile
Definition: LKH.h:302
char Axis
Definition: LKH.h:125
Definition: LKH.h:47
int WeightFormat
Definition: LKH.h:290
Definition: LKH.h:44
Definition: LKH.h:51
int M
Definition: LKH.h:218
CostFunction c
Definition: LKH.h:304
int SubsequentPatching
Definition: LKH.h:269
double GetTime(void)
Definition: GetTime.c:21
int CandidateFiles
Definition: LKH.h:188
Definition: LKH.h:44
int Distance_GEO(Node *Na, Node *Nb)
Definition: Distance.c:62
int C_FUNCTION(Node *Na, Node *Nb)
int Size
Definition: LKH.h:149
char * InitialTourFileName
Definition: LKH.h:284
int c_ATT(Node *Na, Node *Nb)
char * EdgeWeightType
Definition: LKH.h:288
Definition: LKH.h:41
Node * Added2
Definition: LKH.h:115
Definition: LKH.h:43
int c_GEO_MEEUS(Node *Na, Node *Nb)
void SRandom(unsigned seed)
Definition: Random.c:58
char * InputTourFileName
Definition: LKH.h:284
CandidateSetTypes
Definition: LKH.h:51
Definition: LKH.h:43
Node * t2
Definition: LKH.h:171
Node * FixedTo2Saved
Definition: LKH.h:104
unsigned * Rand
Definition: LKH.h:252
int MaxMatrixDimension
Definition: LKH.h:226
char ** CandidateFileName
Definition: LKH.h:284
int MoveType
Definition: LKH.h:232
int InitialPeriod
Definition: LKH.h:210
int * BestTour
Definition: LKH.h:180
int ExtraCandidateSetSymmetric
Definition: LKH.h:290
long long GainType
Definition: GainType.h:13
void UpdateStatistics(GainType Cost, double Time)
Definition: Statistics.c:20
short Reversed
Definition: LKH.h:255
char * NodeCoordType
Definition: LKH.h:288
Node * LastActive
Definition: LKH.h:198
int Distance_EXPLICIT(Node *Na, Node *Nb)
Definition: Distance.c:54
int CandidateSetType
Definition: LKH.h:290
GainType BestCost
Definition: LKH.h:179
unsigned Random(void)
Definition: Random.c:43
int BackboneTrials
Definition: LKH.h:176
CoordTypes
Definition: LKH.h:42
Definition: LKH.h:52
int PatchingCExtended
Definition: LKH.h:290
int(* CostFunction)(Node *Na, Node *Nb)
Definition: LKH.h:64
Node * SubproblemSuc
Definition: LKH.h:111
int D_FUNCTION(Node *Na, Node *Nb)
Node * First
Definition: LKH.h:163


glkh_solver
Author(s): Francisco Suarez-Ruiz
autogenerated on Mon Jun 10 2019 13:50:26