PrintParameters.c
Go to the documentation of this file.
1 #include "LKH.h"
2 
3 /*
4  * The PrintParameters function prints the problem parameters to
5  * standard output.
6 */
7 
9 {
10  int i;
11 
12  printff("ASCENT_CANDIDATES = %d\n", AscentCandidates);
13  printff("BACKBONE_TRIALS = %d\n", BackboneTrials);
14  printff("BACKTRACKING = %s\n", Backtracking ? "YES" : "NO");
15  if (CandidateFiles == 0)
16  printff("# CANDIDATE_FILE =\n");
17  else
18  for (i = 0; i < CandidateFiles; i++)
19  printff("CANDIDATE_FILE = %s\n", CandidateFileName[i]);
20  printff("CANDIDATE_SET_TYPE = %s%s\n",
21  CandidateSetType == ALPHA ? "ALPHA" :
22  CandidateSetType == DELAUNAY ? "DELAUNAY" :
23  CandidateSetType == NN ? "NEAREST-NEIGHBOR" :
24  CandidateSetType == QUADRANT ? "QUADRANT" : "",
25  DelaunayPure ? " PURE" : "");
26  if (Excess >= 0)
27  printff("EXCESS = %g\n", Excess);
28  else
29  printff("# EXCESS =\n");
30  printff("EXTRA_CANDIDATES = %d %s\n",
32  ExtraCandidateSetSymmetric ? "SYMMETRIC" : "");
33  printff("EXTRA_CANDIDATE_SET_TYPE = %s\n",
34  ExtraCandidateSetType == NN ? "NEAREST-NEIGHBOR" :
35  ExtraCandidateSetType == QUADRANT ? "QUADRANT" : "");
36  printff("GAIN23 = %s\n", Gain23Used ? "YES" : "NO");
37  printff("GAIN_CRITERION = %s\n", GainCriterionUsed ? "YES" : "NO");
38  if (InitialPeriod >= 0)
39  printff("INITIAL_PERIOD = %d\n", InitialPeriod);
40  else
41  printff("# INITIAL_PERIOD =\n");
42  printff("INITIAL_STEP_SIZE = %d\n", InitialStepSize);
43  printff("INITIAL_TOUR_ALGORITHM = %s\n",
44  InitialTourAlgorithm == BORUVKA ? "BORUVKA" :
45  InitialTourAlgorithm == GREEDY ? "GREEDY" :
46  InitialTourAlgorithm == MOORE ? "MOORE" :
47  InitialTourAlgorithm == NEAREST_NEIGHBOR ? "NEAREST-NEIGHBOR" :
49  QUICK_BORUVKA ? "QUICK-BORUVKA" :
50  InitialTourAlgorithm == SIERPINSKI ? "SIERPINSKI" : "WALK");
51  printff("%sINITIAL_TOUR_FILE = %s\n",
52  InitialTourFileName ? "" : "# ",
54  printff("INITIAL_TOUR_FRACTION = %0.3f\n", InitialTourFraction);
55  printff("%sINPUT_TOUR_FILE = %s\n",
56  InputTourFileName ? "" : "# ",
58  printff("KICK_TYPE = %d\n", KickType);
59  printff("KICKS = %d\n", Kicks);
60  if (MaxBreadth == INT_MAX)
61  printff("# MAX_BREADTH =\n");
62  else
63  printff("MAX_BREADTH = %d\n", MaxBreadth);
64  printff("MAX_CANDIDATES = %d %s\n",
65  MaxCandidates, CandidateSetSymmetric ? "SYMMETRIC" : "");
66  if (MaxSwaps >= 0)
67  printff("MAX_SWAPS = %d\n", MaxSwaps);
68  else
69  printff("# MAX_SWAPS =\n");
70  if (MaxTrials >= 0)
71  printff("MAX_TRIALS = %d\n", MaxTrials);
72  else
73  printff("# MAX_TRIALS =\n");
74  if (MergeTourFiles == 0)
75  printff("# MERGE_TOUR_FILE =\n");
76  else
77  for (i = 0; i < MergeTourFiles; i++)
78  printff("MERGE_TOUR_FILE = %s\n", MergeTourFileName[i]);
79  printff("MOVE_TYPE = %d\n", MoveType);
80  printff("%sNONSEQUENTIAL_MOVE_TYPE = %d\n",
81  PatchingA > 1 ? "" : "# ", NonsequentialMoveType);
82  if (Optimum == MINUS_INFINITY)
83  printff("# OPTIMUM =\n");
84  else
85  printff("OPTIMUM = " GainFormat "\n", Optimum);
86  printff("%sOUTPUT_TOUR_FILE = %s\n",
87  OutputTourFileName ? "" : "# ",
89  printff("PATCHING_A = %d %s\n", PatchingA,
90  PatchingARestricted ? "RESTRICTED" :
91  PatchingAExtended ? "EXTENDED" : "");
92  printff("PATCHING_C = %d %s\n", PatchingC,
93  PatchingCRestricted ? "RESTRICTED" :
94  PatchingCExtended ? "EXTENDED" : "");
95  printff("%sPI_FILE = %s\n",
96  PiFileName ? "" : "# ", PiFileName ? PiFileName : "");
97  if (MaxPopulationSize == 0)
98  printff("# ");
99  printff("POPULATION_SIZE = %d\n", MaxPopulationSize);
100  printff("PRECISION = %d\n", Precision);
101  printff("%sPROBLEM_FILE = %s\n",
102  ProblemFileName ? "" : "# ",
104  printff("RESTRICTED_SEARCH = %s\n", RestrictedSearch ? "YES" : "NO");
105  printff("RUNS = %d\n", Runs);
106  printff("SEED = %u\n", Seed);
107  printff("STOP_AT_OPTIMUM = %s\n", StopAtOptimum ? "YES" : "NO");
108  printff("SUBGRADIENT = %s\n", Subgradient ? "YES" : "NO");
109  if (SubproblemSize == 0)
110  printff("# SUBPROBLEM_SIZE =\n");
111  else
112  printff("SUBPROBLEM_SIZE = %d%s%s%s\n", SubproblemSize,
113  DelaunayPartitioning ? " DELAUNAY" :
114  KarpPartitioning ? " KARP" :
115  KCenterPartitioning ? " K-CENTER" :
116  KMeansPartitioning ? " K-MEANS" :
117  MoorePartitioning ? " MOORE" :
118  RohePartitioning ? " ROHE" :
119  SierpinskiPartitioning ? " SIERPINSKI" : "",
120  SubproblemBorders ? " BORDERS" : "",
121  SubproblemsCompressed ? " COMPRESSED" : "");
122  printff("%sSUBPROBLEM_TOUR_FILE = %s\n",
123  SubproblemTourFileName ? "" : "# ",
125  printff("SUBSEQUENT_MOVE_TYPE = %d\n",
127  printff("SUBSEQUENT_PATCHING = %s\n",
128  SubsequentPatching ? "YES" : "NO");
129  if (TimeLimit == DBL_MAX)
130  printff("# TIME_LIMIT =\n");
131  else
132  printff("TIME_LIMIT = %0.1f\n", TimeLimit);
133  printff("%sTOUR_FILE = %s\n",
134  TourFileName ? "" : "# ", TourFileName ? TourFileName : "");
135  printff("TRACE_LEVEL = %d\n\n", TraceLevel);
136 }
char * ProblemFileName
Definition: LKH.h:284
Definition: LKH.h:51
int Gain23Used
Definition: LKH.h:206
int NonsequentialMoveType
Definition: LKH.h:237
double InitialTourFraction
Definition: LKH.h:212
int MaxSwaps
Definition: LKH.h:227
int ExtraCandidateSetType
Definition: LKH.h:290
int SubsequentMoveType
Definition: LKH.h:265
char * SubproblemTourFileName
Definition: LKH.h:284
int CandidateSetSymmetric
Definition: LKH.h:290
int Precision
Definition: LKH.h:249
int SubproblemSize
Definition: LKH.h:264
int KMeansPartitioning
Definition: LKH.h:290
int Kicks
Definition: LKH.h:216
int GainCriterionUsed
Definition: LKH.h:207
void printff(char *fmt,...)
Definition: printff.c:10
int SubproblemBorders
Definition: LKH.h:290
int MaxCandidates
Definition: LKH.h:224
int RohePartitioning
Definition: LKH.h:290
int KCenterPartitioning
Definition: LKH.h:290
int KickType
Definition: LKH.h:217
#define MINUS_INFINITY
Definition: GainType.h:21
int DelaunayPartitioning
Definition: LKH.h:290
int PatchingAExtended
Definition: LKH.h:290
GainType Optimum
Definition: LKH.h:241
int MaxBreadth
Definition: LKH.h:221
int SubproblemsCompressed
Definition: LKH.h:290
int MaxTrials
Definition: LKH.h:230
char * OutputTourFileName
Definition: LKH.h:284
int MergeTourFiles
Definition: LKH.h:231
double Excess
Definition: LKH.h:192
int PatchingA
Definition: LKH.h:245
Definition: LKH.h:53
int ExtraCandidates
Definition: LKH.h:196
int DelaunayPure
Definition: LKH.h:290
int RestrictedSearch
Definition: LKH.h:253
Definition: LKH.h:52
int MoorePartitioning
Definition: LKH.h:290
int TraceLevel
Definition: LKH.h:274
Definition: LKH.h:51
Definition: LKH.h:51
char * PiFileName
Definition: LKH.h:284
int Subgradient
Definition: LKH.h:262
int MaxPopulationSize
Definition: LKH.h:229
int PatchingC
Definition: LKH.h:247
int KarpPartitioning
Definition: LKH.h:290
unsigned Seed
Definition: LKH.h:259
int Runs
Definition: LKH.h:258
char * TourFileName
Definition: LKH.h:284
int StopAtOptimum
Definition: LKH.h:260
int InitialTourAlgorithm
Definition: LKH.h:290
double TimeLimit
Definition: LKH.h:273
int AscentCandidates
Definition: LKH.h:174
int SierpinskiPartitioning
Definition: LKH.h:290
Definition: LKH.h:52
int PatchingARestricted
Definition: LKH.h:290
int InitialStepSize
Definition: LKH.h:211
char ** MergeTourFileName
Definition: LKH.h:284
int Backtracking
Definition: LKH.h:177
void PrintParameters()
int PatchingCRestricted
Definition: LKH.h:290
Definition: LKH.h:51
int SubsequentPatching
Definition: LKH.h:269
#define GainFormat
Definition: GainType.h:22
int CandidateFiles
Definition: LKH.h:188
char * InitialTourFileName
Definition: LKH.h:284
char * InputTourFileName
Definition: LKH.h:284
char ** CandidateFileName
Definition: LKH.h:284
int MoveType
Definition: LKH.h:232
int InitialPeriod
Definition: LKH.h:210
int ExtraCandidateSetSymmetric
Definition: LKH.h:290
int CandidateSetType
Definition: LKH.h:290
int BackboneTrials
Definition: LKH.h:176
Definition: LKH.h:52
int PatchingCExtended
Definition: LKH.h:290


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