ROL
ROL::AugmentedLagrangian< Real > Class Template Reference

Provides the interface to evaluate the augmented Lagrangian. More...

#include <ROL_AugmentedLagrangian.hpp>

Inheritance diagram for ROL::AugmentedLagrangian< Real >:

Public Member Functions

 AugmentedLagrangian (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< Constraint< Real > > &con, const Vector< Real > &multiplier, const Real penaltyParameter, const Vector< Real > &optVec, const Vector< Real > &conVec, ROL::ParameterList &parlist)
 Constructor.
 AugmentedLagrangian (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< Constraint< Real > > &con, const Vector< Real > &multiplier, const Real penaltyParameter, const Vector< Real > &optVec, const Vector< Real > &conVec, const bool scaleLagrangian, const int HessianApprox)
 Constructor.
 AugmentedLagrangian ()
 Null constructor.
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
void setScaling (const Real fscale, const Real cscale=1.0)
virtual Real value (const Vector< Real > &x, Real &tol)
virtual void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
virtual Real getObjectiveValue (const Vector< Real > &x)
const Ptr< const Vector< Real > > getObjectiveGradient (const Vector< Real > &x)
virtual void getConstraintVec (Vector< Real > &c, const Vector< Real > &x)
virtual int getNumberConstraintEvaluations (void) const
virtual int getNumberFunctionEvaluations (void) const
virtual int getNumberGradientEvaluations (void) const
virtual void reset (const Vector< Real > &multiplier, const Real penaltyParameter)
Public Member Functions inherited from ROL::ROL::Objective< Real >
virtual ~Objective ()
 Objective ()
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function.
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function.
virtual Real value (const Vector< Real > &x, Real &tol)=0
 Compute value.
virtual void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative.
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector.
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply inverse Hessian approximation to vector.
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector.
virtual void prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
 Compute the proximity operator.
virtual void proxJacVec (Vector< Real > &Jv, const Vector< Real > &v, const Vector< Real > &x, Real t, Real &tol)
 Apply the Jacobian of the proximity operator.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes.
virtual std::vector< std::vector< Real > > checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes.
virtual std::vector< std::vector< Real > > checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes.
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check.
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check.
virtual std::vector< std::vector< Real > > checkProxJacVec (const Vector< Real > &x, const Vector< Real > &v, Real t=Real(1), bool printToStream=true, std::ostream &outStream=std::cout, int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference proximity operator Jacobian-applied-to-vector check.
virtual void setParameter (const std::vector< Real > &param)

Private Attributes

const ROL::Ptr< Objective< Real > > obj_
ROL::Ptr< QuadraticPenalty< Real > > pen_
Real penaltyParameter_
ROL::Ptr< Vector< Real > > dualOptVector_
Real fval_
ROL::Ptr< Vector< Real > > gradient_
Real fscale_
int nfval_
int ngval_
bool scaleLagrangian_
bool isValueComputed_
bool isGradientComputed_

Additional Inherited Members

Protected Member Functions inherited from ROL::ROL::Objective< Real >
const std::vector< Real > getParameter (void) const

Detailed Description

template<class Real>
class ROL::AugmentedLagrangian< Real >

Provides the interface to evaluate the augmented Lagrangian.

This class implements the augmented Lagrangian functional for use with ROL::AugmentedLagrangianStep. Given a function \(f:\mathcal{X}\to\mathbb{R}\) and an equality constraint \(c:\mathcal{X}\to\mathcal{C}\), the augmented Lagrangian functional is

\[ L_A(x,\lambda,\mu) = f(x) + \langle \lambda, c(x)\rangle_{\mathcal{C}^*,\mathcal{C}} + \frac{\mu}{2} \langle \mathfrak{R}c(x),c(x)\rangle_{\mathcal{C}^*,\mathcal{C}} \]

where \(\lambda\in\mathcal{C}^*\) denotes the Lagrange multiplier estimate, \(\mu > 0\) is the penalty parameter and \(\mathfrak{R}\in\mathcal{L}(\mathcal{C},\mathcal{C}^*)\) is the Riesz operator on the constraint space.

This implementation permits the scaling of \(L_A\) by \(\mu^{-1}\) and also permits the Hessian approximation

\[ \nabla^2_x L_A(x,\lambda,\mu)v \approx \nabla^2 f(x) v + \mu c'(x)^*\mathfrak{R} c'(x)v. \]


Definition at line 52 of file ROL_AugmentedLagrangian.hpp.

Constructor & Destructor Documentation

◆ AugmentedLagrangian() [1/3]

template<class Real>
ROL::AugmentedLagrangian< Real >::AugmentedLagrangian ( const ROL::Ptr< Objective< Real > > & obj,
const ROL::Ptr< Constraint< Real > > & con,
const Vector< Real > & multiplier,
const Real penaltyParameter,
const Vector< Real > & optVec,
const Vector< Real > & conVec,
ROL::ParameterList & parlist )
inline

Constructor.

This creates a valid AugmentedLagrangian object.

Parameters
[in]objis an objective function.
[in]conis an equality constraint.
[in]mulitplieris a Lagrange multiplier vector.
[in]penaltyParameteris the penalty parameter.
[in]optVecis an optimization space vector.
[in]conVecis a constraint space vector.
[in]parlistis a parameter list.

Definition at line 92 of file ROL_AugmentedLagrangian.hpp.

References ROL::Vector< Real >::dual(), dualOptVector_, fscale_, fval_, gradient_, isGradientComputed_, isValueComputed_, nfval_, ngval_, obj_, ROL::ROL::Objective< Real >::Objective(), pen_, penaltyParameter_, and scaleLagrangian_.

◆ AugmentedLagrangian() [2/3]

template<class Real>
ROL::AugmentedLagrangian< Real >::AugmentedLagrangian ( const ROL::Ptr< Objective< Real > > & obj,
const ROL::Ptr< Constraint< Real > > & con,
const Vector< Real > & multiplier,
const Real penaltyParameter,
const Vector< Real > & optVec,
const Vector< Real > & conVec,
const bool scaleLagrangian,
const int HessianApprox )
inline

Constructor.

This creates a valid AugmentedLagrangian object.

Parameters
[in]objis an objective function.
[in]conis an equality constraint.
[in]mulitplieris a Lagrange multiplier vector.
[in]penaltyParameteris the penalty parameter.
[in]optVecis an optimization space vector.
[in]conVecis a constraint space vector.
[in]parlistis a parameter list.

Definition at line 125 of file ROL_AugmentedLagrangian.hpp.

References ROL::Vector< Real >::dual(), dualOptVector_, fscale_, fval_, gradient_, isGradientComputed_, isValueComputed_, nfval_, ngval_, obj_, ROL::ROL::Objective< Real >::Objective(), pen_, penaltyParameter_, and scaleLagrangian_.

◆ AugmentedLagrangian() [3/3]

template<class Real>
ROL::AugmentedLagrangian< Real >::AugmentedLagrangian ( )
inline

Null constructor.

This constructor is only used for inheritance and does not create a valid AugmentedLagrangian object. Do not use.

Definition at line 150 of file ROL_AugmentedLagrangian.hpp.

References dualOptVector_, fscale_, fval_, gradient_, isGradientComputed_, isValueComputed_, nfval_, ngval_, obj_, pen_, and scaleLagrangian_.

Member Function Documentation

◆ update()

template<class Real>
virtual void ROL::AugmentedLagrangian< Real >::update ( const Vector< Real > & x,
bool flag = true,
int iter = -1 )
inlinevirtual

◆ setScaling()

template<class Real>
void ROL::AugmentedLagrangian< Real >::setScaling ( const Real fscale,
const Real cscale = 1.0 )
inline

Definition at line 163 of file ROL_AugmentedLagrangian.hpp.

References fscale_, and pen_.

Referenced by ROL::AugmentedLagrangianStep< Real >::initialize().

◆ value()

template<class Real>
virtual Real ROL::AugmentedLagrangian< Real >::value ( const Vector< Real > & x,
Real & tol )
inlinevirtual

◆ gradient()

◆ hessVec()

template<class Real>
virtual void ROL::AugmentedLagrangian< Real >::hessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inlinevirtual

◆ getObjectiveValue()

template<class Real>
virtual Real ROL::AugmentedLagrangian< Real >::getObjectiveValue ( const Vector< Real > & x)
inlinevirtual

◆ getObjectiveGradient()

template<class Real>
const Ptr< const Vector< Real > > ROL::AugmentedLagrangian< Real >::getObjectiveGradient ( const Vector< Real > & x)
inline

◆ getConstraintVec()

template<class Real>
virtual void ROL::AugmentedLagrangian< Real >::getConstraintVec ( Vector< Real > & c,
const Vector< Real > & x )
inlinevirtual

◆ getNumberConstraintEvaluations()

template<class Real>
virtual int ROL::AugmentedLagrangian< Real >::getNumberConstraintEvaluations ( void ) const
inlinevirtual

◆ getNumberFunctionEvaluations()

template<class Real>
virtual int ROL::AugmentedLagrangian< Real >::getNumberFunctionEvaluations ( void ) const
inlinevirtual

◆ getNumberGradientEvaluations()

template<class Real>
virtual int ROL::AugmentedLagrangian< Real >::getNumberGradientEvaluations ( void ) const
inlinevirtual

◆ reset()

template<class Real>
virtual void ROL::AugmentedLagrangian< Real >::reset ( const Vector< Real > & multiplier,
const Real penaltyParameter )
inlinevirtual

Member Data Documentation

◆ obj_

template<class Real>
const ROL::Ptr<Objective<Real> > ROL::AugmentedLagrangian< Real >::obj_
private

◆ pen_

◆ penaltyParameter_

template<class Real>
Real ROL::AugmentedLagrangian< Real >::penaltyParameter_
private

◆ dualOptVector_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::AugmentedLagrangian< Real >::dualOptVector_
private

◆ fval_

template<class Real>
Real ROL::AugmentedLagrangian< Real >::fval_
private

◆ gradient_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::AugmentedLagrangian< Real >::gradient_
private

◆ fscale_

template<class Real>
Real ROL::AugmentedLagrangian< Real >::fscale_
private

◆ nfval_

◆ ngval_

◆ scaleLagrangian_

template<class Real>
bool ROL::AugmentedLagrangian< Real >::scaleLagrangian_
private

◆ isValueComputed_

template<class Real>
bool ROL::AugmentedLagrangian< Real >::isValueComputed_
private

◆ isGradientComputed_

template<class Real>
bool ROL::AugmentedLagrangian< Real >::isGradientComputed_
private

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