| 1 |
// (C) Copyright CNRS |
| 2 |
// This code is published under the Eclipse Public License. |
| 3 |
// |
| 4 |
// Authors : |
| 5 |
// Pierre Bonami, LIF Université de la Méditérannée-CNRS |
| 6 |
// |
| 7 |
// Date : 06/18/2008 |
| 8 |
|
| 9 |
#ifndef BonFixAndSolveHeuristic_H |
| 10 |
#define BonFixAndSolveHeuristic_H |
| 11 |
#include "BonLocalSolverBasedHeuristic.hpp" |
| 12 |
|
| 13 |
namespace Bonmin { |
| 14 |
class FixAndSolveHeuristic:public LocalSolverBasedHeuristic { |
| 15 |
public: |
| 16 |
/** Default constructor*/ |
| 17 |
FixAndSolveHeuristic(); |
| 18 |
/** Constructor with setup.*/ |
| 19 |
FixAndSolveHeuristic(BonminSetup * setup); |
| 20 |
|
| 21 |
/** Copy constructor.*/ |
| 22 |
FixAndSolveHeuristic(const FixAndSolveHeuristic &other); |
| 23 |
/** Virtual constructor.*/ |
| 24 |
virtual CbcHeuristic * clone() const{ |
| 25 |
return new FixAndSolveHeuristic(*this); |
| 26 |
} |
| 27 |
|
| 28 |
/** Destructor*/ |
| 29 |
virtual ~FixAndSolveHeuristic(); |
| 30 |
|
| 31 |
/** Runs heuristic*/ |
| 32 |
int solution(double & objectiveValue, |
| 33 |
double * newSolution); |
| 34 |
/** Register the options common to all local search based heuristics.*/ |
| 35 |
static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions); |
| 36 |
|
| 37 |
/** Initiaize using passed options.*/ |
| 38 |
void Initialize(Ipopt::SmartPtr<Ipopt::OptionsList> options); |
| 39 |
}; |
| 40 |
|
| 41 |
}/* Ends Bonmin namepace.*/ |
| 42 |
#endif |
| 43 |
|