9#ifndef BonLocalSolverBasedHeuristic_H
10#define BonLocalSolverBasedHeuristic_H
12#include "CbcHeuristic.hpp"
30 virtual CbcHeuristic *
clone()
const = 0;
37 virtual void setModel(CbcModel * model){
throw -1;}
51 double * newSolution)=0;
63 double cutoff, std::string prefix =
"local_solver.")
const;
79 const std::string &option,
80 const std::string &value);
84 const std::string &option,
89 const std::string &option,
95 int max_number_nodes_;
97 int max_number_solutions_;
Ipopt::SmartPtr< Ipopt::OptionsList > options()
Acces list of Options.
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register the options common to all local search based heuristics.
LocalSolverBasedHeuristic & operator=(const LocalSolverBasedHeuristic &rhs)
Assignment operator.
static void changeIfNotSet(Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const double &value)
static void changeIfNotSet(Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const int &value)
virtual int solution(double &objectiveValue, double *newSolution)=0
Performs heuristic
void Initialize(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Initiaize using passed options.
LocalSolverBasedHeuristic(const LocalSolverBasedHeuristic &other)
Copy constructor.
virtual void setupDefaults(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Setup the defaults.
void setSetup(BonminSetup *setup)
Change setup used for heuristic.
virtual CbcHeuristic * clone() const =0
Virtual copy constructor.
int doLocalSearch(OsiTMINLPInterface *solver, double *solution, double &solValue, double cutoff, std::string prefix="local_solver.") const
Do a local search based on setup and passed solver.
~LocalSolverBasedHeuristic()
Destructor.
BonminSetup * setup_
Setup to use for local searches (will make copies).
virtual int solution(double &objectiveValue, double *newSolution, OsiCuts &cs)
Performs heuristic which adds cuts
static void changeIfNotSet(Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const std::string &value)
LocalSolverBasedHeuristic()
Default constructor.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
LocalSolverBasedHeuristic(BonminSetup *setup)
Constructor with setup.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
(C) Copyright International Business Machines Corporation 2007