6.7 ABA_CONSTRAINT Class Reference

class forms the virtual base class for all possible constraints given in pool format and is derived from the common base class ABA_CONVAR of all constraints and variables.

#include <constraint.h>

Inheritance diagram for ABA_CONSTRAINT::


PIC


Public Member Functions

Protected Member Functions

Protected Attributes

Private Member Functions

Friends

6.7.1 Detailed Description

class forms the virtual base class for all possible constraints given in pool format and is derived from the common base class ABA_CONVAR of all constraints and variables.

Definition at line 55 of file constraint.h.

6.7.2 Constructor & Destructor Documentation

6.7.2.1 ABA_CONSTRAINT::ABA_CONSTRAINT (ABA_MASTER * master, const ABA_SUB * sub, ABA_CSENSE::SENSE sense, double rhs, bool dynamic, bool local, bool liftable)

The constructor.

Parameters:

master
A pointer to the corresponding master of the optimization.
sub
A pointer to the subproblem associated with the constraint. This can be also the 0-pointer.
sense
The sense of the constraint.
rhs
The right hand side of the constraint.
dynamic
If this paramument is true, then the constraint can be removed from the active constraint set during the cutting plane phase of the subproblem optimization.
local
If this paramument is true, then the constraint is considered to be only locally valid. In this case the paramument sub must not be 0 as each locally valid constraint is associated with a subproblem. }
liftable
If this paramument is true, then a lifting procedure must be available, i.e., that the coefficients of variables which have not been active at generation time of the constraint can be computed.

6.7.2.2 ABA_CONSTRAINT::ABA_CONSTRAINT (ABA_MASTER * master)

The following constructor initializes an empty constraint.

This constructor is, e.g., useful if parallel separation is applied. In this case the constraint can be constructed and receive later its data by message passing.

Parameters:

master
A pointer to the corresponding master of the optimization.

6.7.2.3 ABA_CONSTRAINT::ABA_CONSTRAINT (const ABA_CONSTRAINT & rhs)

The copy constructor.

Parameters:

rhs
The constraint being copied.

6.7.2.4 virtual ABA_CONSTRAINT::~ABA_CONSTRAINT () [virtual]

The destructor.

6.7.3 Member Function Documentation

6.7.3.1 ABA_CSENSE * ABA_CONSTRAINT::sense () [inline]

Returns:

A pointer to the sense of the constraint.

Definition at line 303 of file constraint.h.

6.7.3.2 virtual double ABA_CONSTRAINT::coeff (ABA_VARIABLE * v) [pure virtual]

Parameters:

v
A pointer to a variable.

Returns:

The coefficient of the variable v in the constraint.

Implemented in ABA_NUMCON, and ABA_ROWCON.

6.7.3.3 virtual double ABA_CONSTRAINT::rhs () [virtual]

Returns:

The right hand side of the constraint.

6.7.3.4 bool ABA_CONSTRAINT::liftable () const [inline]

Checks if the constraint is liftable,

i.e., if the coefficients of variables inactive at generation time of the constraint can be computed later.

Returns:

true If the constraint can be lifted,

false otherwise.

Definition at line 308 of file constraint.h.

6.7.3.5 virtual bool ABA_CONSTRAINT::valid (ABA_SUB * sub) [virtual]

Checks if the constraint is valid for the subproblem sub.

Per default, this is the case if the constraint is globally valid, or the subproblem associated with the constraint is an ancestor of the subproblem sub in the enumeration tree.

Returns:

true If the constraint is valid for the subproblem sub,

false otherwise.

Parameters:

sub
The subproblem for which the validity is checked.

6.7.3.6 virtual int ABA_CONSTRAINT::genRow (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * var, ABA_ROW & row) [virtual]

Generates the row format of the constraint associated with the variable set var.

This function is declared virtual since faster constraint specific implementations might be desirable.

All nonzero coefficients are added to the row format. Before we generate the coefficients we try to expand the constraint, afterwards it is compressed again.

Returns:

The number of nonzero elements in the row format row.

Parameters:

var
The variable set for which the row format should be computed.
row
Stores the row format after calling this function.

Reimplemented in ABA_SROWCON.

6.7.3.7 virtual double ABA_CONSTRAINT::slack (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * variables, double * x) [virtual]

Computes the slack of the vector x associated with the variable set variables.

Returns:

The slack induced by the vector x.

Parameters:

variables
The variable set associated with the vector x.
x
The values of the variables.

Reimplemented in ABA_SROWCON.

6.7.3.8 virtual bool ABA_CONSTRAINT::violated (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * variables, double * x, double * sl = 0) [virtual]

Checks if a constraint is violated by a vector x associated with a variable set.

Returns:

true If the constraint is violated,

false otherwise.

Parameters:

variables
The variables associated with the vector x.
x
The vector for which the violation is checked.
sl
If sl is nonzero, then *sl will store the value of the violation, i.e., the slack.

6.7.3.9 virtual bool ABA_CONSTRAINT::violated (double slack) const [virtual]

This version of function violated() checks for the violation given the slack of a vector.

Returns:

true If the constraint is an equation and the slack is nonzero, or if the constraint is a -inequality and the slack is negative, or the constraint is a -inequality and the slack is positive,

false otherwise.

Parameters:

slack
The slack of a vector.

6.7.3.10 void ABA_CONSTRAINT::printRow (ostream & out, ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * var)

Writes the row format of the constraint associated with the variable set var on an output stream.

Parameters:

out
The output stream.
var
The variables for which the row format should be written.

6.7.3.11 virtual double ABA_CONSTRAINT::distance (double * x, ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * actVar) [virtual]

The distance of a point x and a hyperplane aTx = β can be computed in the following way: Let y be the intersection of the hyperplane aTx = β and the line defined by x and the vector a. Then the distance d is the length of the vector ||x - y||.

Returns:

The Euclidean distance of the vector x associated with the variable set actVar to the hyperplane induced by the constraint.

Parameters:

x
The point for which the distance should be computed.
actVar
The variables associated with x.

6.7.3.12 ABA_CONSTRAINT* ABA_CONSTRAINT::duplicate () [inline]

Definition at line 245 of file constraint.h.

6.7.3.13 ABA_CONCLASS* ABA_CONSTRAINT::classification (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * var = 0)

Returns a pointer to the classification of the constraint.

If no classification is available then we try to classify the constraint. In this case var must not be a 0-pointer. Per default var is 0.

A constraint classification can only be generated if the function classify() is redefined in a derived class.

6.7.3.14 virtual ABA_INFEASCON::INFEAS ABA_CONSTRAINT::voidLhsViolated (double newRhs) const [protected, virtual]

Can be called if after variable elimination the left hand side of the constraint has become void and the right hand side has been adapted to newRhs.

Then this function checks if the constraint is violated.

Returns:

{TooLparame or TooSmall} If the value newRhs violates the sense of the constraint, i.e, it is < / > / != 0 and the sense of the constraint is >= / <= / =,

Feasible otherwise.

Parameters:

newRhs
The right hand side of the constraint after the elimination of the variables.

6.7.3.15 virtual ABA_CONCLASS* ABA_CONSTRAINT::classify (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > * var) [protected, virtual]

The default implementation of the function classify() returns a 0 pointer.

6.7.3.16 const ABA_CONSTRAINT& ABA_CONSTRAINT::operator= (const ABA_CONSTRAINT & rhs) [private]

6.7.4 Friends And Related Function Documentation

6.7.4.1 friend class ABA_LPSUB [friend]

Definition at line 56 of file constraint.h.

6.7.5 Member Data Documentation

6.7.5.1 ABA_CSENSE ABA_CONSTRAINT::sense_ [protected]

The sense of the constraint.

Definition at line 285 of file constraint.h.

6.7.5.2 double ABA_CONSTRAINT::rhs_ [protected]

The right hand side of the constraint.

Definition at line 289 of file constraint.h.

6.7.5.3 ABA_CONCLASS*ABA_CONSTRAINT::conClass_ [protected]

Definition at line 290 of file constraint.h.

6.7.5.4 bool ABA_CONSTRAINT::liftable_ [protected]

This member is true if also coefficients of variables which have been inactive at generation time can be computed, false otherwise.

Definition at line 296 of file constraint.h.

The documentation for this class was generated from the following file: