ROL
Public Member Functions | Private Attributes | List of all members
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 ()
 
 AugmentedLagrangian (Objective< Real > &obj, EqualityConstraint< Real > &con, const Vector< Real > &x, const Vector< Real > &c, const Vector< Real > &l, const Real mu, Teuchos::ParameterList &parlist)
 
Real getObjectiveValue (const Vector< Real > &x)
 
void getObjectiveGradient (Vector< Real > &g, const Vector< Real > &x)
 
void getConstraintVec (Vector< Real > &c, const Vector< Real > &x)
 
int getNumberConstraintEvaluations (void)
 
int getNumberFunctionEvaluations (void)
 
int getNumberGradientEvaluations (void)
 
void reset (const Vector< Real > &lam, const Real penaltyParameter)
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update augmented Lagrangian function. More...
 
Real value (const Vector< Real > &x, Real &tol)
 Compute value. More...
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient. More...
 
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector. More...
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative. More...
 
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply inverse Hessian approximation to vector. More...
 
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Private Attributes

Teuchos::RCP< Objective< Real > > obj_
 
Teuchos::RCP< EqualityConstraint< Real > > con_
 
Teuchos::RCP< Vector< Real > > lam_
 
Teuchos::RCP< Vector< Real > > dlam_
 
Teuchos::RCP< Vector< Real > > x_
 
Teuchos::RCP< Vector< Real > > g_
 
Teuchos::RCP< Vector< Real > > c_
 
Teuchos::RCP< Vector< Real > > dc1_
 
Teuchos::RCP< Vector< Real > > dc2_
 
Real fval_
 
int ncval_
 
int nfval_
 
int ngval_
 
Real penaltyParameter_
 
bool scaleLagrangian_
 
int HessianLevel_
 
bool isConstraintComputed_
 
bool isValueComputed_
 
bool isGradientComputed_
 

Detailed Description

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

Provides the interface to evaluate the augmented Lagrangian.


Definition at line 65 of file ROL_AugmentedLagrangian.hpp.

Constructor & Destructor Documentation

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

Definition at line 91 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
ROL::AugmentedLagrangian< Real >::AugmentedLagrangian ( Objective< Real > &  obj,
EqualityConstraint< Real > &  con,
const Vector< Real > &  x,
const Vector< Real > &  c,
const Vector< Real > &  l,
const Real  mu,
Teuchos::ParameterList &  parlist 
)
inline

Member Function Documentation

template<class Real>
Real ROL::AugmentedLagrangian< Real >::getObjectiveValue ( const Vector< Real > &  x)
inline
template<class Real>
void ROL::AugmentedLagrangian< Real >::getObjectiveGradient ( Vector< Real > &  g,
const Vector< Real > &  x 
)
inline

Definition at line 127 of file ROL_AugmentedLagrangian.hpp.

References ROL::ROL_EPSILON, and ROL::Vector< Real >::set().

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

Definition at line 138 of file ROL_AugmentedLagrangian.hpp.

References ROL::ROL_EPSILON, and ROL::Vector< Real >::set().

template<class Real>
int ROL::AugmentedLagrangian< Real >::getNumberConstraintEvaluations ( void  )
inline
template<class Real>
int ROL::AugmentedLagrangian< Real >::getNumberFunctionEvaluations ( void  )
inline
template<class Real>
int ROL::AugmentedLagrangian< Real >::getNumberGradientEvaluations ( void  )
inline
template<class Real>
void ROL::AugmentedLagrangian< Real >::reset ( const Vector< Real > &  lam,
const Real  penaltyParameter 
)
inline

Definition at line 161 of file ROL_AugmentedLagrangian.hpp.

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

Update augmented Lagrangian function.

This function updates the augmented Lagrangian function at new iterations.

Parameters
[in]xis the new iterate.
[in]flagis true if the iterate has changed.
[in]iteris the outer algorithm iterations count.

Reimplemented from ROL::Objective< Real >.

Definition at line 174 of file ROL_AugmentedLagrangian.hpp.

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

Compute value.

This function returns the augmented Lagrangian value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact augmented Lagrangian computation.

Implements ROL::Objective< Real >.

Definition at line 190 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
void ROL::AugmentedLagrangian< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute gradient.

This function returns the augmented Lagrangian gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis a tolerance for inexact augmented Lagrangian computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 225 of file ROL_AugmentedLagrangian.hpp.

References ROL::Vector< Real >::plus(), ROL::Vector< Real >::scale(), and ROL::Vector< Real >::set().

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

Apply Hessian approximation to vector.

This function applies the Hessian of the augmented Lagrangian to the vector \(v\).

Parameters
[out]hvis the the action of the Hessian on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact augmented Lagrangian computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 261 of file ROL_AugmentedLagrangian.hpp.

References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::plus(), and ROL::Vector< Real >::scale().

Member Data Documentation

template<class Real>
Teuchos::RCP<Objective<Real> > ROL::AugmentedLagrangian< Real >::obj_
private

Definition at line 67 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<EqualityConstraint<Real> > ROL::AugmentedLagrangian< Real >::con_
private

Definition at line 68 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::lam_
private

Definition at line 69 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::dlam_
private

Definition at line 70 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::x_
private

Definition at line 71 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::g_
private

Definition at line 72 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::c_
private

Definition at line 73 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::dc1_
private

Definition at line 74 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::AugmentedLagrangian< Real >::dc2_
private

Definition at line 75 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
Real ROL::AugmentedLagrangian< Real >::fval_
private
template<class Real>
int ROL::AugmentedLagrangian< Real >::ncval_
private
template<class Real>
int ROL::AugmentedLagrangian< Real >::nfval_
private
template<class Real>
int ROL::AugmentedLagrangian< Real >::ngval_
private
template<class Real>
Real ROL::AugmentedLagrangian< Real >::penaltyParameter_
private

Definition at line 82 of file ROL_AugmentedLagrangian.hpp.

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

Definition at line 83 of file ROL_AugmentedLagrangian.hpp.

template<class Real>
int ROL::AugmentedLagrangian< Real >::HessianLevel_
private

Definition at line 84 of file ROL_AugmentedLagrangian.hpp.

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

Definition at line 86 of file ROL_AugmentedLagrangian.hpp.

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

Definition at line 87 of file ROL_AugmentedLagrangian.hpp.

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

Definition at line 88 of file ROL_AugmentedLagrangian.hpp.


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