ROL
ROL::ROL::AugmentedLagrangianObjective< Real > Class Template Reference

#include <ROL_Constraint_SerialSimOpt.hpp>

Inheritance diagram for ROL::ROL::AugmentedLagrangianObjective< Real >:

Public Member Functions

 AugmentedLagrangianObjective (const Ptr< Objective< Real > > &obj, const Ptr< Constraint< Real > > &con, const Real penaltyParameter, const Vector< Real > &dualOptVec, const Vector< Real > &primConVec, const Vector< Real > &dualConVec, ParameterList &parlist)
 AugmentedLagrangianObjective (const Ptr< Objective< Real > > &obj, const Ptr< Constraint< Real > > &con, const Real penaltyParameter, const Vector< Real > &dualOptVec, const Vector< Real > &primConVec, const Vector< Real > &dualConVec, const bool scaleLagrangian, const int HessianApprox)
void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function.
void setScaling (const Real fscale=1.0, const Real cscale=1.0)
Real value (const Vector< Real > &x, Real &tol)
 Compute value.
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector.
Real getObjectiveValue (const Vector< Real > &x, Real &tol)
const Ptr< const Vector< Real > > getObjectiveGradient (const Vector< Real > &x, Real &tol)
const Ptr< const Vector< Real > > getConstraintVec (const Vector< Real > &x, Real &tol)
int getNumberConstraintEvaluations (void) const
int getNumberFunctionEvaluations (void) const
int getNumberGradientEvaluations (void) const
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, bool flag=true, int iter=-1)
 Update objective function.
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative.
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)
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 void setParameter (const std::vector< Real > &param)

Private Attributes

const Ptr< Objective< Real > > obj_
const Ptr< Constraint< Real > > con_
Real penaltyParameter_
Ptr< Vector< Real > > multiplier_
Ptr< Vector< Real > > dualOptVector_
Ptr< Vector< Real > > dualConVector_
Ptr< Vector< Real > > primConVector_
Ptr< ScalarController< Real, int > > fval_
Ptr< VectorController< Real, int > > gradient_
Ptr< VectorController< Real, int > > conValue_
Real fscale_
Real cscale_
int nfval_
int ngval_
int ncval_
bool scaleLagrangian_
int HessianApprox_

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::ROL::AugmentedLagrangianObjective< Real >

Definition at line 87 of file ROL_Constraint_SerialSimOpt.hpp.

Constructor & Destructor Documentation

◆ AugmentedLagrangianObjective() [1/2]

template<class Real>
ROL::ROL::AugmentedLagrangianObjective< Real >::AugmentedLagrangianObjective ( const Ptr< Objective< Real > > & obj,
const Ptr< Constraint< Real > > & con,
const Real penaltyParameter,
const Vector< Real > & dualOptVec,
const Vector< Real > & primConVec,
const Vector< Real > & dualConVec,
ParameterList & parlist )
inline

Definition at line 120 of file ROL_Constraint_SerialSimOpt.hpp.

◆ AugmentedLagrangianObjective() [2/2]

template<class Real>
ROL::ROL::AugmentedLagrangianObjective< Real >::AugmentedLagrangianObjective ( const Ptr< Objective< Real > > & obj,
const Ptr< Constraint< Real > > & con,
const Real penaltyParameter,
const Vector< Real > & dualOptVec,
const Vector< Real > & primConVec,
const Vector< Real > & dualConVec,
const bool scaleLagrangian,
const int HessianApprox )
inline

Definition at line 144 of file ROL_Constraint_SerialSimOpt.hpp.

Member Function Documentation

◆ update()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective< Real >::update ( const Vector< Real > & x,
UpdateType type,
int iter = -1 )
inlinevirtual

Update objective function.

This function updates the objective function at new iterations.

Parameters
[in]xis the new iterate.
[in]typeis the type of update requested.
[in]iteris the outer algorithm iterations count.

Reimplemented from ROL::ROL::Objective< Real >.

Definition at line 166 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by ROL::ROL::TypeE::AugmentedLagrangianAlgorithm< Real >::initialize().

◆ setScaling()

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

◆ value()

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

Compute value.

This function returns the objective function value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Implements ROL::ROL::Objective< Real >.

Definition at line 179 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gradient()

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

Compute gradient.

This function returns the objective function gradient.

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

The default implementation is a finite-difference approximation based on the function value. This requires the definition of a basis \(\{\phi_i\}\) for the optimization vectors x and the definition of a basis \(\{\psi_j\}\) for the dual optimization vectors (gradient vectors g). The bases must be related through the Riesz map, i.e., \( R \{\phi_i\} = \{\psi_j\}\), and this must be reflected in the implementation of the ROL::Vector::dual() method.

Reimplemented from ROL::ROL::Objective< Real >.

Definition at line 195 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by ROL::ROL::TypeE::AugmentedLagrangianAlgorithm< Real >::initialize(), and ROL::ROL::TypeE::AugmentedLagrangianAlgorithm< Real >::run().

◆ hessVec()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective< 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 objective function 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 objective function computation.

Reimplemented from ROL::ROL::Objective< Real >.

Definition at line 211 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getObjectiveValue()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective< Real >::getObjectiveValue ( const Vector< Real > & x,
Real & tol )
inline

◆ getObjectiveGradient()

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

◆ getConstraintVec()

template<class Real>
const Ptr< const Vector< Real > > ROL::ROL::AugmentedLagrangianObjective< Real >::getConstraintVec ( const Vector< Real > & x,
Real & tol )
inline

◆ getNumberConstraintEvaluations()

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::getNumberConstraintEvaluations ( void ) const
inline

◆ getNumberFunctionEvaluations()

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::getNumberFunctionEvaluations ( void ) const
inline

◆ getNumberGradientEvaluations()

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::getNumberGradientEvaluations ( void ) const
inline

◆ reset()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective< Real >::reset ( const Vector< Real > & multiplier,
const Real penaltyParameter )
inline

Member Data Documentation

◆ obj_

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

Definition at line 90 of file ROL_Constraint_SerialSimOpt.hpp.

◆ con_

template<class Real>
const Ptr<Constraint<Real> > ROL::ROL::AugmentedLagrangianObjective< Real >::con_
private

Definition at line 91 of file ROL_Constraint_SerialSimOpt.hpp.

Referenced by getNumberGradientEvaluations(), and reset().

◆ penaltyParameter_

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

Definition at line 93 of file ROL_Constraint_SerialSimOpt.hpp.

◆ multiplier_

template<class Real>
Ptr<Vector<Real> > ROL::ROL::AugmentedLagrangianObjective< Real >::multiplier_
private

Definition at line 94 of file ROL_Constraint_SerialSimOpt.hpp.

◆ dualOptVector_

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

Definition at line 97 of file ROL_Constraint_SerialSimOpt.hpp.

◆ dualConVector_

template<class Real>
Ptr<Vector<Real> > ROL::ROL::AugmentedLagrangianObjective< Real >::dualConVector_
private

Definition at line 98 of file ROL_Constraint_SerialSimOpt.hpp.

◆ primConVector_

template<class Real>
Ptr<Vector<Real> > ROL::ROL::AugmentedLagrangianObjective< Real >::primConVector_
private

Definition at line 99 of file ROL_Constraint_SerialSimOpt.hpp.

◆ fval_

template<class Real>
Ptr<ScalarController<Real,int> > ROL::ROL::AugmentedLagrangianObjective< Real >::fval_
private

Definition at line 102 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gradient_

template<class Real>
Ptr<VectorController<Real,int> > ROL::ROL::AugmentedLagrangianObjective< Real >::gradient_
private

Definition at line 103 of file ROL_Constraint_SerialSimOpt.hpp.

◆ conValue_

template<class Real>
Ptr<VectorController<Real,int> > ROL::ROL::AugmentedLagrangianObjective< Real >::conValue_
private

Definition at line 104 of file ROL_Constraint_SerialSimOpt.hpp.

◆ fscale_

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

Definition at line 107 of file ROL_Constraint_SerialSimOpt.hpp.

◆ cscale_

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective< Real >::cscale_
private

Definition at line 108 of file ROL_Constraint_SerialSimOpt.hpp.

◆ nfval_

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::nfval_
private

Definition at line 111 of file ROL_Constraint_SerialSimOpt.hpp.

◆ ngval_

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::ngval_
private

Definition at line 112 of file ROL_Constraint_SerialSimOpt.hpp.

◆ ncval_

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::ncval_
private

Definition at line 113 of file ROL_Constraint_SerialSimOpt.hpp.

◆ scaleLagrangian_

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

Definition at line 116 of file ROL_Constraint_SerialSimOpt.hpp.

◆ HessianApprox_

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective< Real >::HessianApprox_
private

Definition at line 117 of file ROL_Constraint_SerialSimOpt.hpp.


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