Cbc trunk
|
00001 // $Id$ 00002 // Copyright (C) 2006, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 // This code is licensed under the terms of the Eclipse Public License (EPL). 00005 00006 // edwin 12/5/09 carved out of CbcHeuristicRINS 00007 00008 #ifndef CbcHeuristicVND_H 00009 #define CbcHeuristicVND_H 00010 00011 #include "CbcHeuristic.hpp" 00012 00013 00017 class CbcHeuristicVND : public CbcHeuristic { 00018 public: 00019 00020 // Default Constructor 00021 CbcHeuristicVND (); 00022 00023 /* Constructor with model - assumed before cuts 00024 Initial version does not do Lps 00025 */ 00026 CbcHeuristicVND (CbcModel & model); 00027 00028 // Copy constructor 00029 CbcHeuristicVND ( const CbcHeuristicVND &); 00030 00031 // Destructor 00032 ~CbcHeuristicVND (); 00033 00035 virtual CbcHeuristic * clone() const; 00036 00037 00039 CbcHeuristicVND & operator=(const CbcHeuristicVND& rhs); 00040 00042 virtual void generateCpp( FILE * fp) ; 00043 00045 virtual void resetModel(CbcModel * model); 00046 00048 virtual void setModel(CbcModel * model); 00049 00050 using CbcHeuristic::solution ; 00055 virtual int solution(double & objectiveValue, 00056 double * newSolution); 00058 int solutionFix(double & objectiveValue, 00059 double * newSolution, 00060 const int * keep); 00061 00063 inline void setHowOften(int value) { 00064 howOften_ = value; 00065 } 00067 inline double * baseSolution() const { 00068 return baseSolution_; 00069 } 00070 00071 protected: 00072 // Data 00073 00075 int numberSolutions_; 00077 int howOften_; 00079 int numberSuccesses_; 00081 int numberTries_; 00083 int lastNode_; 00085 int stepSize_; 00086 int k_; 00087 int kmax_; 00088 int nDifferent_; 00090 double * baseSolution_; 00091 }; 00092 00093 #endif 00094