Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OsiPresolve.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2003, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 #ifndef OsiPresolve_H
00005 #define OsiPresolve_H
00006 #include "OsiSolverInterface.hpp"
00007 
00008 class CoinPresolveAction;
00009 #include "CoinPresolveMatrix.hpp"
00010 
00011 
00061 class OsiPresolve {
00062 public:
00064   OsiPresolve();
00065 
00067   virtual ~OsiPresolve();
00068 
00088   virtual OsiSolverInterface *presolvedModel(OsiSolverInterface & origModel,
00089                                              double feasibilityTolerance=0.0,
00090                                              bool keepIntegers=true,
00091                                              int numberPasses=5);
00092 
00110   virtual void postsolve(bool updateStatus=true);
00111 
00113   OsiSolverInterface * model() const;
00114 
00116   OsiSolverInterface * originalModel() const;
00117 
00119   void setOriginalModel(OsiSolverInterface *model);
00120 
00122   const int * originalColumns() const;
00123 
00125   const int * originalRows() const;
00126 
00131   inline void setNonLinearValue(double value)
00132   { nonLinearValue_ = value;};
00133   inline double nonLinearValue() const
00134     { return nonLinearValue_;};
00142   inline void setPresolveActions(int action)
00143   { presolveActions_  = (presolveActions_&0xffff0000)|(action&0xffff);};
00144 
00145 private:
00150   OsiSolverInterface * originalModel_;
00151 
00156   OsiSolverInterface * presolvedModel_;
00157 
00163   double nonLinearValue_;
00164 
00166   int * originalColumn_;
00167 
00169   int * originalRow_;
00170 
00172   const CoinPresolveAction *paction_;
00173 
00180   int ncols_;
00181 
00183   int nrows_;
00184 
00186   CoinBigIndex nelems_;
00187 
00193   int presolveActions_;
00195   int numberPasses_;
00196 
00197 protected:
00206   virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
00207 
00218   virtual void postsolve(CoinPostsolveMatrix &prob);
00219 
00226   void gutsOfDestroy();
00227 };
00228 #endif

Generated on Sun Jun 11 02:00:39 2006 by  doxygen 1.3.9.1