13 #ifndef MMKP_PARAM_INCLUDED
14 #define MMKP_PARAM_INCLUDED
17 #include "UtilMacros.h"
19 #include "UtilParameters.h"
45 static const char * common =
"MMKP";
46 LogLevel = utilParam.
GetSetting(
"LogLevel", 0, common);
47 DataDir = utilParam.
GetSetting(
"DataDir",
"", common);
48 Instance = utilParam.
GetSetting(
"Instance",
"", common);
49 DataFormat = utilParam.
GetSetting(
"DataFormat",
"", common);
50 ModelNameCore = utilParam.
GetSetting(
"ModelNameCore",
"MDKP0", common);
51 ModelNameRelax = utilParam.
GetSetting(
"ModelNameRelax",
"MCKP0", common);
53 = utilParam.
GetSetting(
"ModelNameRelaxNest",
"", common);
54 UsePisinger = utilParam.
GetSetting(
"UsePisinger",
true, common);
56 throw UtilException(
"Bad Parameter",
"getSettings",
"MMKP_Param");
60 bool optionsOk =
true;
61 if(!(ModelNameCore ==
"MDKP0" ||
62 ModelNameCore ==
"MCP" ||
63 ModelNameCore ==
"MMKPHalf")){
64 cerr <<
"Error: Parameter ModelNameCore = " << ModelNameCore
65 <<
" is not a defined model choice." << endl;
68 if(!(ModelNameRelax ==
"MCKP0" ||
69 ModelNameRelax ==
"MDKP" ||
70 ModelNameRelax ==
"MDKPHalf")){
71 cerr <<
"Error: Parameter ModelNameRelax = " << ModelNameRelax
72 <<
" is not a defined model choice." << endl;
75 if(!(ModelNameRelaxNest ==
"MC2KP0" ||
76 ModelNameRelaxNest ==
"MDKP" ||
77 ModelNameRelaxNest ==
"MMKP" ||
78 ModelNameRelaxNest ==
"")){
79 cerr <<
"Error: Parameter ModelNameRelaxNest = "
81 <<
" is not a defined model choice." << endl;
89 static const char * common =
"MMKP";
90 (*os) <<
"\n=====================================================\n"
91 <<
"MMKP_DECOMP PARAMETER SETTINGS \n";
92 (*os) << common <<
": LogLevel : " << LogLevel << endl;
93 (*os) << common <<
": DataDir : " << DataDir << endl;
94 (*os) << common <<
": Instance : " << Instance << endl;
95 (*os) << common <<
": DataFormat : " << DataFormat << endl;
96 (*os) << common <<
": ModelNameCore : " << ModelNameCore << endl;
97 (*os) << common <<
": ModelNameRelax : " << ModelNameRelax << endl;
98 (*os) << common <<
": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
99 (*os) << common <<
": UsePisinger : " << UsePisinger << endl;
100 (*os) <<
"=====================================================\n";
109 ModelNameCore (
"MDKP0"),
110 ModelNameRelax (
"MCKP0"),
111 ModelNameRelaxNest(
"" ),
112 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)