Dip  0.92.4
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 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, and Ted Ralphs//
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 
16 //===========================================================================//
17 #ifndef DecompAlgoCGL_h_
18 #define DecompAlgoCGL_h_
19 
20 //===========================================================================//
26 //===========================================================================//
27 
28 //===========================================================================//
29 #include "Decomp.h"
30 
31 //===========================================================================//
32 //#include "CglProbing.hpp" //TODO
33 #include "CglClique.hpp"
34 #include "CglGomory.hpp"
35 #include "CglOddHole.hpp"
36 #include "CglFlowCover.hpp"
37 #include "CglKnapsackCover.hpp"
39 
40 //===========================================================================//
42 
43  //----------------------------------------------------------------------//
48  //----------------------------------------------------------------------//
49 private:
51  std::ostream* m_logStream;
52 
59 
66 public:
67  //-----------------------------------------------------------------------//
72  //-----------------------------------------------------------------------//
73  int initGenerators(const int doClique,
74  const int doOddHole,
75  const int doFlowCover,
76  const int doKnapCover,
77  const int doMixIntRound,
78  const int doGomory);
79  int generateCuts(OsiSolverInterface* cutGenSI,
80  OsiSolverInterface* masterSI,
81  double* xhat,
82  std::vector<int>& integerVars,
83  DecompCutList& newCuts);
84 
85 
86 
91 public:
92  //-----------------------------------------------------------------------//
97  //-----------------------------------------------------------------------//
98  void setLogLevel(const int logLevel) {
99  m_logLevel = logLevel;
100  }
101  void setLogStream(std::ostream* logStream) {
102  m_logStream = logStream;
103  }
108  //-----------------------------------------------------------------------//
113  //-----------------------------------------------------------------------//
114 public:
118  DecompAlgoCGL(int logLevel = 0,
119  DecompAlgoType algo = CUT,
120  std::ostream* logStream = &std::cout):
121  m_logLevel (logLevel),
122  m_logStream (logStream),
123  m_genClique (0),
124  m_genOddHole (0),
125  m_genFlowCover (0),
126  m_genKnapCover (0),
127  m_genMixIntRound(0),
128  m_genGomory (0),
129  m_algo (algo) {
130  }
131 
142  }
146 };
147 
148 #endif
std::list< DecompCut * > DecompCutList
Definition: Decomp.h:93
int generateCuts(OsiSolverInterface *cutGenSI, OsiSolverInterface *masterSI, double *xhat, std::vector< int > &integerVars, DecompCutList &newCuts)
~DecompAlgoCGL()
Destructor.
std::ostream * m_logStream
Definition: DecompAlgoCGL.h:51
CglClique * m_genClique
Definition: DecompAlgoCGL.h:53
Odd Hole Cut Generator Class.
Definition: CglOddHole.hpp:14
An interface to CGL cut generator library.
Definition: DecompAlgoCGL.h:41
DecompAlgoType m_algo
Definition: DecompAlgoCGL.h:60
CglGomory * m_genGomory
Definition: DecompAlgoCGL.h:58
CglOddHole * m_genOddHole
Definition: DecompAlgoCGL.h:54
Lifed Simple Generalized Flow Cover Cut Generator Class.
CglKnapsackCover * m_genKnapCover
Definition: DecompAlgoCGL.h:56
Gomory Cut Generator Class.
Definition: CglGomory.hpp:14
DecompAlgoType
Definition: Decomp.h:123
Abstract Base Class for describing an interface to a solver.
void setLogStream(std::ostream *logStream)
CglFlowCover * m_genFlowCover
Definition: DecompAlgoCGL.h:55
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:57
#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:124
void setLogLevel(const int logLevel)
Definition: DecompAlgoCGL.h:98