aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
 
Loading...
Searching...
No Matches
aligator::BoxConstraintTpl< Scalar > Struct Template Reference

Box constraint set \(z \in [z_\min, z_\max]\). More...

#include <aligator/modelling/constraints/box-constraint.hpp>

Inheritance diagram for aligator::BoxConstraintTpl< Scalar >:
[legend]
Collaboration diagram for aligator::BoxConstraintTpl< Scalar >:
[legend]

Public Types

using Base = ConstraintSetTpl<Scalar>
 
using ActiveType = typename Base::ActiveType
 
- Public Types inherited from aligator::ConstraintSetTpl< Scalar >
using Scalar
 
using ActiveType
 
using Scalar
 
using ActiveType
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 BoxConstraintTpl (const ConstVectorRef lower, const ConstVectorRef upper)
 
 BoxConstraintTpl (const BoxConstraintTpl &)=default
 
BoxConstraintTploperator= (const BoxConstraintTpl &)=default
 
 BoxConstraintTpl (BoxConstraintTpl &&)=default
 
BoxConstraintTploperator= (BoxConstraintTpl &&)=default
 
decltype(auto) projection_impl (const ConstVectorRef &z) const
 
void projection (const ConstVectorRef &z, VectorRef zout) const
 Compute projection of variable z onto the constraint set.
 
void normalConeProjection (const ConstVectorRef &z, VectorRef zout) const
 Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).
 
void computeActiveSet (const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const
 
- Public Member Functions inherited from aligator::ConstraintSetTpl< Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 ConstraintSetTpl ()=default
 
virtual bool disableGaussNewton () const
 
virtual Scalar evaluate (const ConstVectorRef &) const
 
virtual void applyProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply a jacobian of the projection/proximal operator to a matrix.
 
virtual void applyNormalConeProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply the jacobian of the projection on the normal cone.
 
void setProxParameter (const Scalar mu) const
 Update proximal parameter; this applies to when this class is a proximal operator that isn't a projection (e.g. \( \ell_1 \)).
 
virtual ~ConstraintSetTpl ()=default
 
bool operator== (const ConstraintSetTpl< Scalar > &rhs)
 
Scalar evaluateMoreauEnvelope (const ConstVectorRef &zin, const ConstVectorRef &zproj) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin.
 
Scalar computeMoreauEnvelope (const ConstVectorRef &zin, VectorRef zprojout) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin. This variant evaluates the prox map.
 
Scalar mu () const
 
Scalar mu_inv () const
 
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 ConstraintSetTpl ()=default
 
virtual bool disableGaussNewton () const
 
virtual Scalar evaluate (const ConstVectorRef &) const
 
virtual void applyProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply a jacobian of the projection/proximal operator to a matrix.
 
virtual void applyNormalConeProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const
 Apply the jacobian of the projection on the normal cone.
 
void setProxParameter (const Scalar mu) const
 Update proximal parameter; this applies to when this class is a proximal operator that isn't a projection (e.g. \( \ell_1 \)).
 
virtual ~ConstraintSetTpl ()=default
 
bool operator== (const ConstraintSetTpl< Scalar > &rhs)
 
Scalar evaluateMoreauEnvelope (const ConstVectorRef &zin, const ConstVectorRef &zproj) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin.
 
Scalar computeMoreauEnvelope (const ConstVectorRef &zin, VectorRef zprojout) const
 Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin. This variant evaluates the prox map.
 
Scalar mu () const
 
Scalar mu_inv () const
 

Public Attributes

VectorXs lower_limit
 
VectorXs upper_limit
 

Additional Inherited Members

- Protected Attributes inherited from aligator::ConstraintSetTpl< Scalar >
Scalar mu_
 
Scalar mu_inv_
 
Scalar mu_
 
Scalar mu_inv_
 

Detailed Description

template<typename Scalar>
struct aligator::BoxConstraintTpl< Scalar >

Box constraint set \(z \in [z_\min, z_\max]\).

Definition at line 10 of file box-constraint.hpp.

Member Typedef Documentation

◆ Base

template<typename Scalar>
using aligator::BoxConstraintTpl< Scalar >::Base = ConstraintSetTpl<Scalar>

Definition at line 12 of file box-constraint.hpp.

◆ ActiveType

template<typename Scalar>
using aligator::BoxConstraintTpl< Scalar >::ActiveType = typename Base::ActiveType

Definition at line 13 of file box-constraint.hpp.

Constructor & Destructor Documentation

◆ BoxConstraintTpl() [1/3]

template<typename Scalar>
aligator::BoxConstraintTpl< Scalar >::BoxConstraintTpl ( const ConstVectorRef lower,
const ConstVectorRef upper )
inline

Definition at line 18 of file box-constraint.hpp.

◆ BoxConstraintTpl() [2/3]

template<typename Scalar>
aligator::BoxConstraintTpl< Scalar >::BoxConstraintTpl ( const BoxConstraintTpl< Scalar > & )
default

◆ BoxConstraintTpl() [3/3]

template<typename Scalar>
aligator::BoxConstraintTpl< Scalar >::BoxConstraintTpl ( BoxConstraintTpl< Scalar > && )
default

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename Scalar>
aligator::BoxConstraintTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ operator=() [1/2]

template<typename Scalar>
BoxConstraintTpl & aligator::BoxConstraintTpl< Scalar >::operator= ( const BoxConstraintTpl< Scalar > & )
default

◆ operator=() [2/2]

template<typename Scalar>
BoxConstraintTpl & aligator::BoxConstraintTpl< Scalar >::operator= ( BoxConstraintTpl< Scalar > && )
default

◆ projection_impl()

template<typename Scalar>
decltype(auto) aligator::BoxConstraintTpl< Scalar >::projection_impl ( const ConstVectorRef & z) const
inline

Definition at line 27 of file box-constraint.hpp.

◆ projection()

template<typename Scalar>
void aligator::BoxConstraintTpl< Scalar >::projection ( const ConstVectorRef & z,
VectorRef zout ) const
inlinevirtual

Compute projection of variable z onto the constraint set.

Parameters
[in]zInput vector
[out]zoutOutput projection

Implements aligator::ConstraintSetTpl< Scalar >.

Definition at line 31 of file box-constraint.hpp.

◆ normalConeProjection()

template<typename Scalar>
void aligator::BoxConstraintTpl< Scalar >::normalConeProjection ( const ConstVectorRef & z,
VectorRef zout ) const
inlinevirtual

Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).

Parameters
[in]zInput vector
[out]zoutOutput projection on the normal projection

Implements aligator::ConstraintSetTpl< Scalar >.

Definition at line 35 of file box-constraint.hpp.

◆ computeActiveSet()

template<typename Scalar>
void aligator::BoxConstraintTpl< Scalar >::computeActiveSet ( const ConstVectorRef & z,
Eigen::Ref< ActiveType > out ) const
inlinevirtual

Compute the active set of the constraint. Active means the Jacobian of the proximal operator is nonzero.

Implements aligator::ConstraintSetTpl< Scalar >.

Definition at line 39 of file box-constraint.hpp.

Member Data Documentation

◆ lower_limit

template<typename Scalar>
VectorXs aligator::BoxConstraintTpl< Scalar >::lower_limit

Definition at line 15 of file box-constraint.hpp.

◆ upper_limit

template<typename Scalar>
VectorXs aligator::BoxConstraintTpl< Scalar >::upper_limit

Definition at line 16 of file box-constraint.hpp.


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