This class contain the data for a BCPS search tree node. More...
#include <BcpsTreeNode.h>
Public Member Functions | |
BcpsTreeNode () | |
Default constructor. | |
virtual | ~BcpsTreeNode () |
Destructor. | |
virtual int | process (bool isRoot=false, bool rampUp=false) |
This methods performs the processing of the node. | |
virtual int | bound (BcpsModel *model)=0 |
Bounding procedure to estimate quality of this node. | |
virtual std::vector < CoinTriple< AlpsNodeDesc *, AlpsNodeStatus, double > > | branch ()=0 |
This method must be invoked on a pregnant node (which has all the information needed to create the children) and should create the children's decriptions. | |
const BcpsBranchObject * | branchObject () const |
Return the branching object. | |
void | setBranchObject (BcpsBranchObject *b) |
Set the branching object. | |
Protected Member Functions | |
virtual int | generateConstraints (BcpsModel *model, BcpsConstraintPool *conPool) |
Generate constraints. | |
virtual int | generateVariables (BcpsModel *model, BcpsVariablePool *varPool) |
Generate variables. | |
virtual int | chooseBranchingObject (BcpsModel *model)=0 |
Choose a branching object. | |
virtual int | installSubProblem (BcpsModel *model)=0 |
Extract node information (bounds, constraints, variables) from this node and load the information into the relaxation solver, such as linear programming solver. | |
virtual int | handleBoundingStatus (int status, bool &keepOn, bool &fathomed) |
Handle bounding status:
| |
AlpsReturnStatus | encodeBcps (AlpsEncoded *encoded) const |
Pack Bcps portion of node into an encoded object. | |
Protected Attributes | |
BcpsBranchObject * | branchObject_ |
Branching object for this node, which has information of how to execute branching. |
This class contain the data for a BCPS search tree node.
At this level, we consider a tree node to be simply a list of objects. The objects are organized by type. A differencing scheme is implemented here by looking for differences between the lists of each type in the current node and its parent.
Definition at line 46 of file BcpsTreeNode.h.
BcpsTreeNode::BcpsTreeNode | ( | ) | [inline] |
Default constructor.
Definition at line 99 of file BcpsTreeNode.h.
virtual BcpsTreeNode::~BcpsTreeNode | ( | ) | [inline, virtual] |
Destructor.
Definition at line 102 of file BcpsTreeNode.h.
virtual int BcpsTreeNode::generateConstraints | ( | BcpsModel * | model, | |
BcpsConstraintPool * | conPool | |||
) | [inline, protected, virtual] |
Generate constraints.
The generated constraints are stored in constraint pool. The default implementation does nothing.
Definition at line 58 of file BcpsTreeNode.h.
virtual int BcpsTreeNode::generateVariables | ( | BcpsModel * | model, | |
BcpsVariablePool * | varPool | |||
) | [inline, protected, virtual] |
Generate variables.
The generated varaibles are stored in variable pool. The default implementation does nothing.
Definition at line 66 of file BcpsTreeNode.h.
virtual int BcpsTreeNode::chooseBranchingObject | ( | BcpsModel * | model | ) | [protected, pure virtual] |
Choose a branching object.
Implemented in BlisTreeNode, and BlisTreeNode.
virtual int BcpsTreeNode::installSubProblem | ( | BcpsModel * | model | ) | [protected, pure virtual] |
Extract node information (bounds, constraints, variables) from this node and load the information into the relaxation solver, such as linear programming solver.
Implemented in BlisTreeNode, and BlisTreeNode.
virtual int BcpsTreeNode::handleBoundingStatus | ( | int | status, | |
bool & | keepOn, | |||
bool & | fathomed | |||
) | [inline, protected, virtual] |
Handle bounding status:
Set node status accordingly.
staus | Input The solution status of bounding. | |
keepOn | Output Whether to keep on bounding. | |
fathomed | Output Whether this node is fathomed. |
Definition at line 91 of file BcpsTreeNode.h.
virtual int BcpsTreeNode::process | ( | bool | isRoot = false , |
|
bool | rampUp = false | |||
) | [virtual] |
This methods performs the processing of the node.
For branch and bound, this would mean performing the bounding operation. The minimum requirement for this method is that it change the status to either internal or fathomed so the tree manager can deal with it afterwards. The status of the node when it begins processing will be active.
Reimplemented in BlisTreeNode, and BlisTreeNode.
virtual int BcpsTreeNode::bound | ( | BcpsModel * | model | ) | [pure virtual] |
Bounding procedure to estimate quality of this node.
Implemented in BlisTreeNode, and BlisTreeNode.
virtual std::vector< CoinTriple<AlpsNodeDesc*, AlpsNodeStatus, double> > BcpsTreeNode::branch | ( | ) | [pure virtual] |
This method must be invoked on a pregnant
node (which has all the information needed to create the children) and should create the children's decriptions.
The stati of the children can be any of the ones process()
can return.
Implemented in BlisTreeNode, and BlisTreeNode.
const BcpsBranchObject* BcpsTreeNode::branchObject | ( | ) | const [inline] |
Return the branching object.
Definition at line 123 of file BcpsTreeNode.h.
void BcpsTreeNode::setBranchObject | ( | BcpsBranchObject * | b | ) | [inline] |
Set the branching object.
Definition at line 126 of file BcpsTreeNode.h.
AlpsReturnStatus BcpsTreeNode::encodeBcps | ( | AlpsEncoded * | encoded | ) | const [inline, protected] |
Pack Bcps portion of node into an encoded object.
Definition at line 131 of file BcpsTreeNode.h.
BcpsBranchObject* BcpsTreeNode::branchObject_ [protected] |
Branching object for this node, which has information of how to execute branching.
Definition at line 52 of file BcpsTreeNode.h.