TSP_Param.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TSP_PARAM_INCLUDED
00014 #define TSP_PARAM_INCLUDED
00015
00016
00017 #include "UtilParameters.h"
00018
00019
00029
00030 class TSP_Param{
00031 public:
00032 int LogLevel;
00033 string DataDir;
00034 string Instance;
00035 int CutSubtoursX;
00036
00037
00038 string ModelNameCore;
00039 string ModelNameRelax;
00040
00041
00042 public:
00043 void getSettings(UtilParameters & utilParam){
00044 static const char * common = "TSP";
00045 LogLevel = utilParam.GetSetting("LogLevel", 0, common);
00046 DataDir = utilParam.GetSetting("DataDir", "", common);
00047 Instance = utilParam.GetSetting("Instance", "", common);
00048 CutSubtoursX = utilParam.GetSetting("CutSubtoursX", 1, common);
00049
00050
00051 ModelNameCore = utilParam.GetSetting("ModelNameCore", "2MATCH",
00052 common);
00053 ModelNameRelax = utilParam.GetSetting("ModelNameRelax", "SUBTOUR",
00054 common);
00055 }
00056
00057 void dumpSettings(ostream * os = &cout){
00058 static const char * common = "TSP";
00059 (*os) << "\n=====================================================\n"
00060 << "TSP_DECOMP PARAMETER SETTINGS \n";
00061 (*os) << common << ": LogLevel : " << LogLevel << endl;
00062 (*os) << common << ": DataDir : " << DataDir << endl;
00063 (*os) << common << ": Instance : " << Instance << endl;
00064 (*os) << common << ": CutSubtoursX : " << CutSubtoursX << endl;
00065
00066
00067 (*os) << common << ": ModelNameCore : " << ModelNameCore << endl;
00068 (*os) << common << ": ModelNameRelax: " << ModelNameRelax << endl;
00069 (*os) << "=====================================================\n";
00070 }
00071
00072 public:
00073 TSP_Param():
00074 LogLevel (0 ),
00075 DataDir ("."),
00076 Instance ("" ),
00077 CutSubtoursX (1 ),
00078
00079
00080 ModelNameCore ("2MATCH"),
00081 ModelNameRelax("SUBTOUR")
00082
00083 {}
00084 ~TSP_Param() {};
00085 };
00086
00087 #endif