DecompAlgoD.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef DecompAlgoD_h_
00019 #define DecompAlgoD_h_
00020
00021
00027
00028
00029
00030
00031
00032
00033
00034 #include "DecompAlgoPC.h"
00035
00036
00037 class DecompAlgoD : public DecompAlgoPC {
00038 private:
00039
00040
00045
00049 std::string m_classTag;
00050
00051
00052 double* m_xhatD;
00053
00054 DecompCutList* m_newCuts;
00055
00056 int m_numOrigCols;
00057
00058
00059
00060
00065
00070
00074 virtual void createMasterProblem(DecompVarList& initVars);
00075 virtual void masterMatrixAddArtCols(CoinPackedMatrix* masterM,
00076 double* colLB,
00077 double* colUB,
00078 double* objCoeff,
00079 std::vector<std::string>& colNames,
00080 int startRow,
00081 int endRow,
00082 char origOrBranch);
00083 virtual void phaseUpdate(DecompPhase& phase,
00084 DecompStatus& status);
00085 virtual void phaseDone();
00086
00090 virtual inline void setObjBoundIP(const double thisBound) {
00091 UtilPrintFuncBegin(m_osLog, m_classTag,
00092 "setObjBoundIP()", m_param.LogDebugLevel, 2);
00093
00094 if (thisBound < m_nodeStats.objBest.second) {
00095 UTIL_MSG(m_app->m_param.LogDebugLevel, 3,
00096 (*m_osLog) << "New Global UB = "
00097 << UtilDblToStr(thisBound) << std::endl;);
00098
00099
00100
00101
00102 }
00103
00104 UtilPrintFuncEnd(m_osLog, m_classTag,
00105 "setObjBoundIP()", m_param.LogDebugLevel, 2);
00106 }
00107
00108
00109
00110 public:
00111 void solveD(DecompCutList* newCuts) {
00112 m_newCuts = newCuts;
00113
00114 m_param.LimitTotalCutIters = 0;
00115 m_param.LimitRoundCutIters = 0;
00116 m_param.LimitTotalPriceIters = 1000;
00117 m_param.LimitRoundPriceIters = 1000;
00118 m_param.SolveMasterAsIp = 0;
00119 processNode(NULL);
00120 }
00121
00122
00123 public:
00124
00125
00130
00131 private:
00135 DecompAlgoD(const DecompAlgoD&);
00136 DecompAlgoD& operator=(const DecompAlgoD&);
00137
00138 public:
00139
00143 DecompAlgoD(DecompApp* app,
00144 UtilParameters* utilParam,
00145 double* xhat,
00146 int numOrigCols)
00147 :
00148 DecompAlgoPC(app, utilParam,
00149 const_cast<std::string&>(DecompAlgoStr[DECOMP]), false),
00150 m_classTag ("D-ALGOD"),
00151 m_xhatD (xhat),
00152 m_newCuts (0),
00153 m_numOrigCols(numOrigCols) {
00154 std::string paramSection = DecompAlgoStr[DECOMP];
00155 m_algo = DECOMP;
00156 initSetup(utilParam, paramSection);
00157 }
00158
00159
00160 DecompAlgoD(DecompApp* app,
00161 UtilParameters* utilParam,
00162 std::string& paramSection,
00163 double* xhat,
00164 int numOrigCols):
00165 DecompAlgoPC(app, utilParam, paramSection, false),
00166 m_classTag ("D-ALGOD"),
00167 m_xhatD (xhat),
00168 m_newCuts (0),
00169 m_numOrigCols(numOrigCols) {
00170 m_algo = DECOMP;
00171 initSetup(utilParam, paramSection);
00172 }
00173
00177 ~DecompAlgoD() {}
00181 };
00182
00183 #endif