proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
proxsuite::nlp::ConstraintSetProductTpl< Scalar > Struct Template Reference

Cartesian product of multiple constraint sets. This class makes computing multipliers and Jacobian matrix projections more convenient. More...

#include <proxsuite-nlp/modelling/constraints/constraint-set-product.hpp>

Inheritance diagram for proxsuite::nlp::ConstraintSetProductTpl< Scalar >:
[legend]
Collaboration diagram for proxsuite::nlp::ConstraintSetProductTpl< Scalar >:
[legend]

Public Types

using Base = ConstraintSetTpl<Scalar>
 
using ActiveType = typename Base::ActiveType
 
- Public Types inherited from proxsuite::nlp::ConstraintSetTpl< Scalar >
using Scalar = _Scalar
 
using ActiveType = Eigen::Matrix<bool, Eigen::Dynamic, 1>
 

Public Member Functions

 ConstraintSetProductTpl (const std::vector< xyz::polymorphic< Base > > components, const std::vector< Eigen::Index > &blockSizes)
 
 ConstraintSetProductTpl (const ConstraintSetProductTpl &)=default
 
ConstraintSetProductTploperator= (const ConstraintSetProductTpl &)=default
 
 ConstraintSetProductTpl (ConstraintSetProductTpl &&)=default
 
ConstraintSetProductTploperator= (ConstraintSetProductTpl &&)=default
 
Scalar evaluate (const ConstVectorRef &zproj) const override
 
void projection (const ConstVectorRef &z, VectorRef zout) const override
 Compute projection of variable z onto the constraint set.
 
void normalConeProjection (const ConstVectorRef &z, VectorRef zout) const override
 Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).
 
void applyProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const override
 Apply a jacobian of the projection/proximal operator to a matrix.
 
void applyNormalConeProjectionJacobian (const ConstVectorRef &z, MatrixRef Jout) const override
 Apply the jacobian of the projection on the normal cone.
 
void computeActiveSet (const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const override
 
const std::vector< xyz::polymorphic< Base > > & components () const
 
const std::vector< Eigen::Index > & blockSizes () const
 
- Public Member Functions inherited from proxsuite::nlp::ConstraintSetTpl< Scalar >
 ConstraintSetTpl ()=default
 
virtual bool disableGaussNewton () const
 
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

 Scalar
 
- Public Attributes inherited from proxsuite::nlp::ConstraintSetTpl< Scalar >
 Scalar
 

Additional Inherited Members

- Protected Attributes inherited from proxsuite::nlp::ConstraintSetTpl< Scalar >
Scalar mu_ = 0.
 
Scalar mu_inv_
 

Detailed Description

template<typename Scalar>
struct proxsuite::nlp::ConstraintSetProductTpl< Scalar >

Cartesian product of multiple constraint sets. This class makes computing multipliers and Jacobian matrix projections more convenient.

Warning
This struct contains a non-owning vector of its component sets.

Definition at line 36 of file constraint-set-product.hpp.

Member Typedef Documentation

◆ Base

Definition at line 38 of file constraint-set-product.hpp.

◆ ActiveType

template<typename Scalar >
using proxsuite::nlp::ConstraintSetProductTpl< Scalar >::ActiveType = typename Base::ActiveType

Definition at line 39 of file constraint-set-product.hpp.

Constructor & Destructor Documentation

◆ ConstraintSetProductTpl() [1/3]

template<typename Scalar >
proxsuite::nlp::ConstraintSetProductTpl< Scalar >::ConstraintSetProductTpl ( const std::vector< xyz::polymorphic< Base > > components,
const std::vector< Eigen::Index > & blockSizes )
inline

Definition at line 41 of file constraint-set-product.hpp.

◆ ConstraintSetProductTpl() [2/3]

template<typename Scalar >
proxsuite::nlp::ConstraintSetProductTpl< Scalar >::ConstraintSetProductTpl ( const ConstraintSetProductTpl< Scalar > & )
default

◆ ConstraintSetProductTpl() [3/3]

template<typename Scalar >
proxsuite::nlp::ConstraintSetProductTpl< Scalar >::ConstraintSetProductTpl ( ConstraintSetProductTpl< Scalar > && )
default

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ evaluate()

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetProductTpl< Scalar >::evaluate ( const ConstVectorRef & ) const
inlineoverridevirtual

Provided the image zproj by the proximal/projection map, evaluate the nonsmooth penalty or constraint set indicator function.

Note
This will be 0 for projection operators.

Reimplemented from proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 55 of file constraint-set-product.hpp.

◆ projection()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetProductTpl< Scalar >::projection ( const ConstVectorRef & z,
VectorRef zout ) const
inlineoverridevirtual

Compute projection of variable z onto the constraint set.

Parameters
[in]zInput vector
[out]zoutOutput projection

Implements proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 64 of file constraint-set-product.hpp.

◆ normalConeProjection()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetProductTpl< Scalar >::normalConeProjection ( const ConstVectorRef & z,
VectorRef zout ) const
inlineoverridevirtual

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 proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 72 of file constraint-set-product.hpp.

◆ applyProjectionJacobian()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetProductTpl< Scalar >::applyProjectionJacobian ( const ConstVectorRef & z,
MatrixRef Jout ) const
inlineoverridevirtual

Apply a jacobian of the projection/proximal operator to a matrix.

This carries out the product \(PJ\), where \( P \in\partial_B\prox(z)\).

Parameters
[in]zInput vector (multiplier estimate)
[out]JoutOutput Jacobian matrix, which will be modifed in-place and returned.

Reimplemented from proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 81 of file constraint-set-product.hpp.

◆ applyNormalConeProjectionJacobian()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetProductTpl< Scalar >::applyNormalConeProjectionJacobian ( const ConstVectorRef & z,
MatrixRef Jout ) const
inlineoverridevirtual

Apply the jacobian of the projection on the normal cone.

Parameters
[in]zInput vector
[out]JoutOutput Jacobian matrix of shape \((nr, ndx)\), which will be modified in place. The modification should be a row-wise operation.

Reimplemented from proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 90 of file constraint-set-product.hpp.

◆ computeActiveSet()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetProductTpl< Scalar >::computeActiveSet ( const ConstVectorRef & z,
Eigen::Ref< ActiveType > out ) const
inlineoverridevirtual

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

Implements proxsuite::nlp::ConstraintSetTpl< Scalar >.

Definition at line 99 of file constraint-set-product.hpp.

◆ components()

template<typename Scalar >
const std::vector< xyz::polymorphic< Base > > & proxsuite::nlp::ConstraintSetProductTpl< Scalar >::components ( ) const
inline

Definition at line 108 of file constraint-set-product.hpp.

◆ blockSizes()

template<typename Scalar >
const std::vector< Eigen::Index > & proxsuite::nlp::ConstraintSetProductTpl< Scalar >::blockSizes ( ) const
inline

Definition at line 111 of file constraint-set-product.hpp.

Member Data Documentation

◆ Scalar

template<typename Scalar >
proxsuite::nlp::ConstraintSetProductTpl< Scalar >::Scalar

Definition at line 37 of file constraint-set-product.hpp.


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