blob: c8c4e6f38ede14723ffe37ffd092b73cb511f17a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// (C) Copyright International Business Machines 2007
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Authors :
// Andreas Waechter IBM 2007-09-01
#ifndef BonGuessHeuristic_HPP
#define BonGuessHeuristic_HPP
#include "BonOsiTMINLPInterface.hpp"
#include "CbcHeuristic.hpp"
namespace Bonmin
{
class GuessHeuristic : public CbcHeuristic
{
public:
/// Usefull constructor
GuessHeuristic(CbcModel &model);
///Copy constructor
GuessHeuristic( const GuessHeuristic ©):
CbcHeuristic(copy)
{}
/// heuristic method providing guess, based on pseudo costs
virtual int solution(double &solutionValue, double *betterSolution);
virtual int solution(double &solutionValue, double *betterSolution, OsiCuts & cs)
{
return solution(solutionValue, betterSolution);
}
virtual CbcHeuristic * clone()const
{
return new GuessHeuristic(*this);
}
virtual void resetModel(CbcModel*)
{}
private:
/// Default constructor
GuessHeuristic();
/// Assignment operator
GuessHeuristic & operator=(const GuessHeuristic& rhs);
};
}
#endif
|