Bonmin  1.8.8
BonHeuristicLocalBranching.hpp
Go to the documentation of this file.
1 // (C) Copyright CNRS and International Business Machines Corporation
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Authors :
6 // Pierre Bonami, LIF Université de la Méditérannée-CNRS
7 // Joao Goncalves, International Business Machines Corporation
8 //
9 // Date : 06/18/2008
10 
11 #ifndef BonHeuristicLocalBranching_H
12 #define BonHeuristicLocalBranching_H
14 
15 namespace Bonmin {
17  public:
22 
26  virtual CbcHeuristic * clone() const{
27  return new HeuristicLocalBranching(*this);
28  }
29 
31  virtual ~HeuristicLocalBranching();
32 
34  virtual void setModel(CbcModel * model);
35 
37  virtual void validate();
38 
40  int solution(double & objectiveValue,
41  double * newSolution);
42 
44  static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
45 
47  void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
48 
49  private:
51  int howOften_;
54 
55  };
56 
57 }/* Ends Bonmin namepace.*/
58 #endif
59 
int howOften_
How often to do (code can change)
void Initialize(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Initiaize using passed options.
int solution(double &objectiveValue, double *newSolution)
Runs heuristic.
virtual void setModel(CbcModel *model)
Update model.
virtual void validate()
Validate model i.e. sets when_ to 0 if necessary.
virtual CbcHeuristic * clone() const
Virtual constructor.
int numberSolutions_
Number of solutions so we can do something at solution.
virtual ~HeuristicLocalBranching()
Destructor.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register the options common to all local search based heuristics.
HeuristicLocalBranching()
Default constructor.