Dip-All  0.91.0
VRP_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 VRP_PARAM_INCLUDED
14 #define VRP_PARAM_INCLUDED
15 
16 // --------------------------------------------------------------------- //
17 #include "UtilParameters.h"
18 
19 // --------------------------------------------------------------------- //
26 // --------------------------------------------------------------------- //
27 class VRP_Param{
28 public:
29  int LogLevel; //application log level
30  string DataDir; //data directory
31  string Instance; //name of instance
32  int NumRoutes; //number of routes
33  string ModelNameCore; //name of model core
34  string ModelNameRelax; //name of model relax
35  string ModelNameRelaxNest; //name of nested model relax
36 
37 public:
38  void getSettings(UtilParameters & utilParam){
39  static const char * common = "VRP";
40  LogLevel = utilParam.GetSetting("LogLevel", 0, common);
41  DataDir = utilParam.GetSetting("DataDir", "", common);
42  Instance = utilParam.GetSetting("Instance", "", common);
43  NumRoutes = utilParam.GetSetting("NumRoutes", 1, common);
45  = utilParam.GetSetting("ModelNameCore", "", common);
47  = utilParam.GetSetting("ModelNameRelax", "", common);
49  = utilParam.GetSetting("ModelNameRelaxNest", "", common);
50  }
51 
52  void dumpSettings(ostream * os = &cout){
53  static const char * common = "VRP";
54  (*os) << "\n=====================================================\n"
55  << "VRP_DECOMP PARAMETER SETTINGS \n";
56  (*os) << common << ": LogLevel : " << LogLevel << endl;
57  (*os) << common << ": DataDir : " << DataDir << endl;
58  (*os) << common << ": Instance : " << Instance << endl;
59  (*os) << common << ": NumRoutes : " << NumRoutes << endl;
60  (*os) << common << ": ModelNameCore : " << ModelNameCore << endl;
61  (*os) << common << ": ModelNameRelax : " << ModelNameRelax << endl;
62  (*os) << common << ": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
63  (*os) << "=====================================================\n";
64  }
65 
66 public:
68  LogLevel (0 ),
69  DataDir (""),
70  Instance (""),
71  NumRoutes (0 ),
72  ModelNameCore (""),
73  ModelNameRelax (""),
75  {}
76  ~VRP_Param() {};
77 };
78 
79 #endif
string ModelNameRelaxNest
Definition: VRP_Param.h:35
void getSettings(UtilParameters &utilParam)
Definition: VRP_Param.h:38
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
int LogLevel
Definition: VRP_Param.h:29
VRP_Param()
Definition: VRP_Param.h:67
string ModelNameRelax
Definition: VRP_Param.h:34
~VRP_Param()
Definition: VRP_Param.h:76
string Instance
Definition: VRP_Param.h:31
string DataDir
Definition: VRP_Param.h:30
string ModelNameCore
Definition: VRP_Param.h:33
int NumRoutes
Definition: VRP_Param.h:32
void dumpSettings(ostream *os=&cout)
Definition: VRP_Param.h:52