00001 // Copyright (C) 2002, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef CbcHeuristicLocal_H 00004 #define CbcHeuristicLocal_H 00005 00006 #include "CbcHeuristic.hpp" 00010 class CbcHeuristicLocal : public CbcHeuristic { 00011 public: 00012 00013 // Default Constructor 00014 CbcHeuristicLocal (); 00015 00016 /* Constructor with model - assumed before cuts 00017 Initial version does not do Lps 00018 */ 00019 CbcHeuristicLocal (CbcModel & model); 00020 00021 // Copy constructor 00022 CbcHeuristicLocal ( const CbcHeuristicLocal &); 00023 00024 // Destructor 00025 ~CbcHeuristicLocal (); 00026 00028 virtual CbcHeuristic * clone() const; 00029 00031 CbcHeuristicLocal & operator=(const CbcHeuristicLocal& rhs); 00032 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 ; 00054 virtual int solution(double & objectiveValue, 00055 double * newSolution); 00057 int solutionFix(double & objectiveValue, 00058 double * newSolution, 00059 const int * keep); 00060 00062 inline void setSearchType(int value) 00063 { swap_=value;} 00065 inline char * used() const 00066 { return used_;} 00067 00068 protected: 00069 // Data 00070 00071 // Original matrix by column 00072 CoinPackedMatrix matrix_; 00073 00074 // Number of solutions so we only do after new solution 00075 int numberSolutions_; 00076 // Type of search 0=normal, 1=BAB 00077 int swap_; 00079 char * used_; 00080 }; 00081 00082 00083 #endif