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. More...

#include <constraint.h>

Inheritance diagram for ABA_CONSTRAINT:

ABA_CONVAR ABA_ABACUSROOT ABA_NUMCON ABA_ROWCON ABA_SROWCON List of all members.

Public Member Functions

 ABA_CONSTRAINT (ABA_MASTER *master, const ABA_SUB *sub, ABA_CSENSE::SENSE sense, double rhs, bool dynamic, bool local, bool liftable)
 ABA_CONSTRAINT (ABA_MASTER *master)
 ABA_CONSTRAINT (const ABA_CONSTRAINT &rhs)
virtual ~ABA_CONSTRAINT ()
ABA_CSENSEsense ()
virtual double coeff (ABA_VARIABLE *v)=0
virtual double rhs ()
bool liftable () const
virtual bool valid (ABA_SUB *sub)
virtual int genRow (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *var, ABA_ROW &row)
virtual double slack (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *variables, double *x)
 Computes the slack of the vector x associated with the variable set variables.
virtual bool violated (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *variables, double *x, double *sl=0)
virtual bool violated (double slack) const
 This version of function violated() checks for the violation given the slack of a vector.
void 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.
virtual double distance (double *x, ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *actVar)
ABA_CONSTRAINTduplicate ()
ABA_CONCLASSclassification (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *var=0)

Protected Member Functions

virtual ABA_INFEASCON::INFEAS voidLhsViolated (double newRhs) const
 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.
virtual ABA_CONCLASSclassify (ABA_ACTIVE< ABA_VARIABLE, ABA_CONSTRAINT > *var)
 The default implementation of the function classify() returns a 0 pointer.

Protected Attributes

ABA_CSENSE sense_
double rhs_
ABA_CONCLASSconClass_
bool liftable_
 This member is true if also coefficients of variables which have been inactive at generation time can be computed, false otherwise.

Private Member Functions

const ABA_CONSTRAINToperator= (const ABA_CONSTRAINT &rhs)

Friends

class ABA_LPSUB

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.


Constructor & Destructor Documentation

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.

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.

ABA_CONSTRAINT::ABA_CONSTRAINT ( const ABA_CONSTRAINT rhs  ) 

The copy constructor.

Parameters:
rhs The constraint being copied.

virtual ABA_CONSTRAINT::~ABA_CONSTRAINT (  )  [virtual]

The destructor.


Member Function Documentation

ABA_CSENSE * ABA_CONSTRAINT::sense (  )  [inline]

Returns:
A pointer to the sense of the constraint.

Definition at line 303 of file constraint.h.

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.

virtual double ABA_CONSTRAINT::rhs (  )  [virtual]

Returns:
The right hand side of the constraint.

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.

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.

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.

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.

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.

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 $\le$-inequality and the slack is negative, or the constraint is a $\ge$-inequality and the slack is positive,

false otherwise.

Parameters:
slack The slack of a vector.

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.

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

The distance of a point $\overline{x}$ and a hyperplane $a^T x = \beta$ can be computed in the following way: Let $y$ be the intersection of the hyperplane $a^T x = \beta$ and the line defined by $\overline{x}$ and the vector $a$. Then the distance $d$ is the length of the vector $||\overline{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.

ABA_CONSTRAINT* ABA_CONSTRAINT::duplicate (  )  [inline]

Definition at line 245 of file constraint.h.

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.

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.

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.

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


Friends And Related Function Documentation

friend class ABA_LPSUB [friend]

Definition at line 56 of file constraint.h.


Member Data Documentation

ABA_CSENSE ABA_CONSTRAINT::sense_ [protected]

The sense of the constraint.

Definition at line 285 of file constraint.h.

double ABA_CONSTRAINT::rhs_ [protected]

The right hand side of the constraint.

Definition at line 289 of file constraint.h.

ABA_CONCLASS* ABA_CONSTRAINT::conClass_ [protected]

Definition at line 290 of file constraint.h.

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:
Generated on Tue Aug 14 18:09:56 2007 for ABACUS by  doxygen 1.5.1