humoto
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
humoto::constraints::ContainerILU Class Reference

Detailed Description

Container for simple inequality constraints.

Definition at line 312 of file constraints_base.h.

#include <constraints_base.h>

Inheritance diagram for humoto::constraints::ContainerILU:
Inheritance graph

Public Member Functions

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...
 
Location getCopyLocation (const std::size_t number_of_constraints, const std::size_t constraints_offset, const std::size_t number_of_variables) const
 Computes location of the copied constraints in a container and verifies their consistency. More...
 
humoto::IndexVectorgetIndices ()
 Get indices. More...
 
const humoto::IndexVectorgetIndices () const
 Get indices. More...
 
Eigen::VectorXd & getLowerBounds ()
 Get lower bounds (lb/ub vectors from 'lb <= A*x <= ub'). More...
 
const Eigen::VectorXd & getLowerBounds () const
 Get lower bounds (lb/ub vectors from 'lb <= A*x <= ub'). More...
 
std::size_t getNumberOfConstraints () const
 Returns number of constraints in the task. More...
 
std::size_t getNumberOfVariables () const
 Returns number of variables in the task. More...
 
double getProduct (const std::size_t i, const Eigen::VectorXd &vector) const
 Compute A(i,:) * vector. More...
 
Eigen::VectorXd & getUpperBounds ()
 Get upper bounds (ub vectors from 'A*x <= ub'). More...
 
const Eigen::VectorXd & getUpperBounds () const
 Get upper bounds (ub vectors from 'A*x <= ub'). More...
 
void initializeSolutionBounds (Eigen::VectorXd &lb, Eigen::VectorXd &ub) const
 Generates LB and UB, such that 'LB <= X <= UB'. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
 Log data. More...
 

Protected Member Functions

void addATA (Eigen::MatrixXd &H) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. 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 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...
 
void reset (const std::size_t number_of_constraints=0, const std::size_t number_of_variables=0, const bool initialize_matrices=false)
 Initialize constraints. 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, const bool initialize_matrices=false)
 Reset bounds of constraints (b, lb, ub) More...
 
void setNumberOfVariables (const std::size_t number_of_variables)
 Set number of variables. More...
 

Protected Attributes

humoto::IndexVector I_
 
Eigen::VectorXd lb_
 
std::size_t number_of_variables_
 
Eigen::VectorXd ub_
 

Member Function Documentation

◆ addATA()

void humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::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.

◆ copyBodyTo()

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

Copy body to the given matrix.

Parameters
[in]A
[in]locationoffset and length

Definition at line 814 of file constraints_mixins.h.

◆ copyBoundsTo()

void humoto::constraints::BoundsLUMixin< ContainerBase >::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 401 of file constraints_mixins.h.

◆ copyNegativeBodyTo()

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

Copy body to the given matrix.

Parameters
[in]A
[in]locationoffset and length

Definition at line 831 of file constraints_mixins.h.

◆ getATA()

void humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::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.

◆ getCopyLocation()

Location humoto::constraints::ContainerBase::getCopyLocation ( const std::size_t  number_of_constraints,
const std::size_t  constraints_offset,
const std::size_t  number_of_variables 
) const
inlineinherited

Computes location of the copied constraints in a container and verifies their consistency.

Parameters
[in]number_of_constraintsnumber of added constraints
[in]constraints_offsetoffset in the container
[in]number_of_variablesnumber of variables in the container
Returns
Location

Definition at line 262 of file constraints_base.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< BoundsLUMixin< ContainerBase > >::getIndices ( ) const
inlineinherited

Get indices.

Returns
indices

Definition at line 859 of file constraints_mixins.h.

◆ getLowerBounds() [1/2]

Eigen::VectorXd& humoto::constraints::BoundsLMixin< BoundsUMixin< ContainerBase > >::getLowerBounds ( )
inlineinherited

Get lower bounds (lb/ub vectors from 'lb <= A*x <= ub').

Returns
lower bounds.

Definition at line 254 of file constraints_mixins.h.

◆ getLowerBounds() [2/2]

const Eigen::VectorXd& humoto::constraints::BoundsLMixin< BoundsUMixin< ContainerBase > >::getLowerBounds ( ) const
inlineinherited

Get lower bounds (lb/ub vectors from 'lb <= A*x <= ub').

Returns
lower bounds.

Definition at line 260 of file constraints_mixins.h.

◆ getNumberOfConstraints()

std::size_t humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::getNumberOfConstraints ( ) const
inlinevirtualinherited

Returns number of constraints in the task.

Returns
number of constraints

Implements humoto::constraints::ContainerBase.

Definition at line 866 of file constraints_mixins.h.

◆ getNumberOfVariables()

std::size_t humoto::constraints::ContainerBase::getNumberOfVariables ( ) const
inlineinherited

Returns number of variables in the task.

Returns
number of variables

Definition at line 215 of file constraints_base.h.

◆ getProduct()

double humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::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.

◆ getUpperBounds() [1/2]

Eigen::VectorXd& humoto::constraints::BoundsUMixin< ContainerBase >::getUpperBounds ( )
inlineinherited

Get upper bounds (ub vectors from 'A*x <= ub').

Returns
upper bounds.

Definition at line 333 of file constraints_mixins.h.

◆ getUpperBounds() [2/2]

const Eigen::VectorXd& humoto::constraints::BoundsUMixin< ContainerBase >::getUpperBounds ( ) const
inlineinherited

Get upper bounds (ub vectors from 'A*x <= ub').

Returns
upper bounds.

Definition at line 340 of file constraints_mixins.h.

◆ initializeSolutionBounds()

void humoto::constraints::ContainerILU::initializeSolutionBounds ( Eigen::VectorXd &  lb,
Eigen::VectorXd &  ub 
) const
inline

Generates LB and UB, such that 'LB <= X <= UB'.

Parameters
[out]lb
[out]ub

Definition at line 324 of file constraints_base.h.

◆ log()

void humoto::constraints::ContainerBase::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineinherited

Log data.

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

Definition at line 238 of file constraints_base.h.

◆ logBody()

void humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::logBody ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineprotectedvirtualinherited

Log body.

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

Implements humoto::constraints::ContainerBase.

Definition at line 780 of file constraints_mixins.h.

◆ logBounds()

void humoto::constraints::BoundsLUMixin< ContainerBase >::logBounds ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineprotectedvirtualinherited

Log bounds.

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

Reimplemented from humoto::constraints::BoundsLMixin< BoundsUMixin< ContainerBase > >.

Definition at line 388 of file constraints_mixins.h.

◆ reset()

void humoto::constraints::ContainerBase::reset ( const std::size_t  number_of_constraints = 0,
const std::size_t  number_of_variables = 0,
const bool  initialize_matrices = false 
)
inlineprotectedinherited

Initialize constraints.

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

Definition at line 175 of file constraints_base.h.

◆ resetBody()

virtual void humoto::constraints::BodyIMixin< BoundsLUMixin< ContainerBase > >::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

Implements humoto::constraints::ContainerBase.

Definition at line 771 of file constraints_mixins.h.

◆ resetBounds()

void humoto::constraints::BoundsLUMixin< ContainerBase >::resetBounds ( const std::size_t  number_of_constraints,
const bool  initialize_matrices = false 
)
inlineprotectedvirtualinherited

Reset bounds of constraints (b, lb, ub)

Parameters
[in]number_of_constraintsnumber of constraints
[in]initialize_matricesinitialize matrices using defaults
Note
Initialization: lb is set to -humotog_infinity, ub is set to humoto::g_infinity

Reimplemented from humoto::constraints::BoundsLMixin< BoundsUMixin< ContainerBase > >.

Definition at line 380 of file constraints_mixins.h.

◆ setNumberOfVariables()

void humoto::constraints::ContainerBase::setNumberOfVariables ( const std::size_t  number_of_variables)
inlineprotectedinherited

Set number of variables.

Parameters
[in]number_of_variablesnumber of variables

Definition at line 142 of file constraints_base.h.

Member Data Documentation

◆ I_

Definition at line 746 of file constraints_mixins.h.

◆ lb_

Eigen::VectorXd humoto::constraints::BoundsLMixin< BoundsUMixin< ContainerBase > >::lb_
protectedinherited

Definition at line 210 of file constraints_mixins.h.

◆ number_of_variables_

std::size_t humoto::constraints::ContainerBase::number_of_variables_
protectedinherited

Definition at line 120 of file constraints_base.h.

◆ ub_

Eigen::VectorXd humoto::constraints::BoundsUMixin< ContainerBase >::ub_
protectedinherited

Definition at line 288 of file constraints_mixins.h.


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