#include <SbbBranchActual.hpp>
Inheritance diagram for SbbIntegerBranchingObject:
Public Member Functions | |
SbbIntegerBranchingObject () | |
Default constructor. | |
SbbIntegerBranchingObject (SbbModel *model, int variable, int way, double value) | |
SbbIntegerBranchingObject (SbbModel *model, int variable, int way, double lowerValue, double upperValue) | |
SbbIntegerBranchingObject (const SbbIntegerBranchingObject &) | |
Copy constructor. | |
SbbIntegerBranchingObject & | operator= (const SbbIntegerBranchingObject &rhs) |
Assignment operator. | |
virtual SbbBranchingObject * | clone () const |
Clone. | |
virtual | ~SbbIntegerBranchingObject () |
Destructor. | |
virtual void | branch () |
Sets the bounds for the variable according to the current arm of the branch and advances the object state to the next arm. | |
Private 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). |
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.
Variable_ holds the index of the integer variable in the integerVariable_ array of the model.
Definition at line 196 of file SbbBranchActual.hpp.
|
Create a standard floor/ceiling branch object
Specifies a simple two-way branch. Let Definition at line 522 of file SbbBranchActual.cpp. References down_, OsiSolverInterface::getColLower(), SbbModel::getColUpper(), SbbModel::integerVariable(), SbbModel::solver(), and up_.
00524 :SbbBranchingObject(model,variable,way,value) 00525 { 00526 int iColumn = model_->integerVariable()[variable_]; 00527 down_[0] = model_->solver()->getColLower()[iColumn]; 00528 down_[1] = floor(value_); 00529 up_[0] = ceil(value_); 00530 up_[1] = model->getColUpper()[iColumn]; 00531 } |
|
Create a degenerate branch object Specifies a `one-way branch'. Calling branch() for this object will always result in lowerValue <= x <= upperValue. Used to fix a variable when lowerValue = upperValue. Definition at line 533 of file SbbBranchActual.cpp.
00537 :SbbBranchingObject(model,variable,way,lowerValue) 00538 { 00539 numberBranchesLeft_=1; 00540 down_[0] = lowerValue; 00541 down_[1] = upperValue; 00542 up_[0] = lowerValue; 00543 up_[1] = upperValue; 00544 } |