coin-Cgl
CglDuplicateRow.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglDuplicateRow_H
4 #define CglDuplicateRow_H
5 
6 #include <string>
7 
8 #include "CglCutGenerator.hpp"
9 class CglStored;
10 
13 
14 public:
15 
16 
37  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
38  const CglTreeInfo info = CglTreeInfo()) const;
58  CglStored * outDuplicates( OsiSolverInterface * solver);
59 
61 
64  inline const int * duplicate() const
66  { return duplicate_;}
68  inline int sizeDynamic() const
69  { return sizeDynamic_;}
71  inline int numberOriginalRows() const
72  { return matrix_.getNumRows();}
74 
77  inline int logLevel() const
79  { return logLevel_;}
80  inline void setLogLevel(int value)
81  { logLevel_ = value;}
83 
84 
87  inline int maximumRhs() const
89  { return maximumRhs_;}
91  inline void setMaximumRhs(int value)
92  { maximumRhs_=value;}
94 
97  inline int maximumDominated() const
99  { return maximumDominated_;}
101  inline void setMaximumDominated(int value)
102  { maximumDominated_=value;}
104 
106  inline int mode() const
108  { return mode_;}
110  inline void setMode(int value)
111  { mode_=value;}
113 
116  CglDuplicateRow ();
118 
120  CglDuplicateRow (OsiSolverInterface * solver);
121 
124  const CglDuplicateRow & rhs);
125 
127  virtual CglCutGenerator * clone() const;
128 
131  operator=(
132  const CglDuplicateRow& rhs);
133 
135  virtual
136  ~CglDuplicateRow ();
138  virtual std::string generateCpp( FILE * fp);
139 
141  virtual void refreshSolver(OsiSolverInterface * solver);
143 
144 protected:
145 
146 
147  // Protected member data
148 
151  CoinPackedMatrix matrix_;
154  CoinPackedMatrix matrixByRow_;
156  int * rhs_;
158  mutable int * duplicate_;
160  int * lower_;
168  mutable int sizeDynamic_;
170  int mode_;
174 };
175 #endif
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
int sizeDynamic() const
Size of dynamic program.
int maximumDominated_
Check dominated columns if less than this number of candidates.
int sizeDynamic_
Size of dynamic program.
CoinPackedMatrix matrixByRow_
Matrix by row.
int logLevel_
Controls print out.
int logLevel() const
logLevel
CglDuplicateRow & operator=(const CglDuplicateRow &rhs)
Assignment operator.
CoinPackedMatrix matrix_
Matrix.
int maximumDominated() const
Get.
int mode_
1 do rows, 2 do columns, 3 do both
void setMode(int value)
Set mode.
void setLogLevel(int value)
Get duplicate row list, -1 means still in, -2 means out (all fixed), k>= means same as row k...
virtual CglCutGenerator * clone() const
Clone.
const int * duplicate() const
Get duplicate row list, -1 means still in, -2 means out (all fixed), k>= means same as row k...
int * lower_
To allow for <= rows.
void setMaximumDominated(int value)
Set.
int * duplicate_
Marks duplicate rows.
int * rhs_
Possible rhs (if 0 then not possible)
int maximumRhs() const
Get.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setMaximumRhs(int value)
Set.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
Fix variables and find duplicate/dominated rows for the model of the solver interface, si.
CglStored * storedCuts_
Stored cuts if we found dominance cuts.
int maximumRhs_
Check duplicates if effective rhs <= this.
int numberOriginalRows() const
Number of rows in original problem.
Cut Generator Base Class.
virtual ~CglDuplicateRow()
Destructor.
CglDuplicateRow()
Default constructor.
int mode() const
Get mode.
CglStored * outDuplicates(OsiSolverInterface *solver)
Fix variables and find duplicate/dominated rows for the model of the solver interface, si.
Stored Cut Generator Class.
Definition: CglStored.hpp:13
Information about where the cut generator is invoked from.
Definition: CglTreeInfo.hpp:13
DuplicateRow Cut Generator Class.