OsiPresolve.hpp
Go to the documentation of this file.
1 // Copyright (C) 2003, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 
4 #ifndef OsiPresolve_H
5 #define OsiPresolve_H
6 #include "OsiSolverInterface.hpp"
7 
8 class CoinPresolveAction;
9 #include "CoinPresolveMatrix.hpp"
10 
11 
61 class OsiPresolve {
62 public:
64  OsiPresolve();
65 
67  virtual ~OsiPresolve();
68 
90  double feasibilityTolerance=0.0,
91  bool keepIntegers=true,
92  int numberPasses=5,
93  const char * prohibited=NULL,
94  bool doStatus=true,
95  const char * rowProhibited=NULL);
96 
114  virtual void postsolve(bool updateStatus=true);
115 
117  OsiSolverInterface * model() const;
118 
121 
124 
126  const int * originalColumns() const;
127 
129  const int * originalRows() const;
130 
132  inline int getNumRows() const
133  { return nrows_;}
134 
136  inline int getNumCols() const
137  { return ncols_;}
138 
143  inline void setNonLinearValue(double value)
144  { nonLinearValue_ = value;}
145  inline double nonLinearValue() const
146  { return nonLinearValue_;}
156  inline void setPresolveActions(int action)
157  { presolveActions_ = (presolveActions_&0xffff0000)|(action&0xffff);}
158 
159 private:
165 
171 
178 
181 
184 
186  const CoinPresolveAction *paction_;
187 
194  int ncols_;
195 
197  int nrows_;
198 
200  CoinBigIndex nelems_;
201 
210 
211 protected:
220  virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
221 
232  virtual void postsolve(CoinPostsolveMatrix &prob);
233 
240  void gutsOfDestroy();
241 };
242 #endif