Abstract branching object base class. More...
#include <OsiBranchingObject.hpp>
Public Member Functions | |
OsiBranchingObject () | |
Default Constructor. More... | |
OsiBranchingObject (OsiSolverInterface *solver, double value) | |
Constructor. More... | |
OsiBranchingObject (const OsiBranchingObject &) | |
Copy constructor. More... | |
OsiBranchingObject & | operator= (const OsiBranchingObject &rhs) |
Assignment operator. More... | |
virtual OsiBranchingObject * | clone () const =0 |
Clone. More... | |
virtual | ~OsiBranchingObject () |
Destructor. More... | |
int | numberBranches () const |
The number of branch arms created for this branching object. More... | |
int | numberBranchesLeft () const |
The number of branch arms left for this branching object. More... | |
void | incrementNumberBranchesLeft () |
Increment the number of branch arms left for this branching object. More... | |
void | setNumberBranchesLeft (int) |
Set the number of branch arms left for this branching object Just for forcing. More... | |
void | decrementNumberBranchesLeft () |
Decrement the number of branch arms left for this branching object. More... | |
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. More... | |
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. More... | |
virtual bool | boundBranch () const |
Return true if branch should fix variables. More... | |
int | branchIndex () const |
Get the state of the branching object This is just the branch index. More... | |
void | setBranchingIndex (int branchIndex) |
Set the state of the branching object. More... | |
double | value () const |
Current value. More... | |
const OsiObject * | originalObject () const |
Return pointer back to object which created. More... | |
void | setOriginalObject (const OsiObject *object) |
Set pointer back to object which created. More... | |
virtual void | checkIsCutoff (double) |
Double checks in case node can change its mind! Returns objective value Can change objective etc. More... | |
int | columnNumber () const |
For debug. More... | |
virtual void | print (const OsiSolverInterface *=NULL) const |
Print something about branch - only if log level high. More... | |
Protected Attributes | |
double | value_ |
Current value - has some meaning about branch. More... | |
const OsiObject * | originalObject_ |
Pointer back to object which created. More... | |
int | numberBranches_ |
Number of branches. More... | |
short | branchIndex_ |
The state of the branching object. More... | |
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 254 of file OsiBranchingObject.hpp.
OsiBranchingObject::OsiBranchingObject | ( | ) |
Default Constructor.
OsiBranchingObject::OsiBranchingObject | ( | OsiSolverInterface * | solver, |
double | value | ||
) |
Constructor.
OsiBranchingObject::OsiBranchingObject | ( | const OsiBranchingObject & | ) |
Copy constructor.
|
virtual |
Destructor.
OsiBranchingObject& OsiBranchingObject::operator= | ( | const OsiBranchingObject & | rhs | ) |
Assignment operator.
|
pure virtual |
Clone.
Implemented in OsiLotsizeBranchingObject, OsiSOSBranchingObject, and OsiIntegerBranchingObject.
|
inline |
The number of branch arms created for this branching object.
Definition at line 277 of file OsiBranchingObject.hpp.
|
inline |
The number of branch arms left for this branching object.
Definition at line 281 of file OsiBranchingObject.hpp.
|
inline |
Increment the number of branch arms left for this branching object.
Definition at line 285 of file OsiBranchingObject.hpp.
|
inline |
Set the number of branch arms left for this branching object Just for forcing.
Definition at line 291 of file OsiBranchingObject.hpp.
|
inline |
Decrement the number of branch arms left for this branching object.
Definition at line 295 of file OsiBranchingObject.hpp.
|
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 OsiLotsizeBranchingObject, OsiSOSBranchingObject, OsiIntegerBranchingObject, and OsiTwoWayBranchingObject.
|
inlinevirtual |
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 309 of file OsiBranchingObject.hpp.
|
inlinevirtual |
Return true if branch should fix variables.
Definition at line 312 of file OsiBranchingObject.hpp.
|
inline |
Get the state of the branching object This is just the branch index.
Definition at line 317 of file OsiBranchingObject.hpp.
|
inline |
Set the state of the branching object.
Definition at line 322 of file OsiBranchingObject.hpp.
|
inline |
Current value.
Definition at line 326 of file OsiBranchingObject.hpp.
|
inline |
Return pointer back to object which created.
Definition at line 330 of file OsiBranchingObject.hpp.
Set pointer back to object which created.
Definition at line 333 of file OsiBranchingObject.hpp.
|
inlinevirtual |
Double checks in case node can change its mind! Returns objective value Can change objective etc.
Definition at line 338 of file OsiBranchingObject.hpp.
int OsiBranchingObject::columnNumber | ( | ) | const |
For debug.
|
inlinevirtual |
Print something about branch - only if log level high.
Definition at line 343 of file OsiBranchingObject.hpp.
|
protected |
Current value - has some meaning about branch.
Definition at line 348 of file OsiBranchingObject.hpp.
|
protected |
Pointer back to object which created.
Definition at line 351 of file OsiBranchingObject.hpp.
|
protected |
Number of branches.
Definition at line 355 of file OsiBranchingObject.hpp.
|
protected |
The state of the branching object.
i.e. branch index This starts at 0 when created
Definition at line 360 of file OsiBranchingObject.hpp.