OSDipParam.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-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 #ifndef OSDIPPARAM_H
14 #define OSDIPPARAM_H
15 
16 //===========================================================================//
17 #include "UtilParameters.h"
18 
19 //===========================================================================//
30 //===========================================================================//
31 class OSDipParam {
32 
33 
34 
35 public:
36  int LogLevel;
37  std::string DataDir;
38  std::string OSiLFile;
39  std::string OSoLFile;
40  std::string solverFactory;
41  int UseNames; //col/row names for debugging
42  int UseSparse; //create all blocks sparsely
43  int FullModel; //create full model for CPM or direct
44  double BestKnownLB;
45  double BestKnownUB;
46  double ColumnUB; //hack since missing extreme rays
47  double ColumnLB; //hack since missing extreme rays
48  //=1 if all master-only vars in one block
49  //=0 if one block per master-only var
50  //int MasterOnlyOneBlock;
51 
52 public:
53  void getSettings(UtilParameters & utilParam){
54  static const char * common ="OSDip";
55  LogLevel = utilParam.GetSetting("LogLevel", 3, common);
56  DataDir = utilParam.GetSetting("DataDir", "", common);
57  OSiLFile = utilParam.GetSetting("OSiLFile", "", common);
58  OSoLFile = utilParam.GetSetting("OSoLFile", "", common);
59  solverFactory = utilParam.GetSetting("solverFactory", "", common);
60  UseNames = utilParam.GetSetting("UseNames", 0, common);
61  UseSparse = utilParam.GetSetting("UseSparse", 0, common);
62  FullModel = utilParam.GetSetting("FullModel", 0, common);
63  BestKnownLB = utilParam.GetSetting("BestKnownLB", -1.e100, common);
64  BestKnownUB = utilParam.GetSetting("BestKnownUB", 1.e100, common);
65  ColumnUB = utilParam.GetSetting("ColumnUB", 1.0, common);
66  ColumnLB = utilParam.GetSetting("ColumnLB", 0.0, common);
67 
68  }
69 
70  void dumpSettings(std::ostream * os = &std::cout){
71  static const char * common = "OSDip";
72  (*os) << "\n=====================================================\n"
73  << "OSDipParam PARAMETER SETTINGS \n";
74  (*os) << common << ": LogLevel : " << LogLevel << std::endl;
75  (*os) << common << ": DataDir : " << DataDir << std::endl;
76  (*os) << common << ": OSiLFile : " << OSiLFile << std::endl;
77  (*os) << common << ": OSoLFile : " << OSoLFile << std::endl;
78  (*os) << common << ": solverFactory : " << solverFactory << std::endl;
79  (*os) << common << ": UseNames : " << UseNames << std::endl;
80  (*os) << common << ": UseSparse : " << UseSparse << std::endl;
81  (*os) << common << ": FullModel : " << FullModel << std::endl;
82  (*os) << common << ": BestKnownLB : " << BestKnownLB << std::endl;
83  (*os) << common << ": BestKnownUB : " << BestKnownUB << std::endl;
84  (*os) << common << ": ColumnUB : " << ColumnUB << std::endl;
85  (*os) << common << ": ColumnLB : " << ColumnLB << std::endl;
86 
87  (*os) << "\n=====================================================\n";
88  }
89 
90 public:
92  LogLevel (3 ),
93  DataDir (""),
94  OSiLFile (""),
95  OSoLFile (""),
96  solverFactory (""),
97  UseNames (0),
98  UseSparse (1),
99  FullModel (0),
100  BestKnownLB (-1.e100),
101  BestKnownUB ( 1.e100),
102  ColumnUB ( 1.0),
103  ColumnLB (0.0)
104 
105 {};
107 
108 };
109 
110 #endif
void getSettings(UtilParameters &utilParam)
Definition: OSDipParam.h:53
int FullModel
Definition: OSDipParam.h:43
void dumpSettings(std::ostream *os=&std::cout)
Definition: OSDipParam.h:70
double BestKnownLB
Definition: OSDipParam.h:44
int UseNames
Definition: OSDipParam.h:41
int LogLevel
Definition: OSDipParam.h:36
std::string solverFactory
Definition: OSDipParam.h:40
std::string OSoLFile
Definition: OSDipParam.h:39
double BestKnownUB
Definition: OSDipParam.h:45
double ColumnUB
Definition: OSDipParam.h:46
double ColumnLB
Definition: OSDipParam.h:47
std::string OSiLFile
Definition: OSDipParam.h:38
int UseSparse
Definition: OSDipParam.h:42
std::string DataDir
Definition: OSDipParam.h:37