- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# BcpsTreeNode Class Reference

This class contain the data for a BCPS search tree node. More...

`#include <BcpsTreeNode.h>`

Inheritance diagram for BcpsTreeNode:

[legend]
Collaboration diagram for BcpsTreeNode:

[legend]
List of all members.

## 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: relaxed feasible but not integer feasible, integer feasible, infeasible, unbounded, fathomed (for instance, reaching objective limit for LP).
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.

## Detailed Description

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.

## Constructor & Destructor Documentation

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.

References branchObject_.

## Member Function Documentation

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.

References AlpsReturnStatusOk.

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.

References AlpsReturnStatusOk.

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:

- relaxed feasible but not integer feasible,
- integer feasible,
- infeasible,
- unbounded,
- fathomed (for instance, reaching objective limit for LP).

Set node status accordingly.

Parameters:

  | 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.

References BcpsReturnStatusOk.

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.

References branchObject_.

void BcpsTreeNode::setBranchObject | ( | BcpsBranchObject * | b | ) | `[inline]`

Set the branching object.

Definition at line 126 of file BcpsTreeNode.h.

References branchObject_.

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.

References AlpsReturnStatusOk, branchObject_, BcpsBranchObject::encode(), BcpsBranchObject::getType(), and AlpsEncoded::writeRep().

## Member Data Documentation

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.

Referenced by branchObject(), encodeBcps(), setBranchObject(), and ~BcpsTreeNode().

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

- /home/coin/SVN-release/Blis-0.91.0/Bcps/src/BcpsTreeNode.h