source: branches/devel/Bonmin/src/OaInterface/BonDummyHeuristic.hpp @ 58

Last change on this file since 58 was 58, checked in by pbonami, 13 years ago

Finish renaming

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 1.3 KB
Line 
1// (C) Copyright Carnegie Mellon University 2005
2// All Rights Reserved.
3// This code is published under the Common 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
12#include "BonOsiTMINLPInterface.hpp"
13
14#include "CbcHeuristic.hpp"
15namespace Bonmin{
16class  DummyHeuristic : public CbcHeuristic
17{
18public:
19  /// Default constructor
20  DummyHeuristic(OsiTMINLPInterface * si = NULL);
21  /// Usefull constructor
22  DummyHeuristic(CbcModel &model, OsiTMINLPInterface * si = NULL);
23  ///Copy constructor
24  DummyHeuristic( const DummyHeuristic &copy):
25      CbcHeuristic(copy),
26      nlp_(copy.nlp_),
27      knowsSolution(copy.knowsSolution)
28  {}
29  /// Assign an OsiTMINLPInterface
30  void assignInterface(OsiTMINLPInterface * si);
31  /// heuristic method
32  virtual int solution(double &solutionValue, double *betterSolution);
33  virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
34  {
35    return solution(solutionValue, betterSolution);
36  }
37  virtual CbcHeuristic * clone()const
38  {
39    return new DummyHeuristic(*this);
40  }
41  virtual void resetModel(CbcModel*)
42  {}
43private:
44  /// Pointer to the Ipopt interface
45  OsiTMINLPInterface * nlp_;
46  /// Do I have a solution?
47  bool knowsSolution;
48};
49}
50#endif
Note: See TracBrowser for help on using the repository browser.