blob: ac56a564a9abf16380bb0d14ce8b2fd63bf74c14 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// (C) Copyright CNRS and International Business Machines Corporation
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// Authors :
// Pierre Bonami, LIF Université de la Méditérannée-CNRS
// Joao Goncalves, International Business Machines Corporation
//
// Date : 06/18/2008
#ifndef BonHeuristicLocalBranching_H
#define BonHeuristicLocalBranching_H
#include "BonLocalSolverBasedHeuristic.hpp"
namespace Bonmin {
class HeuristicLocalBranching:public LocalSolverBasedHeuristic {
public:
/** Default constructor*/
HeuristicLocalBranching();
/** Constructor with setup.*/
HeuristicLocalBranching(BonminSetup * setup);
/** Copy constructor.*/
HeuristicLocalBranching(const HeuristicLocalBranching &other);
/** Virtual constructor.*/
virtual CbcHeuristic * clone() const{
return new HeuristicLocalBranching(*this);
}
/** Destructor*/
virtual ~HeuristicLocalBranching();
/// Update model
virtual void setModel(CbcModel * model);
/// Validate model i.e. sets when_ to 0 if necessary
virtual void validate();
/** Runs heuristic*/
int solution(double & objectiveValue,
double * newSolution);
/** Register the options common to all local search based heuristics.*/
static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
/** Initiaize using passed options.*/
void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
private:
/// How often to do (code can change)
int howOften_;
/// Number of solutions so we can do something at solution
int numberSolutions_;
};
}/* Ends Bonmin namepace.*/
#endif
|