Dip  0.92.4
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 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, and Ted Ralphs//
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 #ifndef VRP_PARAM_INCLUDED
16 #define VRP_PARAM_INCLUDED
17 
18 // --------------------------------------------------------------------- //
19 #include "UtilParameters.h"
20 
21 // --------------------------------------------------------------------- //
28 // --------------------------------------------------------------------- //
29 class VRP_Param{
30 public:
31  int LogLevel; //application log level
32  string DataDir; //data directory
33  string Instance; //name of instance
34  int NumRoutes; //number of routes
35  string ModelNameCore; //name of model core
36  string ModelNameRelax; //name of model relax
37  string ModelNameRelaxNest; //name of nested model relax
38 
39 public:
40  void getSettings(UtilParameters & utilParam){
41  static const char * common = "VRP";
42  LogLevel = utilParam.GetSetting("LogLevel", 0, common);
43  DataDir = utilParam.GetSetting("DataDir", "", common);
44  Instance = utilParam.GetSetting("Instance", "", common);
45  NumRoutes = utilParam.GetSetting("NumRoutes", 1, common);
47  = utilParam.GetSetting("ModelNameCore", "", common);
49  = utilParam.GetSetting("ModelNameRelax", "", common);
51  = utilParam.GetSetting("ModelNameRelaxNest", "", common);
52  }
53 
54  void dumpSettings(ostream * os = &cout){
55  static const char * common = "VRP";
56  (*os) << "\n=====================================================\n"
57  << "VRP_DECOMP PARAMETER SETTINGS \n";
58  (*os) << common << ": LogLevel : " << LogLevel << endl;
59  (*os) << common << ": DataDir : " << DataDir << endl;
60  (*os) << common << ": Instance : " << Instance << endl;
61  (*os) << common << ": NumRoutes : " << NumRoutes << endl;
62  (*os) << common << ": ModelNameCore : " << ModelNameCore << endl;
63  (*os) << common << ": ModelNameRelax : " << ModelNameRelax << endl;
64  (*os) << common << ": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
65  (*os) << "=====================================================\n";
66  }
67 
68 public:
70  LogLevel (0 ),
71  DataDir (""),
72  Instance (""),
73  NumRoutes (0 ),
74  ModelNameCore (""),
75  ModelNameRelax (""),
77  {}
78  ~VRP_Param() {};
79 };
80 
81 #endif
string ModelNameRelaxNest
Definition: VRP_Param.h:37
void getSettings(UtilParameters &utilParam)
Definition: VRP_Param.h:40
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
int LogLevel
Definition: VRP_Param.h:31
VRP_Param()
Definition: VRP_Param.h:69
string ModelNameRelax
Definition: VRP_Param.h:36
~VRP_Param()
Definition: VRP_Param.h:78
string Instance
Definition: VRP_Param.h:33
string DataDir
Definition: VRP_Param.h:32
string ModelNameCore
Definition: VRP_Param.h:35
int NumRoutes
Definition: VRP_Param.h:34
void dumpSettings(ostream *os=&cout)
Definition: VRP_Param.h:54