Dip 0.95.0
Loading...
Searching...
No Matches
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 //----------------------------------------------------------------------//
49private:
50 int m_logLevel;
51 std::ostream* m_logStream;
52
53 CglClique* m_genClique;
54 CglOddHole* m_genOddHole;
55 CglFlowCover* m_genFlowCover;
56 CglKnapsackCover* m_genKnapCover;
57 CglMixedIntegerRounding2* m_genMixIntRound;
58 CglGomory* m_genGomory;
59
60 DecompAlgoType m_algo;
66public:
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);
80 OsiSolverInterface* masterSI,
81 double* xhat,
82 std::vector<int>& integerVars,
83 DecompCutList& newCuts);
84
85
86
91public:
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 //-----------------------------------------------------------------------//
114public:
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
136 UTIL_DELPTR(m_genClique);
137 UTIL_DELPTR(m_genOddHole);
138 UTIL_DELPTR(m_genFlowCover);
139 UTIL_DELPTR(m_genKnapCover);
140 UTIL_DELPTR(m_genMixIntRound);
141 UTIL_DELPTR(m_genGomory);
142 }
146};
147
148#endif
DecompAlgoType
Definition: Decomp.h:123
@ CUT
Definition: Decomp.h:124
std::list< DecompCut * > DecompCutList
Definition: Decomp.h:93
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:64
An interface to CGL cut generator library.
Definition: DecompAlgoCGL.h:41
DecompAlgoCGL(int logLevel=0, DecompAlgoType algo=CUT, std::ostream *logStream=&std::cout)
Default constructors.
int initGenerators(const int doClique, const int doOddHole, const int doFlowCover, const int doKnapCover, const int doMixIntRound, const int doGomory)
void setLogStream(std::ostream *logStream)
~DecompAlgoCGL()
Destructor.
void setLogLevel(const int logLevel)
Definition: DecompAlgoCGL.h:98
int generateCuts(OsiSolverInterface *cutGenSI, OsiSolverInterface *masterSI, double *xhat, std::vector< int > &integerVars, DecompCutList &newCuts)