Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcHeuristicVND.hpp
Go to the documentation of this file.
1 // $Id: CbcHeuristicVND.hpp 1899 2013-04-09 18:12:08Z stefan $
2 // Copyright (C) 2006, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 // edwin 12/5/09 carved out of CbcHeuristicRINS
7 
8 #ifndef CbcHeuristicVND_H
9 #define CbcHeuristicVND_H
10 
11 #include "CbcHeuristic.hpp"
12 
13 
17 class CbcHeuristicVND : public CbcHeuristic {
18 public:
19 
20  // Default Constructor
21  CbcHeuristicVND ();
22 
23  /* Constructor with model - assumed before cuts
24  Initial version does not do Lps
25  */
26  CbcHeuristicVND (CbcModel & model);
27 
28  // Copy constructor
30 
31  // Destructor
33 
35  virtual CbcHeuristic * clone() const;
36 
37 
40 
42  virtual void generateCpp( FILE * fp) ;
43 
45  virtual void resetModel(CbcModel * model);
46 
48  virtual void setModel(CbcModel * model);
49 
55  virtual int solution(double & objectiveValue,
56  double * newSolution);
58  int solutionFix(double & objectiveValue,
59  double * newSolution,
60  const int * keep);
61 
63  inline void setHowOften(int value) {
64  howOften_ = value;
65  }
67  inline double * baseSolution() const {
68  return baseSolution_;
69  }
70 
71 protected:
72  // Data
73 
77  int howOften_;
83  int lastNode_;
85  int stepSize_;
86  int k_;
87  int kmax_;
90  double * baseSolution_;
91 };
92 
93 #endif
94 
LocalSearch class.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
double * baseSolution() const
base solution array so we can set
int numberSuccesses_
Number of successes.
double * baseSolution_
Base solution.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
int howOften_
How often to do (code can change)
int numberSolutions_
Number of solutions so we can do something at solution.
int numberTries_
Number of tries.
virtual CbcHeuristic * clone() const
Clone.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int lastNode_
Node when last done.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
Heuristic base 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...
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
CbcHeuristicVND & operator=(const CbcHeuristicVND &rhs)
Assignment operator.
Simple Branch and bound class.
Definition: CbcModel.hpp:101
int stepSize_
Step size for decomposition.
void setHowOften(int value)
Sets how often to do it.