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

Base constraint set type. More...

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

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

Public Types

using Scalar = _Scalar
 
using ActiveType = Eigen::Matrix<bool, Eigen::Dynamic, 1>
 

Public Member Functions

 ConstraintSetTpl ()=default
 
virtual bool disableGaussNewton () const
 
virtual Scalar evaluate (const ConstVectorRef &) const
 
virtual void projection (const ConstVectorRef &z, VectorRef zout) const =0
 Compute projection of variable z onto the constraint set.
 
virtual void normalConeProjection (const ConstVectorRef &z, VectorRef zout) const =0
 Compute projection of z onto the normal cone to the set. The default implementation is just \( \mathrm{id} - P\).
 
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 void computeActiveSet (const ConstVectorRef &z, Eigen::Ref< ActiveType > out) const =0
 
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
 

Protected Attributes

Scalar mu_ = 0.
 
Scalar mu_inv_
 

Detailed Description

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

Base constraint set type.

Constraint sets can be the negative or positive orthant, the \(\{0\}\) singleton, cones, etc... The expected inputs are constraint values or shifted constraint values (as in ALM-type algorithms).

Definition at line 104 of file fwd.hpp.

Member Typedef Documentation

◆ Scalar

template<typename Scalar >
using proxsuite::nlp::ConstraintSetTpl< Scalar >::Scalar = _Scalar

Definition at line 20 of file constraint-set.hpp.

◆ ActiveType

template<typename Scalar >
using proxsuite::nlp::ConstraintSetTpl< Scalar >::ActiveType = Eigen::Matrix<bool, Eigen::Dynamic, 1>

Definition at line 22 of file constraint-set.hpp.

Constructor & Destructor Documentation

◆ ConstraintSetTpl()

template<typename Scalar >
proxsuite::nlp::ConstraintSetTpl< Scalar >::ConstraintSetTpl ( )
default

◆ ~ConstraintSetTpl()

template<typename Scalar >
virtual proxsuite::nlp::ConstraintSetTpl< Scalar >::~ConstraintSetTpl ( )
virtualdefault

Member Function Documentation

◆ disableGaussNewton()

template<typename Scalar >
virtual bool proxsuite::nlp::ConstraintSetTpl< Scalar >::disableGaussNewton ( ) const
inlinevirtual

Do not use the vector-Hessian product in the Hessian for Gauss Newton.

Reimplemented in proxsuite::nlp::EqualityConstraintTpl< _Scalar >.

Definition at line 28 of file constraint-set.hpp.

◆ evaluate()

template<typename Scalar >
virtual Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::evaluate ( const ConstVectorRef & ) const
inlinevirtual

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 in proxsuite::nlp::ConstraintSetProductTpl< Scalar >, and proxsuite::nlp::NonsmoothPenaltyL1Tpl< _Scalar >.

Definition at line 33 of file constraint-set.hpp.

◆ projection()

template<typename Scalar >
virtual void proxsuite::nlp::ConstraintSetTpl< Scalar >::projection ( const ConstVectorRef & z,
VectorRef zout ) const
pure virtual

◆ normalConeProjection()

template<typename Scalar >
virtual void proxsuite::nlp::ConstraintSetTpl< Scalar >::normalConeProjection ( const ConstVectorRef & z,
VectorRef zout ) const
pure virtual

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

Implemented in proxsuite::nlp::BoxConstraintTpl< Scalar >, proxsuite::nlp::ConstraintSetProductTpl< Scalar >, proxsuite::nlp::EqualityConstraintTpl< _Scalar >, proxsuite::nlp::NegativeOrthantTpl< _Scalar >, and proxsuite::nlp::NonsmoothPenaltyL1Tpl< _Scalar >.

◆ applyProjectionJacobian()

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

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 in proxsuite::nlp::ConstraintSetProductTpl< Scalar >, and proxsuite::nlp::EqualityConstraintTpl< _Scalar >.

◆ applyNormalConeProjectionJacobian()

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

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 in proxsuite::nlp::ConstraintSetProductTpl< Scalar >, and proxsuite::nlp::EqualityConstraintTpl< _Scalar >.

◆ setProxParameter()

template<typename Scalar >
void proxsuite::nlp::ConstraintSetTpl< Scalar >::setProxParameter ( const Scalar mu) const
inline

Update proximal parameter; this applies to when this class is a proximal operator that isn't a projection (e.g. \( \ell_1 \)).

Definition at line 70 of file constraint-set.hpp.

◆ computeActiveSet()

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

◆ operator==()

template<typename Scalar >
bool proxsuite::nlp::ConstraintSetTpl< Scalar >::operator== ( const ConstraintSetTpl< Scalar > & rhs)
inline

Definition at line 82 of file constraint-set.hpp.

◆ evaluateMoreauEnvelope()

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::evaluateMoreauEnvelope ( const ConstVectorRef & zin,
const ConstVectorRef & zproj ) const
inline

Evaluate the Moreau envelope with parameter mu for the given contraint set or nonsmooth penalty \(g\) at point zin.

The envelope is

\[ M_{\mu g}(z) := g(\prox_{\mu g}(z)) + \frac{1}{2\mu} \| z - \prox_{\mu g}(z) \|^2. \]

Parameters
zinThe input.
zprojProjection of the input to the normal.

Definition at line 95 of file constraint-set.hpp.

◆ computeMoreauEnvelope()

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::computeMoreauEnvelope ( const ConstVectorRef & zin,
VectorRef zprojout ) const
inline

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.

The envelope is

\[ M_{\mu g}(z) := g(\prox_{\mu g}(z)) + \frac{1}{2\mu} \| z - \prox_{\mu g}(z) \|^2. \]

Parameters
zinThe input.
zprojProjection of the input to the normal.

Definition at line 104 of file constraint-set.hpp.

◆ mu()

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::mu ( ) const
inline

Definition at line 110 of file constraint-set.hpp.

◆ mu_inv()

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::mu_inv ( ) const
inline

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

Member Data Documentation

◆ Scalar

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

Definition at line 21 of file constraint-set.hpp.

◆ mu_

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::mu_ = 0.
mutableprotected

Definition at line 114 of file constraint-set.hpp.

◆ mu_inv_

template<typename Scalar >
Scalar proxsuite::nlp::ConstraintSetTpl< Scalar >::mu_inv_
mutableprotected

Definition at line 115 of file constraint-set.hpp.


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