Cbc  2.10.5
 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 
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:
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 
135 
138  const CglDuplicateRow & rhs);
139 
141  virtual CglCutGenerator * clone() const;
142 
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 
170  int * rhs_;
172  int * duplicate_;
174  int * lower_;
184  int mode_;
188 };
189 #endif
void setMaximumDominated(int value)
Set.
int maximumDominated_
Check dominated columns if less than this number of candidates.
void generateCuts12(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for modes 1,2.
CoinPackedMatrix matrixByRow_
Matrix by row.
int maximumRhs_
Check duplicates if effective rhs &lt;= this.
void setMode(int value)
Set mode.
Stored Cut Generator Class.
Definition: CglStored.hpp:16
int * lower_
To allow for &lt;= rows.
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.
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:15
CglStored * storedCuts_
Stored cuts if we found dominance cuts.
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
int mode_
1 do rows, 2 do columns, 3 do both
int * rhs_
Possible rhs (if 0 then not possible)
void setLogLevel(int value)
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
Abstract Base Class for describing an interface to a solver.
const int * duplicate() const
Get duplicate row list, -1 means still in, -2 means out (all fixed), k&gt;= means same as row k...
virtual CglCutGenerator * clone() const
Clone.
int maximumRhs() const
Get.
CglDuplicateRow()
Default constructor.
Cut Generator Base Class.
int numberOriginalRows() const
Number of rows in original problem.
void generateCuts8(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 8.
CglDuplicateRow & operator=(const CglDuplicateRow &rhs)
Assignment operator.
void setMaximumRhs(int value)
Set.
int getNumRows() const
Number of rows.
int sizeDynamic_
Size of dynamic program.
CglStored * outDuplicates(OsiSolverInterface *solver)
Fix variables and find duplicate/dominated rows for the model of the solver interface, si.
Sparse Matrix Base Class.
virtual ~CglDuplicateRow()
Destructor.
CoinPackedMatrix matrix_
Matrix.
DuplicateRow Cut Generator Class.
int sizeDynamic() const
Size of dynamic program.
int logLevel() const
logLevel
int mode() const
Get mode.
int * duplicate_
Marks duplicate rows.
int maximumDominated() const
Get.
void generateCuts4(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Does work for mode 4.
int logLevel_
Controls print out.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.