#include <SbbBranchBase.hpp>
Inheritance diagram for SbbObject:
Public Member Functions | |
SbbObject (SbbModel *model) | |
SbbObject (const SbbObject &) | |
SbbObject & | operator= (const SbbObject &rhs) |
virtual SbbObject * | clone () const=0 |
Clone. | |
virtual | ~SbbObject () |
Destructor. | |
virtual double | infeasibility (int &preferredWay, double &otherWay) const=0 |
virtual void | feasibleRegion ()=0 |
virtual SbbBranchingObject * | createBranch (int way) const=0 |
virtual SbbBranchingObject * | preferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction. | |
virtual SbbBranchingObject * | notPreferredNewFeasible () const |
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction. | |
virtual void | resetBounds () |
int | id () const |
Identifier. | |
void | setModel (SbbModel *model) |
update model | |
SbbModel * | model () const |
Return model. | |
Protected Attributes | |
SbbModel * | model_ |
data | |
int | id_ |
The branching model used in Sbb is based on the idea of an object. In the abstract, an object is something that has a feasible region, can be evaluated for infeasibility, can be branched on (i.e., there's some constructive action to be taken to move toward feasibility), and allows comparison of the effect of branching.
This class (SbbObject) is the base class for an object. To round out the branching model, the class SbbBranchingObject describes how to perform a branch, and the class SbbBranchDecision describes how to compare two SbbBranchingObjects.
To create a new type of object you need to provide three methods: infeasibility(), feasibleRegion(), and createBranch(), described below.
This base class is primarily virtual to allow for any form of structure. Any form of discontinuity is allowed.
Definition at line 43 of file SbbBranchBase.hpp.
|
Create a branching object and indicate which way to branch first. The branching object has to know how to create branches (fix variables, etc.) Implemented in SbbClique, and SbbSimpleInteger. Referenced by SbbNode::chooseBranch(). |
|
For the variable(s) referenced by the object, look at the current solution and set bounds to match the solution. Implemented in SbbClique, and SbbSimpleInteger. Referenced by SbbModel::checkSolution(). |
|
Infeasibility of the object This is some measure of the infeasibility of the object. It should be scaled to be in the range [0.0, 0.5], with 0.0 indicating the object is satisfied. The measure of infeasibility in the preferred branching direction is returned in preferredWay, for the other branching direction in otherWay. This is used to prepare for strong branching but should also think of case when no strong branching Implemented in SbbClique, and SbbSimpleInteger. Referenced by SbbModel::branchAndBound(), SbbNode::chooseBranch(), and SbbModel::feasibleSolution(). |
|
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a bad direction. If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null. Reimplemented in SbbSimpleInteger. Definition at line 110 of file SbbBranchBase.hpp.
00111 { return NULL;};
|
|
Given a valid solution (with reduced costs, etc.), return a branching object which would give a new feasible point in a good direction. If the method cannot generate a feasible point (because there aren't any, or because it isn't bright enough to find one), it should return null. Reimplemented in SbbSimpleInteger. Definition at line 99 of file SbbBranchBase.hpp.
00100 { return NULL;};
|
|
Reset variable bounds to their original values. Bounds may be tightened, so it may be good to be able to reset them to their original values. Reimplemented in SbbSimpleInteger. Definition at line 118 of file SbbBranchBase.hpp. Referenced by SbbModel::branchAndBound().
00118 {}; |