Public Member Functions | Private Member Functions | List of all members
BlisTreeNode Class Reference

This is the class in which we are finally able to concretely define the bounding procedure. More...

#include <BlisSubTree.h>

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

Public Member Functions

 BlisTreeNode ()
 Default constructor. More...
 
 BlisTreeNode (BlisModel *m)
 Useful constructor. More...
 
 BlisTreeNode (AlpsNodeDesc *&desc)
 Useful constructor. More...
 
virtual ~BlisTreeNode ()
 Destructor. More...
 
void init ()
 Initilize member data when constructing a node. More...
 
AlpsTreeNodecreateNewTreeNode (AlpsNodeDesc *&desc) const
 Create a new node based on given desc. More...
 
virtual int installSubProblem (BcpsModel *mode)
 intall subproblem More...
 
virtual int process (bool isRoot=false, bool rampUp=false)
 Performing the bounding operation. More...
 
virtual int bound (BcpsModel *model)
 Bounding procedure. More...
 
virtual std::vector
< CoinTriple< AlpsNodeDesc
*, AlpsNodeStatus, double > > 
branch ()
 Takes the explicit description of the current active node and creates the children's descriptions, which contain information about how the branching is to be done. More...
 
int selectBranchObject (BlisModel *model, bool &foundSol, int numPassesLeft)
 Select a branching object based on give branching strategy. More...
 
virtual int chooseBranchingObject (BcpsModel *)
 To be defined. More...
 
int generateConstraints (BlisModel *model, OsiCuts &cutPool)
 Generate constraints. More...
 
int applyConstraints (BlisModel *model, OsiCuts &cutPool, const double *solution)
 Select and apply constraints. More...
 
int reducedCostFix (BlisModel *model)
 Fix and tighten varaibles based optimality conditions. More...
 
virtual AlpsEncodedencode () const
 Return constraint pool. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 Decode a node from an encoded object. More...
 
 BlisTreeNode ()
 Default constructor. More...
 
 BlisTreeNode (BlisModel *m)
 Useful constructor. More...
 
 BlisTreeNode (AlpsNodeDesc *&desc)
 Useful constructor. More...
 
virtual ~BlisTreeNode ()
 Destructor. More...
 
void init ()
 Initilize member data when constructing a node. More...
 
AlpsTreeNodecreateNewTreeNode (AlpsNodeDesc *&desc) const
 Create a new node based on given desc. More...
 
virtual int installSubProblem (BcpsModel *mode)
 intall subproblem More...
 
virtual int process (bool isRoot=false, bool rampUp=false)
 Performing the bounding operation. More...
 
virtual int bound (BcpsModel *model)
 Bounding procedure. More...
 
virtual std::vector
< CoinTriple< AlpsNodeDesc
*, AlpsNodeStatus, double > > 
branch ()
 Takes the explicit description of the current active node and creates the children's descriptions, which contain information about how the branching is to be done. More...
 
int selectBranchObject (BlisModel *model, bool &foundSol, int numPassesLeft)
 Select a branching object based on give branching strategy. More...
 
virtual int chooseBranchingObject (BcpsModel *)
 To be defined. More...
 
int generateConstraints (BlisModel *model, BcpsConstraintPool &conPool)
 Generate constraints. More...
 
int callHeuristics (BlisModel *model, bool onlyBeforeRoot=false)
 Call heuristic to search solutions. More...
 
void getViolatedConstraints (BlisModel *model, const double *currLpSolution, BcpsConstraintPool &conPool)
 Get violated constraints. More...
 
BlisReturnStatus applyConstraints (BlisModel *model, const double *solution, BcpsConstraintPool &conPool)
 Select and apply constraints. More...
 
BlisReturnStatus reducedCostFix (BlisModel *model)
 Fix and tighten varaibles based optimality conditions. More...
 
virtual AlpsEncodedencode () const
 Encode this node for message passing. More...
 
virtual AlpsKnowledgedecode (AlpsEncoded &) const
 Decode a node from an encoded object. 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...
 
virtual void convertToExplicit ()
 Convert explicit description to difference, and vise-vesa. More...
 
virtual void convertToRelative ()
 Convert explicit description to difference, and vise-vesa. More...
 
- Public Member Functions inherited from BcpsTreeNode
 BcpsTreeNode ()
 Default constructor. More...
 
virtual ~BcpsTreeNode ()
 Destructor. More...
 
const BcpsBranchObjectbranchObject () const
 Return the branching object. More...
 
void setBranchObject (BcpsBranchObject *b)
 Set the branching object. 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...
 
int getDiving () const
 If the this node is in a diving process. More...
 
void setDiving (const bool d)
 If the this node is in a diving process. 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

virtual void process ()
 
void branch (AlpsTreeNode &explicitNode)
 Takes the explicit description of the current active node and creates the children, adds them to the priority queue, etc. More...
 
virtual bool fathom ()
 Takes the explicit description of the current active node and decides whether or not it should be fathomed. More...
 
 BlisTreeNode (const BlisTreeNode &)
 No copy constructor, assignment operator. More...
 
BlisTreeNodeoperator= (const BlisTreeNode &)
 
bool parallel (BlisModel *model, OsiCuts *newCutSet, int lastNew, OsiRowCut *rowCut)
 Constraint pool. More...
 
virtual void process ()
 
void branch (AlpsTreeNode &explicitNode)
 Takes the explicit description of the current active node and creates the children, adds them to the priority queue, etc. More...
 
virtual bool fathom ()
 Takes the explicit description of the current active node and decides whether or not it should be fathomed. More...
 
 BlisTreeNode (const BlisTreeNode &)
 No copy constructor, assignment operator. More...
 
BlisTreeNodeoperator= (const BlisTreeNode &)
 
bool parallel (BlisModel *model, BcpsConstraintPool &conPool, int lastNew, BlisConstraint *aCon)
 Constraint pool. More...
 
double estimateSolution (BlisModel *model, const double *lpSolution, double lpObjValue) const
 Estimate quality of a feasible solution. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BcpsTreeNode
virtual int generateConstraints (BcpsModel *model, BcpsConstraintPool *conPool)
 Generate constraints. More...
 
virtual int generateVariables (BcpsModel *model, BcpsVariablePool *varPool)
 Generate variables. More...
 
virtual int handleBoundingStatus (int status, bool &keepOn, bool &fathomed)
 Handle bounding status: More...
 
AlpsReturnStatus encodeBcps (AlpsEncoded *encoded) const
 Pack Bcps portion of node into an encoded object. More...
 
- Protected Attributes inherited from BcpsTreeNode
BcpsBranchObjectbranchObject_
 Branching object for this node, which has information of how to execute branching. More...
 
- 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...
 
bool diving_
 When processing it, if it is in the diving processing. More...
 
- Protected Attributes inherited from AlpsKnowledge
KnowledgeType type_
 

Detailed Description

This is the class in which we are finally able to concretely define the bounding procedure.

Here we can assume that we have an LP solver and that the objects are cuts and variables, etc.

Definition at line 33 of file BlisSubTree.h.

Constructor & Destructor Documentation

BlisTreeNode::BlisTreeNode ( const BlisTreeNode )
private

No copy constructor, assignment operator.

BlisTreeNode::BlisTreeNode ( )
inline

Default constructor.

Definition at line 74 of file BlisTreeNode.h.

BlisTreeNode::BlisTreeNode ( BlisModel m)
inline

Useful constructor.

Definition at line 80 of file BlisTreeNode.h.

BlisTreeNode::BlisTreeNode ( AlpsNodeDesc *&  desc)
inline

Useful constructor.

Definition at line 86 of file BlisTreeNode.h.

virtual BlisTreeNode::~BlisTreeNode ( )
inlinevirtual

Destructor.

Definition at line 93 of file BlisTreeNode.h.

BlisTreeNode::BlisTreeNode ( const BlisTreeNode )
private

No copy constructor, assignment operator.

BlisTreeNode::BlisTreeNode ( )
inline

Default constructor.

Definition at line 79 of file BlisTreeNode.h.

BlisTreeNode::BlisTreeNode ( BlisModel m)
inline

Useful constructor.

Definition at line 85 of file BlisTreeNode.h.

BlisTreeNode::BlisTreeNode ( AlpsNodeDesc *&  desc)
inline

Useful constructor.

Definition at line 91 of file BlisTreeNode.h.

virtual BlisTreeNode::~BlisTreeNode ( )
inlinevirtual

Destructor.

Definition at line 98 of file BlisTreeNode.h.

Member Function Documentation

virtual void BlisTreeNode::process ( )
privatevirtual
void BlisTreeNode::branch ( AlpsTreeNode explicitNode)
private

Takes the explicit description of the current active node and creates the children, adds them to the priority queue, etc.

Most likely, the node description will contain information about how the branching is to be done.

virtual bool BlisTreeNode::fathom ( )
privatevirtual

Takes the explicit description of the current active node and decides whether or not it should be fathomed.

BlisTreeNode& BlisTreeNode::operator= ( const BlisTreeNode )
private
bool BlisTreeNode::parallel ( BlisModel model,
OsiCuts newCutSet,
int  lastNew,
OsiRowCut rowCut 
)
private

Constraint pool.

Variable pool. Save an explicit node description.

void BlisTreeNode::init ( )
inline

Initilize member data when constructing a node.

Definition at line 99 of file BlisTreeNode.h.

AlpsTreeNode* BlisTreeNode::createNewTreeNode ( AlpsNodeDesc *&  desc) const
virtual

Create a new node based on given desc.

Implements AlpsTreeNode.

virtual void BlisTreeNode::convertToExplicit ( )
virtual

Convert explicit description to difference, and vise-vesa.

Reimplemented from AlpsTreeNode.

virtual void BlisTreeNode::convertToRelative ( )
virtual

Convert explicit description to difference, and vise-vesa.

Reimplemented from AlpsTreeNode.

virtual int BlisTreeNode::installSubProblem ( BcpsModel mode)
virtual

intall subproblem

Implements BcpsTreeNode.

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

Performing the bounding operation.

Reimplemented from BcpsTreeNode.

virtual int BlisTreeNode::bound ( BcpsModel model)
virtual

Bounding procedure.

Implements BcpsTreeNode.

virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > BlisTreeNode::branch ( )
virtual

Takes the explicit description of the current active node and creates the children's descriptions, which contain information about how the branching is to be done.

The stati of the children are AlpsNodeStatusCandidate.

Implements BcpsTreeNode.

int BlisTreeNode::selectBranchObject ( BlisModel model,
bool &  foundSol,
int  numPassesLeft 
)

Select a branching object based on give branching strategy.

virtual int BlisTreeNode::chooseBranchingObject ( BcpsModel )
inlinevirtual

To be defined.

Implements BcpsTreeNode.

Definition at line 135 of file BlisTreeNode.h.

int BlisTreeNode::generateConstraints ( BlisModel model,
OsiCuts cutPool 
)

Generate constraints.

int BlisTreeNode::applyConstraints ( BlisModel model,
OsiCuts cutPool,
const double *  solution 
)

Select and apply constraints.

int BlisTreeNode::reducedCostFix ( BlisModel model)

Fix and tighten varaibles based optimality conditions.

virtual AlpsEncoded* BlisTreeNode::encode ( ) const
virtual

Return constraint pool.

Return variable pool. Encode this node for message passing.

Reimplemented from AlpsKnowledge.

virtual AlpsKnowledge* BlisTreeNode::decode ( AlpsEncoded ) const
virtual

Decode a node from an encoded object.

Reimplemented from AlpsKnowledge.

virtual void BlisTreeNode::process ( )
privatevirtual
void BlisTreeNode::branch ( AlpsTreeNode explicitNode)
private

Takes the explicit description of the current active node and creates the children, adds them to the priority queue, etc.

Most likely, the node description will contain information about how the branching is to be done.

virtual bool BlisTreeNode::fathom ( )
privatevirtual

Takes the explicit description of the current active node and decides whether or not it should be fathomed.

BlisTreeNode& BlisTreeNode::operator= ( const BlisTreeNode )
private
bool BlisTreeNode::parallel ( BlisModel model,
BcpsConstraintPool conPool,
int  lastNew,
BlisConstraint aCon 
)
private

Constraint pool.

Variable pool. Save an explicit node description. Check and remove parallel constraints.

double BlisTreeNode::estimateSolution ( BlisModel model,
const double *  lpSolution,
double  lpObjValue 
) const
private

Estimate quality of a feasible solution.

void BlisTreeNode::init ( )
inline

Initilize member data when constructing a node.

Definition at line 103 of file BlisTreeNode.h.

AlpsTreeNode* BlisTreeNode::createNewTreeNode ( AlpsNodeDesc *&  desc) const
virtual

Create a new node based on given desc.

Implements AlpsTreeNode.

virtual void BlisTreeNode::convertToExplicit ( )
virtual

Convert explicit description to difference, and vise-vesa.

Reimplemented from AlpsTreeNode.

virtual void BlisTreeNode::convertToRelative ( )
virtual

Convert explicit description to difference, and vise-vesa.

Reimplemented from AlpsTreeNode.

virtual int BlisTreeNode::installSubProblem ( BcpsModel mode)
virtual

intall subproblem

Implements BcpsTreeNode.

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

Performing the bounding operation.

Reimplemented from BcpsTreeNode.

virtual int BlisTreeNode::bound ( BcpsModel model)
virtual

Bounding procedure.

Implements BcpsTreeNode.

virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > BlisTreeNode::branch ( )
virtual

Takes the explicit description of the current active node and creates the children's descriptions, which contain information about how the branching is to be done.

The stati of the children are AlpsNodeStatusCandidate.

Implements BcpsTreeNode.

int BlisTreeNode::selectBranchObject ( BlisModel model,
bool &  foundSol,
int  numPassesLeft 
)

Select a branching object based on give branching strategy.

virtual int BlisTreeNode::chooseBranchingObject ( BcpsModel )
inlinevirtual

To be defined.

Implements BcpsTreeNode.

Definition at line 139 of file BlisTreeNode.h.

int BlisTreeNode::generateConstraints ( BlisModel model,
BcpsConstraintPool conPool 
)

Generate constraints.

int BlisTreeNode::callHeuristics ( BlisModel model,
bool  onlyBeforeRoot = false 
)

Call heuristic to search solutions.

0: no solution; 1: found solutions; 2: fathom this node. onlyBeforeRoot is for heuristics like feasibility pump.

void BlisTreeNode::getViolatedConstraints ( BlisModel model,
const double *  currLpSolution,
BcpsConstraintPool conPool 
)

Get violated constraints.

BlisReturnStatus BlisTreeNode::applyConstraints ( BlisModel model,
const double *  solution,
BcpsConstraintPool conPool 
)

Select and apply constraints.

BlisReturnStatus BlisTreeNode::reducedCostFix ( BlisModel model)

Fix and tighten varaibles based optimality conditions.

virtual AlpsEncoded* BlisTreeNode::encode ( ) const
virtual

Encode this node for message passing.

Reimplemented from AlpsKnowledge.

virtual AlpsKnowledge* BlisTreeNode::decode ( AlpsEncoded ) const
virtual

Decode a node from an encoded object.

Reimplemented from AlpsKnowledge.


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