This just adds two-wayness to a branching object. More...
#include <OsiBranchingObject.hpp>
Public Member Functions | |
OsiTwoWayBranchingObject () | |
Default constructor. More... | |
OsiTwoWayBranchingObject (OsiSolverInterface *solver, const OsiObject *originalObject, int way, double value) | |
Create a standard tw0-way branch object. More... | |
OsiTwoWayBranchingObject (const OsiTwoWayBranchingObject &) | |
Copy constructor. More... | |
OsiTwoWayBranchingObject & | operator= (const OsiTwoWayBranchingObject &rhs) |
Assignment operator. More... | |
virtual | ~OsiTwoWayBranchingObject () |
Destructor. More... | |
virtual double | branch (OsiSolverInterface *solver)=0 |
Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. More... | |
int | firstBranch () const |
int | way () const |
Way returns -1 on down +1 on up. More... | |
![]() | |
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 () |
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 | |
int | firstBranch_ |
Which way was first branch -1 = down, +1 = up. More... | |
![]() | |
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... | |
This just adds two-wayness to a branching object.
Definition at line 467 of file OsiBranchingObject.hpp.
OsiTwoWayBranchingObject::OsiTwoWayBranchingObject | ( | ) |
Default constructor.
OsiTwoWayBranchingObject::OsiTwoWayBranchingObject | ( | OsiSolverInterface * | solver, |
const OsiObject * | originalObject, | ||
int | way, | ||
double | value | ||
) |
Create a standard tw0-way branch object.
Specifies a simple two-way branch. Specify way = -1 to set the object state to perform the down arm first, way = 1 for the up arm.
OsiTwoWayBranchingObject::OsiTwoWayBranchingObject | ( | const OsiTwoWayBranchingObject & | ) |
Copy constructor.
|
virtual |
Destructor.
OsiTwoWayBranchingObject& OsiTwoWayBranchingObject::operator= | ( | const OsiTwoWayBranchingObject & | rhs | ) |
Assignment operator.
|
pure virtual |
Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm.
state. Returns change in guessed objective on next branch
Implements OsiBranchingObject.
Implemented in OsiLotsizeBranchingObject, OsiSOSBranchingObject, and OsiIntegerBranchingObject.
|
inline |
Definition at line 500 of file OsiBranchingObject.hpp.
|
inline |
Way returns -1 on down +1 on up.
Definition at line 502 of file OsiBranchingObject.hpp.
|
protected |
Which way was first branch -1 = down, +1 = up.
Definition at line 506 of file OsiBranchingObject.hpp.