CbcHeuristicRINS.hpp
Go to the documentation of this file.
1 /* $Id: CbcHeuristicRINS.hpp 1261 2009-10-30 12:45:20Z forrest $ */
2 // Copyright (C) 2006, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef CbcHeuristicRINS_H
5 #define CbcHeuristicRINS_H
6 
7 #include "CbcHeuristic.hpp"
8 // for backward compatibility include 3 other headers
9 #include "CbcHeuristicRENS.hpp"
10 #include "CbcHeuristicDINS.hpp"
11 #include "CbcHeuristicVND.hpp"
16 public:
17 
18  // Default Constructor
20 
21  /* Constructor with model - assumed before cuts
22  Initial version does not do Lps
23  */
24  CbcHeuristicRINS (CbcModel & model);
25 
26  // Copy constructor
28 
29  // Destructor
31 
33  virtual CbcHeuristic * clone() const;
34 
35 
38 
40  virtual void generateCpp( FILE * fp) ;
41 
43  virtual void resetModel(CbcModel * model);
44 
46  virtual void setModel(CbcModel * model);
47 
53  virtual int solution(double & objectiveValue,
54  double * newSolution);
56  int solutionFix(double & objectiveValue,
57  double * newSolution,
58  const int * keep);
59 
61  inline void setHowOften(int value) {
62  howOften_ = value;
63  }
65  inline char * used() const {
66  return used_;
67  }
69  inline void setLastNode(int value) {
70  lastNode_ = value;
71  }
72 
73 protected:
74  // Data
75 
79  int howOften_;
91  int lastNode_;
93  char * used_;
94 };
95 #endif
96 
char * used_
Whether a variable has been in a solution.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
CbcHeuristicRINS & operator=(const CbcHeuristicRINS &rhs)
Assignment operator.
char * used() const
Used array so we can set.
int howOften_
How often to do (code can change)
virtual CbcHeuristic * clone() const
Clone.
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 stateOfFixing_
State of fixing continuous variables - 0 - not tried +n - this divisor makes small enough -n - this d...
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int numberTries_
Number of tries.
Heuristic base class.
int numberSolutions_
Number of solutions so we can do something at solution.
void setLastNode(int value)
Resets lastNode.
void setHowOften(int value)
Sets how often to do it.
LocalSearch class.
int lastNode_
Node when last done.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
int numberSuccesses_
Number of successes.
Simple Branch and bound class.
Definition: CbcModel.hpp:98
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)