diff options
Diffstat (limited to 'thirdparty/linux/include/coin/BonHeuristicLocalBranching.hpp')
-rw-r--r-- | thirdparty/linux/include/coin/BonHeuristicLocalBranching.hpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin/BonHeuristicLocalBranching.hpp b/thirdparty/linux/include/coin/BonHeuristicLocalBranching.hpp new file mode 100644 index 0000000..ac56a56 --- /dev/null +++ b/thirdparty/linux/include/coin/BonHeuristicLocalBranching.hpp @@ -0,0 +1,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 + |