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

SbbObject Class Reference

#include <SbbBranchBase.hpp>

Inheritance diagram for SbbObject:

SbbClique SbbSimpleInteger List of all members.

Public Member Functions

 SbbObject (SbbModel *model)
 SbbObject (const SbbObject &)
SbbObjectoperator= (const SbbObject &rhs)
virtual SbbObjectclone () const=0
 Clone.

virtual ~SbbObject ()
 Destructor.

virtual double infeasibility (int &preferredWay, double &otherWay) const=0
virtual void feasibleRegion ()=0
virtual SbbBranchingObjectcreateBranch (int way) const=0
virtual SbbBranchingObjectpreferredNewFeasible () 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 SbbBranchingObjectnotPreferredNewFeasible () 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

SbbModelmodel () const
 Return model.


Protected Attributes

SbbModelmodel_
 data

int id_

Detailed Description

Abstract base class for `objects'.

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.

Todo:
The notion that all branches are binary (two arms) is wired into the implementation of SbbObject, SbbBranchingObject, and SbbBranchDecision. Changing this will require a moderate amount of recoding.

Definition at line 43 of file SbbBranchBase.hpp.


Member Function Documentation

virtual SbbBranchingObject* SbbObject::createBranch int  way  )  const [pure virtual]
 

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

virtual void SbbObject::feasibleRegion  )  [pure virtual]
 

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

virtual double SbbObject::infeasibility int &  preferredWay,
double &  otherWay
const [pure virtual]
 

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

virtual SbbBranchingObject* SbbObject::notPreferredNewFeasible  )  const [inline, virtual]
 

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;};

virtual SbbBranchingObject* SbbObject::preferredNewFeasible  )  const [inline, virtual]
 

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;};

virtual void SbbObject::resetBounds  )  [inline, virtual]
 

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 {};


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