CbcHeuristicVND.hpp
Go to the documentation of this file.
1 // edwin 12/5/09 carved out of CbcHeuristicRINS
2 #ifndef CbcHeuristicVND_H
3 #define CbcHeuristicVND_H
4 
5 #include "CbcHeuristic.hpp"
6 
7 
11 class CbcHeuristicVND : public CbcHeuristic {
12 public:
13 
14  // Default Constructor
15  CbcHeuristicVND ();
16 
17  /* Constructor with model - assumed before cuts
18  Initial version does not do Lps
19  */
20  CbcHeuristicVND (CbcModel & model);
21 
22  // Copy constructor
24 
25  // Destructor
27 
29  virtual CbcHeuristic * clone() const;
30 
31 
34 
36  virtual void generateCpp( FILE * fp) ;
37 
39  virtual void resetModel(CbcModel * model);
40 
42  virtual void setModel(CbcModel * model);
43 
49  virtual int solution(double & objectiveValue,
50  double * newSolution);
52  int solutionFix(double & objectiveValue,
53  double * newSolution,
54  const int * keep);
55 
57  inline void setHowOften(int value) {
58  howOften_ = value;
59  }
61  inline double * baseSolution() const {
62  return baseSolution_;
63  }
64 
65 protected:
66  // Data
67 
71  int howOften_;
77  int lastNode_;
79  int stepSize_;
80  int k_;
81  int kmax_;
84  double * baseSolution_;
85 };
86 
87 #endif
88 
CbcHeuristicVND & operator=(const CbcHeuristicVND &rhs)
Assignment operator.
int stepSize_
Step size for decomposition.
LocalSearch class.
virtual int solution(double &objectiveValue, double *newSolution)=0
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
double * baseSolution_
Base solution.
int howOften_
How often to do (code can change)
double * baseSolution() const
base solution array so we can set
virtual CbcHeuristic * clone() const
Clone.
int lastNode_
Node when last done.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
int numberTries_
Number of tries.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
int numberSuccesses_
Number of successes.
int numberSolutions_
Number of solutions so we can do something at solution.
Heuristic base class.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
void setHowOften(int value)
Sets how often to do it.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
Simple Branch and bound class.
Definition: CbcModel.hpp:98