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

Settings for the ADMM constraint solver loop. More...

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

Inheritance diagram for ADMMSolverSettingsTpl< _Scalar >:
Collaboration diagram for ADMMSolverSettingsTpl< _Scalar >:

Public Types

typedef ConstraintSolverSettingsBase< Self > Base
typedef _Scalar Scalar
typedef ADMMSolverSettingsTpl Self

Public Member Functions

 ADMMSolverSettingsTpl (std::size_t max_iterations=1000, Scalar absolute_feasibility_tol=Scalar(1e-6), Scalar relative_feasibility_tol=Scalar(1e-6), Scalar absolute_complementarity_tol=Scalar(1e-6), Scalar relative_complementarity_tol=Scalar(1e-6), bool solve_ncp=true, bool measure_timings=false, bool stat_record=false, std::optional< Scalar > rho_init=std::nullopt, bool warmstart_rho_with_previous_result=false, ADMMUpdateRule admm_update_rule=ADMMUpdateRule::OSQP, ADMMProximalRule admm_proximal_rule=ADMMProximalRule::MANUAL, Scalar mu_prox=Scalar(1e-6), Scalar tau_prox=Scalar(1), Scalar tau=Scalar(0.5), Scalar ratio_primal_dual=Scalar(10), Scalar dual_momentum=Scalar(0), Scalar rho_update_ratio=Scalar(0), std::size_t rho_min_update_frequency=1, Scalar rho_momentum=Scalar(0), Scalar rho_min=Scalar(1e-6), Scalar rho_max=Scalar(1e6), Scalar spectral_rho_power_init=Scalar(0.2), Scalar spectral_rho_power_factor=Scalar(0.05), Scalar linear_update_rule_factor=Scalar(2), std::size_t lanczos_size=std::numeric_limits< int >::max(), std::size_t max_delassus_decomposition_updates=std::numeric_limits< int >::max(), std::size_t anderson_capacity=0)
 Default constructor.
void checkValidityImpl () const

Public Attributes

ADMMProximalRule admm_proximal_rule
 Update rule for the primal proximal term.
ADMMUpdateRule admm_update_rule
 Update rule for the rho admm term.
std::size_t anderson_capacity
 Size of the andersion history used to fit the anderson linear system. If set to 0 or 1, no anderson acceleration is used.
Scalar dual_momentum
 Momentum on the dual variable. 0 means no momentum.
std::size_t lanczos_size
 Size of the lanczos decomposition. Higher values lead to more precise estimation of the Delassus' maximum eigenvalue.
Scalar linear_update_rule_factor
 Value by which rho is multiplied/divided in the LINEAR update rule.
std::size_t max_delassus_decomposition_updates
 Maximum number of delassus decomposition updates. Once this number is reached, rho and mu_prox are kept constant.
Scalar mu_prox
 Value of the proximal term when admm_proximal_rule is MANUAL. When admm_proximal_rule is AUTOMATIC, the proximal term follows the rho term.
Scalar ratio_primal_dual
 Value of the primal/dual ratio beyond/below which a rho update is considered. If the primal/dual ratio is not big/low enough, rho is kept constant.
std::optional< Scalar > rho_init
 Initial value of rho parameter. If set to boost::none, the initial rho will be computed by estimating the largest eigenvalue of the Delassus.
Scalar rho_max
 Maximum value that rho can take. During 'solve', rho is clamped between rho_min and rho_max.
Scalar rho_min
 Minimum value that rho can take. During 'solve', rho is clamped between rho_min and rho_max.
std::size_t rho_min_update_frequency
 How many iterations before rho can be updated again. 1 means rho can be updated. every iterations (it does not mean it is updated every iterations).
Scalar rho_momentum
 Momentum on rho value.
Scalar rho_update_ratio
 Ratio w.r.t previous rho value beyond/below which rho is updated. In essence, if rho has not changed enough compared to the previous rho value, its value stays unchanged. This is a knob to prevent updating rho too much.
Scalar spectral_rho_power_factor
 Power factor used to update rho in the SPECTRAL update rule.
Scalar spectral_rho_power_init
 Initial value of the rho power in the SPECTRAL update rule.
Scalar tau
 Scaling factor in front of the rho ADMM term.
Scalar tau_prox
 Scaling factor in front of the primal proximal term.
bool warmstart_rho_with_previous_result
 Whether or not to warmstart rho with previous result. If set to true, the rho_init will be bypassed by the value of rho stored in the solver's solution.

Detailed Description

template<typename _Scalar>
struct pinocchio::ADMMSolverSettingsTpl< _Scalar >

Settings for the ADMM constraint solver loop.

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

Member Typedef Documentation

◆ Base

template<typename _Scalar>
typedef ConstraintSolverSettingsBase<Self> Base

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

◆ Scalar

template<typename _Scalar>
typedef _Scalar Scalar

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

◆ Self

template<typename _Scalar>
typedef ADMMSolverSettingsTpl Self

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

Constructor & Destructor Documentation

◆ ADMMSolverSettingsTpl()

template<typename _Scalar>
ADMMSolverSettingsTpl(std::size_tmax_iterations = 1000,
Scalarabsolute_feasibility_tol = Scalar(1e-6),
Scalarrelative_feasibility_tol = Scalar(1e-6),
Scalarabsolute_complementarity_tol = Scalar(1e-6),
Scalarrelative_complementarity_tol = Scalar(1e-6),
boolsolve_ncp = true,
boolmeasure_timings = false,
boolstat_record = false,
std::optional< Scalar >rho_init = std::nullopt,
boolwarmstart_rho_with_previous_result = false,
ADMMUpdateRuleadmm_update_rule = ADMMUpdateRule::OSQP,
ADMMProximalRuleadmm_proximal_rule = ADMMProximalRule::MANUAL,
Scalarmu_prox = Scalar(1e-6),
Scalartau_prox = Scalar(1),
Scalartau = Scalar(0.5),
Scalarratio_primal_dual = Scalar(10),
Scalardual_momentum = Scalar(0),
Scalarrho_update_ratio = Scalar(0),
std::size_trho_min_update_frequency = 1,
Scalarrho_momentum = Scalar(0),
Scalarrho_min = Scalar(1e-6),
Scalarrho_max = Scalar(1e6),
Scalarspectral_rho_power_init = Scalar(0.2),
Scalarspectral_rho_power_factor = Scalar(0.05),
Scalarlinear_update_rule_factor = Scalar(2),
std::size_tlanczos_size = std::numeric_limits<int>::max(),
std::size_tmax_delassus_decomposition_updates = std::numeric_limits<int>::max(),
std::size_tanderson_capacity = 0 )
inline

Default constructor.

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

Member Function Documentation

◆ checkValidityImpl()

template<typename _Scalar>
void checkValidityImpl()const
inline

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

Member Data Documentation

◆ admm_proximal_rule

template<typename _Scalar>
ADMMProximalRule admm_proximal_rule

Update rule for the primal proximal term.

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

◆ admm_update_rule

template<typename _Scalar>
ADMMUpdateRule admm_update_rule

Update rule for the rho admm term.

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

◆ anderson_capacity

template<typename _Scalar>
std::size_t anderson_capacity

Size of the andersion history used to fit the anderson linear system. If set to 0 or 1, no anderson acceleration is used.

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

◆ dual_momentum

template<typename _Scalar>
Scalar dual_momentum

Momentum on the dual variable. 0 means no momentum.

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

◆ lanczos_size

template<typename _Scalar>
std::size_t lanczos_size

Size of the lanczos decomposition. Higher values lead to more precise estimation of the Delassus' maximum eigenvalue.

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

◆ linear_update_rule_factor

template<typename _Scalar>
Scalar linear_update_rule_factor

Value by which rho is multiplied/divided in the LINEAR update rule.

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

◆ max_delassus_decomposition_updates

template<typename _Scalar>
std::size_t max_delassus_decomposition_updates

Maximum number of delassus decomposition updates. Once this number is reached, rho and mu_prox are kept constant.

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

◆ mu_prox

template<typename _Scalar>
Scalar mu_prox

Value of the proximal term when admm_proximal_rule is MANUAL. When admm_proximal_rule is AUTOMATIC, the proximal term follows the rho term.

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

◆ ratio_primal_dual

template<typename _Scalar>
Scalar ratio_primal_dual

Value of the primal/dual ratio beyond/below which a rho update is considered. If the primal/dual ratio is not big/low enough, rho is kept constant.

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

◆ rho_init

template<typename _Scalar>
std::optional<Scalar> rho_init

Initial value of rho parameter. If set to boost::none, the initial rho will be computed by estimating the largest eigenvalue of the Delassus.

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

◆ rho_max

template<typename _Scalar>
Scalar rho_max

Maximum value that rho can take. During 'solve', rho is clamped between rho_min and rho_max.

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

◆ rho_min

template<typename _Scalar>
Scalar rho_min

Minimum value that rho can take. During 'solve', rho is clamped between rho_min and rho_max.

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

◆ rho_min_update_frequency

template<typename _Scalar>
std::size_t rho_min_update_frequency

How many iterations before rho can be updated again. 1 means rho can be updated. every iterations (it does not mean it is updated every iterations).

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

◆ rho_momentum

template<typename _Scalar>
Scalar rho_momentum

Momentum on rho value.

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

◆ rho_update_ratio

template<typename _Scalar>
Scalar rho_update_ratio

Ratio w.r.t previous rho value beyond/below which rho is updated. In essence, if rho has not changed enough compared to the previous rho value, its value stays unchanged. This is a knob to prevent updating rho too much.

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

◆ spectral_rho_power_factor

template<typename _Scalar>
Scalar spectral_rho_power_factor

Power factor used to update rho in the SPECTRAL update rule.

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

◆ spectral_rho_power_init

template<typename _Scalar>
Scalar spectral_rho_power_init

Initial value of the rho power in the SPECTRAL update rule.

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

◆ tau

template<typename _Scalar>
Scalar tau

Scaling factor in front of the rho ADMM term.

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

◆ tau_prox

template<typename _Scalar>
Scalar tau_prox

Scaling factor in front of the primal proximal term.

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

◆ warmstart_rho_with_previous_result

template<typename _Scalar>
bool warmstart_rho_with_previous_result

Whether or not to warmstart rho with previous result. If set to true, the rho_init will be bypassed by the value of rho stored in the solver's solution.

Note
This setting is only effective if a previous solution is valid.

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


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