17 max_number_nodes_(1000),
18 max_number_solutions_(10){
24 max_number_nodes_(1000),
25 max_number_solutions_(10){
32 time_limit_(other.time_limit_),
33 max_number_nodes_(other.max_number_nodes_),
34 max_number_solutions_(other.max_number_solutions_) {
43 CbcHeuristic::operator=(rhs);
52 const std::string &option,
53 const std::string &value){
55 if(!options->GetEnumValue(option,dummy,prefix))
56 options->SetStringValue(prefix + option, value,
true,
true);
62 const std::string &option,
65 if(!options->GetNumericValue(option,dummy,prefix))
66 options->SetNumericValue(prefix + option, value,
true,
true);
72 const std::string &option,
75 if(!options->GetIntegerValue(option,dummy,prefix))
76 options->SetIntegerValue(prefix + option, value,
true,
true);
82 std::string
prefix =
"local_solver.";
84 changeIfNotSet(options, prefix,
"variable_selection",
"most-fractional");
94 double cutoff,std::string
prefix)
const{
~LocalSolverBasedHeuristic()
Destructor.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
static void registerOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register the options common to all local search based heuristics.
Number of candidates for strong branching.
virtual int getNumCols() const
Get number of columns.
double bestObj() const
return objective value of the bestSolution
virtual BabSetupBase * clone() const
virtual copy constructor.
LocalSolverBasedHeuristic & operator=(const LocalSolverBasedHeuristic &rhs)
Assignment operator.
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()
Default constructor.
void Initialize(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Initiaize using passed options.
void setDoubleParameter(const DoubleParameter &p, const double v)
Return value of double parameter.
virtual int solution(double &objectiveValue, double *newSolution)=0
Performs heuristic.
static void changeIfNotSet(Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const std::string &value)
virtual void setupDefaults(Ipopt::SmartPtr< Ipopt::OptionsList > options)
Setup the defaults.
const double * bestSolution() const
get the best solution known to the problem (is optimal if MipStatus is FeasibleOptimal).
Ipopt::SmartPtr< Ipopt::OptionsList > options()
Acces list of Options.
void setIntParameter(const IntParameter &p, const int v)
Return value of integer parameter.
BonminSetup * setup_
Setup to use for local searches (will make copies).