00001 // edwin 12/5/09 carved out of CbcHeuristicRINS 00002 #ifndef CbcHeuristicDINS_H 00003 #define CbcHeuristicDINS_H 00004 00005 #include "CbcHeuristic.hpp" 00006 00007 00008 class CbcHeuristicDINS : public CbcHeuristic { 00009 public: 00010 00011 // Default Constructor 00012 CbcHeuristicDINS (); 00013 00014 /* Constructor with model - assumed before cuts 00015 Initial version does not do Lps 00016 */ 00017 CbcHeuristicDINS (CbcModel & model); 00018 00019 // Copy constructor 00020 CbcHeuristicDINS ( const CbcHeuristicDINS &); 00021 00022 // Destructor 00023 ~CbcHeuristicDINS (); 00024 00026 virtual CbcHeuristic * clone() const; 00027 00028 00030 CbcHeuristicDINS & operator=(const CbcHeuristicDINS& rhs); 00031 00033 virtual void generateCpp( FILE * fp) ; 00034 00036 virtual void resetModel(CbcModel * model); 00037 00039 virtual void setModel(CbcModel * model); 00040 00041 using CbcHeuristic::solution ; 00046 virtual int solution(double & objectiveValue, 00047 double * newSolution); 00049 int solutionFix(double & objectiveValue, 00050 double * newSolution, 00051 const int * keep); 00052 00054 inline void setHowOften(int value) { 00055 howOften_ = value; 00056 } 00058 inline void setMaximumKeep(int value) { 00059 maximumKeepSolutions_ = value; 00060 } 00062 inline void setConstraint(int value) { 00063 localSpace_ = value; 00064 } 00065 00066 protected: 00067 // Data 00068 00070 int numberSolutions_; 00072 int howOften_; 00074 int numberSuccesses_; 00076 int numberTries_; 00078 int maximumKeepSolutions_; 00080 int numberKeptSolutions_; 00082 int numberIntegers_; 00084 int localSpace_; 00086 int ** values_; 00087 }; 00088 00089 #endif 00090