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

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

# OsiBranchingObject Class Reference

Abstract branching object base class. More...

`#include <OsiBranchingObject.hpp>`

Inheritance diagram for OsiBranchingObject:

[legend]
Collaboration diagram for OsiBranchingObject:

[legend]
List of all members.

## Public Member Functions
| OsiBranchingObject ()
| Default Constructor.
| OsiBranchingObject (OsiSolverInterface *solver, double value)
| Constructor.
| OsiBranchingObject (const OsiBranchingObject &)
| Copy constructor.
OsiBranchingObject & | operator= (const OsiBranchingObject &rhs)
| Assignment operator.
virtual OsiBranchingObject * | clone () const =0
| Clone.
virtual | ~OsiBranchingObject ()
| Destructor.
int | numberBranches () const
| The number of branch arms created for this branching object.
int | numberBranchesLeft () const
| The number of branch arms left for this branching object.
void | incrementNumberBranchesLeft ()
| Increment the number of branch arms left for this branching object.
void | setNumberBranchesLeft (int value)
| Set the number of branch arms left for this branching object Just for forcing.
void | decrementNumberBranchesLeft ()
| Decrement the number of branch arms left for this branching object.
virtual double | branch (OsiSolverInterface *solver)=0
| Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.
virtual double | branch ()
| Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.
virtual bool | boundBranch () const
| Return true if branch should fix variables.
int | branchIndex () const
| Get the state of the branching object This is just the branch index.
void | setBranchingIndex (int branchIndex)
| Set the state of the branching object.
double | value () const
| Current value.
const OsiObject * | originalObject () const
| Return pointer back to object which created.
void | setOriginalObject (const OsiObject *object)
| Set pointer back to object which created.
virtual void | checkIsCutoff (double cutoff)
| Double checks in case node can change its mind! Returns objective value Can change objective etc.
int | columnNumber () const
| For debug.
virtual void | print (const OsiSolverInterface *solver=NULL) const
| Print something about branch - only if log level high.
## Protected Attributes
double | value_
| Current value - has some meaning about branch.
const OsiObject * | originalObject_
| Pointer back to object which created.
int | numberBranches_
| Number of branches.
short | branchIndex_
| The state of the branching object.

## Detailed Description

Abstract branching object base class.

In the abstract, an OsiBranchingObject contains instructions for how to branch. We want an abstract class so that we can describe how to branch on simple objects (e.g., integers) and more exotic objects (e.g., cliques or hyperplanes).

The branch() method is the crucial routine: it is expected to be able to step through a set of branch arms, executing the actions required to create each subproblem in turn. The base class is primarily virtual to allow for a wide range of problem modifications.

See OsiObject for an overview of the two classes (OsiObject and OsiBranchingObject) which make up Osi's branching model.

Definition at line 247 of file OsiBranchingObject.hpp.

## Constructor & Destructor Documentation

OsiBranchingObject::OsiBranchingObject | ( |  | ) |

Default Constructor.

OsiBranchingObject::OsiBranchingObject | ( | OsiSolverInterface * | solver,
|  | double | value |
| ) |  |  |

Constructor.

OsiBranchingObject::OsiBranchingObject | ( | const OsiBranchingObject & |  | ) |

Copy constructor.

virtual OsiBranchingObject::~OsiBranchingObject | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

OsiBranchingObject& OsiBranchingObject::operator= | ( | const OsiBranchingObject & | rhs | ) |

Assignment operator.

virtual OsiBranchingObject* OsiBranchingObject::clone | ( |  | ) | const`[pure virtual]`

Clone.

Implemented in OsiIntegerBranchingObject, OsiSOSBranchingObject, and OsiLotsizeBranchingObject.

int OsiBranchingObject::numberBranches | ( |  | ) | const`[inline]`

The number of branch arms created for this branching object.

Definition at line 270 of file OsiBranchingObject.hpp.

References numberBranches_.

Referenced by OsiHotInfo::downChange(), OsiHotInfo::downIterationCount(), OsiHotInfo::downStatus(), OsiHotInfo::setDownChange(), OsiHotInfo::setDownStatus(), OsiHotInfo::setUpChange(), OsiHotInfo::setUpStatus(), OsiHotInfo::upChange(), OsiHotInfo::upIterationCount(), and OsiHotInfo::upStatus().

int OsiBranchingObject::numberBranchesLeft | ( |  | ) | const`[inline]`

The number of branch arms left for this branching object.

Definition at line 274 of file OsiBranchingObject.hpp.

References branchIndex_, and numberBranches_.

void OsiBranchingObject::incrementNumberBranchesLeft | ( |  | ) | `[inline]`

Increment the number of branch arms left for this branching object.

Definition at line 278 of file OsiBranchingObject.hpp.

References numberBranches_.

void OsiBranchingObject::setNumberBranchesLeft | ( | int | value | ) | `[inline]`

Set the number of branch arms left for this branching object Just for forcing.

Definition at line 284 of file OsiBranchingObject.hpp.

References branchIndex_, and numberBranches_.

void OsiBranchingObject::decrementNumberBranchesLeft | ( |  | ) | `[inline]`

Decrement the number of branch arms left for this branching object.

Definition at line 288 of file OsiBranchingObject.hpp.

References branchIndex_.

virtual double OsiBranchingObject::branch | ( | OsiSolverInterface * | solver | ) | `[pure virtual]`

Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.

Returns change in guessed objective on next branch

Implemented in OsiTwoWayBranchingObject, OsiIntegerBranchingObject, OsiSOSBranchingObject, and OsiLotsizeBranchingObject.

virtual double OsiBranchingObject::branch | ( |  | ) | `[inline, virtual]`

Execute the actions required to branch, as specified by the current state of the branching object, and advance the object's state.

Returns change in guessed objective on next branch

Definition at line 302 of file OsiBranchingObject.hpp.

virtual bool OsiBranchingObject::boundBranch | ( |  | ) | const`[inline, virtual]`

Return true if branch should fix variables.

Definition at line 305 of file OsiBranchingObject.hpp.

int OsiBranchingObject::branchIndex | ( |  | ) | const`[inline]`

Get the state of the branching object This is just the branch index.

Definition at line 310 of file OsiBranchingObject.hpp.

References branchIndex_.

void OsiBranchingObject::setBranchingIndex | ( | int | branchIndex | ) | `[inline]`

Set the state of the branching object.

Definition at line 315 of file OsiBranchingObject.hpp.

References branchIndex_.

double OsiBranchingObject::value | ( |  | ) | const`[inline]`

Current value.

Definition at line 319 of file OsiBranchingObject.hpp.

References value_.

const OsiObject* OsiBranchingObject::originalObject | ( |  | ) | const`[inline]`

Return pointer back to object which created.

Definition at line 323 of file OsiBranchingObject.hpp.

References originalObject_.

void OsiBranchingObject::setOriginalObject | ( | const OsiObject * | object | ) | `[inline]`

Set pointer back to object which created.

Definition at line 326 of file OsiBranchingObject.hpp.

References originalObject_.

virtual void OsiBranchingObject::checkIsCutoff | ( | double | cutoff | ) | `[inline, virtual]`

Double checks in case node can change its mind! Returns objective value Can change objective etc.

Definition at line 331 of file OsiBranchingObject.hpp.

int OsiBranchingObject::columnNumber | ( |  | ) | const

For debug.

virtual void OsiBranchingObject::print | ( | const OsiSolverInterface * | solver = `NULL` | ) | const`[inline, virtual]`

Print something about branch - only if log level high.

Definition at line 336 of file OsiBranchingObject.hpp.

## Member Data Documentation

double OsiBranchingObject::value_`[protected]`

Current value - has some meaning about branch.

Definition at line 341 of file OsiBranchingObject.hpp.

Referenced by value().

const OsiObject* OsiBranchingObject::originalObject_`[protected]`

Pointer back to object which created.

Definition at line 344 of file OsiBranchingObject.hpp.

Referenced by originalObject(), and setOriginalObject().

int OsiBranchingObject::numberBranches_`[protected]`

Number of branches.

Definition at line 348 of file OsiBranchingObject.hpp.

Referenced by incrementNumberBranchesLeft(), numberBranches(), numberBranchesLeft(), and setNumberBranchesLeft().

short OsiBranchingObject::branchIndex_`[protected]`

The state of the branching object.

i.e. branch index This starts at 0 when created

Definition at line 353 of file OsiBranchingObject.hpp.

Referenced by branchIndex(), decrementNumberBranchesLeft(), numberBranchesLeft(), setBranchingIndex(), setNumberBranchesLeft(), and OsiTwoWayBranchingObject::way().

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

- /home/coin/SVN-release/Blis-0.91.0/Osi/src/OsiBranchingObject.hpp