DecompAlgoCGL.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 DecompAlgoCGL_h_
00019 #define DecompAlgoCGL_h_
00020
00021
00027
00028
00029
00030 #include "Decomp.h"
00031
00032
00033
00034 #include "CglClique.hpp"
00035 #include "CglGomory.hpp"
00036 #include "CglOddHole.hpp"
00037 #include "CglFlowCover.hpp"
00038 #include "CglKnapsackCover.hpp"
00039 #include "CglMixedIntegerRounding2.hpp"
00040
00041
00042 class DecompAlgoCGL {
00043
00044
00049
00050 private:
00051 int m_logLevel;
00052 std::ostream* m_logStream;
00053
00054 CglClique* m_genClique;
00055 CglOddHole* m_genOddHole;
00056 CglFlowCover* m_genFlowCover;
00057 CglKnapsackCover* m_genKnapCover;
00058 CglMixedIntegerRounding2* m_genMixIntRound;
00059 CglGomory* m_genGomory;
00060
00061 DecompAlgoType m_algo;
00067 public:
00068
00073
00074 int initGenerators(const int doClique,
00075 const int doOddHole,
00076 const int doFlowCover,
00077 const int doKnapCover,
00078 const int doMixIntRound,
00079 const int doGomory);
00080 int generateCuts(OsiSolverInterface* cutGenSI,
00081 OsiSolverInterface* masterSI,
00082 double* xhat,
00083 std::vector<int>& integerVars,
00084 DecompCutList& newCuts);
00085
00086
00087
00092 public:
00093
00098
00099 void setLogLevel(const int logLevel) {
00100 m_logLevel = logLevel;
00101 }
00102 void setLogStream(std::ostream* logStream) {
00103 m_logStream = logStream;
00104 }
00109
00114
00115 public:
00119 DecompAlgoCGL(int logLevel = 0,
00120 DecompAlgoType algo = CUT,
00121 std::ostream* logStream = &std::cout):
00122 m_logLevel (logLevel),
00123 m_logStream (logStream),
00124 m_genClique (0),
00125 m_genOddHole (0),
00126 m_genFlowCover (0),
00127 m_genKnapCover (0),
00128 m_genMixIntRound(0),
00129 m_genGomory (0),
00130 m_algo (algo) {
00131 }
00132
00136 ~DecompAlgoCGL() {
00137 UTIL_DELPTR(m_genClique);
00138 UTIL_DELPTR(m_genOddHole);
00139 UTIL_DELPTR(m_genFlowCover);
00140 UTIL_DELPTR(m_genKnapCover);
00141 UTIL_DELPTR(m_genMixIntRound);
00142 UTIL_DELPTR(m_genGomory);
00143 }
00147 };
00148
00149 #endif