• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/tmp/buildd/coinor-cbc-2.5.0/debian/tmp/usr/include/coin/CbcHeuristicFPump.hpp

Go to the documentation of this file.
00001 /* $Id: CbcHeuristicFPump.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
00002 // Copyright (C) 2004, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef CbcHeuristicFeasibilityPump_H
00005 #define CbcHeuristicFeasibilityPump_H
00006 
00007 #include "CbcHeuristic.hpp"
00008 #include "OsiClpSolverInterface.hpp"
00009 
00013 class CbcHeuristicFPump : public CbcHeuristic {
00014 public:
00015 
00016     // Default Constructor
00017     CbcHeuristicFPump ();
00018 
00019     // Constructor with model - assumed before cuts
00020     CbcHeuristicFPump (CbcModel & model,
00021                        double downValue = 0.5, bool roundExpensive = false);
00022 
00023     // Copy constructor
00024     CbcHeuristicFPump ( const CbcHeuristicFPump &);
00025 
00026     // Destructor
00027     ~CbcHeuristicFPump ();
00028 
00030     CbcHeuristicFPump & operator=(const CbcHeuristicFPump& rhs);
00032     virtual CbcHeuristic * clone() const;
00034     virtual void generateCpp( FILE * fp) ;
00035 
00037     virtual void resetModel(CbcModel * model);
00038 
00040     virtual void setModel(CbcModel * model);
00041 
00042     using CbcHeuristic::solution ;
00063     virtual int solution(double & objectiveValue,
00064                          double * newSolution);
00065 
00067     void setMaximumTime(double value);
00069     inline double maximumTime() const {
00070         return maximumTime_;
00071     }
00073     inline void setFakeCutoff(double value) {
00074         fakeCutoff_ = value;
00075     }
00077     inline double fakeCutoff() const {
00078         return fakeCutoff_;
00079     }
00081     inline void setAbsoluteIncrement(double value) {
00082         absoluteIncrement_ = value;
00083     }
00085     inline double absoluteIncrement() const {
00086         return absoluteIncrement_;
00087     }
00089     inline void setRelativeIncrement(double value) {
00090         relativeIncrement_ = value;
00091     }
00093     inline double relativeIncrement() const {
00094         return relativeIncrement_;
00095     }
00097     inline void setDefaultRounding(double value) {
00098         defaultRounding_ = value;
00099     }
00101     inline double defaultRounding() const {
00102         return defaultRounding_;
00103     }
00105     inline void setInitialWeight(double value) {
00106         initialWeight_ = value;
00107     }
00109     inline double initialWeight() const {
00110         return initialWeight_;
00111     }
00113     inline void setWeightFactor(double value) {
00114         weightFactor_ = value;
00115     }
00117     inline double weightFactor() const {
00118         return weightFactor_;
00119     }
00121     inline void setArtificialCost(double value) {
00122         artificialCost_ = value;
00123     }
00125     inline double artificialCost() const {
00126         return artificialCost_;
00127     }
00129     inline double iterationRatio() const {
00130         return iterationRatio_;
00131     }
00133     inline void setIterationRatio(double value) {
00134         iterationRatio_ = value;
00135     }
00137     inline void setMaximumPasses(int value) {
00138         maximumPasses_ = value;
00139     }
00141     inline int maximumPasses() const {
00142         return maximumPasses_;
00143     }
00145     inline void setMaximumRetries(int value) {
00146         maximumRetries_ = value;
00147     }
00149     inline int maximumRetries() const {
00150         return maximumRetries_;
00151     }
00173     inline void setAccumulate(int value) {
00174         accumulate_ = value;
00175     }
00177     inline int accumulate() const {
00178         return accumulate_;
00179     }
00185     inline void setFixOnReducedCosts(int value) {
00186         fixOnReducedCosts_ = value;
00187     }
00189     inline int fixOnReducedCosts() const {
00190         return fixOnReducedCosts_;
00191     }
00196     inline void setReducedCostMultiplier(double value) {
00197         reducedCostMultiplier_ = value;
00198     }
00200     inline double reducedCostMultiplier() const {
00201         return reducedCostMultiplier_;
00202     }
00203 
00204 protected:
00205     // Data
00207     double startTime_;
00209     double maximumTime_;
00213     double fakeCutoff_;
00215     double absoluteIncrement_;
00217     double relativeIncrement_;
00219     double defaultRounding_;
00221     double initialWeight_;
00223     double weightFactor_;
00225     double artificialCost_;
00228     double iterationRatio_;
00233     double reducedCostMultiplier_;
00235     int maximumPasses_;
00239     int maximumRetries_;
00250     int accumulate_;
00256     int fixOnReducedCosts_;
00258     bool roundExpensive_;
00259 
00260 private:
00265     int rounds(OsiSolverInterface * solver, double * solution,
00266                /*const double * objective, */
00267                int numberIntegers, const int * integerVariable,
00268                /*char * pumpPrint,*/int passNumber,
00269                /*bool roundExpensive=false,*/
00270                double downValue = 0.5, int *flip = 0);
00271     /* note for eagle eyed readers.
00272        when_ can now be exotic -
00273        <=10 normal
00274     */
00275 };
00276 
00277 # ifdef COIN_HAS_CLP
00278 
00279 class CbcDisasterHandler : public OsiClpDisasterHandler {
00280 public:
00284 #ifdef JJF_ZERO
00285 
00286     virtual void intoSimplex();
00288     virtual bool check() const ;
00290     virtual void saveInfo();
00291 #endif
00292 
00293     virtual int typeOfDisaster();
00295 
00296 
00301     CbcDisasterHandler(CbcModel * model = NULL);
00303     virtual ~CbcDisasterHandler();
00304     // Copy
00305     CbcDisasterHandler(const CbcDisasterHandler&);
00306     // Assignment
00307     CbcDisasterHandler& operator=(const CbcDisasterHandler&);
00309     virtual ClpDisasterHandler * clone() const;
00310 
00312 
00317     void setCbcModel(CbcModel * model);
00319     inline CbcModel * cbcModel() const {
00320         return cbcModel_;
00321     }
00322 
00324 
00325 
00326 protected:
00330 
00331     CbcModel * cbcModel_;
00332 
00334 };
00335 #endif
00336 
00337 #endif
00338 

Generated on Tue Sep 7 2010 20:23:52 by  doxygen 1.7.1