ROL
Loading...
Searching...
No Matches
ROL::ROL::AugmentedLagrangianObjective2< Real > Class Template Reference

#include <ROL_Constraint_SerialSimOpt.hpp>

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

Public Member Functions

 AugmentedLagrangianObjective2 (const Ptr< Objective< Real > > &obj, const std::vector< Ptr< AugmentedLagrangianPenalty< Real > > > &pen, const Vector< Real > &dualOptVec, ParameterList &parlist)
 AugmentedLagrangianObjective2 (const Ptr< Objective< Real > > &obj, const std::vector< Ptr< AugmentedLagrangianPenalty< Real > > > &pen, const Vector< Real > &dualOptVec, const bool scaleLagrangian)
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function.
void setScaling (const Real fscale=1.0)
void setScaling (const Real cscale, const int k)
Real getScaling (const int k)
virtual Real value (const Vector< Real > &x, Real &tol)
 Compute value.
virtual void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector.
Real dualNorm (const Vector< Real > &x, Real &tol, const int k)
Real dualResidual (const Vector< Real > &x, Real &tol, const int k)
Real feasibility (const Vector< Real > &x, Real &tol, const int k)
void setPenaltyParameter (const Real penaltyParameter, const int k)
Real getPenaltyParameter (const int k)
void setMultiplier (const Vector< Real > &multiplier, const int k)
Real updateMultiplier (const Vector< Real > &x, Real &tol, const int k)
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, const int k)
int getNumberConstraints (void) const
int getNumberConstraintEvaluations (void) const
int getNumberFunctionEvaluations (void) const
int getNumberGradientEvaluations (void) const
void reset (void)
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)
 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 Ptr< Objective< Real > > obj_
const std::vector< Ptr< AugmentedLagrangianPenalty< Real > > > pvec_
Ptr< Vector< Real > > dualOptVector_
Ptr< ScalarController< Real, int > > fval_
Ptr< VectorController< Real, int > > gradient_
Real fscale_
int nfval_
int ngval_
bool scaleLagrangian_

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::AugmentedLagrangianObjective2< Real >

Definition at line 19 of file ROL_Constraint_SerialSimOpt.hpp.

Constructor & Destructor Documentation

◆ AugmentedLagrangianObjective2() [1/2]

template<class Real>
ROL::ROL::AugmentedLagrangianObjective2< Real >::AugmentedLagrangianObjective2 ( const Ptr< Objective< Real > > & obj,
const std::vector< Ptr< AugmentedLagrangianPenalty< Real > > > & pen,
const Vector< Real > & dualOptVec,
ParameterList & parlist )
inline

Definition at line 47 of file ROL_Constraint_SerialSimOpt.hpp.

◆ AugmentedLagrangianObjective2() [2/2]

template<class Real>
ROL::ROL::AugmentedLagrangianObjective2< Real >::AugmentedLagrangianObjective2 ( const Ptr< Objective< Real > > & obj,
const std::vector< Ptr< AugmentedLagrangianPenalty< Real > > > & pen,
const Vector< Real > & dualOptVec,
const bool scaleLagrangian )
inline

Definition at line 62 of file ROL_Constraint_SerialSimOpt.hpp.

Member Function Documentation

◆ update()

template<class Real>
virtual void ROL::ROL::AugmentedLagrangianObjective2< 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 75 of file ROL_Constraint_SerialSimOpt.hpp.

◆ setScaling() [1/2]

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

Definition at line 82 of file ROL_Constraint_SerialSimOpt.hpp.

◆ setScaling() [2/2]

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective2< Real >::setScaling ( const Real cscale,
const int k )
inline

Definition at line 86 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getScaling()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::getScaling ( const int k)
inline

Definition at line 90 of file ROL_Constraint_SerialSimOpt.hpp.

◆ value()

template<class Real>
virtual Real ROL::ROL::AugmentedLagrangianObjective2< 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 94 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gradient()

template<class Real>
virtual void ROL::ROL::AugmentedLagrangianObjective2< 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 104 of file ROL_Constraint_SerialSimOpt.hpp.

◆ hessVec()

template<class Real>
virtual void ROL::ROL::AugmentedLagrangianObjective2< 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 115 of file ROL_Constraint_SerialSimOpt.hpp.

◆ dualNorm()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::dualNorm ( const Vector< Real > & x,
Real & tol,
const int k )
inline

Definition at line 126 of file ROL_Constraint_SerialSimOpt.hpp.

◆ dualResidual()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::dualResidual ( const Vector< Real > & x,
Real & tol,
const int k )
inline

Definition at line 130 of file ROL_Constraint_SerialSimOpt.hpp.

◆ feasibility()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::feasibility ( const Vector< Real > & x,
Real & tol,
const int k )
inline

Definition at line 134 of file ROL_Constraint_SerialSimOpt.hpp.

◆ setPenaltyParameter()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective2< Real >::setPenaltyParameter ( const Real penaltyParameter,
const int k )
inline

Definition at line 138 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getPenaltyParameter()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::getPenaltyParameter ( const int k)
inline

Definition at line 142 of file ROL_Constraint_SerialSimOpt.hpp.

◆ setMultiplier()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective2< Real >::setMultiplier ( const Vector< Real > & multiplier,
const int k )
inline

Definition at line 145 of file ROL_Constraint_SerialSimOpt.hpp.

◆ updateMultiplier()

template<class Real>
Real ROL::ROL::AugmentedLagrangianObjective2< Real >::updateMultiplier ( const Vector< Real > & x,
Real & tol,
const int k )
inline

Definition at line 149 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getObjectiveValue()

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

Definition at line 154 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getObjectiveGradient()

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

Definition at line 166 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getConstraintVec()

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

Definition at line 176 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getNumberConstraints()

template<class Real>
int ROL::ROL::AugmentedLagrangianObjective2< Real >::getNumberConstraints ( void ) const
inline

Definition at line 180 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getNumberConstraintEvaluations()

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

Definition at line 185 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getNumberFunctionEvaluations()

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

Definition at line 193 of file ROL_Constraint_SerialSimOpt.hpp.

◆ getNumberGradientEvaluations()

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

Definition at line 198 of file ROL_Constraint_SerialSimOpt.hpp.

◆ reset()

template<class Real>
void ROL::ROL::AugmentedLagrangianObjective2< Real >::reset ( void )
inline

Definition at line 203 of file ROL_Constraint_SerialSimOpt.hpp.

Member Data Documentation

◆ obj_

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

Definition at line 24 of file ROL_Constraint_SerialSimOpt.hpp.

◆ pvec_

template<class Real>
const std::vector<Ptr<AugmentedLagrangianPenalty<Real> > > ROL::ROL::AugmentedLagrangianObjective2< Real >::pvec_
private

Definition at line 25 of file ROL_Constraint_SerialSimOpt.hpp.

◆ dualOptVector_

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

Definition at line 28 of file ROL_Constraint_SerialSimOpt.hpp.

◆ fval_

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

Definition at line 31 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gradient_

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

Definition at line 32 of file ROL_Constraint_SerialSimOpt.hpp.

◆ fscale_

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

Definition at line 35 of file ROL_Constraint_SerialSimOpt.hpp.

◆ nfval_

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

Definition at line 38 of file ROL_Constraint_SerialSimOpt.hpp.

◆ ngval_

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

Definition at line 39 of file ROL_Constraint_SerialSimOpt.hpp.

◆ scaleLagrangian_

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

Definition at line 42 of file ROL_Constraint_SerialSimOpt.hpp.


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