Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CbcHeuristicDINS.hpp
Go to the documentation of this file.
1 // $Id$
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 
14 public:
15  // Default Constructor
17 
18  /* Constructor with model - assumed before cuts
19  Initial version does not do Lps
20  */
21  CbcHeuristicDINS(CbcModel &model);
22 
23  // Copy constructor
25 
26  // Destructor
28 
30  virtual CbcHeuristic *clone() const;
31 
34 
36  virtual void generateCpp(FILE *fp);
37 
39  virtual void resetModel(CbcModel *model);
40 
42  virtual void setModel(CbcModel *model);
43 
49  virtual int solution(double &objectiveValue,
50  double *newSolution);
52  int solutionFix(double &objectiveValue,
53  double *newSolution,
54  const int *keep);
55 
57  inline void setHowOften(int value)
58  {
59  howOften_ = value;
60  }
62  inline void setMaximumKeep(int value)
63  {
64  maximumKeepSolutions_ = value;
65  }
67  inline void setConstraint(int value)
68  {
69  localSpace_ = value;
70  }
71 
72 protected:
73  // Data
74 
78  int howOften_;
92  int **values_;
93 };
94 
95 #endif
96 
97 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
98 */
CbcHeuristicDINS
Definition: CbcHeuristicDINS.hpp:13
CbcHeuristicDINS::CbcHeuristicDINS
CbcHeuristicDINS()
CbcHeuristicDINS::numberSolutions_
int numberSolutions_
Number of solutions so we can do something at solution.
Definition: CbcHeuristicDINS.hpp:76
CbcHeuristicDINS::setConstraint
void setConstraint(int value)
Sets tightness of extra constraint.
Definition: CbcHeuristicDINS.hpp:67
CbcHeuristicDINS::setModel
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
CbcHeuristic
Heuristic base class.
Definition: CbcHeuristic.hpp:86
CbcHeuristicDINS::solutionFix
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
CbcHeuristicDINS::numberSuccesses_
int numberSuccesses_
Number of successes.
Definition: CbcHeuristicDINS.hpp:80
CbcHeuristicDINS::solution
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
CbcHeuristicDINS::setMaximumKeep
void setMaximumKeep(int value)
Sets maximum number of solutions kept.
Definition: CbcHeuristicDINS.hpp:62
CbcHeuristicDINS::~CbcHeuristicDINS
~CbcHeuristicDINS()
CbcModel
Simple Branch and bound class.
Definition: CbcModel.hpp:100
CbcHeuristicDINS::maximumKeepSolutions_
int maximumKeepSolutions_
Maximum number of solutions to keep.
Definition: CbcHeuristicDINS.hpp:84
CbcHeuristicDINS::numberTries_
int numberTries_
Number of tries.
Definition: CbcHeuristicDINS.hpp:82
CbcHeuristicDINS::resetModel
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
CbcHeuristicDINS::generateCpp
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
CbcHeuristicDINS::setHowOften
void setHowOften(int value)
Sets how often to do it.
Definition: CbcHeuristicDINS.hpp:57
CbcHeuristicDINS::values_
int ** values_
Values of integer variables.
Definition: CbcHeuristicDINS.hpp:92
CbcHeuristicDINS::numberIntegers_
int numberIntegers_
Number of integer variables.
Definition: CbcHeuristicDINS.hpp:88
CbcHeuristic::solution
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...
CbcHeuristicDINS::localSpace_
int localSpace_
Local parameter.
Definition: CbcHeuristicDINS.hpp:90
CbcHeuristic.hpp
CbcHeuristicDINS::howOften_
int howOften_
How often to do (code can change)
Definition: CbcHeuristicDINS.hpp:78
CbcHeuristicDINS::clone
virtual CbcHeuristic * clone() const
Clone.
CbcHeuristicDINS::operator=
CbcHeuristicDINS & operator=(const CbcHeuristicDINS &rhs)
Assignment operator.
CbcHeuristicDINS::numberKeptSolutions_
int numberKeptSolutions_
Number of solutions kept.
Definition: CbcHeuristicDINS.hpp:86