Container for general inequality constraints.
Definition at line 282 of file constraints_base.h.
#include <constraints_base.h>
|
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...
|
|
void | copyNegativeBodyTo (Eigen::MatrixXd &A, const Location &location) const |
| Copy body to the given matrix. More...
|
|
Eigen::MatrixXd & | getA () |
| Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'. More...
|
|
const Eigen::MatrixXd & | getA () const |
| Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'. 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...
|
|
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 | log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const |
| Log data. 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 | 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...
|
|
void | resetBody (const std::size_t number_of_constraints, const bool initialize_matrices=false) |
| Initialize A. 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...
|
|
◆ addATA()
Compute 'A^T * A' for general equality constaints and save or add the result to H.
- Parameters
-
[in,out] | H | left 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 503 of file constraints_mixins.h.
◆ copyBodyTo()
Copy body to the given matrix.
- Parameters
-
[in] | A | |
[in] | location | offset and length |
Definition at line 530 of file constraints_mixins.h.
◆ copyBoundsTo()
Copy bounds to given vectors.
- Parameters
-
[in] | lb | |
[in] | ub | |
[in] | location | offset and length |
Definition at line 401 of file constraints_mixins.h.
◆ copyNegativeBodyTo()
Copy body to the given matrix.
- Parameters
-
[in] | A | |
[in] | location | offset and length |
Definition at line 540 of file constraints_mixins.h.
◆ getA() [1/2]
Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'.
- Returns
- matrix A
Definition at line 517 of file constraints_mixins.h.
◆ getA() [2/2]
Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'.
- Returns
- matrix A
Definition at line 523 of file constraints_mixins.h.
◆ getATA()
Compute 'A^T * A' for general equality constaints and save or add the result to H.
- Parameters
-
[in,out] | H | left 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 495 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_constraints | number of added constraints |
[in] | constraints_offset | offset in the container |
[in] | number_of_variables | number of variables in the container |
- Returns
- Location
Definition at line 262 of file constraints_base.h.
◆ getLowerBounds() [1/2]
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]
Get lower bounds (lb/ub vectors from 'lb <= A*x <= ub').
- Returns
- lower bounds.
Definition at line 260 of file constraints_mixins.h.
◆ getNumberOfConstraints()
◆ 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()
Compute A(i,:) * vector.
- Parameters
-
[in] | i | row index |
[in] | vector | vector |
- Returns
- result of multiplication
Definition at line 564 of file constraints_mixins.h.
◆ getUpperBounds() [1/2]
Get upper bounds (ub vectors from 'A*x <= ub').
- Returns
- upper bounds.
Definition at line 333 of file constraints_mixins.h.
◆ getUpperBounds() [2/2]
Get upper bounds (ub vectors from 'A*x <= ub').
- Returns
- upper bounds.
Definition at line 340 of file constraints_mixins.h.
◆ log()
Log data.
- Parameters
-
[in,out] | logger | logger |
[in] | parent | parent |
[in] | name | name |
Definition at line 238 of file constraints_base.h.
◆ logBody()
|
inlineprotectedvirtualinherited |
◆ logBounds()
|
inlineprotectedvirtualinherited |
◆ 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_constraints | number of constraints |
[in] | number_of_variables | number of variables |
[in] | initialize_matrices | initialize matrices using defaults |
Definition at line 175 of file constraints_base.h.
◆ resetBody()
|
inlineprotectedvirtualinherited |
◆ resetBounds()
|
inlineprotectedvirtualinherited |
◆ setNumberOfVariables()
void humoto::constraints::ContainerBase::setNumberOfVariables |
( |
const std::size_t |
number_of_variables | ) |
|
|
inlineprotectedinherited |
Set number of variables.
- Parameters
-
[in] | number_of_variables | number of variables |
Definition at line 142 of file constraints_base.h.
◆ A_
◆ lb_
◆ number_of_variables_
std::size_t humoto::constraints::ContainerBase::number_of_variables_ |
|
protectedinherited |
◆ ub_
The documentation for this class was generated from the following file: