humoto
|
Constraints 'A*S*x = b'.
t_Base | Base class (humoto::constraints::ConstraintsBase or humoto::TaskBase) |
Definition at line 433 of file constraints.h.
#include <constraints.h>
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... | |
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... | |
std::size_t | copyTo (ContainerALU &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... | |
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... | |
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... | |
Eigen::VectorXd & | getB () |
Get vector b from equalities: 'A*x = b' or 'x = b'. More... | |
const Eigen::VectorXd & | getB () const |
Get vector b from equalities: 'A*x = b' or 'x = b'. More... | |
std::size_t | getNumberOfConstraints () const |
Returns number of constraints in the task. More... | |
std::ptrdiff_t | getOffset () const |
Get offset of body part in the constriaints. 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... | |
void | setOffset (const std::ptrdiff_t offset) |
Set offset of body part in the constriaints. More... | |
Protected Member Functions | |
ConstraintsASB () | |
~ConstraintsASB () | |
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 | 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 | 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 | 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=0, const bool initialize_matrices=false) |
Reset bounds of constraints (b, lb, ub) More... | |
Protected Attributes | |
Eigen::MatrixXd | A_ |
Eigen::VectorXd | b_ |
std::ptrdiff_t | offset_ |
|
inlineprotected |
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition at line 440 of file constraints.h.
|
inlineprotected |
Definition at line 441 of file constraints.h.
|
inlineprotectedinherited |
Compute 'A^T * A' for general equality constaints and save or add the result to H.
[in,out] | H | left lower triangular part of the result. |
Definition at line 641 of file constraints_mixins.h.
|
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.
[in,out] | H | left lower triangular part of the result. |
[in,out] | g | result |
Definition at line 485 of file constraints.h.
|
inline |
Check consistency of the constraints.
Definition at line 460 of file constraints.h.
|
inlineinherited |
Compute violations given a solution vector.
[in,out] | violations | violations |
[in] | location | location of the constraints in the active set |
[in] | solution | solution vector |
Definition at line 1333 of file constraints_mixins.h.
|
inlineinherited |
Copy body to the given matrix.
[in] | A | |
[in] | location | offset and length |
Definition at line 689 of file constraints_mixins.h.
|
inlineinherited |
Copy bounds to given vectors.
[in] | lb | |
[in] | ub | |
[in] | location | offset and length |
Definition at line 190 of file constraints_mixins.h.
|
inlineprotectedinherited |
|
inlineinherited |
Copy body to the given matrix.
[in] | A | |
[in] | location | offset and length |
Definition at line 705 of file constraints_mixins.h.
|
inlineinherited |
Set constraints.
[in,out] | container | new constraints |
[in] | constraints_offset | first row offset |
Definition at line 615 of file constraints_base.h.
|
inlineinherited |
Set constraints.
[in,out] | container | new constraints |
[in] | constraints_offset | first row offset |
Definition at line 777 of file constraints_base.h.
|
inlineinherited |
Determine active set given a solution vector.
[in,out] | active_set | active set |
[in] | location | location of the constraints in the active set |
[in] | solution | solution vector |
Definition at line 1187 of file constraints_mixins.h.
|
inlineinherited |
Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'.
Definition at line 654 of file constraints_mixins.h.
|
inlineinherited |
Get matrix A from general constraints: 'A*x = b', 'lb <= A*x <= ub'.
Definition at line 660 of file constraints_mixins.h.
|
inlineprotectedinherited |
Compute 'A^T * A' for general equality constaints and save or add the result to H.
[in,out] | H | left lower triangular part of the result. |
Definition at line 634 of file constraints_mixins.h.
|
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.
[in,out] | H | left lower triangular part of the result. |
[in,out] | g | result |
Definition at line 472 of file constraints.h.
|
inlineinherited |
Get vector b from equalities: 'A*x = b' or 'x = b'.
Definition at line 176 of file constraints_mixins.h.
|
inlineinherited |
Get vector b from equalities: 'A*x = b' or 'x = b'.
Definition at line 183 of file constraints_mixins.h.
|
inlineinherited |
Returns number of constraints in the task.
Definition at line 721 of file constraints_mixins.h.
|
inlineinherited |
Get offset of body part in the constriaints.
Definition at line 671 of file constraints_mixins.h.
|
inlineinherited |
Compute A(i,:) * vector.
[in] | i | row index |
[in] | vector | vector |
Definition at line 728 of file constraints_mixins.h.
|
inline |
Returns type of the constraints.
Definition at line 453 of file constraints.h.
|
inlineprotectedinherited |
Log body.
[in,out] | logger | logger |
[in] | parent | parent |
[in] | name | name |
Definition at line 623 of file constraints_mixins.h.
|
inlineprotectedinherited |
Log bounds.
[in,out] | logger | logger |
[in] | parent | parent |
[in] | name | name |
Definition at line 149 of file constraints_mixins.h.
|
inlineprotectedinherited |
Initialize A.
[in] | number_of_constraints | number of constraints |
[in] | initialize_matrices | initialize matrices using defaults |
Initialization:
Definition at line 608 of file constraints_mixins.h.
|
inlineprotectedinherited |
Reset bounds of constraints (b, lb, ub)
[in] | number_of_constraints | number of constraints |
[in] | initialize_matrices | initialize matrices using defaults |
Definition at line 134 of file constraints_mixins.h.
|
inlineinherited |
Set offset of body part in the constriaints.
[in] | offset |
Definition at line 682 of file constraints_mixins.h.
|
protectedinherited |
Definition at line 583 of file constraints_mixins.h.
|
protectedinherited |
Definition at line 118 of file constraints_mixins.h.
|
protectedinherited |
Definition at line 584 of file constraints_mixins.h.