Dip-All  0.91.0
TSP_Param.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, Lehigh University //
8 // //
9 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 #ifndef TSP_PARAM_INCLUDED
14 #define TSP_PARAM_INCLUDED
15 
16 // --------------------------------------------------------------------- //
17 #include "UtilParameters.h"
18 
19 // --------------------------------------------------------------------- //
29 // --------------------------------------------------------------------- //
30 class TSP_Param{
31 public:
32  int LogLevel;
33  string DataDir;
34  string Instance;
36  //int CutBlossomsX;
37  //int CutCombsX;
38  string ModelNameCore; //name of model core
39  string ModelNameRelax; //name of model relax
40 
41 
42 public:
43  void getSettings(UtilParameters & utilParam){
44  static const char * common = "TSP";
45  LogLevel = utilParam.GetSetting("LogLevel", 0, common);
46  DataDir = utilParam.GetSetting("DataDir", "", common);
47  Instance = utilParam.GetSetting("Instance", "", common);
48  CutSubtoursX = utilParam.GetSetting("CutSubtoursX", 1, common);
49  //CutBlossomsX = utilParam.GetSetting("CutBlossomsX", 1, common);
50  //CutCombsX = utilParam.GetSetting("CutCombsX", 1, common);
51  ModelNameCore = utilParam.GetSetting("ModelNameCore", "2MATCH",
52  common);
53  ModelNameRelax = utilParam.GetSetting("ModelNameRelax", "SUBTOUR",
54  common);
55  }
56 
57  void dumpSettings(ostream * os = &cout){
58  static const char * common = "TSP";
59  (*os) << "\n=====================================================\n"
60  << "TSP_DECOMP PARAMETER SETTINGS \n";
61  (*os) << common << ": LogLevel : " << LogLevel << endl;
62  (*os) << common << ": DataDir : " << DataDir << endl;
63  (*os) << common << ": Instance : " << Instance << endl;
64  (*os) << common << ": CutSubtoursX : " << CutSubtoursX << endl;
65  //(*os) << common << ": CutBlossomsX : " << CutBlossomsX << endl;
66  //(*os) << common << ": CutCombsX : " << CutCombsX << endl;
67  (*os) << common << ": ModelNameCore : " << ModelNameCore << endl;
68  (*os) << common << ": ModelNameRelax: " << ModelNameRelax << endl;
69  (*os) << "=====================================================\n";
70  }
71 
72 public:
74  LogLevel (0 ),
75  DataDir ("."),
76  Instance ("" ),
77  CutSubtoursX (1 ),
78  //CutBlossomsX (0 ),
79  //CutCombsX (0 ),
80  ModelNameCore ("2MATCH"),
81  ModelNameRelax("SUBTOUR")
82 
83  {}
84  ~TSP_Param() {};
85 };
86 
87 #endif
void getSettings(UtilParameters &utilParam)
Definition: TSP_Param.h:43
int LogLevel
Definition: TSP_Param.h:32
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
void dumpSettings(ostream *os=&cout)
Definition: TSP_Param.h:57
string Instance
Definition: TSP_Param.h:34
TSP_Param()
Definition: TSP_Param.h:73
string ModelNameRelax
Definition: TSP_Param.h:39
string ModelNameCore
Definition: TSP_Param.h:38
~TSP_Param()
Definition: TSP_Param.h:84
string DataDir
Definition: TSP_Param.h:33
int CutSubtoursX
Definition: TSP_Param.h:35