CbcHeuristicDINS.hpp
Go to the documentation of this file.
1 // edwin 12/5/09 carved out of CbcHeuristicRINS
2 #ifndef CbcHeuristicDINS_H
3 #define CbcHeuristicDINS_H
4 
5 #include "CbcHeuristic.hpp"
6 
7 
8 class CbcHeuristicDINS : public CbcHeuristic {
9 public:
10 
11  // Default Constructor
13 
14  /* Constructor with model - assumed before cuts
15  Initial version does not do Lps
16  */
17  CbcHeuristicDINS (CbcModel & model);
18 
19  // Copy constructor
21 
22  // Destructor
24 
26  virtual CbcHeuristic * clone() const;
27 
28 
31 
33  virtual void generateCpp( FILE * fp) ;
34 
36  virtual void resetModel(CbcModel * model);
37 
39  virtual void setModel(CbcModel * model);
40 
46  virtual int solution(double & objectiveValue,
47  double * newSolution);
49  int solutionFix(double & objectiveValue,
50  double * newSolution,
51  const int * keep);
52 
54  inline void setHowOften(int value) {
55  howOften_ = value;
56  }
58  inline void setMaximumKeep(int value) {
59  maximumKeepSolutions_ = value;
60  }
62  inline void setConstraint(int value) {
63  localSpace_ = value;
64  }
65 
66 protected:
67  // Data
68 
72  int howOften_;
86  int ** values_;
87 };
88 
89 #endif
90 
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
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 localSpace_
Local parameter.
int ** values_
Values of integer variables.
int howOften_
How often to do (code can change)
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int numberKeptSolutions_
Number of solutions kept.
int numberIntegers_
Number of integer variables.
CbcHeuristicDINS & operator=(const CbcHeuristicDINS &rhs)
Assignment operator.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
void setConstraint(int value)
Sets tightness of extra constraint.
Heuristic base class.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
void setMaximumKeep(int value)
Sets maximum number of solutions kept.
void setHowOften(int value)
Sets how often to do it.
int maximumKeepSolutions_
Maximum number of solutions to keep.
int numberSolutions_
Number of solutions so we can do something at solution.
int numberTries_
Number of tries.
int numberSuccesses_
Number of successes.
Simple Branch and bound class.
Definition: CbcModel.hpp:98
virtual CbcHeuristic * clone() const
Clone.