Bonmin  1.8.8
BonDummyHeuristic.hpp
Go to the documentation of this file.
1 // (C) Copyright Carnegie Mellon University 2005
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors :
6 // P. Bonami, Carnegie Mellon University
7 //
8 // Date : 05/26/2005
9 
10 #ifndef BonDummyHeuristic_HPP
11 #define BonDummyHeuristic_HPP
13 
14 #include "CbcHeuristic.hpp"
15 namespace Bonmin
16 {
17  class DummyHeuristic : public CbcHeuristic
18  {
19  public:
23  DummyHeuristic(CbcModel &model, OsiTMINLPInterface * si = NULL);
26  CbcHeuristic(copy),
27  nlp_(copy.nlp_),
29  {}
31  void setNlp(OsiTMINLPInterface * si);
33  virtual int solution(double &solutionValue, double *betterSolution);
34  virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
35  {
36  return solution(solutionValue, betterSolution);
37  }
38  virtual CbcHeuristic * clone()const
39  {
40  return new DummyHeuristic(*this);
41  }
42  virtual void resetModel(CbcModel*)
43  {}
44  virtual bool shouldHeurRun(int whereFrom){
45  return true;}
46  private:
51  };
52 }
53 #endif
virtual bool shouldHeurRun(int whereFrom)
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
virtual int solution(double &solutionValue, double *betterSolution, OsiCuts &cs)
DummyHeuristic(const DummyHeuristic &copy)
Copy constructor.
virtual CbcHeuristic * clone() const
void setNlp(OsiTMINLPInterface *si)
Set nlp_.
virtual void resetModel(CbcModel *)
DummyHeuristic(OsiTMINLPInterface *si=NULL)
Default constructor.
OsiTMINLPInterface * nlp_
Pointer to the Ipopt interface.
virtual int solution(double &solutionValue, double *betterSolution)
heuristic method
bool knowsSolution
Do I have a solution?