Public Member Functions | Private Attributes | List of all members
CbcTreeVariable Class Reference

#include <CbcTreeLocal.hpp>

Inheritance diagram for CbcTreeVariable:
CbcTree CbcTree

Public Member Functions

 CbcTreeVariable ()
 CbcTreeVariable (CbcModel *model, const double *solution, int range=10, int typeCuts=0, int maxDiversification=0, int timeLimit=1000000, int nodeLimit=1000000, bool refine=true)
 CbcTreeVariable (const CbcTreeVariable &rhs)
CbcTreeVariableoperator= (const CbcTreeVariable &rhs)
virtual ~CbcTreeVariable ()
virtual CbcTreeclone () const
 Clone.
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state.
 CbcTreeVariable ()
 CbcTreeVariable (CbcModel *model, const double *solution, int range=10, int typeCuts=0, int maxDiversification=0, int timeLimit=1000000, int nodeLimit=1000000, bool refine=true)
 CbcTreeVariable (const CbcTreeVariable &rhs)
CbcTreeVariableoperator= (const CbcTreeVariable &rhs)
virtual ~CbcTreeVariable ()
virtual CbcTreeclone () const
 Clone.
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state.
Heap access and maintenance methods
virtual CbcNodetop () const
 Return the top node of the heap.
virtual void push (CbcNode *x)
 Add a node to the heap.
virtual void pop ()
 Remove the top node from the heap.
virtual CbcNodetop () const
 Return the top node of the heap.
virtual void push (CbcNode *x)
 Add a node to the heap.
virtual void pop ()
 Remove the top node from the heap.
Other stuff
int createCut (const double *solution, OsiRowCut &cut)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
virtual bool empty ()
 Test if empty *** note may be overridden.
virtual void endSearch ()
 We may have got an intelligent tree so give it one more chance.
void reverseCut (int state, double bias=0.0)
 Other side of last cut branch (if bias==rhs_ will be weakest possible)
void deleteCut (OsiRowCut &cut)
 Delete last cut branch.
void passInSolution (const double *solution, double solutionValue)
 Pass in solution (so can be used after heuristic)
int range () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setRange (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int typeCuts () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setTypeCuts (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int maxDiversification () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setMaxDiversification (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int timeLimit () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setTimeLimit (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int nodeLimit () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setNodeLimit (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
bool refine () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setRefine (bool yesNo)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int createCut (const double *solution, OsiRowCut &cut)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
virtual bool empty ()
 Test if empty *** note may be overridden.
virtual void endSearch ()
 We may have got an intelligent tree so give it one more chance.
void reverseCut (int state, double bias=0.0)
 Other side of last cut branch (if bias==rhs_ will be weakest possible)
void deleteCut (OsiRowCut &cut)
 Delete last cut branch.
void passInSolution (const double *solution, double solutionValue)
 Pass in solution (so can be used after heuristic)
int range () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setRange (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int typeCuts () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setTypeCuts (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int maxDiversification () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setMaxDiversification (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int timeLimit () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setTimeLimit (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
int nodeLimit () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setNodeLimit (int value)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
bool refine () const
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
void setRefine (bool yesNo)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.
- Public Member Functions inherited from CbcTree
 CbcTree ()
 CbcTree (const CbcTree &rhs)
CbcTreeoperator= (const CbcTree &rhs)
virtual ~CbcTree ()
 CbcTree ()
 CbcTree (const CbcTree &rhs)
CbcTreeoperator= (const CbcTree &rhs)
virtual ~CbcTree ()
void setComparison (CbcCompareBase &compare)
 Set comparison function and resort heap.
virtual CbcNodebestNode (double cutoff)
 Gets best node and takes off heap.
void setComparison (CbcCompareBase &compare)
 Set comparison function and resort heap.
virtual CbcNodebestNode (double cutoff)
 Gets best node and takes off heap.
virtual int size () const
 Return size.
CbcNodeoperator[] (int i) const
 [] operator
CbcNodenodePointer (int i) const
 Return a node pointer.
virtual int size () const
 Return size.
CbcNodeoperator[] (int i) const
 [] operator
CbcNodenodePointer (int i) const
 Return a node pointer.
virtual void cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective)
 Prune the tree using an objective function cutoff.
CbcNodebestAlternate ()
 Get best on list using alternate method.
virtual double getBestPossibleObjective ()
 Get best possible objective function in the tree.
void resetNodeNumbers ()
 Reset maximum node number.
int maximumNodeNumber () const
 Get maximum node number.
void setNumberBranching (int value)
 Set number of branches.
int getNumberBranching () const
 Get number of branches.
void setMaximumBranching (int value)
 Set maximum branches.
int getMaximumBranching () const
 Get maximum branches.
unsigned int * branched () const
 Get branched variables.
int * newBounds () const
 Get bounds.
void addBranchingInformation (const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper)
 Adds branching information to complete state.
void increaseSpace ()
 Increase space for data.
virtual void cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective)
 Prune the tree using an objective function cutoff.
CbcNodebestAlternate ()
 Get best on list using alternate method.
virtual double getBestPossibleObjective ()
 Get best possible objective function in the tree.
void resetNodeNumbers ()
 Reset maximum node number.
int maximumNodeNumber () const
 Get maximum node number.
void setNumberBranching (int value)
 Set number of branches.
int getNumberBranching () const
 Get number of branches.
void setMaximumBranching (int value)
 Set maximum branches.
int getMaximumBranching () const
 Get maximum branches.
unsigned int * branched () const
 Get branched variables.
int * newBounds () const
 Get bounds.
void addBranchingInformation (const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper)
 Adds branching information to complete state.
void increaseSpace ()
 Increase space for data.

Private Attributes

CbcNodelocalNode_
double * bestSolution_
double * savedSolution_
int saveNumberSolutions_
OsiRowCut cut_
OsiRowCut fixedCut_
CbcModelmodel_
double * originalLower_
double * originalUpper_
int range_
int typeCuts_
int maxDiversification_
int diversification_
bool nextStrong_
double rhs_
double savedGap_
double bestCutoff_
int timeLimit_
int startTime_
int nodeLimit_
int startNode_
int searchType_
bool refine_

Additional Inherited Members

- Protected Attributes inherited from CbcTree
std::vector< CbcNode * > nodes_
CbcCompare comparison_
int maximumNodeNumber_
 

Sort function for heap ordering.


int numberBranching_
 Size of variable list.
int maximumBranching_
 Maximum size of variable list.
unsigned int * branched_
 Integer variables branched or bounded top bit set if new upper bound next bit set if a branch.
int * newBound_
 New bound.

Detailed Description

Definition at line 204 of file CbcTreeLocal.hpp.

Constructor & Destructor Documentation

CbcTreeVariable::CbcTreeVariable ( )
CbcTreeVariable::CbcTreeVariable ( CbcModel model,
const double *  solution,
int  range = 10,
int  typeCuts = 0,
int  maxDiversification = 0,
int  timeLimit = 1000000,
int  nodeLimit = 1000000,
bool  refine = true 
)
CbcTreeVariable::CbcTreeVariable ( const CbcTreeVariable rhs)
virtual CbcTreeVariable::~CbcTreeVariable ( )
virtual
CbcTreeVariable::CbcTreeVariable ( )
CbcTreeVariable::CbcTreeVariable ( CbcModel model,
const double *  solution,
int  range = 10,
int  typeCuts = 0,
int  maxDiversification = 0,
int  timeLimit = 1000000,
int  nodeLimit = 1000000,
bool  refine = true 
)
CbcTreeVariable::CbcTreeVariable ( const CbcTreeVariable rhs)
virtual CbcTreeVariable::~CbcTreeVariable ( )
virtual

Member Function Documentation

CbcTreeVariable& CbcTreeVariable::operator= ( const CbcTreeVariable rhs)
virtual CbcTree* CbcTreeVariable::clone ( ) const
virtual

Clone.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::generateCpp ( FILE *  fp)
virtual

Create C++ lines to get to current state.

Reimplemented from CbcTree.

virtual CbcNode* CbcTreeVariable::top ( ) const
virtual

Return the top node of the heap.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::push ( CbcNode x)
virtual

Add a node to the heap.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::pop ( )
virtual

Remove the top node from the heap.

Reimplemented from CbcTree.

int CbcTreeVariable::createCut ( const double *  solution,
OsiRowCut &  cut 
)

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

virtual bool CbcTreeVariable::empty ( )
virtual

Test if empty *** note may be overridden.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::endSearch ( )
virtual

We may have got an intelligent tree so give it one more chance.

Reimplemented from CbcTree.

void CbcTreeVariable::reverseCut ( int  state,
double  bias = 0.0 
)

Other side of last cut branch (if bias==rhs_ will be weakest possible)

void CbcTreeVariable::deleteCut ( OsiRowCut &  cut)

Delete last cut branch.

void CbcTreeVariable::passInSolution ( const double *  solution,
double  solutionValue 
)

Pass in solution (so can be used after heuristic)

int CbcTreeVariable::range ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 271 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setRange ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 275 of file CbcTreeLocal.hpp.

int CbcTreeVariable::typeCuts ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 279 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setTypeCuts ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 283 of file CbcTreeLocal.hpp.

int CbcTreeVariable::maxDiversification ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 287 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setMaxDiversification ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 291 of file CbcTreeLocal.hpp.

int CbcTreeVariable::timeLimit ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 295 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setTimeLimit ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 299 of file CbcTreeLocal.hpp.

int CbcTreeVariable::nodeLimit ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 303 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setNodeLimit ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 307 of file CbcTreeLocal.hpp.

bool CbcTreeVariable::refine ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 311 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setRefine ( bool  yesNo)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 315 of file CbcTreeLocal.hpp.

CbcTreeVariable& CbcTreeVariable::operator= ( const CbcTreeVariable rhs)
virtual CbcTree* CbcTreeVariable::clone ( ) const
virtual

Clone.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::generateCpp ( FILE *  fp)
virtual

Create C++ lines to get to current state.

Reimplemented from CbcTree.

virtual CbcNode* CbcTreeVariable::top ( ) const
virtual

Return the top node of the heap.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::push ( CbcNode x)
virtual

Add a node to the heap.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::pop ( )
virtual

Remove the top node from the heap.

Reimplemented from CbcTree.

int CbcTreeVariable::createCut ( const double *  solution,
OsiRowCut &  cut 
)

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

virtual bool CbcTreeVariable::empty ( )
virtual

Test if empty *** note may be overridden.

Reimplemented from CbcTree.

virtual void CbcTreeVariable::endSearch ( )
virtual

We may have got an intelligent tree so give it one more chance.

Reimplemented from CbcTree.

void CbcTreeVariable::reverseCut ( int  state,
double  bias = 0.0 
)

Other side of last cut branch (if bias==rhs_ will be weakest possible)

void CbcTreeVariable::deleteCut ( OsiRowCut &  cut)

Delete last cut branch.

void CbcTreeVariable::passInSolution ( const double *  solution,
double  solutionValue 
)

Pass in solution (so can be used after heuristic)

int CbcTreeVariable::range ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 271 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setRange ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 275 of file CbcTreeLocal.hpp.

int CbcTreeVariable::typeCuts ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 279 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setTypeCuts ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 283 of file CbcTreeLocal.hpp.

int CbcTreeVariable::maxDiversification ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 287 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setMaxDiversification ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 291 of file CbcTreeLocal.hpp.

int CbcTreeVariable::timeLimit ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 295 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setTimeLimit ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 299 of file CbcTreeLocal.hpp.

int CbcTreeVariable::nodeLimit ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 303 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setNodeLimit ( int  value)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 307 of file CbcTreeLocal.hpp.

bool CbcTreeVariable::refine ( ) const
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 311 of file CbcTreeLocal.hpp.

void CbcTreeVariable::setRefine ( bool  yesNo)
inline

Create cut - return -1 if bad, 0 if okay and 1 if cut is everything.

Definition at line 315 of file CbcTreeLocal.hpp.

Member Data Documentation

CbcNode * CbcTreeVariable::localNode_
private

Definition at line 322 of file CbcTreeLocal.hpp.

double * CbcTreeVariable::bestSolution_
private

Definition at line 324 of file CbcTreeLocal.hpp.

double * CbcTreeVariable::savedSolution_
private

Definition at line 326 of file CbcTreeLocal.hpp.

int CbcTreeVariable::saveNumberSolutions_
private

Definition at line 328 of file CbcTreeLocal.hpp.

OsiRowCut CbcTreeVariable::cut_
private

Definition at line 330 of file CbcTreeLocal.hpp.

OsiRowCut CbcTreeVariable::fixedCut_
private

Definition at line 332 of file CbcTreeLocal.hpp.

CbcModel * CbcTreeVariable::model_
private

Definition at line 334 of file CbcTreeLocal.hpp.

double * CbcTreeVariable::originalLower_
private

Definition at line 336 of file CbcTreeLocal.hpp.

double * CbcTreeVariable::originalUpper_
private

Definition at line 338 of file CbcTreeLocal.hpp.

int CbcTreeVariable::range_
private

Definition at line 340 of file CbcTreeLocal.hpp.

int CbcTreeVariable::typeCuts_
private

Definition at line 342 of file CbcTreeLocal.hpp.

int CbcTreeVariable::maxDiversification_
private

Definition at line 344 of file CbcTreeLocal.hpp.

int CbcTreeVariable::diversification_
private

Definition at line 346 of file CbcTreeLocal.hpp.

bool CbcTreeVariable::nextStrong_
private

Definition at line 348 of file CbcTreeLocal.hpp.

double CbcTreeVariable::rhs_
private

Definition at line 350 of file CbcTreeLocal.hpp.

double CbcTreeVariable::savedGap_
private

Definition at line 352 of file CbcTreeLocal.hpp.

double CbcTreeVariable::bestCutoff_
private

Definition at line 354 of file CbcTreeLocal.hpp.

int CbcTreeVariable::timeLimit_
private

Definition at line 356 of file CbcTreeLocal.hpp.

int CbcTreeVariable::startTime_
private

Definition at line 358 of file CbcTreeLocal.hpp.

int CbcTreeVariable::nodeLimit_
private

Definition at line 360 of file CbcTreeLocal.hpp.

int CbcTreeVariable::startNode_
private

Definition at line 362 of file CbcTreeLocal.hpp.

int CbcTreeVariable::searchType_
private

Definition at line 364 of file CbcTreeLocal.hpp.

bool CbcTreeVariable::refine_
private

Definition at line 366 of file CbcTreeLocal.hpp.


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