Cbc  2.10.10
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
CbcTreeLocal Class Reference

#include <CbcTreeLocal.hpp>

+ Inheritance diagram for CbcTreeLocal:
+ Collaboration diagram for CbcTreeLocal:

Public Member Functions

 CbcTreeLocal ()
 
 CbcTreeLocal (CbcModel *model, const double *solution, int range=10, int typeCuts=0, int maxDiversification=0, int timeLimit=1000000, int nodeLimit=1000000, bool refine=true)
 
 CbcTreeLocal (const CbcTreeLocal &rhs)
 
CbcTreeLocaloperator= (const CbcTreeLocal &rhs)
 
virtual ~CbcTreeLocal ()
 
virtual CbcTreeclone () const
 Clone. More...
 
virtual void generateCpp (FILE *fp)
 Create C++ lines to get to current state. More...
 
Heap access and maintenance methods
virtual CbcNodetop () const
 Return the top node of the heap. More...
 
virtual void push (CbcNode *x)
 Add a node to the heap. More...
 
virtual void pop ()
 Remove the top node from the heap. More...
 
- Public Member Functions inherited from CbcTree
 CbcTree ()
 Default Constructor. More...
 
 CbcTree (const CbcTree &rhs)
 Copy constructor. More...
 
CbcTreeoperator= (const CbcTree &rhs)
 = operator More...
 
virtual ~CbcTree ()
 Destructor. More...
 
void setComparison (CbcCompareBase &compare)
 Set comparison function and resort heap. More...
 
virtual CbcNodebestNode (double cutoff)
 Gets best node and takes off heap. More...
 
virtual void rebuild ()
 Rebuild the heap. More...
 
virtual int size () const
 Return size. More...
 
CbcNodeoperator[] (int i) const
 Return a node pointer. More...
 
CbcNodenodePointer (int i) const
 Return a node pointer. More...
 
void realpop ()
 
void fixTop ()
 After changing data in the top node, fix the heap. More...
 
void realpush (CbcNode *node)
 
virtual void cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective)
 Prune the tree using an objective function cutoff. More...
 
CbcNodebestAlternate ()
 Get best on list using alternate method. More...
 
virtual double getBestPossibleObjective ()
 Get best possible objective function in the tree. More...
 
void resetNodeNumbers ()
 Reset maximum node number. More...
 
int maximumNodeNumber () const
 Get maximum node number. More...
 
void setNumberBranching (int value)
 Set number of branches. More...
 
int getNumberBranching () const
 Get number of branches. More...
 
void setMaximumBranching (int value)
 Set maximum branches. More...
 
int getMaximumBranching () const
 Get maximum branches. More...
 
unsigned int * branched () const
 Get branched variables. More...
 
int * newBounds () const
 Get bounds. More...
 
double lastObjective () const
 Last objective in branch-and-cut search tree. More...
 
int lastDepth () const
 Last depth in branch-and-cut search tree. More...
 
int lastUnsatisfied () const
 Last number of objects unsatisfied. More...
 
void addBranchingInformation (const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper)
 Adds branching information to complete state. More...
 
void increaseSpace ()
 Increase space for data. More...
 

Other stuff

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_
 
int createCut (const double *solution, OsiRowCut &cut)
 Create cut - return -1 if bad, 0 if okay and 1 if cut is everything. More...
 
virtual bool empty ()
 Test if empty *** note may be overridden. More...
 
virtual void endSearch ()
 We may have got an intelligent tree so give it one more chance. More...
 
void reverseCut (int state, double bias=0.0)
 Other side of last cut branch (if bias==rhs_ will be weakest possible) More...
 
void deleteCut (OsiRowCut &cut)
 Delete last cut branch. More...
 
void passInSolution (const double *solution, double solutionValue)
 Pass in solution (so can be used after heuristic) More...
 
int range () const
 
void setRange (int value)
 
int typeCuts () const
 
void setTypeCuts (int value)
 
int maxDiversification () const
 
void setMaxDiversification (int value)
 
int timeLimit () const
 
void setTimeLimit (int value)
 
int nodeLimit () const
 
void setNodeLimit (int value)
 
bool refine () const
 
void setRefine (bool yesNo)
 

Additional Inherited Members

- Protected Attributes inherited from CbcTree
std::vector< CbcNode * > nodes_
 Storage vector for the heap. More...
 
CbcCompare comparison_
 Sort predicate for heap ordering. More...
 
int maximumNodeNumber_
 Maximum "node" number so far to split ties. More...
 
int numberBranching_
 Size of variable list. More...
 
int maximumBranching_
 Maximum size of variable list. More...
 
double lastObjective_
 Objective of last node pushed on tree. More...
 
int lastDepth_
 Depth of last node pushed on tree. More...
 
int lastUnsatisfied_
 Number unsatisfied of last node pushed on tree. More...
 
unsigned int * branched_
 Integer variables branched or bounded top bit set if new upper bound next bit set if a branch. More...
 
int * newBound_
 New bound. More...
 

Detailed Description

Definition at line 39 of file CbcTreeLocal.hpp.

Constructor & Destructor Documentation

◆ CbcTreeLocal() [1/3]

CbcTreeLocal::CbcTreeLocal ( )

◆ CbcTreeLocal() [2/3]

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

◆ CbcTreeLocal() [3/3]

CbcTreeLocal::CbcTreeLocal ( const CbcTreeLocal rhs)

◆ ~CbcTreeLocal()

virtual CbcTreeLocal::~CbcTreeLocal ( )
virtual

Member Function Documentation

◆ operator=()

CbcTreeLocal& CbcTreeLocal::operator= ( const CbcTreeLocal rhs)

◆ clone()

virtual CbcTree* CbcTreeLocal::clone ( ) const
virtual

Clone.

Reimplemented from CbcTree.

◆ generateCpp()

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

Create C++ lines to get to current state.

Reimplemented from CbcTree.

◆ top()

virtual CbcNode* CbcTreeLocal::top ( ) const
virtual

Return the top node of the heap.

Reimplemented from CbcTree.

◆ push()

virtual void CbcTreeLocal::push ( CbcNode x)
virtual

Add a node to the heap.

Reimplemented from CbcTree.

◆ pop()

virtual void CbcTreeLocal::pop ( )
virtual

Remove the top node from the heap.

Reimplemented from CbcTree.

◆ createCut()

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

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

◆ empty()

virtual bool CbcTreeLocal::empty ( )
virtual

Test if empty *** note may be overridden.

Reimplemented from CbcTree.

◆ endSearch()

virtual void CbcTreeLocal::endSearch ( )
virtual

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

Reimplemented from CbcTree.

◆ reverseCut()

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

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

◆ deleteCut()

void CbcTreeLocal::deleteCut ( OsiRowCut &  cut)

Delete last cut branch.

◆ passInSolution()

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

Pass in solution (so can be used after heuristic)

◆ range()

int CbcTreeLocal::range ( ) const
inline

Definition at line 105 of file CbcTreeLocal.hpp.

◆ setRange()

void CbcTreeLocal::setRange ( int  value)
inline

Definition at line 110 of file CbcTreeLocal.hpp.

◆ typeCuts()

int CbcTreeLocal::typeCuts ( ) const
inline

Definition at line 115 of file CbcTreeLocal.hpp.

◆ setTypeCuts()

void CbcTreeLocal::setTypeCuts ( int  value)
inline

Definition at line 120 of file CbcTreeLocal.hpp.

◆ maxDiversification()

int CbcTreeLocal::maxDiversification ( ) const
inline

Definition at line 125 of file CbcTreeLocal.hpp.

◆ setMaxDiversification()

void CbcTreeLocal::setMaxDiversification ( int  value)
inline

Definition at line 130 of file CbcTreeLocal.hpp.

◆ timeLimit()

int CbcTreeLocal::timeLimit ( ) const
inline

Definition at line 135 of file CbcTreeLocal.hpp.

◆ setTimeLimit()

void CbcTreeLocal::setTimeLimit ( int  value)
inline

Definition at line 140 of file CbcTreeLocal.hpp.

◆ nodeLimit()

int CbcTreeLocal::nodeLimit ( ) const
inline

Definition at line 145 of file CbcTreeLocal.hpp.

◆ setNodeLimit()

void CbcTreeLocal::setNodeLimit ( int  value)
inline

Definition at line 150 of file CbcTreeLocal.hpp.

◆ refine()

bool CbcTreeLocal::refine ( ) const
inline

Definition at line 155 of file CbcTreeLocal.hpp.

◆ setRefine()

void CbcTreeLocal::setRefine ( bool  yesNo)
inline

Definition at line 160 of file CbcTreeLocal.hpp.

Member Data Documentation

◆ localNode_

CbcNode* CbcTreeLocal::localNode_
private

Definition at line 168 of file CbcTreeLocal.hpp.

◆ bestSolution_

double* CbcTreeLocal::bestSolution_
private

Definition at line 170 of file CbcTreeLocal.hpp.

◆ savedSolution_

double* CbcTreeLocal::savedSolution_
private

Definition at line 172 of file CbcTreeLocal.hpp.

◆ saveNumberSolutions_

int CbcTreeLocal::saveNumberSolutions_
private

Definition at line 174 of file CbcTreeLocal.hpp.

◆ cut_

OsiRowCut CbcTreeLocal::cut_
private

Definition at line 176 of file CbcTreeLocal.hpp.

◆ fixedCut_

OsiRowCut CbcTreeLocal::fixedCut_
private

Definition at line 178 of file CbcTreeLocal.hpp.

◆ model_

CbcModel* CbcTreeLocal::model_
private

Definition at line 180 of file CbcTreeLocal.hpp.

◆ originalLower_

double* CbcTreeLocal::originalLower_
private

Definition at line 182 of file CbcTreeLocal.hpp.

◆ originalUpper_

double* CbcTreeLocal::originalUpper_
private

Definition at line 184 of file CbcTreeLocal.hpp.

◆ range_

int CbcTreeLocal::range_
private

Definition at line 186 of file CbcTreeLocal.hpp.

◆ typeCuts_

int CbcTreeLocal::typeCuts_
private

Definition at line 188 of file CbcTreeLocal.hpp.

◆ maxDiversification_

int CbcTreeLocal::maxDiversification_
private

Definition at line 190 of file CbcTreeLocal.hpp.

◆ diversification_

int CbcTreeLocal::diversification_
private

Definition at line 192 of file CbcTreeLocal.hpp.

◆ nextStrong_

bool CbcTreeLocal::nextStrong_
private

Definition at line 194 of file CbcTreeLocal.hpp.

◆ rhs_

double CbcTreeLocal::rhs_
private

Definition at line 196 of file CbcTreeLocal.hpp.

◆ savedGap_

double CbcTreeLocal::savedGap_
private

Definition at line 198 of file CbcTreeLocal.hpp.

◆ bestCutoff_

double CbcTreeLocal::bestCutoff_
private

Definition at line 200 of file CbcTreeLocal.hpp.

◆ timeLimit_

int CbcTreeLocal::timeLimit_
private

Definition at line 202 of file CbcTreeLocal.hpp.

◆ startTime_

int CbcTreeLocal::startTime_
private

Definition at line 204 of file CbcTreeLocal.hpp.

◆ nodeLimit_

int CbcTreeLocal::nodeLimit_
private

Definition at line 206 of file CbcTreeLocal.hpp.

◆ startNode_

int CbcTreeLocal::startNode_
private

Definition at line 208 of file CbcTreeLocal.hpp.

◆ searchType_

int CbcTreeLocal::searchType_
private

Definition at line 210 of file CbcTreeLocal.hpp.

◆ refine_

bool CbcTreeLocal::refine_
private

Definition at line 212 of file CbcTreeLocal.hpp.


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