Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglDuplicateRow.hpp
Go to the documentation of this file.
1 // $Id: CglDuplicateRow.hpp 1119 2013-04-06 20:24:18Z stefan $
2 // Copyright (C) 2004, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef CglDuplicateRow_H
7 #define CglDuplicateRow_H
8
9 #include <string>
10
11 #include "CglCutGenerator.hpp"
12 class CglStored;
13
15 class CglDuplicateRow : public CglCutGenerator {
16
17 public:
18
19
40 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
41 const CglTreeInfo info = CglTreeInfo());
42 private:
44 void generateCuts12( const OsiSolverInterface & si, OsiCuts & cs,
45 const CglTreeInfo info = CglTreeInfo());
47 void generateCuts4( const OsiSolverInterface & si, OsiCuts & cs,
48 const CglTreeInfo info = CglTreeInfo());
50 void generateCuts8( const OsiSolverInterface & si, OsiCuts & cs,
51 const CglTreeInfo info = CglTreeInfo());
52 public:
72 CglStored * outDuplicates( OsiSolverInterface * solver);
73
75
78 inline const int * duplicate() const
80 { return duplicate_;}
82 inline int sizeDynamic() const
83 { return sizeDynamic_;}
85 inline int numberOriginalRows() const
86 { return matrix_.getNumRows();}
88
91 inline int logLevel() const
93 { return logLevel_;}
94 inline void setLogLevel(int value)
95 { logLevel_ = value;}
97
98
101 inline int maximumRhs() const
103 { return maximumRhs_;}
105 inline void setMaximumRhs(int value)
106 { maximumRhs_=value;}
108
111 inline int maximumDominated() const
113 { return maximumDominated_;}
115 inline void setMaximumDominated(int value)
116 { maximumDominated_=value;}
118
120 inline int mode() const
122 { return mode_;}
124 inline void setMode(int value)
125 { mode_=value;}
127
130 CglDuplicateRow ();
132
134 CglDuplicateRow (OsiSolverInterface * solver);
135
137 CglDuplicateRow (
138 const CglDuplicateRow & rhs);
139
141 virtual CglCutGenerator * clone() const;
142
144 CglDuplicateRow &
145 operator=(
146 const CglDuplicateRow& rhs);
147
149 virtual
150 ~CglDuplicateRow ();
152 virtual std::string generateCpp( FILE * fp);
153
155 virtual void refreshSolver(OsiSolverInterface * solver);
157
158 protected:
159
160
161 // Protected member data
162
165 CoinPackedMatrix matrix_;
168 CoinPackedMatrix matrixByRow_;
170 int * rhs_;
172 int * duplicate_;
174 int * lower_;
176 CglStored * storedCuts_;
178 int maximumDominated_;
180 int maximumRhs_;
182 int sizeDynamic_;
184 int mode_;
186 int logLevel_;
188 };
189 #endif
CglDuplicateRow::setMaximumDominated
void setMaximumDominated(int value)
Set.
Definition: CglDuplicateRow.hpp:115
CglDuplicateRow::maximumDominated_
int maximumDominated_
Check dominated columns if less than this number of candidates.
Definition: CglDuplicateRow.hpp:178
CglDuplicateRow::generateCuts12
void generateCuts12(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for modes 1,2.
CglDuplicateRow::matrixByRow_
CoinPackedMatrix matrixByRow_
Matrix by row.
Definition: CglDuplicateRow.hpp:168
CglDuplicateRow::maximumRhs_
int maximumRhs_
Check duplicates if effective rhs &lt;= this.
Definition: CglDuplicateRow.hpp:180
CglDuplicateRow::setMode
void setMode(int value)
Set mode.
Definition: CglDuplicateRow.hpp:124
CglStored
Stored Cut Generator Class.
Definition: CglStored.hpp:16
CglDuplicateRow::lower_
int * lower_
To allow for &lt;= rows.
Definition: CglDuplicateRow.hpp:174
CglCutGenerator.hpp
CglDuplicateRow::generateCuts
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Fix variables and find duplicate/dominated rows for the model of the solver interface, si.
CglTreeInfo
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
CglDuplicateRow::storedCuts_
CglStored * storedCuts_
Stored cuts if we found dominance cuts.
Definition: CglDuplicateRow.hpp:176
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
CglDuplicateRow::mode_
int mode_
1 do rows, 2 do columns, 3 do both
Definition: CglDuplicateRow.hpp:184
CglDuplicateRow::rhs_
int * rhs_
Possible rhs (if 0 then not possible)
Definition: CglDuplicateRow.hpp:170
CglDuplicateRow::setLogLevel
void setLogLevel(int value)
Definition: CglDuplicateRow.hpp:94
CglDuplicateRow::generateCpp
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:61
CglDuplicateRow::duplicate
const int * duplicate() const
Get duplicate row list, -1 means still in, -2 means out (all fixed), k&gt;= means same as row k...
Definition: CglDuplicateRow.hpp:79
CglDuplicateRow::clone
virtual CglCutGenerator * clone() const
Clone.
CglDuplicateRow::maximumRhs
int maximumRhs() const
Get.
Definition: CglDuplicateRow.hpp:102
CglDuplicateRow::CglDuplicateRow
CglDuplicateRow()
Default constructor.
CglCutGenerator
Cut Generator Base Class.
Definition: CglCutGenerator.hpp:23
CglDuplicateRow::numberOriginalRows
int numberOriginalRows() const
Number of rows in original problem.
Definition: CglDuplicateRow.hpp:85
CglDuplicateRow::generateCuts8
void generateCuts8(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 8.
CglDuplicateRow::operator=
CglDuplicateRow & operator=(const CglDuplicateRow &rhs)
Assignment operator.
CglDuplicateRow::setMaximumRhs
void setMaximumRhs(int value)
Set.
Definition: CglDuplicateRow.hpp:105
CoinPackedMatrix::getNumRows
int getNumRows() const
Number of rows.
Definition: CoinPackedMatrix.hpp:114
CglDuplicateRow::sizeDynamic_
int sizeDynamic_
Size of dynamic program.
Definition: CglDuplicateRow.hpp:182
CglDuplicateRow::outDuplicates
CglStored * outDuplicates(OsiSolverInterface *solver)
Fix variables and find duplicate/dominated rows for the model of the solver interface, si.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
CglDuplicateRow::~CglDuplicateRow
virtual ~CglDuplicateRow()
Destructor.
CglDuplicateRow::matrix_
CoinPackedMatrix matrix_
Matrix.
Definition: CglDuplicateRow.hpp:166
CglDuplicateRow
DuplicateRow Cut Generator Class.
Definition: CglDuplicateRow.hpp:15
CglDuplicateRow::sizeDynamic
int sizeDynamic() const
Size of dynamic program.
Definition: CglDuplicateRow.hpp:82
CglDuplicateRow::logLevel
int logLevel() const
logLevel
Definition: CglDuplicateRow.hpp:92
CglDuplicateRow::mode
int mode() const
Get mode.
Definition: CglDuplicateRow.hpp:121
CglDuplicateRow::duplicate_
int * duplicate_
Marks duplicate rows.
Definition: CglDuplicateRow.hpp:172
CglDuplicateRow::maximumDominated
int maximumDominated() const
Get.
Definition: CglDuplicateRow.hpp:112
CglDuplicateRow::generateCuts4
void generateCuts4(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 4.
CglDuplicateRow::logLevel_
int logLevel_
Controls print out.
Definition: CglDuplicateRow.hpp:186
CglDuplicateRow::refreshSolver
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.