#include <constraint.h>
Inheritance diagram for ABA_CONSTRAINT:

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_CSENSE * | sense () |
| 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_CONSTRAINT * | duplicate () |
| ABA_CONCLASS * | classification (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_CONCLASS * | classify (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_CONCLASS * | conClass_ |
| 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_CONSTRAINT & | operator= (const ABA_CONSTRAINT &rhs) |
Friends | |
| class | ABA_LPSUB |
Definition at line 55 of file constraint.h.
| 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.
| 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.
| master | A pointer to the corresponding master of the optimization. |
| ABA_CONSTRAINT::ABA_CONSTRAINT | ( | const ABA_CONSTRAINT & | rhs | ) |
The copy constructor.
| rhs | The constraint being copied. |
| virtual ABA_CONSTRAINT::~ABA_CONSTRAINT | ( | ) | [virtual] |
The destructor.
| ABA_CSENSE * ABA_CONSTRAINT::sense | ( | ) | [inline] |
| virtual double ABA_CONSTRAINT::coeff | ( | ABA_VARIABLE * | v | ) | [pure virtual] |
| v | A pointer to a variable. |
Implemented in ABA_NUMCON, and ABA_ROWCON.
| virtual double ABA_CONSTRAINT::rhs | ( | ) | [virtual] |
| 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.
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.
false otherwise.
| 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.
| 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.
| 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.
false otherwise.
| 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.
-inequality and the slack is negative, or the constraint is a
-inequality and the slack is positive, false otherwise.
| 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.
| 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
and a hyperplane
can be computed in the following way: Let
be the intersection of the hyperplane
and the line defined by
and the vector
. Then the distance
is the length of the vector
.
| 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.
| 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.
Feasible otherwise.
| 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] |
friend class ABA_LPSUB [friend] |
Definition at line 56 of file constraint.h.
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.
1.5.1