/home/coin/SVN-release/CoinAll-1.1.0/Cbc/src/CbcHeuristicFPump.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef CbcHeuristicFeasibilityPump_H
00004 #define CbcHeuristicFeasibilityPump_H
00005 
00006 #include "CbcHeuristic.hpp"
00007 
00011 class CbcHeuristicFPump : public CbcHeuristic {
00012 public:
00013 
00014   // Default Constructor 
00015   CbcHeuristicFPump ();
00016 
00017   // Constructor with model - assumed before cuts
00018   CbcHeuristicFPump (CbcModel & model,
00019                      double downValue=0.5,bool roundExpensive=false);
00020   
00021   // Copy constructor 
00022   CbcHeuristicFPump ( const CbcHeuristicFPump &);
00023    
00024   // Destructor 
00025   ~CbcHeuristicFPump ();
00026   
00028   CbcHeuristicFPump & operator=(const CbcHeuristicFPump& rhs);
00030   virtual CbcHeuristic * clone() const;
00032   virtual void generateCpp( FILE * fp) ;
00033 
00035   virtual void resetModel(CbcModel * model);
00036 
00038   virtual void setModel(CbcModel * model);
00039   
00040   using CbcHeuristic::solution ;
00056   virtual int solution(double & objectiveValue,
00057                        double * newSolution);
00058 
00060   void setMaximumTime(double value);
00062   inline double maximumTime() const
00063   { return maximumTime_;}
00065   inline void setFakeCutoff(double value)
00066   { fakeCutoff_ = value;}
00068   inline double fakeCutoff() const
00069   { return fakeCutoff_;}
00071   inline void setAbsoluteIncrement(double value)
00072   { absoluteIncrement_ = value;}
00074   inline double absoluteIncrement() const
00075   { return absoluteIncrement_;}
00077   inline void setRelativeIncrement(double value)
00078   { relativeIncrement_ = value;}
00080   inline double relativeIncrement() const
00081   { return relativeIncrement_;}
00083   inline void setDefaultRounding(double value)
00084   { defaultRounding_ = value;}
00086   inline double defaultRounding() const
00087   { return defaultRounding_;}
00089   inline void setInitialWeight(double value)
00090   { initialWeight_ = value;}
00092   inline double initialWeight() const
00093   { return initialWeight_;}
00095   inline void setWeightFactor(double value)
00096   { weightFactor_ = value;}
00098   inline double weightFactor() const
00099   { return weightFactor_;}
00101   inline void setArtificialCost(double value)
00102   { artificialCost_ = value;}
00104   inline double artificialCost() const
00105   { return artificialCost_;}
00107   inline void setMaximumPasses(int value)
00108   { maximumPasses_=value;}
00110   inline int maximumPasses() const
00111   { return maximumPasses_;}
00113   inline void setMaximumRetries(int value)
00114   { maximumRetries_=value;}
00116   inline int maximumRetries() const
00117   { return maximumRetries_;}
00124   inline void setAccumulate(int value)
00125   { accumulate_=value;}
00127   inline int accumulate() const
00128   { return accumulate_;}
00134   inline void setFixOnReducedCosts(int value)
00135   { fixOnReducedCosts_=value;}
00137   inline int fixOnReducedCosts() const
00138   { return fixOnReducedCosts_;}
00139 
00140 protected:
00141   // Data
00143   double startTime_;
00145   double maximumTime_;
00149   double fakeCutoff_;
00151   double absoluteIncrement_;
00153   double relativeIncrement_;
00155   double defaultRounding_;
00157   double initialWeight_;
00159   double weightFactor_;
00161   double artificialCost_;
00163   int maximumPasses_;
00167   int maximumRetries_;
00175   int accumulate_;
00181   int fixOnReducedCosts_;
00183   bool roundExpensive_;
00184 
00185 private:
00190   int rounds(OsiSolverInterface * solver,double * solution, const double * objective, 
00191              int numberIntegers, const int * integerVariable,
00192              char * pumpPrint,int & passNumber,
00193              bool roundExpensive=false,
00194              double downValue=0.5, int *flip=0);
00195   /* note for eagle eyed readers.
00196      when_ can now be exotic -
00197      <=10 normal
00198   */
00199 };
00200 
00201 
00202 #endif

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