#include <Stage.hpp>
Public Types | |
typedef MatrixXd::Index | Index |
typedef SubMatrix< MatrixXd > ::RowIndices | Indirect |
typedef TriangularView < SubMatrixXd, Lower > | TriSubMatrixXd |
typedef TriangularView < const_SubMatrixXd, Lower > | const_TriSubMatrixXd |
typedef VectorBlock < MatrixXd::RowXpr > | RowL |
typedef MatrixXd::RowXpr | RowML |
![]() | |
typedef boost::function< void(std::string, ConstraintRef, std::string)> | listener_function_t |
Public Member Functions | |
Stage (const MatrixXd &J, const VectorBound &bounds, BaseY &Y) | |
Stage (const Index nr, const Index nc, const double *Jdata, const Bound *bdata, const BaseY &Y) | |
Stage (const Index nr, const Index nc, const double *Jdata, const BaseY &Y) | |
void | setInitialActiveSet (void) |
void | setInitialActiveSet (const cstref_vector_t &initialGuess, bool checkTwin=false) |
cstref_vector_t | getOptimalActiveSet (bool withTwin=false) |
void | reset (void) |
void | computeInitialCOD (BaseY &Yinit) |
bool | downdate (const Index position, GivensSequence &Ydown) |
bool | propagateDowndate (GivensSequence &Ydown, bool decreasePreviousRank) |
Index | update (const ConstraintRef &cst, GivensSequence &Yup) |
void | propagateUpdate (GivensSequence &Ydown, Index decreasePreviousRank) |
void | computeSolution (VectorXd &Ytu) const |
void | damp (void) |
template<typename VectorDerived > | |
void | applyDamping (MatrixBase< VectorDerived > &x) const |
template<typename VD1 , typename VD2 > | |
void | applyDamping (MatrixBase< VD1 > &x, MatrixBase< VD2 > &y) const |
template<typename VectorDerived > | |
void | applyDampingTranspose (MatrixBase< VectorDerived > &x) const |
template<typename VD1 , typename VD2 > | |
void | applyDampingTranspose (MatrixBase< VD1 > &x, const MatrixBase< VD2 > &y) const |
void | damping (const double &factor) |
double | damping (void) const |
bool | useDamp (void) const |
void | dampBoundValue (const ConstraintRef &cst, const double &value) |
template<typename D > | |
void | computeError (const VectorXd &Ytu, MatrixBase< D > &err) const |
void | computeError (const VectorXd &Ytu) |
void | computeRho (const VectorXd &Ytu, VectorXd &Ytrho, bool inLambda=false) |
template<typename D > | |
void | computeLagrangeMultipliers (VectorXd &rho, MatrixBase< D > &l) const |
input: rho_under_i = {ro_1, ..., ro_i} on return: lambda_i = Wr_i*L_i^{-T}*rho_i rho_under_{i-1} = rho_under_{i-1} + Mr_i^T*L_i^{-T}*rho_i ??? * rho_i = L_i^{-T}*rho_i (should not be useful). More... | |
void | computeLagrangeMultipliers (VectorXd &rho) |
bool | checkBound (const VectorXd &u0, const VectorXd &u1, ConstraintRef *, double *tau) |
bool | checkBound (const VectorXd &u0, const VectorXd &u1, ConstraintRef &cstmax, double &taumax) |
bool | maxLambda (const VectorXd &u, double &lmax, Index &row) const |
void | freezeSlacks (const bool &slacks=true) |
void | recompose (MatrixXd &WMLY) const |
void | show (std::ostream &os, Index stageRef, bool check=false) const |
void | showActiveSet (std::ostream &os) const |
SubMatrix< MatrixXd, RowPermutation > | Jactive (MatrixXd &J_) const |
MatrixXd | Jactive () const |
SubVectorXd | eactive (VectorXd &e_) const |
VectorXd | eactive () const |
bool | testRecomposition (void) const |
bool | testSolution (const VectorXd &solution) const |
bool | testUnactiveTwins (void) |
Index | where (Index cst) const |
ConstraintRef | which (Index row) const |
bool | isActive (Index cst) const |
SubMatrixXd | getM () |
const_SubMatrixXd | getM () const |
SubMatrixXd | getL () |
const_SubMatrixXd | getL () const |
TriSubMatrixXd | getLtri () |
const_TriSubMatrixXd | getLtri () const |
TriSubMatrixXd | getLdtri () |
const_TriSubMatrixXd | getLdtri () const |
SubVectorXd | gete () |
const_SubVectorXd | gete () const |
SubVectorXd | getLagrangeMultipliers () |
const_SubVectorXd | getLagrangeMultipliers () const |
MatrixXd | getWr () const |
VectorXd | getLagrangeDamped () const |
RowL | rowL0 (const Index r) |
RowML | rowMrL0 (const Index r) |
RowL | rowML (const Index r) |
Index | rowSize (const Index r) |
Index | nbConstraints (void) const |
Index | sizeA (void) const |
Index | sizeN (void) const |
Index | rank () const |
Index | getSizeM () const |
Index | getSizeL () const |
![]() | |
BasicStage (const MatrixXd &J, const VectorBound &bounds, const BaseY &Y) | |
BasicStage (const Index nr, const Index nc, const double *Jdata, const Bound *bdata, const BaseY &Y) | |
BasicStage (const Index nr, const Index nc, const double *Jdata, const BaseY &Y) | |
void | set (const MatrixXd &J, const VectorBound &bounds) |
void | set (const double *Jdata, const Bound *bdata) |
Index | nbConstraints (void) const |
VectorXd | getJrow (const Index &cst) const |
Bound | getBoundRow (const Index &cst) const |
MatrixXd | getJ () const |
VectorBound | getBounds () const |
VectorBound & | getBoundsInternal () |
Public Attributes | |
std::string | name |
![]() | |
std::string | name |
boost::signal< void(std::string, ConstraintRef, std::string)> | notifior |
Static Public Attributes | |
static double | EPSILON = 1e-8 |
Protected Member Functions | |
void | nullifyLineDeficient (const Index row, const Index in_r) |
void | computeInitialJY () |
void | conditionalWinit (bool id) |
void | regularizeHessenberg (GivensSequence &Ydown) |
Index | nullifyACrossFromW (const Index position) |
void | removeARowFromL (Index row) |
void | removeACrossFromW (const Index &row, const Index &col) |
void | addARow (const Index &mlrowup, bool deficient=false) |
void | computeErrorFromJu (const VectorXd &MLYtu) |
template<typename D > | |
void | computeErrorFromJu (const VectorXd &Ytu, MatrixBase< D > &err) const |
void | computeMLYtu (const VectorXd &Ytu, VectorXd &MLYtu) const |
Protected Attributes | |
MatrixXd | W_ |
MatrixXd | ML_ |
VectorXd | e_ |
VectorXd | lambda_ |
Indirect | Ir |
Indirect | Irn |
Indirect | Iw |
Indirect | Im |
Indirect | Il |
SubMatrixXd | M |
SubMatrixXd | L |
SubMatrixXd | W |
SubMatrixXd | Wr |
SubMatrixXd | Mr |
SubVectorXd | e |
SubVectorXd | lambda |
VectorXd | lambdadamped |
VectorXd | lzfreezed |
bool | isWIdenty |
Index | sizeM |
Index | sizeL |
SubActiveSet< ActiveSet < Indirect >, Indirect > | activeSet |
AllocatorML | freeML |
MatrixXd | Ld_ |
MatrixXd | Ldwork_ |
VectorXd | edwork_ |
SubMatrixXd | Ld |
SubMatrixXd | Ldwork |
SubVectorXd | edwork |
GivensSequence | Wd |
double | dampingFactor |
bool | isReset |
bool | isInit |
bool | isOptimumCpt |
bool | isLagrangeCpt |
bool | isDampCpt |
bool | isFreezed |
![]() | |
const MatrixXdRef & | J |
const VectorBoundRef & | bounds |
const Index | nr |
const Index | nc |
const BaseY & | Y |
Static Protected Attributes | |
static const double | DAMPING_FACTOR |
Additional Inherited Members | |
![]() | |
typedef MapXd | MatrixXdRef |
typedef MapBound | VectorBoundRef |
typedef TriangularView<const_SubMatrixXd, Lower> soth::Stage::const_TriSubMatrixXd |
typedef MatrixXd::Index soth::Stage::Index |
typedef SubMatrix<MatrixXd>::RowIndices soth::Stage::Indirect |
typedef VectorBlock<MatrixXd::RowXpr> soth::Stage::RowL |
typedef MatrixXd::RowXpr soth::Stage::RowML |
typedef TriangularView<SubMatrixXd, Lower> soth::Stage::TriSubMatrixXd |
soth::Stage::Stage | ( | const MatrixXd & | J, |
const VectorBound & | bounds, | ||
BaseY & | Y | ||
) |
soth::Stage::Stage | ( | const Index | nr, |
const Index | nc, | ||
const double * | Jdata, | ||
const Bound * | bdata, | ||
const BaseY & | Y | ||
) |
|
protected |
References Eigen::RowSelectionImpl< MatrixType, IsSub >::getRowIndices(), and sotDEBUG.
void soth::Stage::applyDamping | ( | MatrixBase< VectorDerived > & | x | ) | const |
References sotDEBUG.
void soth::Stage::applyDamping | ( | MatrixBase< VD1 > & | x, |
MatrixBase< VD2 > & | y | ||
) | const |
References sotDEBUG.
void soth::Stage::applyDampingTranspose | ( | MatrixBase< VectorDerived > & | x | ) | const |
References sotDEBUG.
void soth::Stage::applyDampingTranspose | ( | MatrixBase< VD1 > & | x, |
const MatrixBase< VD2 > & | y | ||
) | const |
References sotDEBUG.
bool soth::Stage::checkBound | ( | const VectorXd & | u0, |
const VectorXd & | u1, | ||
ConstraintRef * | cstptr, | ||
double * | tau | ||
) |
bool soth::Stage::checkBound | ( | const VectorXd & | u0, |
const VectorXd & | u1, | ||
ConstraintRef & | cstmax, | ||
double & | taumax | ||
) |
References soth::Bound::check(), soth::Bound::getBound(), and sotDEBUG.
void soth::Stage::computeError | ( | const VectorXd & | Ytu, |
MatrixBase< D > & | err | ||
) | const |
void soth::Stage::computeError | ( | const VectorXd & | Ytu | ) |
|
protected |
References sotDEBUG.
|
protected |
void soth::Stage::computeInitialCOD | ( | BaseY & | Yinit | ) |
References Eigen::DestructiveColPivQR< _MatrixType, _HouseholderStorageType >::colsPermutation(), soth::BaseY::getHouseholderEssential(), soth::BaseY::getNextHouseholderEssential(), soth::BaseY::getRank(), soth::BaseY::increaseRank(), soth::BaseY::matrixExplicit, Eigen::DestructiveColPivQR< _MatrixType, _HouseholderStorageType >::matrixR(), Eigen::DestructiveColPivQR< _MatrixType, _HouseholderStorageType >::rank(), and sotDEBUG.
|
protected |
References sotDEBUG.
void soth::Stage::computeLagrangeMultipliers | ( | VectorXd & | rho, |
MatrixBase< D > & | l | ||
) | const |
input: rho_under_i = {ro_1, ..., ro_i}
on return: lambda_i = Wr_i*L_i^{-T}*rho_i rho_under_{i-1} = rho_under_{i-1} + Mr_i^T*L_i^{-T}*rho_i ??? * rho_i = L_i^{-T}*rho_i (should not be useful).
References soth::solveInPlaceWithUpperTriangular(), and sotDEBUG.
void soth::Stage::computeLagrangeMultipliers | ( | VectorXd & | rho | ) |
References sotDEBUG.
|
protected |
References sotDEBUG.
void soth::Stage::computeRho | ( | const VectorXd & | Ytu, |
VectorXd & | Ytrho, | ||
bool | inLambda = false |
||
) |
References sotDEBUG.
void soth::Stage::computeSolution | ( | VectorXd & | Ytu | ) | const |
References soth::solveInPlaceWithLowerTriangular(), and sotDEBUG.
|
protected |
void soth::Stage::damp | ( | void | ) |
References sotDEBUG, and soth::Givens::transpose().
void soth::Stage::dampBoundValue | ( | const ConstraintRef & | cst, |
const double & | value | ||
) |
Referenced by soth::HCOD::downdate().
|
inline |
Referenced by soth::HCOD::testLagrangeMultipliers().
|
inline |
bool soth::Stage::downdate | ( | const Index | position, |
GivensSequence & | Ydown | ||
) |
References sotDEBUG.
SubVectorXd soth::Stage::eactive | ( | VectorXd & | e_ | ) | const |
VectorXd soth::Stage::eactive | ( | ) | const |
void soth::Stage::freezeSlacks | ( | const bool & | slacks = true | ) |
References EI_FOREACH, and sotDEBUG.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by soth::HCOD::testLagrangeMultipliers().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
cstref_vector_t soth::Stage::getOptimalActiveSet | ( | bool | withTwin = false | ) |
Referenced by soth::HCOD::getOptimalActiveSet().
|
inline |
|
inline |
Referenced by soth::HCOD::testLagrangeMultipliers().
|
inline |
bool soth::Stage::isActive | ( | Index | cst | ) | const |
SubMatrix< MatrixXd, RowPermutation > soth::Stage::Jactive | ( | MatrixXd & | J_ | ) | const |
Referenced by soth::HCOD::testLagrangeMultipliers().
MatrixXd soth::Stage::Jactive | ( | ) | const |
bool soth::Stage::maxLambda | ( | const VectorXd & | u, |
double & | lmax, | ||
Index & | row | ||
) | const |
|
inline |
|
protected |
References sotDEBUG.
References soth::Givens::applyTransposeOnTheRight(), and sotDEBUG.
bool soth::Stage::propagateDowndate | ( | GivensSequence & | Ydown, |
bool | decreasePreviousRank | ||
) |
References EI_FOREACH, sotDEBUG, and soth::Givens::transpose().
void soth::Stage::propagateUpdate | ( | GivensSequence & | Ydown, |
Index | decreasePreviousRank | ||
) |
|
inline |
void soth::Stage::recompose | ( | MatrixXd & | WMLY | ) | const |
References sotDEBUG.
|
protected |
References soth::GivensSequence::push().
References sotDEBUG.
void soth::Stage::reset | ( | void | ) |
References sotDEBUG.
Stage::RowL soth::Stage::rowL0 | ( | const Index | r | ) |
Stage::RowL soth::Stage::rowML | ( | const Index | r | ) |
Stage::RowML soth::Stage::rowMrL0 | ( | const Index | r | ) |
Stage::Index soth::Stage::rowSize | ( | const Index | r | ) |
void soth::Stage::setInitialActiveSet | ( | void | ) |
Referenced by soth::HCOD::setInitialActiveSet().
void soth::Stage::setInitialActiveSet | ( | const cstref_vector_t & | initialGuess, |
bool | checkTwin = false |
||
) |
References sotDEBUG, sotDEBUGIN, and sotDEBUGOUT.
void soth::Stage::show | ( | std::ostream & | os, |
Index | stageRef, | ||
bool | check = false |
||
) | const |
References sotDEBUG, sotDEBUG_ENABLE, soth::sotDEBUGFLOW, and sotDEBUGPRIOR.
void soth::Stage::showActiveSet | ( | std::ostream & | os | ) | const |
|
inline |
|
inline |
bool soth::Stage::testRecomposition | ( | void | ) | const |
References Eigen::ColSelectionImpl< MatrixType, IsSub >::cols(), and sotDEBUG.
bool soth::Stage::testSolution | ( | const VectorXd & | solution | ) | const |
bool soth::Stage::testUnactiveTwins | ( | void | ) |
References sotDEBUG.
MatrixXd::Index soth::Stage::update | ( | const ConstraintRef & | cst, |
GivensSequence & | Yup | ||
) |
|
inline |
Referenced by soth::HCOD::testLagrangeMultipliers().
Stage::Index soth::Stage::where | ( | Index | cst | ) | const |
ConstraintRef soth::Stage::which | ( | Index | row | ) | const |
References soth::ConstraintRef::row, and soth::ConstraintRef::type.
Referenced by soth::HCOD::downdate().
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
static |
Referenced by soth::HCOD::search(), and soth::HCOD::searchAndDowndate().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
std::string soth::Stage::name |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |