00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef DECOMP_PARAM_INCLUDED
00014 #define DECOMP_PARAM_INCLUDED
00015
00016 #include "UtilParameters.h"
00017 #include "DecompConstants.h"
00018
00019
00020 class DecompParam {
00021 private:
00022 DecompParam(const DecompParam&);
00023 DecompParam& operator=(const DecompParam&);
00024
00025 public:
00026
00027 int LogLevel;
00028 int LogAppLevel;
00029 int LogDebugLevel;
00030 int LogLpLevel;
00031 unsigned int LimitInitVars;
00032 double TolZero;
00033 int LimitTotalCutIters;
00034 int LimitTotalPriceIters;
00035 int LimitRoundCutIters;
00036 int LimitRoundPriceIters;
00037 double LimitTime;
00038 int PriceMultiPoly;
00039 int CutDC;
00040 int CutCGL;
00041
00042 int CutCglKnapC;
00043 int CutCglFlowC;
00044 int CutCglMir;
00045 int CutCglClique;
00046
00047 public:
00048 void getSettings(UtilParameters& utilParam) {
00049 static const char* common = "DECOMP";
00050 LogLevel = utilParam.GetSetting("LogLevel", 0, common);
00051 LogAppLevel = utilParam.GetSetting("LogAppLevel", 0, common);
00052 LogDebugLevel = utilParam.GetSetting("LogDebugLevel", 0, common);
00053 LogLpLevel = utilParam.GetSetting("LogLpLevel", 0, common);
00054 LimitInitVars = utilParam.GetSetting("LimitInitVars", 1, common);
00055 TolZero = utilParam.GetSetting("TolZero",
00056 DecompEpsilon, common);
00057 LimitTotalCutIters = utilParam.GetSetting("LimitTotalCutIters",
00058 2000, common);
00059 LimitTotalPriceIters = utilParam.GetSetting("LimitTotalPriceIters",
00060 2000, common);
00061 LimitRoundCutIters = utilParam.GetSetting("LimitRoundCutIters",
00062 2000, common);
00063 LimitRoundPriceIters = utilParam.GetSetting("LimitRoundPriceIters",
00064 2000, common);
00065 LimitTime = utilParam.GetSetting("LimitTime",
00066 600, common);
00067
00068 PriceMultiPoly = utilParam.GetSetting("PriceMultiPoly",
00069 0, common);
00070 CutDC = utilParam.GetSetting("CutDC",
00071 0, common);
00072 CutCGL = utilParam.GetSetting("CutCGL",
00073 0, common);
00074 CutCglKnapC = utilParam.GetSetting("CutCglKnapC",
00075 0, common);
00076 CutCglFlowC = utilParam.GetSetting("CutCglFlowC",
00077 0, common);
00078 CutCglMir = utilParam.GetSetting("CutCglMir",
00079 0, common);
00080 CutCglClique = utilParam.GetSetting("CutCglClique",
00081 0, common);
00082 }
00083
00084
00085
00086 void dumpSettings(ostream* os = &cout) {
00087 static const char* common = "DECOMP";
00088 (*os) << "\n========================================================\n"
00089 << "DECOMP PARAMETER SETTINGS \n";
00090 (*os) << common << ": LogLevel = " << LogLevel << endl;
00091 (*os) << common << ": LogAppLevel = " << LogAppLevel << endl;
00092 (*os) << common << ": LogDebugLevel = " << LogDebugLevel << endl;
00093 (*os) << common << ": LogLpLevel = " << LogLpLevel << endl;
00094 (*os) << common << ": LimitInitVars = " << LimitInitVars << endl;
00095 (*os) << common << ": TolZero = " << TolZero << endl;
00096 (*os) << common << ": LimitTotalCutIters = "
00097 << LimitTotalCutIters << endl;
00098 (*os) << common << ": LimitTotalPriceIters = "
00099 << LimitTotalPriceIters << endl;
00100 (*os) << common << ": LimitRoundCutIters = "
00101 << LimitRoundCutIters << endl;
00102 (*os) << common << ": LimitRoundPriceIters = "
00103 << LimitRoundPriceIters << endl;
00104 (*os) << common << ": PriceMultiPoly= " << PriceMultiPoly << endl;
00105 (*os) << common << ": CutDC = " << CutDC << endl;
00106 (*os) << common << ": CutCGL = " << CutCGL << endl;
00107 (*os) << common << ": CutCglKnapC = " << CutCglKnapC << endl;
00108 (*os) << common << ": CutCglFlowC = " << CutCglFlowC << endl;
00109 (*os) << common << ": CutCglMir = " << CutCglMir << endl;
00110 (*os) << common << ": CutCglClique = " << CutCglClique << endl;
00111 (*os) << "========================================================\n";
00112 }
00113
00114 public:
00115 DecompParam():
00116 LogLevel(0),
00117 LogAppLevel(0),
00118 LogDebugLevel(0),
00119 LogLpLevel(0),
00120 LimitInitVars(1),
00121 TolZero(DecompEpsilon),
00122 LimitTotalCutIters(2000),
00123 LimitTotalPriceIters(2000),
00124 LimitRoundCutIters(2000),
00125 LimitRoundPriceIters(2000),
00126 LimitTime(60),
00127 PriceMultiPoly(0),
00128 CutDC(0),
00129 CutCGL(0),
00130 CutCglKnapC(0),
00131 CutCglFlowC(0),
00132 CutCglMir(0),
00133 CutCglClique(0)
00134 {}
00135
00136 ~DecompParam() {};
00137 };
00138
00139 #endif