LPRowBase< R > Class Template Reference (In)equality for LPs.Class LPRowBase provides constraints for linear programs in the form
where a is a DSVector. l is referred to as left hand side, r as right hand side and a as row vector or the constraint vector. l and r may also take values
Detailed Descriptiontemplate<class R>
|
enum Type |
(In)Equality type of an LP row.
LPRowBases may be of one of the following Types. This datatype may be used for constructing new LPRowBases in the regular form.
Enumerator | |
---|---|
LESS_EQUAL |
|
EQUAL |
|
GREATER_EQUAL |
|
RANGE |
|
Definition at line 72 of file lprowbase.h.
|
explicit |
Constructs LPRowBase with a vector ready to hold defDim
nonzeros.
Definition at line 87 of file lprowbase.h.
References LPRowBase< R >::isConsistent().
Copy constructor.
Definition at line 94 of file lprowbase.h.
References LPRowBase< R >::isConsistent().
Copy constructor.
Definition at line 102 of file lprowbase.h.
References LPRowBase< R >::isConsistent().
LPRowBase | ( | const R & | p_lhs, |
const SVectorBase< R > & | p_rowVector, | ||
const R & | p_rhs, | ||
const R & | p_obj = 0 |
||
) |
Constructs LPRowBase with the given left-hand side, right-hand side and rowVector.
Definition at line 109 of file lprowbase.h.
References LPRowBase< R >::isConsistent().
LPRowBase | ( | const SVectorBase< R > & | p_rowVector, |
Type | p_type, | ||
const R & | p_value, | ||
const R & | p_obj = 0 |
||
) |
Constructs LPRowBase from passed rowVector
, type
and value
.
Definition at line 116 of file lprowbase.h.
References LPRowBase< R >::EQUAL, LPRowBase< R >::GREATER_EQUAL, soplex::infinity, LPRowBase< R >::isConsistent(), and LPRowBase< R >::LESS_EQUAL.
~LPRowBase | ( | ) |
Destructor.
Definition at line 141 of file lprowbase.h.
bool isConsistent | ( | ) | const |
Checks consistency.
Definition at line 257 of file lprowbase.h.
References DSVectorBase< R >::isConsistent().
Referenced by LPRowBase< R >::LPRowBase().
R lhs | ( | ) | const |
Left-hand side value.
Definition at line 203 of file lprowbase.h.
References LPRowBase< R >::left.
Referenced by SoPlex::_changeRowReal(), LPRowSetBase< Real >::add(), SoPlex::addRowRational(), SoPlex::addRowReal(), SPxLPBase< Real >::changeRow(), SoPlex::changeRowRational(), SoPlex::changeRowReal(), LPRowBase< R >::setType(), LPRowBase< R >::type(), and LPRowBase< R >::value().
R obj | ( | ) | const |
Objective coefficient value.
Definition at line 227 of file lprowbase.h.
References LPRowBase< R >::object.
Referenced by LPRowSetBase< Real >::add(), and SPxLPBase< Real >::changeRow().
R rhs | ( | ) | const |
Right-hand side value.
Definition at line 215 of file lprowbase.h.
References LPRowBase< R >::right.
Referenced by SoPlex::_changeRowReal(), LPRowSetBase< Real >::add(), SoPlex::addRowRational(), SoPlex::addRowReal(), SPxLPBase< Real >::changeRow(), SoPlex::changeRowRational(), SoPlex::changeRowReal(), LPRowBase< R >::setType(), LPRowBase< R >::type(), and LPRowBase< R >::value().
const SVectorBase<R>& rowVector | ( | ) | const |
Constraint row vector.
Definition at line 239 of file lprowbase.h.
References LPRowBase< R >::vec.
Referenced by LPRowSetBase< Real >::add(), SPxLPBase< Real >::changeRow(), and SPxLPBase< Real >::doAddRow().
void setLhs | ( | const R & | p_left | ) |
Sets left-hand side value.
Definition at line 209 of file lprowbase.h.
Referenced by SPxLPBase< Real >::getRow(), soplex::MPSreadRows(), and SPxLPBase< R >::readLPF().
void setObj | ( | const R & | p_obj | ) |
Sets objective coefficient value.
Definition at line 233 of file lprowbase.h.
Referenced by SPxLPBase< Real >::getRow().
void setRhs | ( | const R & | p_right | ) |
Sets right-hand side value.
Definition at line 221 of file lprowbase.h.
Referenced by SPxLPBase< Real >::getRow(), soplex::MPSreadRows(), and SPxLPBase< R >::readLPF().
void setRowVector | ( | const DSVectorBase< R > & | p_vec | ) |
access constraint row vector.
Definition at line 245 of file lprowbase.h.
Referenced by SPxLPBase< Real >::getRow(), and SPxLPBase< R >::readLPF().
void setType | ( | Type | p_type | ) |
Sets type of (in)equality.
Definition at line 166 of file lprowbase.h.
References LPRowBase< R >::EQUAL, LPRowBase< R >::GREATER_EQUAL, soplex::infinity, LPRowBase< R >::LESS_EQUAL, LPRowBase< R >::lhs(), MSG_ERROR, LPRowBase< R >::RANGE, and LPRowBase< R >::rhs().
Type type | ( | ) | const |
Gets type of row.
Definition at line 151 of file lprowbase.h.
References LPRowBase< R >::EQUAL, LPRowBase< R >::GREATER_EQUAL, soplex::infinity, LPRowBase< R >::LESS_EQUAL, LPRowBase< R >::lhs(), LPRowBase< R >::RANGE, and LPRowBase< R >::rhs().
Referenced by LPRowBase< R >::value().
R value | ( | ) | const |
Right hand side value of (in)equality.
This method returns for a LPRowBase in regular form. However, value() may only be called for LPRowBases with type() !=
RANGE
.
Definition at line 195 of file lprowbase.h.
References soplex::infinity, LPRowBase< R >::lhs(), LPRowBase< R >::RANGE, LPRowBase< R >::rhs(), and LPRowBase< R >::type().
|
friend |
Definition at line 47 of file lprowbase.h.
|
private |
left-hand side of the constraint
Definition at line 55 of file lprowbase.h.
Referenced by LPRowBase< R >::lhs().
|
private |
objective coefficient of corresponding slack variable s = vec times primal
Definition at line 57 of file lprowbase.h.
Referenced by LPRowBase< R >::obj().
|
private |
right-hand side of the constraint
Definition at line 56 of file lprowbase.h.
Referenced by LPRowBase< R >::rhs().
|
private |
the row vector
Definition at line 58 of file lprowbase.h.
Referenced by LPRowBase< R >::rowVector().