DecompAlgoRC.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
00019
00020
00021
00022 #ifndef DECOMP_ALGORC_INCLUDED
00023 #define DECOMP_ALGORC_INCLUDED
00024
00025 #include "DecompAlgo.h"
00026
00027 class DecompApp;
00028
00029 class DecompAlgoRC : public DecompAlgo {
00030 private:
00031 DecompAlgoRC(const DecompAlgoRC&);
00032 DecompAlgoRC& operator=(const DecompAlgoRC&);
00033
00034 private:
00035 static const char* m_classTag;
00036
00037 private:
00038 vector<double> m_u;
00039 double* m_rc;
00040 double m_UB;
00041 double m_LB;
00042
00043 int m_cntSameLB;
00044 int m_iter;
00045 double m_step;
00046 bool m_zeroSub;
00047
00048 DecompVar* m_shatVar;
00049
00050
00051 public:
00052
00053 void createMasterProblem(DecompVarList& initVars);
00054 decompStat solutionUpdate(const decompPhase phase,
00055 const int maxInnerIter,
00056 const int maxOuterIter);
00057
00058
00059
00060 int addCutsFromPool();
00061 int generateVars(const decompStat stat,
00062 DecompVarList& newVars,
00063 double& mostNegReducedCost);
00064
00065 bool isDone();
00066
00067 const double* getRowPrice() const {
00068 return &m_u[0];
00069 }
00070
00071 public:
00072 DecompAlgoRC(DecompApp* app)
00073 : DecompAlgo(RELAX_AND_CUT, app),
00074 m_u(),
00075 m_rc(0),
00076 m_UB(DecompInf),
00077 m_LB(-DecompInf),
00078 m_cntSameLB(0),
00079 m_iter(0),
00080 m_step(2.0),
00081 m_zeroSub(false),
00082 m_shatVar(0)
00083
00084 {};
00085 ~DecompAlgoRC() {
00086 UTIL_DELARR(m_rc);
00087 };
00088 };
00089
00090 #endif