Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcHeuristicDINS.hpp
Go to the documentation of this file.
1 // $Id: CbcHeuristicDINS.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 CbcHeuristicDINS_H
9 #define CbcHeuristicDINS_H
10 
11 #include "CbcHeuristic.hpp"
12 
13 
15 public:
16 
17  // Default Constructor
19 
20  /* Constructor with model - assumed before cuts
21  Initial version does not do Lps
22  */
23  CbcHeuristicDINS (CbcModel & model);
24 
25  // Copy constructor
27 
28  // Destructor
30 
32  virtual CbcHeuristic * clone() const;
33 
34 
37 
39  virtual void generateCpp( FILE * fp) ;
40 
42  virtual void resetModel(CbcModel * model);
43 
45  virtual void setModel(CbcModel * model);
46 
52  virtual int solution(double & objectiveValue,
53  double * newSolution);
55  int solutionFix(double & objectiveValue,
56  double * newSolution,
57  const int * keep);
58 
60  inline void setHowOften(int value) {
61  howOften_ = value;
62  }
64  inline void setMaximumKeep(int value) {
65  maximumKeepSolutions_ = value;
66  }
68  inline void setConstraint(int value) {
69  localSpace_ = value;
70  }
71 
72 protected:
73  // Data
74 
78  int howOften_;
92  int ** values_;
93 };
94 
95 #endif
96 
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setHowOften(int value)
Sets how often to do it.
void setMaximumKeep(int value)
Sets maximum number of solutions kept.
int localSpace_
Local parameter.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
int numberIntegers_
Number of integer variables.
int howOften_
How often to do (code can change)
void setConstraint(int value)
Sets tightness of extra constraint.
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.
int maximumKeepSolutions_
Maximum number of solutions to keep.
int numberSolutions_
Number of solutions so we can do something at solution.
Heuristic base class.
CbcHeuristicDINS & operator=(const CbcHeuristicDINS &rhs)
Assignment operator.
int numberKeptSolutions_
Number of solutions kept.
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 numberTries_
Number of tries.
int numberSuccesses_
Number of successes.
int ** values_
Values of integer variables.
Simple Branch and bound class.
Definition: CbcModel.hpp:101
virtual CbcHeuristic * clone() const
Clone.