Couenne  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BonInitHeuristic.hpp
Go to the documentation of this file.
1 /* $Id: BonInitHeuristic.hpp 488 2011-01-10 17:06:41Z pbelotti $ */
2 // (C) Copyright International Business Machines Corporation 2007
3 // All Rights Reserved.
4 // This code is published under the Eclipse Public License (EPL).
5 //
6 // Authors :
7 // Andreas Waechter, International Business Machines Corporation
8 //
9 // Date : 12/07/2007
10 
11 #ifndef BonInitHeuristic_HPP
12 #define BonInitHeuristic_HPP
13 
14 #include "CbcHeuristic.hpp"
15 #include "CouenneProblem.hpp"
16 
17 namespace Couenne {
18 
24  class InitHeuristic : public CbcHeuristic{
25 
26  public:
27 
29  InitHeuristic(double objValue, const double* sol, CouenneProblem& cp);
31  InitHeuristic(const InitHeuristic &other);
32 
34  virtual ~InitHeuristic();
35 
37  virtual CbcHeuristic * clone() const;
38 
41 
42  virtual void resetModel(CbcModel * model){}
48  virtual int solution(double & objectiveValue, double * newSolution);
49 
50  private:
51 
53  InitHeuristic();
54 
56  double objValue_;
57 
59  double* sol_;
60 
62  int nVars_;
63  };
64 
65 }
66 
67 #endif
68 
InitHeuristic & operator=(const InitHeuristic &rhs)
Assignment operator.
A heuristic that stores the initial solution of the NLP.
virtual ~InitHeuristic()
Destructor.
int nVars_
Size of array sol.
virtual void resetModel(CbcModel *model)
virtual int solution(double &objectiveValue, double *newSolution)
Run heuristic, return 1 if a better solution than the one passed is found and 0 otherwise.
Class for MINLP problems with symbolic information.
virtual CbcHeuristic * clone() const
Clone.
InitHeuristic()
Default constructor.
double * sol_
point from initial solve
double objValue_
objective function value from initial solve