Bonmin::HeuristicDiveMIP Class Reference

#include <BonHeuristicDiveMIP.hpp>

Inheritance diagram for Bonmin::HeuristicDiveMIP:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HeuristicDiveMIP (BonminSetup *setup)
 Constructor with setup.
 HeuristicDiveMIP (const HeuristicDiveMIP &copy)
 Copy constructor.
 ~HeuristicDiveMIP ()
 Destructor.
HeuristicDiveMIPoperator= (const HeuristicDiveMIP &rhs)
 Assignment operator.
virtual CbcHeuristic * clone () const =0
 Clone.
void Initialize (BonminSetup *setup)
 Initialize method.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
virtual void setSetup (BonminSetup *setup)
 Change setup used for heuristic.
virtual int solution (double &solutionValue, double *betterSolution)
 Performs heuristic.
virtual void setInternalVariables (TMINLP2TNLP *minlp)=0
 sets internal variables
virtual void selectVariableToBranch (TMINLP2TNLP *minlp, const vector< int > &integerColumns, const double *newSolution, int &bestColumn, int &bestRound)=0
 If bestColumn = -1, it means that no variable was found.

Protected Attributes

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

Private Attributes

int howOften_
 How often to do (code can change).
OsiSolverInterface * emptyInterface_
 empty LP solver to use for creating sub-MIP
CbcStrategy * strategy_
 A strategy for Cbc.

Detailed Description

Definition at line 18 of file BonHeuristicDiveMIP.hpp.


Constructor & Destructor Documentation

Bonmin::HeuristicDiveMIP::HeuristicDiveMIP ( BonminSetup setup  ) 

Constructor with setup.

Definition at line 52 of file BonHeuristicDiveMIP.cpp.

References Initialize().

Bonmin::HeuristicDiveMIP::HeuristicDiveMIP ( const HeuristicDiveMIP copy  ) 

Copy constructor.

Definition at line 89 of file BonHeuristicDiveMIP.cpp.

Bonmin::HeuristicDiveMIP::~HeuristicDiveMIP (  ) 

Destructor.

Definition at line 115 of file BonHeuristicDiveMIP.cpp.

References emptyInterface_, and strategy_.


Member Function Documentation

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

Assignment operator.

Definition at line 99 of file BonHeuristicDiveMIP.cpp.

References emptyInterface_, howOften_, setup_, and strategy_.

Referenced by Bonmin::HeuristicDiveMIPVectorLength::operator=(), and Bonmin::HeuristicDiveMIPFractional::operator=().

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

Clone.

Implemented in Bonmin::HeuristicDiveMIPFractional, and Bonmin::HeuristicDiveMIPVectorLength.

void Bonmin::HeuristicDiveMIP::Initialize ( BonminSetup setup  ) 

Initialize method.

Definition at line 64 of file BonHeuristicDiveMIP.cpp.

References emptyInterface_, Bonmin::BabSetupBase::options(), Bonmin::BabSetupBase::prefix(), and strategy_.

Referenced by HeuristicDiveMIP().

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

Resets stuff if model changes.

Definition at line 45 of file BonHeuristicDiveMIP.hpp.

virtual void Bonmin::HeuristicDiveMIP::setSetup ( BonminSetup setup  )  [inline, virtual]

Change setup used for heuristic.

Reimplemented in Bonmin::HeuristicDiveMIPFractional, and Bonmin::HeuristicDiveMIPVectorLength.

Definition at line 50 of file BonHeuristicDiveMIP.hpp.

References setup_.

Referenced by Bonmin::HeuristicDiveMIPVectorLength::setSetup(), and Bonmin::HeuristicDiveMIPFractional::setSetup().

int Bonmin::HeuristicDiveMIP::solution ( double &  solutionValue,
double *  betterSolution 
) [virtual]

Performs heuristic.

Definition at line 131 of file BonHeuristicDiveMIP.cpp.

References Bonmin::adjustPrimalTolerance(), Bonmin::B_BB, c, Bonmin::OsiTMINLPInterface::clone(), Bonmin::TMINLP::CONTINUOUS, emptyInterface_, Bonmin::TMINLP2TNLP::get_nlp_info(), Bonmin::TMINLP::get_variables_linearity(), Bonmin::BonminSetup::getAlgorithm(), Bonmin::OsiTMINLPInterface::getInfinity(), Bonmin::SubMipSolver::getLastSolution(), howOften_, Bonmin::OsiTMINLPInterface::initialSolve(), Bonmin::isNlpFeasible(), LINEAR, Bonmin::OsiTMINLPInterface::model(), Bonmin::BabSetupBase::nonlinearSolver(), Bonmin::SubMipSolver::optimize(), Bonmin::OsiTMINLPInterface::problem(), selectVariableToBranch(), setInternalVariables(), setup_, and strategy_.

virtual void Bonmin::HeuristicDiveMIP::setInternalVariables ( TMINLP2TNLP minlp  )  [pure virtual]

sets internal variables

Implemented in Bonmin::HeuristicDiveMIPFractional, and Bonmin::HeuristicDiveMIPVectorLength.

Referenced by solution().

virtual void Bonmin::HeuristicDiveMIP::selectVariableToBranch ( TMINLP2TNLP minlp,
const vector< int > &  integerColumns,
const double *  newSolution,
int &  bestColumn,
int &  bestRound 
) [pure virtual]

If bestColumn = -1, it means that no variable was found.

Implemented in Bonmin::HeuristicDiveMIPFractional, and Bonmin::HeuristicDiveMIPVectorLength.

Referenced by solution().


Member Data Documentation

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

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

Definition at line 72 of file BonHeuristicDiveMIP.hpp.

Referenced by operator=(), setSetup(), and solution().

int Bonmin::HeuristicDiveMIP::howOften_ [private]

How often to do (code can change).

Definition at line 76 of file BonHeuristicDiveMIP.hpp.

Referenced by operator=(), and solution().

OsiSolverInterface* Bonmin::HeuristicDiveMIP::emptyInterface_ [private]

empty LP solver to use for creating sub-MIP

Definition at line 78 of file BonHeuristicDiveMIP.hpp.

Referenced by Initialize(), operator=(), solution(), and ~HeuristicDiveMIP().

CbcStrategy* Bonmin::HeuristicDiveMIP::strategy_ [private]

A strategy for Cbc.

Definition at line 80 of file BonHeuristicDiveMIP.hpp.

Referenced by Initialize(), operator=(), solution(), and ~HeuristicDiveMIP().


The documentation for this class was generated from the following files:
Generated on Mon May 3 03:13:55 2010 by  doxygen 1.4.7