Bonmin 1.8.9
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Bonmin::LocalSolverBasedHeuristic Class Referenceabstract

#include <BonLocalSolverBasedHeuristic.hpp>

+ Inheritance diagram for Bonmin::LocalSolverBasedHeuristic:
+ Collaboration diagram for Bonmin::LocalSolverBasedHeuristic:

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).
 

Detailed Description

Definition at line 15 of file BonLocalSolverBasedHeuristic.hpp.

Constructor & Destructor Documentation

◆ LocalSolverBasedHeuristic() [1/3]

Bonmin::LocalSolverBasedHeuristic::LocalSolverBasedHeuristic ( )

Default constructor.

◆ LocalSolverBasedHeuristic() [2/3]

Bonmin::LocalSolverBasedHeuristic::LocalSolverBasedHeuristic ( BonminSetup * setup)

Constructor with setup.

◆ LocalSolverBasedHeuristic() [3/3]

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

Copy constructor.

◆ ~LocalSolverBasedHeuristic()

Bonmin::LocalSolverBasedHeuristic::~LocalSolverBasedHeuristic ( )

Destructor.

Member Function Documentation

◆ clone()

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

◆ operator=()

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

Assignment operator.

◆ resetModel()

virtual void Bonmin::LocalSolverBasedHeuristic::resetModel ( CbcModel * model)
inlinevirtual

Resets stuff if model changes.

Definition at line 40 of file BonLocalSolverBasedHeuristic.hpp.

◆ setSetup()

void Bonmin::LocalSolverBasedHeuristic::setSetup ( BonminSetup * setup)
inline

Change setup used for heuristic.

Definition at line 45 of file BonLocalSolverBasedHeuristic.hpp.

◆ solution() [1/2]

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

◆ solution() [2/2]

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

Performs heuristic which adds cuts

Definition at line 54 of file BonLocalSolverBasedHeuristic.hpp.

◆ doLocalSearch()

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.

◆ registerOptions()

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

Register the options common to all local search based heuristics.

◆ setupDefaults()

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

Setup the defaults.

Reimplemented in Bonmin::PumpForMinlp.

◆ Initialize()

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

Initiaize using passed options.

◆ changeIfNotSet() [1/3]

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

◆ changeIfNotSet() [2/3]

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

◆ changeIfNotSet() [3/3]

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

Member Data Documentation

◆ setup_

BonminSetup* Bonmin::LocalSolverBasedHeuristic::setup_
protected

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

Definition at line 75 of file BonLocalSolverBasedHeuristic.hpp.


The documentation for this class was generated from the following file: