Dip-All  0.91.0
MILP_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 MILP_PARAM_INCLUDED
14 #define MILP_PARAM_INCLUDED
15 
16 //===========================================================================//
17 #include "UtilParameters.h"
18 
19 using namespace std;
20 
21 //===========================================================================//
22 class MILP_Param{
23 public:
24  int LogLevel;
26  double RelaxPercent;
27  double BestKnownLB;
28  double BestKnownUB;
29  string DataDir;
30  string Instance;
31 
32 public:
33  void getSettings(UtilParameters & utilParam){
34  static const char * common = "MILP";
35  LogLevel = utilParam.GetSetting("LogLevel", 0, common);
36  RandomSeed = utilParam.GetSetting("RandomSeed", 1, common);
37  RelaxPercent = utilParam.GetSetting("RelaxPercent", 0.333, common);
38  BestKnownLB = utilParam.GetSetting("BestKnownLB", -1.e100, common);
39  BestKnownUB = utilParam.GetSetting("BestKnownUB", 1.e100, common);
40  DataDir = utilParam.GetSetting("DataDir", "", common);
41  Instance = utilParam.GetSetting("Instance", "", common);
42  }
43 
44  void dumpSettings(ostream * os = &cout){
45  static const char * common = "MILP";
46  (*os) << "\n=====================================================\n"
47  << "MILP_DECOMP PARAMETER SETTINGS \n";
48  (*os) << common << ": LogLevel : " << LogLevel << endl;
49  (*os) << common << ": RandomSeed : " << RandomSeed << endl;
50  (*os) << common << ": RelaxPercent: " << RelaxPercent << endl;
51  (*os) << common << ": BestKnownLB : " << BestKnownLB << endl;
52  (*os) << common << ": BestKnownUB : " << BestKnownUB << endl;
53  (*os) << common << ": DataDir : " << DataDir << endl;
54  (*os) << common << ": Instance : " << Instance << endl;
55  (*os) << "\n=====================================================\n";
56  }
57 
58 public:
60  LogLevel (0 ),
61  RandomSeed (1 ),
62  RelaxPercent(0.333 ),
63  BestKnownLB (-1e100),
64  BestKnownUB ( 1e100),
65  DataDir ("" ),
66  Instance ("" ) {};
68 };
69 
70 #endif
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
double BestKnownUB
Definition: MILP_Param.h:28
string DataDir
Definition: MILP_Param.h:29
int RandomSeed
Definition: MILP_Param.h:25
int LogLevel
Definition: MILP_Param.h:24
void getSettings(UtilParameters &utilParam)
Definition: MILP_Param.h:33
double BestKnownLB
Definition: MILP_Param.h:27
void dumpSettings(ostream *os=&cout)
Definition: MILP_Param.h:44
double RelaxPercent
Definition: MILP_Param.h:26
string Instance
Definition: MILP_Param.h:30