Cbc  2.9.9
 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 1956 2013-08-17 15:28:45Z forrest $ */
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 
20  // Default Constructor
22 
23  /* Constructor with model - assumed before cuts
24  Initial version does not do Lps
25  */
26  CbcHeuristicRINS (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 char * used() const {
68  return used_;
69  }
71  inline void setLastNode(int value) {
72  lastNode_ = value;
73  }
75  inline void setSolutionCount(int value) {
76  numberSolutions_ = value;
77  }
78 
79 protected:
80  // Data
81 
85  int howOften_;
97  int lastNode_;
99  char * used_;
100 };
101 #endif
102 
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:101
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)