Public Member Functions | Protected Attributes
CbcHeuristicDive Class Reference

Dive class. More...

#include <CbcHeuristicDive.hpp>

Inheritance diagram for CbcHeuristicDive:
CbcHeuristic CbcHeuristic CbcHeuristicDiveCoefficient CbcHeuristicDiveCoefficient CbcHeuristicDiveFractional CbcHeuristicDiveFractional CbcHeuristicDiveGuided CbcHeuristicDiveGuided CbcHeuristicDiveLineSearch CbcHeuristicDiveLineSearch CbcHeuristicDivePseudoCost CbcHeuristicDivePseudoCost CbcHeuristicDiveVectorLength CbcHeuristicDiveVectorLength

List of all members.

Public Member Functions

 CbcHeuristicDive ()
 CbcHeuristicDive (CbcModel &model)
 CbcHeuristicDive (const CbcHeuristicDive &)
 ~CbcHeuristicDive ()
virtual CbcHeuristicDiveclone () const =0
 Clone.
CbcHeuristicDiveoperator= (const CbcHeuristicDive &rhs)
 Assignment operator.
virtual void generateCpp (FILE *)
 Create C++ lines to get to current state.
void generateCpp (FILE *fp, const char *heuristic)
 Create C++ lines to get to current state - does work for base class.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
virtual void setModel (CbcModel *model)
 update model (This is needed if cliques update matrix etc)
virtual int solution (double &objectiveValue, double *newSolution)
 returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts This does Fractional Diving
virtual void validate ()
 Validate model i.e. sets when_ to 0 if necessary (may be NULL)
void selectBinaryVariables ()
 Select candidate binary variables for fixing.
void setPercentageToFix (double value)
 Set percentage of integer variables to fix at bounds.
void setMaxIterations (int value)
 Set maximum number of iterations.
void setMaxSimplexIterations (int value)
 Set maximum number of simplex iterations.
void setMaxSimplexIterationsAtRoot (int value)
 Set maximum number of simplex iterations at root node.
void setMaxTime (double value)
 Set maximum time allowed.
virtual bool canHeuristicRun ()
 Tests if the heuristic can run.
virtual bool selectVariableToBranch (OsiSolverInterface *solver, const double *newSolution, int &bestColumn, int &bestRound)=0
 Selects the next variable to branch on Returns true if all the fractional variables can be trivially rounded.
virtual void initializeData ()
 Initializes any data which is going to be used repeatedly in selectVariableToBranch.
int reducedCostFix (OsiSolverInterface *solver)
 Perform reduced cost fixing on integer variables.
virtual int fixOtherVariables (OsiSolverInterface *solver, const double *solution, PseudoReducedCost *candidate, const double *random)
 Fix other variables at bounds.
 CbcHeuristicDive ()
 CbcHeuristicDive (CbcModel &model)
 CbcHeuristicDive (const CbcHeuristicDive &)
 ~CbcHeuristicDive ()
virtual CbcHeuristicDiveclone () const =0
 Clone.
CbcHeuristicDiveoperator= (const CbcHeuristicDive &rhs)
 Assignment operator.
virtual void generateCpp (FILE *)
 Create C++ lines to get to current state.
void generateCpp (FILE *fp, const char *heuristic)
 Create C++ lines to get to current state - does work for base class.
virtual void resetModel (CbcModel *model)
 Resets stuff if model changes.
virtual void setModel (CbcModel *model)
 update model (This is needed if cliques update matrix etc)
virtual int solution (double &objectiveValue, double *newSolution)
 returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts This does Fractional Diving
virtual void validate ()
 Validate model i.e. sets when_ to 0 if necessary (may be NULL)
void selectBinaryVariables ()
 Select candidate binary variables for fixing.
void setPercentageToFix (double value)
 Set percentage of integer variables to fix at bounds.
void setMaxIterations (int value)
 Set maximum number of iterations.
void setMaxSimplexIterations (int value)
 Set maximum number of simplex iterations.
void setMaxSimplexIterationsAtRoot (int value)
 Set maximum number of simplex iterations at root node.
void setMaxTime (double value)
 Set maximum time allowed.
virtual bool canHeuristicRun ()
 Tests if the heuristic can run.
virtual bool selectVariableToBranch (OsiSolverInterface *solver, const double *newSolution, int &bestColumn, int &bestRound)=0
 Selects the next variable to branch on Returns true if all the fractional variables can be trivially rounded.
virtual void initializeData ()
 Initializes any data which is going to be used repeatedly in selectVariableToBranch.
int reducedCostFix (OsiSolverInterface *solver)
 Perform reduced cost fixing on integer variables.
virtual int fixOtherVariables (OsiSolverInterface *solver, const double *solution, PseudoReducedCost *candidate, const double *random)
 Fix other variables at bounds.

Protected Attributes

CoinPackedMatrix matrix_
CoinPackedMatrix matrixByRow_
unsigned short * downLocks_
unsigned short * upLocks_
double * downArray_
 Extra down array (number Integers long)
double * upArray_
 Extra up array (number Integers long)
std::vector< int > binVarIndex_
std::vector< int > vbRowIndex_
double percentageToFix_
int maxIterations_
int maxSimplexIterations_
int maxSimplexIterationsAtRoot_
double maxTime_

Detailed Description

Dive class.

Definition at line 17 of file CbcHeuristicDive.hpp.


Constructor & Destructor Documentation

CbcHeuristicDive::CbcHeuristicDive ( )
CbcHeuristicDive::CbcHeuristicDive ( CbcModel model)
CbcHeuristicDive::CbcHeuristicDive ( const CbcHeuristicDive )
CbcHeuristicDive::~CbcHeuristicDive ( )
CbcHeuristicDive::CbcHeuristicDive ( )
CbcHeuristicDive::CbcHeuristicDive ( CbcModel model)
CbcHeuristicDive::CbcHeuristicDive ( const CbcHeuristicDive )
CbcHeuristicDive::~CbcHeuristicDive ( )

Member Function Documentation

virtual CbcHeuristicDive* CbcHeuristicDive::clone ( ) const [pure virtual]
CbcHeuristicDive& CbcHeuristicDive::operator= ( const CbcHeuristicDive rhs)

Assignment operator.

virtual void CbcHeuristicDive::generateCpp ( FILE *  ) [inline, virtual]
void CbcHeuristicDive::generateCpp ( FILE *  fp,
const char *  heuristic 
)

Create C++ lines to get to current state - does work for base class.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicDive::resetModel ( CbcModel model) [virtual]

Resets stuff if model changes.

Implements CbcHeuristic.

virtual void CbcHeuristicDive::setModel ( CbcModel model) [virtual]

update model (This is needed if cliques update matrix etc)

Reimplemented from CbcHeuristic.

virtual int CbcHeuristicDive::solution ( double &  objectiveValue,
double *  newSolution 
) [virtual]

returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts This does Fractional Diving

Implements CbcHeuristic.

virtual void CbcHeuristicDive::validate ( ) [virtual]

Validate model i.e. sets when_ to 0 if necessary (may be NULL)

Reimplemented from CbcHeuristic.

void CbcHeuristicDive::selectBinaryVariables ( )

Select candidate binary variables for fixing.

void CbcHeuristicDive::setPercentageToFix ( double  value) [inline]

Set percentage of integer variables to fix at bounds.

Definition at line 67 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxIterations ( int  value) [inline]

Set maximum number of iterations.

Definition at line 72 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxSimplexIterations ( int  value) [inline]

Set maximum number of simplex iterations.

Definition at line 77 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxSimplexIterationsAtRoot ( int  value) [inline]

Set maximum number of simplex iterations at root node.

Definition at line 82 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxTime ( double  value) [inline]

Set maximum time allowed.

Definition at line 87 of file CbcHeuristicDive.hpp.

virtual bool CbcHeuristicDive::canHeuristicRun ( ) [virtual]

Tests if the heuristic can run.

Reimplemented in CbcHeuristicDiveGuided, and CbcHeuristicDiveGuided.

virtual bool CbcHeuristicDive::selectVariableToBranch ( OsiSolverInterface *  solver,
const double *  newSolution,
int &  bestColumn,
int &  bestRound 
) [pure virtual]

Selects the next variable to branch on Returns true if all the fractional variables can be trivially rounded.

Returns false, if there is at least one fractional variable that is not trivially roundable. In this case, the bestColumn returned will not be trivially roundable.

Implemented in CbcHeuristicDiveCoefficient, CbcHeuristicDiveFractional, CbcHeuristicDiveGuided, CbcHeuristicDiveLineSearch, CbcHeuristicDivePseudoCost, CbcHeuristicDiveVectorLength, CbcHeuristicDiveCoefficient, CbcHeuristicDiveFractional, CbcHeuristicDiveGuided, CbcHeuristicDiveLineSearch, CbcHeuristicDivePseudoCost, and CbcHeuristicDiveVectorLength.

virtual void CbcHeuristicDive::initializeData ( ) [inline, virtual]

Initializes any data which is going to be used repeatedly in selectVariableToBranch.

Reimplemented in CbcHeuristicDivePseudoCost, and CbcHeuristicDivePseudoCost.

Definition at line 106 of file CbcHeuristicDive.hpp.

int CbcHeuristicDive::reducedCostFix ( OsiSolverInterface *  solver)

Perform reduced cost fixing on integer variables.

virtual int CbcHeuristicDive::fixOtherVariables ( OsiSolverInterface *  solver,
const double *  solution,
PseudoReducedCost candidate,
const double *  random 
) [virtual]

Fix other variables at bounds.

Reimplemented in CbcHeuristicDivePseudoCost, and CbcHeuristicDivePseudoCost.

virtual CbcHeuristicDive* CbcHeuristicDive::clone ( ) const [pure virtual]
CbcHeuristicDive& CbcHeuristicDive::operator= ( const CbcHeuristicDive rhs)

Assignment operator.

virtual void CbcHeuristicDive::generateCpp ( FILE *  ) [inline, virtual]
void CbcHeuristicDive::generateCpp ( FILE *  fp,
const char *  heuristic 
)

Create C++ lines to get to current state - does work for base class.

Reimplemented from CbcHeuristic.

virtual void CbcHeuristicDive::resetModel ( CbcModel model) [virtual]

Resets stuff if model changes.

Implements CbcHeuristic.

virtual void CbcHeuristicDive::setModel ( CbcModel model) [virtual]

update model (This is needed if cliques update matrix etc)

Reimplemented from CbcHeuristic.

virtual int CbcHeuristicDive::solution ( double &  objectiveValue,
double *  newSolution 
) [virtual]

returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets solution values if good, sets objective value (only if good) This is called after cuts have been added - so can not add cuts This does Fractional Diving

Implements CbcHeuristic.

virtual void CbcHeuristicDive::validate ( ) [virtual]

Validate model i.e. sets when_ to 0 if necessary (may be NULL)

Reimplemented from CbcHeuristic.

void CbcHeuristicDive::selectBinaryVariables ( )

Select candidate binary variables for fixing.

void CbcHeuristicDive::setPercentageToFix ( double  value) [inline]

Set percentage of integer variables to fix at bounds.

Definition at line 67 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxIterations ( int  value) [inline]

Set maximum number of iterations.

Definition at line 72 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxSimplexIterations ( int  value) [inline]

Set maximum number of simplex iterations.

Definition at line 77 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxSimplexIterationsAtRoot ( int  value) [inline]

Set maximum number of simplex iterations at root node.

Definition at line 82 of file CbcHeuristicDive.hpp.

void CbcHeuristicDive::setMaxTime ( double  value) [inline]

Set maximum time allowed.

Definition at line 87 of file CbcHeuristicDive.hpp.

virtual bool CbcHeuristicDive::canHeuristicRun ( ) [virtual]

Tests if the heuristic can run.

Reimplemented in CbcHeuristicDiveGuided, and CbcHeuristicDiveGuided.

virtual bool CbcHeuristicDive::selectVariableToBranch ( OsiSolverInterface *  solver,
const double *  newSolution,
int &  bestColumn,
int &  bestRound 
) [pure virtual]

Selects the next variable to branch on Returns true if all the fractional variables can be trivially rounded.

Returns false, if there is at least one fractional variable that is not trivially roundable. In this case, the bestColumn returned will not be trivially roundable.

Implemented in CbcHeuristicDiveCoefficient, CbcHeuristicDiveFractional, CbcHeuristicDiveGuided, CbcHeuristicDiveLineSearch, CbcHeuristicDivePseudoCost, CbcHeuristicDiveVectorLength, CbcHeuristicDiveCoefficient, CbcHeuristicDiveFractional, CbcHeuristicDiveGuided, CbcHeuristicDiveLineSearch, CbcHeuristicDivePseudoCost, and CbcHeuristicDiveVectorLength.

virtual void CbcHeuristicDive::initializeData ( ) [inline, virtual]

Initializes any data which is going to be used repeatedly in selectVariableToBranch.

Reimplemented in CbcHeuristicDivePseudoCost, and CbcHeuristicDivePseudoCost.

Definition at line 106 of file CbcHeuristicDive.hpp.

int CbcHeuristicDive::reducedCostFix ( OsiSolverInterface *  solver)

Perform reduced cost fixing on integer variables.

virtual int CbcHeuristicDive::fixOtherVariables ( OsiSolverInterface *  solver,
const double *  solution,
PseudoReducedCost candidate,
const double *  random 
) [virtual]

Fix other variables at bounds.

Reimplemented in CbcHeuristicDivePseudoCost, and CbcHeuristicDivePseudoCost.


Member Data Documentation

CoinPackedMatrix CbcHeuristicDive::matrix_ [protected]

Definition at line 120 of file CbcHeuristicDive.hpp.

CoinPackedMatrix CbcHeuristicDive::matrixByRow_ [protected]

Definition at line 123 of file CbcHeuristicDive.hpp.

unsigned short * CbcHeuristicDive::downLocks_ [protected]

Definition at line 126 of file CbcHeuristicDive.hpp.

unsigned short * CbcHeuristicDive::upLocks_ [protected]

Definition at line 129 of file CbcHeuristicDive.hpp.

double * CbcHeuristicDive::downArray_ [protected]

Extra down array (number Integers long)

Definition at line 132 of file CbcHeuristicDive.hpp.

double * CbcHeuristicDive::upArray_ [protected]

Extra up array (number Integers long)

Definition at line 135 of file CbcHeuristicDive.hpp.

std::vector< int > CbcHeuristicDive::binVarIndex_ [protected]

Definition at line 139 of file CbcHeuristicDive.hpp.

std::vector< int > CbcHeuristicDive::vbRowIndex_ [protected]

Definition at line 142 of file CbcHeuristicDive.hpp.

Definition at line 145 of file CbcHeuristicDive.hpp.

Definition at line 148 of file CbcHeuristicDive.hpp.

Definition at line 151 of file CbcHeuristicDive.hpp.

Definition at line 154 of file CbcHeuristicDive.hpp.

double CbcHeuristicDive::maxTime_ [protected]

Definition at line 157 of file CbcHeuristicDive.hpp.


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