Bonmin::LocalSolverBasedHeuristic Class Reference

#include <BonLocalSolverBasedHeuristic.hpp>

Inheritance diagram for Bonmin::LocalSolverBasedHeuristic:

Inheritance graph
[legend]
Collaboration diagram for Bonmin::LocalSolverBasedHeuristic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LocalSolverBasedHeuristic ()
 Default constructor.
 LocalSolverBasedHeuristic (BonminSetup *setup)
 Constructor with setup.
 LocalSolverBasedHeuristic (const LocalSolverBasedHeuristic &other)
 Copy constructor.
 ~LocalSolverBasedHeuristic ()
 Destructor.
virtual CbcHeuristic * clone () const =0
 Virtual copy constructor.
LocalSolverBasedHeuristicoperator= (const LocalSolverBasedHeuristic &rhs)
 Assignment operator.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
void setSetup (BonminSetup *setup)
 Change setup used for heuristic.
virtual int solution (double &objectiveValue, double *newSolution)=0
 Performs heuristic.
virtual int solution (double &objectiveValue, double *newSolution, OsiCuts &cs)
 Performs heuristic which adds cuts.
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.
virtual void setupDefaults (Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Setup the defaults.
void Initialize (Ipopt::SmartPtr< Ipopt::OptionsList > options)
 Initiaize using passed options.

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Register the options common to all local search based heuristics.

Static Protected Member Functions

static void changeIfNotSet (Ipopt::SmartPtr< Ipopt::OptionsList > options, std::string prefix, const std::string &option, const std::string &value)
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)

Protected Attributes

BonminSetupsetup_
 Setup to use for local searches (will make copies).

Private Attributes

double time_limit_
 Time limit in local search.
int max_number_nodes_
 maximal number of nodes in local search.
int max_number_solutions_
 Maximal number of solutions in local search.

Detailed Description

Definition at line 15 of file BonLocalSolverBasedHeuristic.hpp.


Constructor & Destructor Documentation

Bonmin::LocalSolverBasedHeuristic::LocalSolverBasedHeuristic (  ) 

Default constructor.

Definition at line 13 of file BonLocalSolverBasedHeuristic.cpp.

Bonmin::LocalSolverBasedHeuristic::LocalSolverBasedHeuristic ( BonminSetup setup  ) 

Constructor with setup.

Definition at line 20 of file BonLocalSolverBasedHeuristic.cpp.

References Initialize(), and Bonmin::BabSetupBase::options().

Bonmin::LocalSolverBasedHeuristic::LocalSolverBasedHeuristic ( const LocalSolverBasedHeuristic other  ) 

Copy constructor.

Definition at line 29 of file BonLocalSolverBasedHeuristic.cpp.

Bonmin::LocalSolverBasedHeuristic::~LocalSolverBasedHeuristic (  ) 

Destructor.

Definition at line 37 of file BonLocalSolverBasedHeuristic.cpp.


Member Function Documentation

virtual CbcHeuristic* Bonmin::LocalSolverBasedHeuristic::clone (  )  const [pure virtual]

Virtual copy constructor.

Implemented in Bonmin::DummyPump, Bonmin::FixAndSolveHeuristic, Bonmin::HeuristicLocalBranching, Bonmin::HeuristicRINS, and Bonmin::PumpForMinlp.

LocalSolverBasedHeuristic & Bonmin::LocalSolverBasedHeuristic::operator= ( const LocalSolverBasedHeuristic rhs  ) 

Assignment operator.

Definition at line 41 of file BonLocalSolverBasedHeuristic.cpp.

References setup_.

virtual void Bonmin::LocalSolverBasedHeuristic::resetModel ( CbcModel *  model  )  [inline, virtual]

Resets stuff if model changes.

Definition at line 40 of file BonLocalSolverBasedHeuristic.hpp.

void Bonmin::LocalSolverBasedHeuristic::setSetup ( BonminSetup setup  )  [inline]

Change setup used for heuristic.

Definition at line 45 of file BonLocalSolverBasedHeuristic.hpp.

virtual int Bonmin::LocalSolverBasedHeuristic::solution ( double &  objectiveValue,
double *  newSolution 
) [pure virtual]

Performs heuristic.

Implemented in Bonmin::DummyPump, Bonmin::FixAndSolveHeuristic, Bonmin::HeuristicLocalBranching, Bonmin::HeuristicRINS, and Bonmin::PumpForMinlp.

virtual int Bonmin::LocalSolverBasedHeuristic::solution ( double &  objectiveValue,
double *  newSolution,
OsiCuts &  cs 
) [inline, virtual]

Performs heuristic which adds cuts.

Definition at line 54 of file BonLocalSolverBasedHeuristic.hpp.

int Bonmin::LocalSolverBasedHeuristic::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.

Definition at line 91 of file BonLocalSolverBasedHeuristic.cpp.

References Bonmin::Bab::bestObj(), Bonmin::Bab::bestSolution(), Bonmin::BonminSetup::clone(), Bonmin::BabSetupBase::Cutoff, Bonmin::OsiTMINLPInterface::getNumCols(), Bonmin::BabSetupBase::NumberStrong, Bonmin::BabSetupBase::setDoubleParameter(), Bonmin::BabSetupBase::setIntParameter(), and setup_.

Referenced by Bonmin::PumpForMinlp::solution(), Bonmin::HeuristicRINS::solution(), Bonmin::HeuristicLocalBranching::solution(), Bonmin::FixAndSolveHeuristic::solution(), and Bonmin::DummyPump::solution().

void Bonmin::LocalSolverBasedHeuristic::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Register the options common to all local search based heuristics.

Reimplemented in Bonmin::DummyPump, Bonmin::FixAndSolveHeuristic, Bonmin::HeuristicLocalBranching, Bonmin::HeuristicRINS, and Bonmin::PumpForMinlp.

Definition at line 112 of file BonLocalSolverBasedHeuristic.cpp.

Referenced by Couenne::CouenneSetup::registerAllOptions(), and Bonmin::BonminSetup::registerAllOptions().

void Bonmin::LocalSolverBasedHeuristic::setupDefaults ( Ipopt::SmartPtr< Ipopt::OptionsList >  options  )  [virtual]

Setup the defaults.

Reimplemented in Bonmin::PumpForMinlp.

Definition at line 81 of file BonLocalSolverBasedHeuristic.cpp.

References changeIfNotSet(), and prefix.

Referenced by Initialize().

void Bonmin::LocalSolverBasedHeuristic::Initialize ( Ipopt::SmartPtr< Ipopt::OptionsList >  options  ) 

Initiaize using passed options.

Some fancy defaults.

Reimplemented in Bonmin::DummyPump, Bonmin::FixAndSolveHeuristic, Bonmin::HeuristicLocalBranching, Bonmin::HeuristicRINS, and Bonmin::PumpForMinlp.

Definition at line 117 of file BonLocalSolverBasedHeuristic.cpp.

References setupDefaults().

Referenced by LocalSolverBasedHeuristic().

void Bonmin::LocalSolverBasedHeuristic::changeIfNotSet ( Ipopt::SmartPtr< Ipopt::OptionsList >  options,
std::string  prefix,
const std::string &  option,
const std::string &  value 
) [static, protected]

Definition at line 50 of file BonLocalSolverBasedHeuristic.cpp.

Referenced by Bonmin::PumpForMinlp::setupDefaults(), and setupDefaults().

void Bonmin::LocalSolverBasedHeuristic::changeIfNotSet ( Ipopt::SmartPtr< Ipopt::OptionsList >  options,
std::string  prefix,
const std::string &  option,
const double &  value 
) [static, protected]

Definition at line 60 of file BonLocalSolverBasedHeuristic.cpp.

void Bonmin::LocalSolverBasedHeuristic::changeIfNotSet ( Ipopt::SmartPtr< Ipopt::OptionsList >  options,
std::string  prefix,
const std::string &  option,
const int &  value 
) [static, protected]

Definition at line 70 of file BonLocalSolverBasedHeuristic.cpp.


Member Data Documentation

BonminSetup* Bonmin::LocalSolverBasedHeuristic::setup_ [protected]

Setup to use for local searches (will make copies).

Definition at line 75 of file BonLocalSolverBasedHeuristic.hpp.

Referenced by doLocalSearch(), operator=(), Bonmin::PumpForMinlp::solution(), Bonmin::HeuristicRINS::solution(), Bonmin::HeuristicLocalBranching::solution(), Bonmin::FixAndSolveHeuristic::solution(), Bonmin::DummyPump::solution(), and Bonmin::HeuristicLocalBranching::validate().

double Bonmin::LocalSolverBasedHeuristic::time_limit_ [private]

Time limit in local search.

Definition at line 93 of file BonLocalSolverBasedHeuristic.hpp.

int Bonmin::LocalSolverBasedHeuristic::max_number_nodes_ [private]

maximal number of nodes in local search.

Definition at line 95 of file BonLocalSolverBasedHeuristic.hpp.

int Bonmin::LocalSolverBasedHeuristic::max_number_solutions_ [private]

Maximal number of solutions in local search.

Definition at line 97 of file BonLocalSolverBasedHeuristic.hpp.


The documentation for this class was generated from the following files:
Generated on Wed Nov 30 03:13:02 2011 by  doxygen 1.4.7