pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
ADMMConstraintSolverTpl< _Scalar, _Options > Struct Template Reference

ADMM constraint solver. More...

#include <pinocchio/algorithm/solvers/admm-solver.hpp>

Inheritance diagram for ADMMConstraintSolverTpl< _Scalar, _Options >:
Collaboration diagram for ADMMConstraintSolverTpl< _Scalar, _Options >:

Public Types

typedef internal::ADMMLinearUpdateRuleTpl< Scalar > ADMMLinearUpdateRule
typedef internal::ADMMOSQPUpdateRuleTpl< Scalar > ADMMOSQPUpdateRule
typedef ADMMSolverResultTpl< Scalar, Options > ADMMSolverResult
typedef ADMMSolverSettingsTpl< Scalar > ADMMSolverSettings
typedef ADMMSolverStatsTpl< Scalar > ADMMSolverStats
typedef internal::ADMMSolverWorkspaceTpl< Scalar, Options > ADMMSolverWorkspace
typedef internal::ADMMSpectralUpdateRuleTpl< Scalar > ADMMSpectralUpdateRule
typedef internal::ADMMUpdateRuleContainerTpl< Scalar > ADMMUpdateRuleContainer
typedef ConstraintSolverBase< Self > Base
typedef const Eigen::Ref< const VectorXs > ConstRefVectorXs
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > MatrixXs
typedef Eigen::Ref< const VectorXs > RefConstVectorXs
typedef Eigen::Ref< VectorXs > RefVectorXs
typedef _Scalar Scalar
typedef ADMMConstraintSolverTpl Self
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > VectorXs

Public Member Functions

 ADMMConstraintSolverTpl (std::size_t max_problem_size=0)
 Default constructor.
bool isValid () const
 Returns true if solver is in a valid state (it has solved a constraint problem). If so, its stats are valid.
void resetImpl ()
template<typename DelassusDerived, typename VectorLike, typename ConstraintModel, typename ConstraintModelAllocator, typename ConstraintData, typename ConstraintDataAllocator>
bool solveImpl (DelassusOperatorBase< DelassusDerived > &delassus, const Eigen::MatrixBase< VectorLike > &g, const std::vector< ConstraintModel, ConstraintModelAllocator > &constraint_models, const std::vector< ConstraintData, ConstraintDataAllocator > &constraint_datas, const ADMMSolverSettings &settings, ADMMSolverResult &result)

Public Attributes

ADMMSolverStats stats
 Per-iteration stats of the ADMM solver.

Static Public Attributes

static constexpr int Options = _Options

Static Protected Member Functions

template<typename DelassusDerived>
static Scalar computeDelassusLargestEigenvalue (const DelassusOperatorBase< DelassusDerived > &delassus, ADMMSolverWorkspace &workspace)
 Compute largest eigen value of delassus.
template<typename DelassusDerived, typename VectorLike, typename ConstraintModel, typename ConstraintModelAllocator, typename ConstraintData, typename ConstraintDataAllocator>
static void retrievePrimalDualGuess (DelassusOperatorBase< DelassusDerived > &delassus, const Eigen::MatrixBase< VectorLike > &g, const std::vector< ConstraintModel, ConstraintModelAllocator > &constraint_models, const std::vector< ConstraintData, ConstraintDataAllocator > &constraint_datas, const ADMMSolverSettings &settings, const ADMMSolverResult &result, ADMMSolverWorkspace &workspace)
 Retrieve primal and/or dual guesses from settings and result's warmstarts.
template<typename DelassusDerived>
static void retrieveRhoGuess (const DelassusOperatorBase< DelassusDerived > &delassus, const ADMMSolverSettings &settings, const ADMMSolverResult &result, ADMMSolverWorkspace &workspace)
 Retrieve rho parameters guesses from settings and result's warmstarts.

Protected Attributes

bool m_is_valid
 Flag to check whether or not the solver is in a reset state. If not, its stats are valid.
ADMMSolverWorkspace m_workspace
 Workspace of the ADMM solver. This is an internal of the solver and is not meant to be accessed by users.

Detailed Description

template<typename _Scalar, int _Options>
struct pinocchio::ADMMConstraintSolverTpl< _Scalar, _Options >

ADMM constraint solver.

The solver solves the following CPP/NCP problem: min_x x^T G x + g s.t. x \in C, where G is the delassus matrix, g is the constraint velocities without any constraint forces acting on the system and C are the constraint sets. If the g term is augmented with the DeSaxce term, the problem becomes an NCP.

Definition at line 120 of file admm-solver.hpp.

Member Typedef Documentation

◆ ADMMLinearUpdateRule

template<typename _Scalar, int _Options>
typedef internal::ADMMLinearUpdateRuleTpl<Scalar> ADMMLinearUpdateRule

Definition at line 141 of file admm-solver.hpp.

◆ ADMMOSQPUpdateRule

template<typename _Scalar, int _Options>
typedef internal::ADMMOSQPUpdateRuleTpl<Scalar> ADMMOSQPUpdateRule

Definition at line 140 of file admm-solver.hpp.

◆ ADMMSolverResult

template<typename _Scalar, int _Options>
typedef ADMMSolverResultTpl<Scalar, Options> ADMMSolverResult

Definition at line 134 of file admm-solver.hpp.

◆ ADMMSolverSettings

template<typename _Scalar, int _Options>
typedef ADMMSolverSettingsTpl<Scalar> ADMMSolverSettings

Definition at line 136 of file admm-solver.hpp.

◆ ADMMSolverStats

template<typename _Scalar, int _Options>
typedef ADMMSolverStatsTpl<Scalar> ADMMSolverStats

Definition at line 137 of file admm-solver.hpp.

◆ ADMMSolverWorkspace

template<typename _Scalar, int _Options>
typedef internal::ADMMSolverWorkspaceTpl<Scalar, Options> ADMMSolverWorkspace

Definition at line 135 of file admm-solver.hpp.

◆ ADMMSpectralUpdateRule

template<typename _Scalar, int _Options>
typedef internal::ADMMSpectralUpdateRuleTpl<Scalar> ADMMSpectralUpdateRule

Definition at line 139 of file admm-solver.hpp.

◆ ADMMUpdateRuleContainer

template<typename _Scalar, int _Options>
typedef internal::ADMMUpdateRuleContainerTpl<Scalar> ADMMUpdateRuleContainer

Definition at line 142 of file admm-solver.hpp.

◆ Base

template<typename _Scalar, int _Options>
typedef ConstraintSolverBase<Self> Base

Definition at line 126 of file admm-solver.hpp.

◆ ConstRefVectorXs

template<typename _Scalar, int _Options>
typedef const Eigen::Ref<const VectorXs> ConstRefVectorXs

Definition at line 131 of file admm-solver.hpp.

◆ MatrixXs

template<typename _Scalar, int _Options>
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options> MatrixXs

Definition at line 132 of file admm-solver.hpp.

◆ RefConstVectorXs

template<typename _Scalar, int _Options>
typedef Eigen::Ref<const VectorXs> RefConstVectorXs

Definition at line 130 of file admm-solver.hpp.

◆ RefVectorXs

template<typename _Scalar, int _Options>
typedef Eigen::Ref<VectorXs> RefVectorXs

Definition at line 129 of file admm-solver.hpp.

◆ Scalar

template<typename _Scalar, int _Options>
typedef _Scalar Scalar

Definition at line 122 of file admm-solver.hpp.

◆ Self

template<typename _Scalar, int _Options>
typedef ADMMConstraintSolverTpl Self

Definition at line 125 of file admm-solver.hpp.

◆ VectorXs

template<typename _Scalar, int _Options>
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> VectorXs

Definition at line 128 of file admm-solver.hpp.

Constructor & Destructor Documentation

◆ ADMMConstraintSolverTpl()

template<typename _Scalar, int _Options>
ADMMConstraintSolverTpl(std::size_tmax_problem_size = 0)
inlineexplicit

Default constructor.

Note
The user can give max_problem_size to preallocate maximum problem sizes data. This is optional and the solver will automatically resize its workspace to handle the constraint problem thrown at it. If the solver encounters a problem which size is bigger than max_problem_size, it will automatically resize its internals as well as the result output of solve.
Parameters
[in]max_problem_sizemaximum problem size (before automatic reallocation)

Definition at line 156 of file admm-solver.hpp.

Member Function Documentation

◆ isValid()

template<typename _Scalar, int _Options>
bool isValid()const
inline

Returns true if solver is in a valid state (it has solved a constraint problem). If so, its stats are valid.

Definition at line 168 of file admm-solver.hpp.

◆ resetImpl()

template<typename _Scalar, int _Options>
void resetImpl()
inline

Definition at line 188 of file admm-solver.hpp.

Member Data Documentation

◆ m_is_valid

template<typename _Scalar, int _Options>
bool m_is_valid
protected

Flag to check whether or not the solver is in a reset state. If not, its stats are valid.

Definition at line 206 of file admm-solver.hpp.

◆ m_workspace

template<typename _Scalar, int _Options>
ADMMSolverWorkspace m_workspace
protected

Workspace of the ADMM solver. This is an internal of the solver and is not meant to be accessed by users.

Definition at line 202 of file admm-solver.hpp.

◆ Options

template<typename _Scalar, int _Options>
int Options = _Options
staticconstexpr

Definition at line 123 of file admm-solver.hpp.

◆ stats

template<typename _Scalar, int _Options>
ADMMSolverStats stats

Per-iteration stats of the ADMM solver.

Definition at line 196 of file admm-solver.hpp.


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