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

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

astyled the devel branch

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 1.4 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
16{
17  class  DummyHeuristic : public CbcHeuristic
18  {
19  public:
20    /// Default constructor
21    DummyHeuristic(OsiTMINLPInterface * si = NULL);
22    /// Usefull constructor
23    DummyHeuristic(CbcModel &model, OsiTMINLPInterface * si = NULL);
24    ///Copy constructor
25    DummyHeuristic( const DummyHeuristic &copy):
26        CbcHeuristic(copy),
27        nlp_(copy.nlp_),
28        knowsSolution(copy.knowsSolution)
29    {}
30    /// Assign an OsiTMINLPInterface
31    void assignInterface(OsiTMINLPInterface * si);
32    /// heuristic method
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  private:
45    /// Pointer to the Ipopt interface
46    OsiTMINLPInterface * nlp_;
47    /// Do I have a solution?
48    bool knowsSolution;
49  };
50}
51#endif
Note: See TracBrowser for help on using the repository browser.