/home/coin/SVN-release/CoinAll-1.1.0/Osi/src/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 
00089   virtual OsiSolverInterface *presolvedModel(OsiSolverInterface & origModel,
00090                                              double feasibilityTolerance=0.0,
00091                                              bool keepIntegers=true,
00092                                              int numberPasses=5,
00093                                              const char * prohibited=NULL,
00094                                              bool doStatus=true);
00095 
00113   virtual void postsolve(bool updateStatus=true);
00114 
00116   OsiSolverInterface * model() const;
00117 
00119   OsiSolverInterface * originalModel() const;
00120 
00122   void setOriginalModel(OsiSolverInterface *model);
00123 
00125   const int * originalColumns() const;
00126 
00128   const int * originalRows() const;
00129 
00134   inline void setNonLinearValue(double value)
00135   { nonLinearValue_ = value;}
00136   inline double nonLinearValue() const
00137     { return nonLinearValue_;}
00145   inline void setPresolveActions(int action)
00146   { presolveActions_  = (presolveActions_&0xffff0000)|(action&0xffff);}
00147 
00148 private:
00153   OsiSolverInterface * originalModel_;
00154 
00159   OsiSolverInterface * presolvedModel_;
00160 
00166   double nonLinearValue_;
00167 
00169   int * originalColumn_;
00170 
00172   int * originalRow_;
00173 
00175   const CoinPresolveAction *paction_;
00176 
00183   int ncols_;
00184 
00186   int nrows_;
00187 
00189   CoinBigIndex nelems_;
00190 
00196   int presolveActions_;
00198   int numberPasses_;
00199 
00200 protected:
00209   virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
00210 
00221   virtual void postsolve(CoinPostsolveMatrix &prob);
00222 
00229   void gutsOfDestroy();
00230 };
00231 #endif

Generated on Sun Nov 14 14:06:40 2010 for Coin-All by  doxygen 1.4.7