Dip-All  0.91.0
DecompAlgoCGL.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the DIP Solver Framework. //
3 // //
4 // DIP is distributed under the Eclipse Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Conceptual Design: Matthew Galati, SAS Institute Inc. //
10 // Ted Ralphs, Lehigh University //
11 // //
12 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, and Ted Ralphs//
13 // All Rights Reserved. //
14 //===========================================================================//
15 
16 
17 //===========================================================================//
18 #ifndef DecompAlgoCGL_h_
19 #define DecompAlgoCGL_h_
20 
21 //===========================================================================//
27 //===========================================================================//
28 
29 //===========================================================================//
30 #include "Decomp.h"
31 
32 //===========================================================================//
33 //#include "CglProbing.hpp" //TODO
34 #include "CglClique.hpp"
35 #include "CglGomory.hpp"
36 #include "CglOddHole.hpp"
37 #include "CglFlowCover.hpp"
38 #include "CglKnapsackCover.hpp"
40 
41 //===========================================================================//
43 
44  //----------------------------------------------------------------------//
49  //----------------------------------------------------------------------//
50 private:
52  std::ostream* m_logStream;
53 
60 
67 public:
68  //-----------------------------------------------------------------------//
73  //-----------------------------------------------------------------------//
74  int initGenerators(const int doClique,
75  const int doOddHole,
76  const int doFlowCover,
77  const int doKnapCover,
78  const int doMixIntRound,
79  const int doGomory);
80  int generateCuts(OsiSolverInterface* cutGenSI,
81  OsiSolverInterface* masterSI,
82  double* xhat,
83  std::vector<int>& integerVars,
84  DecompCutList& newCuts);
85 
86 
87 
92 public:
93  //-----------------------------------------------------------------------//
98  //-----------------------------------------------------------------------//
99  void setLogLevel(const int logLevel) {
100  m_logLevel = logLevel;
101  }
102  void setLogStream(std::ostream* logStream) {
103  m_logStream = logStream;
104  }
109  //-----------------------------------------------------------------------//
114  //-----------------------------------------------------------------------//
115 public:
119  DecompAlgoCGL(int logLevel = 0,
120  DecompAlgoType algo = CUT,
121  std::ostream* logStream = &std::cout):
122  m_logLevel (logLevel),
123  m_logStream (logStream),
124  m_genClique (0),
125  m_genOddHole (0),
126  m_genFlowCover (0),
127  m_genKnapCover (0),
128  m_genMixIntRound(0),
129  m_genGomory (0),
130  m_algo (algo) {
131  }
132 
143  }
147 };
148 
149 #endif
std::list< DecompCut * > DecompCutList
Definition: Decomp.h:55
int generateCuts(OsiSolverInterface *cutGenSI, OsiSolverInterface *masterSI, double *xhat, std::vector< int > &integerVars, DecompCutList &newCuts)
~DecompAlgoCGL()
Destructor.
std::ostream * m_logStream
Definition: DecompAlgoCGL.h:52
CglClique * m_genClique
Definition: DecompAlgoCGL.h:54
Odd Hole Cut Generator Class.
Definition: CglOddHole.hpp:14
An interface to CGL cut generator library.
Definition: DecompAlgoCGL.h:42
DecompAlgoType m_algo
Definition: DecompAlgoCGL.h:61
CglGomory * m_genGomory
Definition: DecompAlgoCGL.h:59
CglOddHole * m_genOddHole
Definition: DecompAlgoCGL.h:55
Lifed Simple Generalized Flow Cover Cut Generator Class.
CglKnapsackCover * m_genKnapCover
Definition: DecompAlgoCGL.h:57
Gomory Cut Generator Class.
Definition: CglGomory.hpp:14
DecompAlgoType
Definition: Decomp.h:85
Abstract Base Class for describing an interface to a solver.
void setLogStream(std::ostream *logStream)
CglFlowCover * m_genFlowCover
Definition: DecompAlgoCGL.h:56
Knapsack Cover Cut Generator Class.
DecompAlgoCGL(int logLevel=0, DecompAlgoType algo=CUT, std::ostream *logStream=&std::cout)
Default constructors.
CglMixedIntegerRounding2 * m_genMixIntRound
Definition: DecompAlgoCGL.h:58
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:28
int initGenerators(const int doClique, const int doOddHole, const int doFlowCover, const int doKnapCover, const int doMixIntRound, const int doGomory)
Mixed Integer Rounding Cut Generator Class.
Definition: Decomp.h:86
void setLogLevel(const int logLevel)
Definition: DecompAlgoCGL.h:99