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

ClpPresolve.hpp

00001 // Copyright (C) 2002, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 #ifndef ClpPresolve_H
00005 #define ClpPresolve_H
00006 #include "ClpSimplex.hpp"
00007 
00008 class CoinPresolveAction;
00009 #include "CoinPresolveMatrix.hpp"
00010 class ClpPresolve {
00011 public:
00013   ClpPresolve();
00014 
00016   virtual ~ClpPresolve();
00018 
00034   ClpSimplex * presolvedModel(ClpSimplex & si,
00035                                       double feasibilityTolerance=0.0,
00036                                       bool keepIntegers=true,
00037                                       int numberPasses=5,
00038                                       bool dropNames=false);
00042   int presolvedModelToFile(ClpSimplex &si,std::string fileName,
00043                               double feasibilityTolerance=0.0,
00044                               bool keepIntegers=true,
00045                               int numberPasses=5);
00048   ClpSimplex * model() const;
00050   ClpSimplex * originalModel() const;
00052   void setOriginalModel(ClpSimplex * model);
00053     
00055   const int * originalColumns() const;
00057   const int * originalRows() const;
00062   inline void setNonLinearValue(double value)
00063   { nonLinearValue_ = value;};
00064   inline double nonLinearValue() const
00065     { return nonLinearValue_;};
00066 
00075   virtual void postsolve(bool updateStatus=true);
00076 
00078 private:
00080   ClpSimplex * originalModel_;
00081 
00083   ClpSimplex * presolvedModel_;
00089   double nonLinearValue_;
00091   int * originalColumn_;
00093   int * originalRow_;
00095   const CoinPresolveAction *paction_;
00096 
00102   int ncols_;
00103   int nrows_;
00104   CoinBigIndex nelems_;
00106   int numberPasses_;
00108   std::string saveFile_;
00109 
00110 protected:
00114   virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
00115 
00121   virtual void postsolve(CoinPostsolveMatrix &prob);
00123   void gutsOfDestroy();
00125   virtual ClpSimplex * gutsOfPresolvedModel(ClpSimplex * originalModel
00126                                             ,double feasibilityTolerance,
00127                                             bool keepIntegers,
00128                                             int numberPasses,
00129                                             bool dropNames);
00130 };
00131 #endif

Generated on Wed Dec 3 14:37:30 2003 for CLP by doxygen 1.3.5