Simple branching object for an integer variable. More...
#include <OsiBranchingObject.hpp>
Public Member Functions | |
OsiIntegerBranchingObject () | |
Default constructor. | |
OsiIntegerBranchingObject (OsiSolverInterface *solver, const OsiSimpleInteger *originalObject, int way, double value) | |
Create a standard floor/ceiling branch object. | |
OsiIntegerBranchingObject (OsiSolverInterface *solver, const OsiSimpleInteger *originalObject, int way, double value, double downUpperBound, double upLowerBound) | |
Create a standard floor/ceiling branch object. | |
OsiIntegerBranchingObject (const OsiIntegerBranchingObject &) | |
Copy constructor. | |
OsiIntegerBranchingObject & | operator= (const OsiIntegerBranchingObject &rhs) |
Assignment operator. | |
virtual OsiBranchingObject * | clone () const |
Clone. | |
virtual | ~OsiIntegerBranchingObject () |
Destructor. | |
virtual double | branch (OsiSolverInterface *solver) |
Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. | |
virtual void | print (const OsiSolverInterface *solver=NULL) |
Print something about branch - only if log level high. | |
Protected Attributes | |
double | down_ [2] |
Lower [0] and upper [1] bounds for the down arm (way_ = -1). | |
double | up_ [2] |
Lower [0] and upper [1] bounds for the up arm (way_ = 1). |
Simple branching object for an integer variable.
This object can specify a two-way branch on an integer variable. For each arm of the branch, the upper and lower bounds on the variable can be independently specified. 0 -> down, 1-> up.
Definition at line 592 of file OsiBranchingObject.hpp.
OsiIntegerBranchingObject::OsiIntegerBranchingObject | ( | ) |
Default constructor.
OsiIntegerBranchingObject::OsiIntegerBranchingObject | ( | OsiSolverInterface * | solver, | |
const OsiSimpleInteger * | originalObject, | |||
int | way, | |||
double | value | |||
) |
Create a standard floor/ceiling branch object.
Specifies a simple two-way branch. Let value
= x*. One arm of the branch will be lb <= x <= floor(x*), the other ceil(x*) <= x <= ub. Specify way = -1 to set the object state to perform the down arm first, way = 1 for the up arm.
OsiIntegerBranchingObject::OsiIntegerBranchingObject | ( | OsiSolverInterface * | solver, | |
const OsiSimpleInteger * | originalObject, | |||
int | way, | |||
double | value, | |||
double | downUpperBound, | |||
double | upLowerBound | |||
) |
Create a standard floor/ceiling branch object.
Specifies a simple two-way branch in a more flexible way. One arm of the branch will be lb <= x <= downUpperBound, the other upLowerBound <= x <= ub. Specify way = -1 to set the object state to perform the down arm first, way = 1 for the up arm.
OsiIntegerBranchingObject::OsiIntegerBranchingObject | ( | const OsiIntegerBranchingObject & | ) |
Copy constructor.
virtual OsiIntegerBranchingObject::~OsiIntegerBranchingObject | ( | ) | [virtual] |
Destructor.
OsiIntegerBranchingObject& OsiIntegerBranchingObject::operator= | ( | const OsiIntegerBranchingObject & | rhs | ) |
Assignment operator.
Reimplemented from OsiTwoWayBranchingObject.
virtual OsiBranchingObject* OsiIntegerBranchingObject::clone | ( | ) | const [virtual] |
Clone.
Implements OsiBranchingObject.
virtual double OsiIntegerBranchingObject::branch | ( | OsiSolverInterface * | solver | ) | [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 OsiTwoWayBranchingObject.
virtual void OsiIntegerBranchingObject::print | ( | const OsiSolverInterface * | solver = NULL |
) | [virtual] |
Print something about branch - only if log level high.
double OsiIntegerBranchingObject::down_[2] [protected] |
Lower [0] and upper [1] bounds for the down arm (way_ = -1).
Definition at line 646 of file OsiBranchingObject.hpp.
double OsiIntegerBranchingObject::up_[2] [protected] |
Lower [0] and upper [1] bounds for the up arm (way_ = 1).
Definition at line 648 of file OsiBranchingObject.hpp.