Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

OsiPresolve.hpp

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 class OsiPresolve {
00011 public:
00013   OsiPresolve();
00014 
00016   virtual ~OsiPresolve();
00018 
00034   virtual OsiSolverInterface * presolvedModel(OsiSolverInterface & si,
00035                                       double feasibilityTolerance=0.0,
00036                                       bool keepIntegers=true,
00037                                               int numberPasses=5);
00038 
00041   OsiSolverInterface * model() const;
00043   OsiSolverInterface * originalModel() const;
00045   void setOriginalModel(OsiSolverInterface * model);
00046     
00048   const int * originalColumns() const;
00050   const int * originalRows() const;
00055   inline void setNonLinearValue(double value)
00056   { nonLinearValue_ = value;};
00057   inline double nonLinearValue() const
00058     { return nonLinearValue_;};
00059 
00068   virtual void postsolve(bool updateStatus=true);
00069 
00071 private:
00073   OsiSolverInterface * originalModel_;
00074 
00076   OsiSolverInterface * presolvedModel_;
00082   double nonLinearValue_;
00084   int * originalColumn_;
00086   int * originalRow_;
00088   const CoinPresolveAction *paction_;
00089 
00095   int ncols_;
00096   int nrows_;
00097   CoinBigIndex nelems_;
00099   int numberPasses_;
00100 
00101 protected:
00105   virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
00106 
00112   virtual void postsolve(CoinPostsolveMatrix &prob);
00114   void gutsOfDestroy();
00115 };
00116 #endif

Generated on Wed Dec 3 14:35:33 2003 for Osi by doxygen 1.3.5