00001 // Copyright (C) 2006, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef CbcHeuristicRINS_H 00004 #define CbcHeuristicRINS_H 00005 00006 #include "CbcHeuristic.hpp" 00010 class CbcHeuristicRINS : public CbcHeuristic { 00011 public: 00012 00013 // Default Constructor 00014 CbcHeuristicRINS (); 00015 00016 /* Constructor with model - assumed before cuts 00017 Initial version does not do Lps 00018 */ 00019 CbcHeuristicRINS (CbcModel & model); 00020 00021 // Copy constructor 00022 CbcHeuristicRINS ( const CbcHeuristicRINS &); 00023 00024 // Destructor 00025 ~CbcHeuristicRINS (); 00026 00028 virtual CbcHeuristic * clone() const; 00029 00030 00032 CbcHeuristicRINS & operator=(const CbcHeuristicRINS& rhs); 00033 00035 virtual void generateCpp( FILE * fp) ; 00036 00038 virtual void resetModel(CbcModel * model); 00039 00041 virtual void setModel(CbcModel * model); 00042 00043 using CbcHeuristic::solution ; 00048 virtual int solution(double & objectiveValue, 00049 double * newSolution); 00051 int solutionFix(double & objectiveValue, 00052 double * newSolution, 00053 const int * keep); 00054 00056 inline void setHowOften(int value) 00057 { howOften_=value;} 00059 inline char * used() const 00060 { return used_;} 00061 00062 protected: 00063 // Data 00064 00066 int numberSolutions_; 00068 int howOften_; 00070 int numberSuccesses_; 00072 int numberTries_; 00074 char * used_; 00075 }; 00076 00077 00078 #endif