15 #ifndef MMKP_PARAM_INCLUDED
16 #define MMKP_PARAM_INCLUDED
19 #include "UtilMacros.h"
21 #include "UtilParameters.h"
47 static const char * common =
"MMKP";
48 LogLevel = utilParam.
GetSetting(
"LogLevel", 0, common);
49 DataDir = utilParam.
GetSetting(
"DataDir",
"", common);
50 Instance = utilParam.
GetSetting(
"Instance",
"", common);
51 DataFormat = utilParam.
GetSetting(
"DataFormat",
"", common);
52 ModelNameCore = utilParam.
GetSetting(
"ModelNameCore",
"MDKP0", common);
53 ModelNameRelax = utilParam.
GetSetting(
"ModelNameRelax",
"MCKP0", common);
55 = utilParam.
GetSetting(
"ModelNameRelaxNest",
"", common);
56 UsePisinger = utilParam.
GetSetting(
"UsePisinger",
true, common);
58 throw UtilException(
"Bad Parameter",
"getSettings",
"MMKP_Param");
62 bool optionsOk =
true;
63 if(!(ModelNameCore ==
"MDKP0" ||
64 ModelNameCore ==
"MCP" ||
65 ModelNameCore ==
"MMKPHalf")){
66 cerr <<
"Error: Parameter ModelNameCore = " << ModelNameCore
67 <<
" is not a defined model choice." << endl;
70 if(!(ModelNameRelax ==
"MCKP0" ||
71 ModelNameRelax ==
"MDKP" ||
72 ModelNameRelax ==
"MDKPHalf")){
73 cerr <<
"Error: Parameter ModelNameRelax = " << ModelNameRelax
74 <<
" is not a defined model choice." << endl;
77 if(!(ModelNameRelaxNest ==
"MC2KP0" ||
78 ModelNameRelaxNest ==
"MDKP" ||
79 ModelNameRelaxNest ==
"MMKP" ||
80 ModelNameRelaxNest ==
"")){
81 cerr <<
"Error: Parameter ModelNameRelaxNest = "
83 <<
" is not a defined model choice." << endl;
91 static const char * common =
"MMKP";
92 (*os) <<
"\n=====================================================\n"
93 <<
"MMKP_DECOMP PARAMETER SETTINGS \n";
94 (*os) << common <<
": LogLevel : " << LogLevel << endl;
95 (*os) << common <<
": DataDir : " << DataDir << endl;
96 (*os) << common <<
": Instance : " << Instance << endl;
97 (*os) << common <<
": DataFormat : " << DataFormat << endl;
98 (*os) << common <<
": ModelNameCore : " << ModelNameCore << endl;
99 (*os) << common <<
": ModelNameRelax : " << ModelNameRelax << endl;
100 (*os) << common <<
": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
101 (*os) << common <<
": UsePisinger : " << UsePisinger << endl;
102 (*os) <<
"=====================================================\n";
111 ModelNameCore (
"MDKP0"),
112 ModelNameRelax (
"MCKP0"),
113 ModelNameRelaxNest(
"" ),
114 UsePisinger (true ){}
void getSettings(UtilParameters &utilParam)
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
void dumpSettings(ostream *os=&cout)
string ModelNameRelaxNest
#define UtilException(msg, methodN, classN)