ABA_SETBRANCHRULE Class Reference

The data members of the class ABA_SETBRANCHRULE. More...

#include <setbranchrule.h>

Inheritance diagram for ABA_SETBRANCHRULE:

ABA_BRANCHRULE ABA_ABACUSROOT List of all members.

Public Member Functions

 ABA_SETBRANCHRULE (ABA_MASTER *master, int variable, ABA_FSVARSTAT::STATUS status)
virtual ~ABA_SETBRANCHRULE ()
 The destructor.
virtual int extract (ABA_SUB *sub)
virtual void extract (ABA_LPSUB *lp)
 The function extract() is overloaded to modify directly the linear programming relaxation.
virtual void unExtract (ABA_LPSUB *lp)
 The function unExtract().
virtual bool branchOnSetVar ()
 Redefines the virtual function of the base class ABA_BRANCHRULE as this branching rule is setting a binary variable.
bool setToUpperBound () const
int variable () const

Private Attributes

int variable_
ABA_FSVARSTAT::STATUS status_
double oldLpBound_

Friends

ostream & operator<< (ostream &out, const ABA_SETBRANCHRULE &rhs)
 The output operator writes the number of the branching variable and its status on an output stream.

Detailed Description

The data members of the class ABA_SETBRANCHRULE.

Parameters:
int variable_ The branching variable.
ABA_FSVARSTAT::STATUS status_ The status of the branching variable (SetToLowerBound or SetToUpperBound).
double oldLpbound_ The bound of the branching variable in the linear program, before it is temporarily modified for testing the quality of this branching rule.

Definition at line 43 of file setbranchrule.h.


Constructor & Destructor Documentation

ABA_SETBRANCHRULE::ABA_SETBRANCHRULE ( ABA_MASTER master,
int  variable,
ABA_FSVARSTAT::STATUS  status 
)

The constructor.

Parameters:
master A pointer to the corresponding master of the optimization.
variable The branching variable.
status The status the variable is set to (SetToLowerBound or SetToUpperBound).

virtual ABA_SETBRANCHRULE::~ABA_SETBRANCHRULE (  )  [virtual]

The destructor.


Member Function Documentation

virtual int ABA_SETBRANCHRULE::extract ( ABA_SUB sub  )  [virtual]

Modifies a subproblem by setting the branching variable.

Returns:
0 If the subproblem can be modified according to the branching rule.

1 If a contradiction occurs.

Parameters:
sub The subproblem being modified.

Implements ABA_BRANCHRULE.

virtual void ABA_SETBRANCHRULE::extract ( ABA_LPSUB lp  )  [virtual]

The function extract() is overloaded to modify directly the linear programming relaxation.

This required to evaluate the quality of a branching rule with linear programming methods. The changes have to be undone with the function unextract() before the next linear program is solved.

Parameters:
lp A pointer to the linear programming relaxation of a subproblem.

Reimplemented from ABA_BRANCHRULE.

virtual void ABA_SETBRANCHRULE::unExtract ( ABA_LPSUB lp  )  [virtual]

The function unExtract().

Reimplemented from ABA_BRANCHRULE.

virtual bool ABA_SETBRANCHRULE::branchOnSetVar (  )  [virtual]

Redefines the virtual function of the base class ABA_BRANCHRULE as this branching rule is setting a binary variable.

Returns:
Always true.

Reimplemented from ABA_BRANCHRULE.

bool ABA_SETBRANCHRULE::setToUpperBound (  )  const

Returns:
true If the branching variable is set to the upper bound,

false otherwise.

int ABA_SETBRANCHRULE::variable (  )  const [inline]

Returns:
The number of the branching variable.

Definition at line 151 of file setbranchrule.h.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const ABA_SETBRANCHRULE rhs 
) [friend]

The output operator writes the number of the branching variable and its status on an output stream.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The branching rule being output.


Member Data Documentation

int ABA_SETBRANCHRULE::variable_ [private]

Definition at line 144 of file setbranchrule.h.

ABA_FSVARSTAT::STATUS ABA_SETBRANCHRULE::status_ [private]

Definition at line 145 of file setbranchrule.h.

double ABA_SETBRANCHRULE::oldLpBound_ [private]

Definition at line 146 of file setbranchrule.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:58 2007 for ABACUS by  doxygen 1.5.1