Debian Codegraph @

Bonmin/src/CbcBonmin/Heuristics/BonHeuristicRINS.hpp

raw
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 BonHeuristicRINS_H
12 #define BonHeuristicRINS_H
13 #include "BonLocalSolverBasedHeuristic.hpp"
14
15 namespace Bonmin {
16 class HeuristicRINS:public LocalSolverBasedHeuristic {
17 public:
18 /** Default constructor*/
19 HeuristicRINS();
20 /** Constructor with setup.*/
21 HeuristicRINS(BonminSetup * setup);
22
23 /** Copy constructor.*/
24 HeuristicRINS(const HeuristicRINS &other);
25 /** Virtual constructor.*/
26 virtual CbcHeuristic * clone() const{
27 return new HeuristicRINS(*this);
28 }
29
30 /** Destructor*/
31 virtual ~HeuristicRINS();
32
33 /** Runs heuristic*/
34 int solution(double & objectiveValue,
35 double * newSolution);
36 /** Register the options common to all local search based heuristics.*/
37 static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions);
38
39 /** Initiaize using passed options.*/
40 void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options);
41
42 /// Sets how often to do it
43 inline void setHowOften(int value)
44 { howOften_=value;}
45
46 private:
47 /// How often to do (code can change)
48 int howOften_;
49 /// Number of solutions so we can do something at solution
50 int numberSolutions_;
51
52 };
53
54 }/* Ends Bonmin namepace.*/
55 #endif