00001
00002
00003
00004 #ifndef CbcHeuristicRINS_H
00005 #define CbcHeuristicRINS_H
00006
00007 #include "CbcHeuristic.hpp"
00011 class CbcHeuristicRINS : public CbcHeuristic {
00012 public:
00013
00014
00015 CbcHeuristicRINS ();
00016
00017
00018
00019
00020 CbcHeuristicRINS (CbcModel & model);
00021
00022
00023 CbcHeuristicRINS ( const CbcHeuristicRINS &);
00024
00025
00026 ~CbcHeuristicRINS ();
00027
00029 virtual CbcHeuristic * clone() const;
00030
00031
00033 CbcHeuristicRINS & operator=(const CbcHeuristicRINS& rhs);
00034
00036 virtual void generateCpp( FILE * fp) ;
00037
00039 virtual void resetModel(CbcModel * model);
00040
00042 virtual void setModel(CbcModel * model);
00043
00044 using CbcHeuristic::solution ;
00049 virtual int solution(double & objectiveValue,
00050 double * newSolution);
00052 int solutionFix(double & objectiveValue,
00053 double * newSolution,
00054 const int * keep);
00055
00057 inline void setHowOften(int value)
00058 { howOften_=value;}
00060 inline char * used() const
00061 { return used_;}
00062
00063 protected:
00064
00065
00067 int numberSolutions_;
00069 int howOften_;
00071 int numberSuccesses_;
00073 int numberTries_;
00079 int stateOfFixing_;
00081 int lastNode_;
00083 char * used_;
00084 };
00085
00089 class CbcHeuristicRENS : public CbcHeuristic {
00090 public:
00091
00092
00093 CbcHeuristicRENS ();
00094
00095
00096
00097
00098 CbcHeuristicRENS (CbcModel & model);
00099
00100
00101 CbcHeuristicRENS ( const CbcHeuristicRENS &);
00102
00103
00104 ~CbcHeuristicRENS ();
00105
00107 virtual CbcHeuristic * clone() const;
00108
00109
00111 CbcHeuristicRENS & operator=(const CbcHeuristicRENS& rhs);
00112
00114 virtual void resetModel(CbcModel * model);
00115
00117 virtual void setModel(CbcModel * model);
00118
00119 using CbcHeuristic::solution ;
00125 virtual int solution(double & objectiveValue,
00126 double * newSolution);
00127
00128 protected:
00129
00131 int numberTries_;
00132 };
00133
00134 class CbcHeuristicDINS : public CbcHeuristic {
00135 public:
00136
00137
00138 CbcHeuristicDINS ();
00139
00140
00141
00142
00143 CbcHeuristicDINS (CbcModel & model);
00144
00145
00146 CbcHeuristicDINS ( const CbcHeuristicDINS &);
00147
00148
00149 ~CbcHeuristicDINS ();
00150
00152 virtual CbcHeuristic * clone() const;
00153
00154
00156 CbcHeuristicDINS & operator=(const CbcHeuristicDINS& rhs);
00157
00159 virtual void generateCpp( FILE * fp) ;
00160
00162 virtual void resetModel(CbcModel * model);
00163
00165 virtual void setModel(CbcModel * model);
00166
00167 using CbcHeuristic::solution ;
00172 virtual int solution(double & objectiveValue,
00173 double * newSolution);
00175 int solutionFix(double & objectiveValue,
00176 double * newSolution,
00177 const int * keep);
00178
00180 inline void setHowOften(int value)
00181 { howOften_=value;}
00183 inline void setMaximumKeep(int value)
00184 { maximumKeepSolutions_=value;}
00186 inline void setConstraint(int value)
00187 { localSpace_=value;}
00188
00189 protected:
00190
00191
00193 int numberSolutions_;
00195 int howOften_;
00197 int numberSuccesses_;
00199 int numberTries_;
00201 int maximumKeepSolutions_;
00203 int numberKeptSolutions_;
00205 int numberIntegers_;
00207 int localSpace_;
00209 int ** values_;
00210 };
00211
00215 class CbcHeuristicVND : public CbcHeuristic {
00216 public:
00217
00218
00219 CbcHeuristicVND ();
00220
00221
00222
00223
00224 CbcHeuristicVND (CbcModel & model);
00225
00226
00227 CbcHeuristicVND ( const CbcHeuristicVND &);
00228
00229
00230 ~CbcHeuristicVND ();
00231
00233 virtual CbcHeuristic * clone() const;
00234
00235
00237 CbcHeuristicVND & operator=(const CbcHeuristicVND& rhs);
00238
00240 virtual void generateCpp( FILE * fp) ;
00241
00243 virtual void resetModel(CbcModel * model);
00244
00246 virtual void setModel(CbcModel * model);
00247
00248 using CbcHeuristic::solution ;
00253 virtual int solution(double & objectiveValue,
00254 double * newSolution);
00256 int solutionFix(double & objectiveValue,
00257 double * newSolution,
00258 const int * keep);
00259
00261 inline void setHowOften(int value)
00262 { howOften_=value;}
00264 inline double * baseSolution() const
00265 { return baseSolution_;}
00266
00267 protected:
00268
00269
00271 int numberSolutions_;
00273 int howOften_;
00275 int numberSuccesses_;
00277 int numberTries_;
00279 int lastNode_;
00281 int stepSize_;
00282 int k_;
00283 int kmax_;
00284 int nDifferent_;
00286 double * baseSolution_;
00287 };
00288
00289 #endif