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

#include <AbcTreeNode.h>

Inheritance diagram for AbcTreeNode:
Inheritance graph
[legend]
Collaboration diagram for AbcTreeNode:
Collaboration graph
[legend]

Public Member Functions

 AbcTreeNode ()
 
 AbcTreeNode (AbcModel *m)
 
 AbcTreeNode (AbcNodeDesc *&desc)
 
 ~AbcTreeNode ()
 
virtual AlpsTreeNodecreateNewTreeNode (AlpsNodeDesc *&desc) const
 The purpose of this function is be able to create the children of a node after branching. More...
 
virtual int process (bool isRoot=false, bool rampUp=false)
 Performing the bounding operation. More...
 
int chooseBranch (AbcModel *model, bool &strongFound)
 Select the branch variable. More...
 
virtual std::vector
< CoinTriple< AlpsNodeDesc
*, AlpsNodeStatus, double > > 
branch ()
 
int numberUnsatisfied () const
 Get the number of objects unsatisfied at this node. More...
 
double guessedObjectiveValue () const
 Guessed objective value (for solution) More...
 
void setGuessedObjectiveValue (double value)
 
void setBranchedOn (int b)
 
void setBranchedDir (int d)
 
void setBranchedOnValue (double b)
 
int getBranchedOn () const
 
int getBranchedDir () const
 
double getBranchedOnValue () const
 
virtual AlpsEncodedencode () const
 This method should encode the content of the object and return a pointer to the encoded form. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked. More...
 
double getObjValue () const
 Query/set the objective value (could be approximately or not exit) of the node. More...
 
void setObjValue (const double objValue)
 Query/set the objective value (could be approximately or not exit) of the node. More...
 
- Public Member Functions inherited from AlpsTreeNode
 AlpsTreeNode ()
 
virtual ~AlpsTreeNode ()
 
bool operator< (const AlpsTreeNode &compNode)
 
AlpsNodeDescmodifyDesc ()
 Access the desc so that can modify it. More...
 
AlpsNodeDescgetDesc () const
 
void setDesc (AlpsNodeDesc *desc)
 
AlpsKnowledgeBrokergetKnowledgeBroker () const
 Functions to access/set the knwoledge broker. More...
 
void setKnowledgeBroker (AlpsKnowledgeBroker *kb)
 
void removeChild (AlpsTreeNode *&child)
 Remove the pointer to given child from the list of children. More...
 
void addChild (AlpsTreeNode *&child)
 Add a child to the list of children for this node. More...
 
void removeDescendants ()
 Removes all the descendants of the node. More...
 
AlpsNodeStatus getStatus () const
 Query/set the current status. More...
 
void setStatus (const AlpsNodeStatus stat)
 Query/set the current status. More...
 
bool isCandidate () const
 Query functions about specific stati. More...
 
bool isEvaluated () const
 Query functions about specific stati. More...
 
bool isPregnant () const
 Query functions about specific stati. More...
 
bool isBranched () const
 Query functions about specific stati. More...
 
bool isFathomed () const
 Query functions about specific stati. More...
 
bool isDiscarded () const
 Query functions about specific stati. More...
 
bool isActive () const
 Query/set node in-process indicator. More...
 
void setActive (const bool yesno)
 Query/set node in-process indicator. More...
 
AlpsNodeIndex_t getIndex () const
 Query/set node identifier (unique within subtree). More...
 
void setIndex (const AlpsNodeIndex_t index)
 Query/set node identifier (unique within subtree). More...
 
int getDepth () const
 Query/set what depth the search tree node is at. More...
 
void setDepth (const int depth)
 Query/set what depth the search tree node is at. More...
 
double getSolEstimate () const
 Query/set the solution estimate of the node. More...
 
void setSolEstimate (double est)
 Query/set the solution estimate of the node. More...
 
double getQuality () const
 Query/set the quality of the node. More...
 
void setQuality (double quality)
 Query/set the quality of the node. More...
 
int getNumChildren () const
 Query/set what the number of children. More...
 
void setNumChildren (const int numChildren)
 Query/set what the number of children. More...
 
void modifyNumChildren (const int s)
 Query/set what the number of children. More...
 
AlpsTreeNodegetChild (const int i) const
 Query/set pointer to the ith child. More...
 
void setChild (const int i, AlpsTreeNode *node)
 Returns a const pointer to the ith child. More...
 
AlpsTreeNodegetParent () const
 Get/set subtree. More...
 
void setParent (AlpsTreeNode *parent)
 Get/set subtree. More...
 
AlpsNodeIndex_t getParentIndex () const
 Get/set the index of the parent of the node. More...
 
void setParentIndex (AlpsNodeIndex_t index)
 Get/set the index of the parent of the node. More...
 
int getExplicit () const
 Get/set the indication of whether the node has full or differencing description. More...
 
void setExplicit (int fp)
 Get/set the indication of whether the node has full or differencing description. More...
 
virtual void convertToExplicit ()
 Convert explicit description to difference, and vise-vesa. More...
 
virtual void convertToRelative ()
 Convert explicit description to difference, and vise-vesa. More...
 
int getSentMark () const
 Various marks used in parallel code. More...
 
void setSentMark (const int tf)
 Various marks used in parallel code. More...
 
- Public Member Functions inherited from AlpsKnowledge
 AlpsKnowledge ()
 
virtual ~AlpsKnowledge ()
 
KnowledgeType getType ()
 
void setType (KnowledgeType t)
 
virtual AlpsReturnStatus encode (AlpsEncoded *encoded)
 Pack into a encode object. More...
 
AlpsEncodedgetEncoded () const
 Get/set encoded. More...
 
void setEncoded (AlpsEncoded *e)
 

Private Member Functions

 AbcTreeNode (const AbcTreeNode &)
 
AbcTreeNodeoperator= (const AbcTreeNode &)
 

Private Attributes

int branchedOn_
 The index of the branching variable. More...
 
double branchedOnVal_
 The solution value (non-integral) of the branching variable. More...
 
int branchedDir_
 Branching direction. More...
 
double guessedObjectiveValue_
 Guessed satisfied Objective value. More...
 
int numberUnsatisfied_
 The number of objects unsatisfied at this node. More...
 

Additional Inherited Members

- Protected Attributes inherited from AlpsTreeNode
bool active_
 The subtree own this node. More...
 
AlpsNodeIndex_t index_
 The unique index of the tree node (across the whole search tree). More...
 
int depth_
 The depth of the node (in the whole tree – the root is at depth 0). More...
 
double solEstimate_
 The solution estimate. More...
 
double quality_
 The quality of this node. More...
 
AlpsTreeNodeparent_
 The parent of the tree node. More...
 
AlpsNodeIndex_t parentIndex_
 The index of parent of the tree node. More...
 
int numChildren_
 The number of children. More...
 
AlpsTreeNode ** children_
 
int explicit_
 Indicate whether the node description is explicit(1) or relative(0). More...
 
AlpsNodeDescdesc_
 The actual description of the tree node. More...
 
AlpsNodeStatus status_
 The current status of the node. More...
 
AlpsKnowledgeBrokerknowledgeBroker_
 A pointer to the knowledge broker of the process where this node is processed. More...
 
int sentMark_
 Various mark used in splitting and passing subtrees. More...
 
- Protected Attributes inherited from AlpsKnowledge
KnowledgeType type_
 

Detailed Description

Definition at line 43 of file AbcTreeNode.h.

Constructor & Destructor Documentation

AbcTreeNode::AbcTreeNode ( const AbcTreeNode )
private
AbcTreeNode::AbcTreeNode ( )
inline

Definition at line 66 of file AbcTreeNode.h.

AbcTreeNode::AbcTreeNode ( AbcModel m)
inline

Definition at line 78 of file AbcTreeNode.h.

AbcTreeNode::AbcTreeNode ( AbcNodeDesc *&  desc)
inline

Definition at line 89 of file AbcTreeNode.h.

AbcTreeNode::~AbcTreeNode ( )
inline

Definition at line 103 of file AbcTreeNode.h.

Member Function Documentation

AbcTreeNode& AbcTreeNode::operator= ( const AbcTreeNode )
private
virtual AlpsTreeNode* AbcTreeNode::createNewTreeNode ( AlpsNodeDesc *&  desc) const
virtual

The purpose of this function is be able to create the children of a node after branching.

Implements AlpsTreeNode.

virtual int AbcTreeNode::process ( bool  isRoot = false,
bool  rampUp = false 
)
virtual

Performing the bounding operation.

int AbcTreeNode::chooseBranch ( AbcModel model,
bool &  strongFound 
)

Select the branch variable.

Return value:

  • 0: A branching object has been installed
  • -1: A monotone object was discovered
  • -2: An infeasible object was discovered
double AbcTreeNode::getObjValue ( ) const
inline

Query/set the objective value (could be approximately or not exit) of the node.

Definition at line 125 of file AbcTreeNode.h.

void AbcTreeNode::setObjValue ( const double  objValue)
inline

Query/set the objective value (could be approximately or not exit) of the node.

Definition at line 126 of file AbcTreeNode.h.

virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > AbcTreeNode::branch ( )
virtual
int AbcTreeNode::numberUnsatisfied ( ) const
inline

Get the number of objects unsatisfied at this node.

Definition at line 133 of file AbcTreeNode.h.

double AbcTreeNode::guessedObjectiveValue ( ) const
inline

Guessed objective value (for solution)

Definition at line 137 of file AbcTreeNode.h.

void AbcTreeNode::setGuessedObjectiveValue ( double  value)
inline

Definition at line 140 of file AbcTreeNode.h.

void AbcTreeNode::setBranchedOn ( int  b)
inline

Definition at line 143 of file AbcTreeNode.h.

void AbcTreeNode::setBranchedDir ( int  d)
inline

Definition at line 145 of file AbcTreeNode.h.

void AbcTreeNode::setBranchedOnValue ( double  b)
inline

Definition at line 147 of file AbcTreeNode.h.

int AbcTreeNode::getBranchedOn ( ) const
inline

Definition at line 149 of file AbcTreeNode.h.

int AbcTreeNode::getBranchedDir ( ) const
inline

Definition at line 151 of file AbcTreeNode.h.

double AbcTreeNode::getBranchedOnValue ( ) const
inline

Definition at line 153 of file AbcTreeNode.h.

virtual AlpsEncoded* AbcTreeNode::encode ( ) const
virtual

This method should encode the content of the object and return a pointer to the encoded form.

NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.

Reimplemented from AlpsKnowledge.

virtual AlpsKnowledge* AbcTreeNode::decode ( AlpsEncoded encoded) const
virtual

This method should decode and return a pointer to a brand new object, i.e., the method must create a new object on the heap from the decoded data instead of filling up the object for which the method was invoked.

NOTE: This default implementation can not be used when the memory of data members is not continously allocated, for example, some data members are pointers, STL set, map, etc.

Reimplemented from AlpsKnowledge.

Member Data Documentation

int AbcTreeNode::branchedOn_
private

The index of the branching variable.

Definition at line 51 of file AbcTreeNode.h.

double AbcTreeNode::branchedOnVal_
private

The solution value (non-integral) of the branching variable.

Definition at line 54 of file AbcTreeNode.h.

int AbcTreeNode::branchedDir_
private

Branching direction.

Definition at line 57 of file AbcTreeNode.h.

double AbcTreeNode::guessedObjectiveValue_
private

Guessed satisfied Objective value.

Definition at line 60 of file AbcTreeNode.h.

int AbcTreeNode::numberUnsatisfied_
private

The number of objects unsatisfied at this node.

Definition at line 63 of file AbcTreeNode.h.


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