Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

SbbIntegerBranchingObject Class Reference

#include <SbbBranchActual.hpp>

Inheritance diagram for SbbIntegerBranchingObject:

SbbBranchingObject List of all members.

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.

SbbIntegerBranchingObjectoperator= (const SbbIntegerBranchingObject &rhs)
 Assignment operator.

virtual SbbBranchingObjectclone () 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).


Detailed Description

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.

Variable_ holds the index of the integer variable in the integerVariable_ array of the model.

Definition at line 196 of file SbbBranchActual.hpp.


Constructor & Destructor Documentation

SbbIntegerBranchingObject::SbbIntegerBranchingObject SbbModel model,
int  variable,
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 is 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.

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 }

SbbIntegerBranchingObject::SbbIntegerBranchingObject SbbModel model,
int  variable,
int  way,
double  lowerValue,
double  upperValue
 

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.

References down_, and up_.

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 }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:36:23 2003 for Sbb by doxygen 1.3.5