humoto
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
humoto::constraints::ConstraintsIB0< t_Base > Class Template Reference

Detailed Description

template<class t_Base>
class humoto::constraints::ConstraintsIB0< t_Base >

Constraints 'x[I] = 0'.

Template Parameters
t_BaseBase class (humoto::constraints::ConstraintsBase or humoto::TaskBase)

Definition at line 1031 of file constraints.h.

#include <constraints.h>

Inheritance diagram for humoto::constraints::ConstraintsIB0< t_Base >:
Inheritance graph

Public Member Functions

void addATAandATb (Eigen::MatrixXd &H, Eigen::VectorXd &g) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. Compute 'A^T * b' for general equality constaints and save or add the result to g. More...
 
void checkConsistency () const
 Check consistency of the constraints. More...
 
void computeViolations (ViolationsConstraints &violations, const Location &location, const Solution &solution) const
 Compute violations given a solution vector. More...
 
virtual void copyBodyTo (Eigen::MatrixXd &A, const Location &location) const
 Copy body to the given matrix. More...
 
void copyBoundsTo (Eigen::VectorXd &lb, Eigen::VectorXd &ub, const Location &location) const
 Copy bounds to given vectors. More...
 
virtual void copyNegativeBodyTo (Eigen::MatrixXd &A, const Location &location) const
 Copy body to the given matrix. More...
 
std::size_t copyTo (ContainerALU &container, const std::size_t constraints_offset) const
 Set constraints. More...
 
std::size_t copyTo (ContainerILU &container, const std::size_t constraints_offset) const
 Set constraints. More...
 
std::size_t copyTo (ContainerAB &container, const std::size_t constraints_offset) const
 Set constraints. More...
 
void determineActiveSet (ActiveSetConstraints &active_set, const Location &location, const Solution &solution) const
 Determine active set given a solution vector. More...
 
void getATAandATb (Eigen::MatrixXd &H, Eigen::VectorXd &g) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. Compute 'A^T * b' for general equality constaints and save or add the result to g. More...
 
humoto::IndexVectorgetIndices ()
 Get indices. More...
 
const humoto::IndexVectorgetIndices () const
 Get indices. More...
 
std::size_t getNumberOfConstraints () const
 Returns number of constraints in the task. More...
 
double getProduct (const std::size_t i, const Eigen::VectorXd &vector) const
 Compute A(i,:) * vector. More...
 
ConstraintType::Type getType () const
 Returns type of the constraints. More...
 

Protected Member Functions

 ConstraintsIB0 ()
 
 ~ConstraintsIB0 ()
 Protected destructor: prevent destruction of the child classes through a base pointer. More...
 
void addATA (Eigen::MatrixXd &H) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. More...
 
void addATb (Eigen::VectorXd &g) const
 Compute 'A^T * b' for general equality constaints and save or add the result to g. More...
 
void copyEqualityBoundsTo (Eigen::VectorXd &b, const Location &location) const
 Copy b. More...
 
void getATA (Eigen::MatrixXd &H) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. More...
 
void getATb (Eigen::VectorXd &g) const
 Compute 'A^T * b' for general equality constaints and save or add the result to g. More...
 
void logBody (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
 Log body. More...
 
void logBounds (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
 Log bounds. More...
 
virtual void resetBody (const std::size_t number_of_constraints=0, const bool initialize_matrices=false)
 Initialize I and gains. More...
 
void resetBounds (const std::size_t number_of_constraints=0, const bool initialize_matrices=false)
 Reset bounds of constraints (b, lb, ub) More...
 

Protected Attributes

humoto::IndexVector I_
 

Constructor & Destructor Documentation

◆ ~ConstraintsIB0()

template<class t_Base>
humoto::constraints::ConstraintsIB0< t_Base >::~ConstraintsIB0 ( )
inlineprotected

Protected destructor: prevent destruction of the child classes through a base pointer.

Definition at line 1038 of file constraints.h.

◆ ConstraintsIB0()

template<class t_Base>
humoto::constraints::ConstraintsIB0< t_Base >::ConstraintsIB0 ( )
inlineprotected

Definition at line 1039 of file constraints.h.

Member Function Documentation

◆ addATA()

void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::addATA ( Eigen::MatrixXd &  H) const
inlineprotectedinherited

Compute 'A^T * A' for general equality constaints and save or add the result to H.

Parameters
[in,out]Hleft lower triangular part of the result.
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 799 of file constraints_mixins.h.

◆ addATAandATb()

template<class t_Base>
void humoto::constraints::ConstraintsIB0< t_Base >::addATAandATb ( Eigen::MatrixXd &  H,
Eigen::VectorXd &  g 
) const
inline

Compute 'A^T * A' for general equality constaints and save or add the result to H. Compute 'A^T * b' for general equality constaints and save or add the result to g.

Parameters
[in,out]Hleft lower triangular part of the result.
[in,out]gresult
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 1067 of file constraints.h.

◆ addATb()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::addATb ( Eigen::VectorXd &  g) const
inlineprotectedinherited

Compute 'A^T * b' for general equality constaints and save or add the result to g.

Parameters
[in,out]gresult

Definition at line 77 of file constraints_mixins.h.

◆ checkConsistency()

template<class t_Base>
void humoto::constraints::ConstraintsIB0< t_Base >::checkConsistency ( ) const
inline

Check consistency of the constraints.

Definition at line 1055 of file constraints.h.

◆ computeViolations()

void humoto::constraints::ViolationsComputationB0Mixin< ActiveSetDeterminationBMixin< BodyIMixin< BoundsB0Mixin< t_Base > > > >::computeViolations ( ViolationsConstraints violations,
const Location location,
const Solution solution 
) const
inlineinherited

Compute violations given a solution vector.

Parameters
[in,out]violationsviolations
[in]locationlocation of the constraints in the active set
[in]solutionsolution vector

Definition at line 1366 of file constraints_mixins.h.

◆ copyBodyTo()

virtual void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::copyBodyTo ( Eigen::MatrixXd &  A,
const Location location 
) const
inlinevirtualinherited

Copy body to the given matrix.

Parameters
[in]A
[in]locationoffset and length

Reimplemented in humoto::constraints::BodyGIMixin< BoundsB0Mixin< t_Base > >.

Definition at line 814 of file constraints_mixins.h.

◆ copyBoundsTo()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::copyBoundsTo ( Eigen::VectorXd &  lb,
Eigen::VectorXd &  ub,
const Location location 
) const
inlineinherited

Copy bounds to given vectors.

Parameters
[in]lb
[in]ub
[in]locationoffset and length

Definition at line 98 of file constraints_mixins.h.

◆ copyEqualityBoundsTo()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::copyEqualityBoundsTo ( Eigen::VectorXd &  b,
const Location location 
) const
inlineprotectedinherited

Copy b.

Parameters
[in,out]b
[in]location

Definition at line 89 of file constraints_mixins.h.

◆ copyNegativeBodyTo()

virtual void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::copyNegativeBodyTo ( Eigen::MatrixXd &  A,
const Location location 
) const
inlinevirtualinherited

Copy body to the given matrix.

Parameters
[in]A
[in]locationoffset and length

Reimplemented in humoto::constraints::BodyGIMixin< BoundsB0Mixin< t_Base > >.

Definition at line 831 of file constraints_mixins.h.

◆ copyTo() [1/3]

std::size_t humoto::constraints::CopyAnyToALUMixin< CopySimpleToILUMixin< CopyEqualityToABMixin< ViolationsComputationB0Mixin< ActiveSetDeterminationBMixin< BodyIMixin< BoundsB0Mixin< t_Base > > > > > > >::copyTo ( ContainerALU container,
const std::size_t  constraints_offset 
) const
inlineinherited

Set constraints.

Parameters
[in,out]containernew constraints
[in]constraints_offsetfirst row offset
Returns
offset of the end of added constraints

Definition at line 615 of file constraints_base.h.

◆ copyTo() [2/3]

std::size_t humoto::constraints::CopySimpleToILUMixin< CopyEqualityToABMixin< ViolationsComputationB0Mixin< ActiveSetDeterminationBMixin< BodyIMixin< BoundsB0Mixin< t_Base > > > > > >::copyTo ( ContainerILU container,
const std::size_t  constraints_offset 
) const
inlineinherited

Set constraints.

Parameters
[in,out]containernew constraints
[in]constraints_offsetfirst row offset
Returns
offset of the end of added constraints

Definition at line 743 of file constraints_base.h.

◆ copyTo() [3/3]

std::size_t humoto::constraints::CopyEqualityToABMixin< ViolationsComputationB0Mixin< ActiveSetDeterminationBMixin< BodyIMixin< BoundsB0Mixin< t_Base > > > > >::copyTo ( ContainerAB container,
const std::size_t  constraints_offset 
) const
inlineinherited

Set constraints.

Parameters
[in,out]containernew constraints
[in]constraints_offsetfirst row offset
Returns
offset of the end of added constraints

Definition at line 777 of file constraints_base.h.

◆ determineActiveSet()

void humoto::constraints::ActiveSetDeterminationBMixin< BodyIMixin< BoundsB0Mixin< t_Base > > >::determineActiveSet ( ActiveSetConstraints active_set,
const Location location,
const Solution solution 
) const
inlineinherited

Determine active set given a solution vector.

Parameters
[in,out]active_setactive set
[in]locationlocation of the constraints in the active set
[in]solutionsolution vector

Definition at line 1187 of file constraints_mixins.h.

◆ getATA()

void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::getATA ( Eigen::MatrixXd &  H) const
inlineprotectedinherited

Compute 'A^T * A' for general equality constaints and save or add the result to H.

Parameters
[in,out]Hleft lower triangular part of the result.
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 789 of file constraints_mixins.h.

◆ getATAandATb()

template<class t_Base>
void humoto::constraints::ConstraintsIB0< t_Base >::getATAandATb ( Eigen::MatrixXd &  H,
Eigen::VectorXd &  g 
) const
inline

Compute 'A^T * A' for general equality constaints and save or add the result to H. Compute 'A^T * b' for general equality constaints and save or add the result to g.

Parameters
[in,out]Hleft lower triangular part of the result.
[in,out]gresult
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 1059 of file constraints.h.

◆ getATb()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::getATb ( Eigen::VectorXd &  g) const
inlineprotectedinherited

Compute 'A^T * b' for general equality constaints and save or add the result to g.

Parameters
[in,out]gresult

Definition at line 70 of file constraints_mixins.h.

◆ getIndices() [1/2]

Get indices.

Returns
indices

Definition at line 852 of file constraints_mixins.h.

◆ getIndices() [2/2]

const humoto::IndexVector& humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::getIndices ( ) const
inlineinherited

Get indices.

Returns
indices

Definition at line 859 of file constraints_mixins.h.

◆ getNumberOfConstraints()

std::size_t humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::getNumberOfConstraints ( ) const
inlineinherited

Returns number of constraints in the task.

Returns
number of constraints

Definition at line 866 of file constraints_mixins.h.

◆ getProduct()

double humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::getProduct ( const std::size_t  i,
const Eigen::VectorXd &  vector 
) const
inlineinherited

Compute A(i,:) * vector.

Parameters
[in]irow index
[in]vectorvector
Returns
result of multiplication

Definition at line 873 of file constraints_mixins.h.

◆ getType()

template<class t_Base>
ConstraintType::Type humoto::constraints::ConstraintsIB0< t_Base >::getType ( ) const
inline

Returns type of the constraints.

Returns
type of the constraints

Definition at line 1048 of file constraints.h.

◆ logBody()

void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::logBody ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineprotectedinherited

Log body.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Definition at line 780 of file constraints_mixins.h.

◆ logBounds()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::logBounds ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineprotectedinherited

Log bounds.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Definition at line 56 of file constraints_mixins.h.

◆ resetBody()

virtual void humoto::constraints::BodyIMixin< BoundsB0Mixin< t_Base > >::resetBody ( const std::size_t  number_of_constraints = 0,
const bool  initialize_matrices = false 
)
inlineprotectedvirtualinherited

Initialize I and gains.

Parameters
[in]number_of_constraintsnumber of constraints
[in]initialize_matricesinitialize matrices using defaults

Reimplemented in humoto::constraints::BodyGIMixin< BoundsB0Mixin< t_Base > >.

Definition at line 771 of file constraints_mixins.h.

◆ resetBounds()

template<class t_Base>
void humoto::constraints::BoundsB0Mixin< t_Base >::resetBounds ( const std::size_t  number_of_constraints = 0,
const bool  initialize_matrices = false 
)
inlineprotectedinherited

Reset bounds of constraints (b, lb, ub)

Parameters
[in]number_of_constraintsnumber of constraints
[in]initialize_matricesinitialize matrices using defaults

Definition at line 48 of file constraints_mixins.h.

Member Data Documentation

◆ I_

Definition at line 746 of file constraints_mixins.h.


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