Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcHeuristicRINS.hpp
Go to the documentation of this file.
1 /* $Id: CbcHeuristicRINS.hpp 2465 2019-01-03 19:26:52Z unxusr $ */
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 #ifndef CbcHeuristicRINS_H
7 #define CbcHeuristicRINS_H
8 
9 #include "CbcHeuristic.hpp"
10 // for backward compatibility include 3 other headers
11 #include "CbcHeuristicRENS.hpp"
12 #include "CbcHeuristicDINS.hpp"
13 #include "CbcHeuristicVND.hpp"
18 public:
19  // Default Constructor
21 
22  /* Constructor with model - assumed before cuts
23  Initial version does not do Lps
24  */
25  CbcHeuristicRINS(CbcModel &model);
26 
27  // Copy constructor
29 
30  // Destructor
32 
34  virtual CbcHeuristic *clone() const;
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  {
63  howOften_ = value;
64  }
66  inline char *used() const
67  {
68  return used_;
69  }
71  inline void setLastNode(int value)
72  {
73  lastNode_ = value;
74  }
76  inline void setSolutionCount(int value)
77  {
78  numberSolutions_ = value;
79  }
80 
81 protected:
82  // Data
83 
87  int howOften_;
99  int lastNode_;
101  char *used_;
102 };
103 #endif
104 
105 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
106 */
int lastNode_
Node when last done.
char * used_
Whether a variable has been in a solution.
int stateOfFixing_
State of fixing continuous variables - 0 - not tried +n - this divisor makes small enough -n - this d...
LocalSearch class.
int numberTries_
Number of tries.
void setSolutionCount(int value)
Resets number of solutions.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
void setLastNode(int value)
Resets lastNode.
virtual CbcHeuristic * clone() const
Clone.
CbcHeuristicRINS & operator=(const CbcHeuristicRINS &rhs)
Assignment operator.
int howOften_
How often to do (code can change)
void setHowOften(int value)
Sets how often to do it.
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)=0
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
char * used() const
Used array so we can set.
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)