ROL
ROL::CompositeStep< Real > Class Template Reference

Implements the computation of optimization steps with composite-step trust-region methods. More...

#include <ROL_CompositeStep.hpp>

Inheritance diagram for ROL::CompositeStep< Real >:

Public Member Functions

virtual ~CompositeStep ()
 CompositeStep (ROL::ParameterList &parlist)
void initialize (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
 Initialize step.
void compute (Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
 Compute step.
void update (Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
 Update step, if successful.
void compute (Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
 Compute step for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.
void update (Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
 Update step, for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.
std::string printHeader (void) const
 Print iterate header.
std::string printName (void) const
 Print step name.
std::string print (AlgorithmState< Real > &algo_state, bool pHeader=false) const
 Print iterate status.
void computeLagrangeMultiplier (Vector< Real > &l, const Vector< Real > &x, const Vector< Real > &gf, Constraint< Real > &con)
 Compute Lagrange multipliers by solving the least-squares problem minimizing the gradient of the Lagrangian, via the augmented system formulation.
void computeQuasinormalStep (Vector< Real > &n, const Vector< Real > &c, const Vector< Real > &x, Real delta, Constraint< Real > &con)
 Compute quasi-normal step by minimizing the norm of the linearized constraint.
void solveTangentialSubproblem (Vector< Real > &t, Vector< Real > &tCP, Vector< Real > &Wg, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &n, const Vector< Real > &l, Real delta, Objective< Real > &obj, Constraint< Real > &con)
 Solve tangential subproblem.
void accept (Vector< Real > &s, Vector< Real > &n, Vector< Real > &t, Real f_new, Vector< Real > &c_new, Vector< Real > &gf_new, Vector< Real > &l_new, Vector< Real > &g_new, const Vector< Real > &x, const Vector< Real > &l, Real f, const Vector< Real > &gf, const Vector< Real > &c, const Vector< Real > &g, Vector< Real > &tCP, Vector< Real > &Wg, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
 Check acceptance of subproblem solutions, adjust merit function penalty parameter, ensure global convergence.
Public Member Functions inherited from ROL::Step< Real >
virtual ~Step ()
 Step (void)
virtual void initialize (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
 Initialize step with bound constraint.
virtual void initialize (Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
 Initialize step with bound constraint.
virtual void initialize (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
 Initialize step with equality constraint.
virtual void compute (Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
 Compute step (equality constraints).
virtual void update (Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, BoundConstraint< Real > &bnd, AlgorithmState< Real > &algo_state)
 Update step, if successful (equality constraints).
const ROL::Ptr< const StepState< Real > > getStepState (void) const
 Get state for step object.
void reset (const Real searchSize=1.0)
 Get state for step object.

Private Member Functions

template<typename T>
int sgn (T val)
void printInfoLS (const std::vector< Real > &res) const
Real setTolOSS (const Real intol) const

Private Attributes

ROL::Ptr< Vector< Real > > xvec_
ROL::Ptr< Vector< Real > > gvec_
ROL::Ptr< Vector< Real > > cvec_
ROL::Ptr< Vector< Real > > lvec_
int flagCG_
int flagAC_
int iterCG_
int maxiterCG_
int maxiterOSS_
Real tolCG_
Real tolOSS_
bool tolOSSfixed_
Real lmhtol_
Real qntol_
Real pgtol_
Real projtol_
Real tangtol_
Real tntmax_
Real zeta_
Real Delta_
Real penalty_
Real eta_
bool useConHess_
Real ared_
Real pred_
Real snorm_
Real nnorm_
Real tnorm_
bool infoQN_
bool infoLM_
bool infoTS_
bool infoAC_
bool infoLS_
bool infoALL_
int totalIterCG_
int totalProj_
int totalNegCurv_
int totalRef_
int totalCallLS_
int totalIterLS_

Additional Inherited Members

Protected Member Functions inherited from ROL::Step< Real >
ROL::Ptr< StepState< Real > > getState (void)

Detailed Description

template<class Real>
class ROL::CompositeStep< Real >

Implements the computation of optimization steps with composite-step trust-region methods.

Definition at line 29 of file ROL_CompositeStep.hpp.

Constructor & Destructor Documentation

◆ ~CompositeStep()

template<class Real>
virtual ROL::CompositeStep< Real >::~CompositeStep ( )
inlinevirtual

Definition at line 114 of file ROL_CompositeStep.hpp.

◆ CompositeStep()

Member Function Documentation

◆ sgn()

template<class Real>
template<typename T>
int ROL::CompositeStep< Real >::sgn ( T val)
inlineprivate

Definition at line 87 of file ROL_CompositeStep.hpp.

Referenced by solveTangentialSubproblem().

◆ printInfoLS()

template<class Real>
void ROL::CompositeStep< Real >::printInfoLS ( const std::vector< Real > & res) const
inlineprivate

◆ setTolOSS()

template<class Real>
Real ROL::CompositeStep< Real >::setTolOSS ( const Real intol) const
inlineprivate

◆ initialize()

◆ compute() [1/2]

◆ update() [1/2]

◆ compute() [2/2]

template<class Real>
void ROL::CompositeStep< Real >::compute ( Vector< Real > & s,
const Vector< Real > & x,
Objective< Real > & obj,
BoundConstraint< Real > & con,
AlgorithmState< Real > & algo_state )
inlinevirtual

Compute step for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.

Reimplemented from ROL::Step< Real >.

Definition at line 338 of file ROL_CompositeStep.hpp.

◆ update() [2/2]

template<class Real>
void ROL::CompositeStep< Real >::update ( Vector< Real > & x,
const Vector< Real > & s,
Objective< Real > & obj,
BoundConstraint< Real > & con,
AlgorithmState< Real > & algo_state )
inlinevirtual

Update step, for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.

Reimplemented from ROL::Step< Real >.

Definition at line 345 of file ROL_CompositeStep.hpp.

◆ printHeader()

template<class Real>
std::string ROL::CompositeStep< Real >::printHeader ( void ) const
inlinevirtual

Print iterate header.

Reimplemented from ROL::Step< Real >.

Definition at line 351 of file ROL_CompositeStep.hpp.

Referenced by print().

◆ printName()

template<class Real>
std::string ROL::CompositeStep< Real >::printName ( void ) const
inlinevirtual

Print step name.

Reimplemented from ROL::Step< Real >.

Definition at line 372 of file ROL_CompositeStep.hpp.

Referenced by print().

◆ print()

◆ computeLagrangeMultiplier()

template<class Real>
void ROL::CompositeStep< Real >::computeLagrangeMultiplier ( Vector< Real > & l,
const Vector< Real > & x,
const Vector< Real > & gf,
Constraint< Real > & con )
inline

Compute Lagrange multipliers by solving the least-squares problem minimizing the gradient of the Lagrangian, via the augmented system formulation.

Parameters
[out]lis the updated Lagrange multiplier; a dual constraint-space vector
[in]xis the current iterate; an optimization-space vector
[in]gfis the gradient of the objective function; a dual optimization-space vector
[in]conis the equality constraint object

On return ... fill the blanks.

Definition at line 434 of file ROL_CompositeStep.hpp.

References ROL::Constraint< Real >::applyAdjointJacobian(), cvec_, gvec_, infoLM_, lmhtol_, lvec_, ROL::Vector< Real >::plus(), printInfoLS(), ROL::ROL_EPSILON(), setTolOSS(), ROL::Constraint< Real >::solveAugmentedSystem(), totalCallLS_, totalIterLS_, and xvec_.

Referenced by accept(), initialize(), and update().

◆ computeQuasinormalStep()

template<class Real>
void ROL::CompositeStep< Real >::computeQuasinormalStep ( Vector< Real > & n,
const Vector< Real > & c,
const Vector< Real > & x,
Real delta,
Constraint< Real > & con )
inline

Compute quasi-normal step by minimizing the norm of the linearized constraint.

Compute an approximate solution of the problem

\[ \begin{array}{rl} \min_{n} & \|c'(x_k)n + c(x_k)\|^2_{\mathcal{X}} \\ \mbox{subject to} & \|n\|_{\mathcal{X}} \le \delta \end{array} \]

The approximate solution is computed using Powell's dogleg method. The dogleg path is computed using the Cauchy point and a full Newton step. The path's intersection with the trust-region constraint gives the quasi-normal step.

Parameters
[out]nis the quasi-normal step; an optimization-space vector
[in]cis the value of equality constraints; a constraint-space vector
[in]xis the current iterate; an optimization-space vector
[in]deltais the trust-region radius for the quasi-normal step
[in]conis the equality constraint object

Definition at line 501 of file ROL_CompositeStep.hpp.

References ROL::Constraint< Real >::applyAdjointJacobian(), ROL::Constraint< Real >::applyJacobian(), ROL::Vector< Real >::axpy(), cvec_, ROL::Vector< Real >::dual(), gvec_, infoQN_, lvec_, printInfoLS(), qntol_, ROL::ROL_EPSILON(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), setTolOSS(), ROL::Constraint< Real >::solveAugmentedSystem(), totalCallLS_, totalIterLS_, xvec_, and zero.

Referenced by accept(), and compute().

◆ solveTangentialSubproblem()

template<class Real>
void ROL::CompositeStep< Real >::solveTangentialSubproblem ( Vector< Real > & t,
Vector< Real > & tCP,
Vector< Real > & Wg,
const Vector< Real > & x,
const Vector< Real > & g,
const Vector< Real > & n,
const Vector< Real > & l,
Real delta,
Objective< Real > & obj,
Constraint< Real > & con )
inline

Solve tangential subproblem.

  @param[out]      t     is the solution of the tangential subproblem; an optimization-space vector
  @param[out]      tCP   is the Cauchy point for the tangential subproblem; an optimization-space vector
  @param[out]      Wg    is the dual of the projected gradient of the Lagrangian; an optimization-space vector
  @param[in]       x     is the current iterate; an optimization-space vector
  @param[in]       g     is the gradient of the Lagrangian; a dual optimization-space vector
  @param[in]       n     is the quasi-normal step; an optimization-space vector
  @param[in]       l     is the Lagrange multiplier; a dual constraint-space vector
  @param[in]       delta is the trust-region radius for the tangential subproblem
  @param[in]       con   is the equality constraint object

Definition at line 611 of file ROL_CompositeStep.hpp.

References ROL::Constraint< Real >::applyAdjointHessian(), ROL::Constraint< Real >::applyJacobian(), cvec_, ROL::Vector< Real >::dot(), ROL::Vector< Real >::dual(), flagCG_, gvec_, ROL::Objective< Real >::hessVec(), infoTS_, iterCG_, lvec_, maxiterCG_, ROL::Vector< Real >::norm(), pgtol_, ROL::Vector< Real >::plus(), printInfoLS(), projtol_, ROL::ROL_EPSILON(), ROL::Vector< Real >::set(), setTolOSS(), sgn(), ROL::Constraint< Real >::solveAugmentedSystem(), tolCG_, totalCallLS_, totalIterLS_, useConHess_, xvec_, ROL::Vector< Real >::zero(), and zero.

Referenced by accept(), and compute().

◆ accept()

template<class Real>
void ROL::CompositeStep< Real >::accept ( Vector< Real > & s,
Vector< Real > & n,
Vector< Real > & t,
Real f_new,
Vector< Real > & c_new,
Vector< Real > & gf_new,
Vector< Real > & l_new,
Vector< Real > & g_new,
const Vector< Real > & x,
const Vector< Real > & l,
Real f,
const Vector< Real > & gf,
const Vector< Real > & c,
const Vector< Real > & g,
Vector< Real > & tCP,
Vector< Real > & Wg,
Objective< Real > & obj,
Constraint< Real > & con,
AlgorithmState< Real > & algo_state )
inline

Member Data Documentation

◆ xvec_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::CompositeStep< Real >::xvec_
private

◆ gvec_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::CompositeStep< Real >::gvec_
private

◆ cvec_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::CompositeStep< Real >::cvec_
private

◆ lvec_

template<class Real>
ROL::Ptr<Vector<Real> > ROL::CompositeStep< Real >::lvec_
private

◆ flagCG_

template<class Real>
int ROL::CompositeStep< Real >::flagCG_
private

Definition at line 39 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), print(), and solveTangentialSubproblem().

◆ flagAC_

template<class Real>
int ROL::CompositeStep< Real >::flagAC_
private

Definition at line 40 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), print(), and update().

◆ iterCG_

template<class Real>
int ROL::CompositeStep< Real >::iterCG_
private

◆ maxiterCG_

template<class Real>
int ROL::CompositeStep< Real >::maxiterCG_
private

Definition at line 44 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and solveTangentialSubproblem().

◆ maxiterOSS_

template<class Real>
int ROL::CompositeStep< Real >::maxiterOSS_
private

Definition at line 45 of file ROL_CompositeStep.hpp.

◆ tolCG_

template<class Real>
Real ROL::CompositeStep< Real >::tolCG_
private

Definition at line 46 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and solveTangentialSubproblem().

◆ tolOSS_

template<class Real>
Real ROL::CompositeStep< Real >::tolOSS_
private

Definition at line 47 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and setTolOSS().

◆ tolOSSfixed_

template<class Real>
bool ROL::CompositeStep< Real >::tolOSSfixed_
private

Definition at line 48 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and setTolOSS().

◆ lmhtol_

template<class Real>
Real ROL::CompositeStep< Real >::lmhtol_
private

Definition at line 51 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and computeLagrangeMultiplier().

◆ qntol_

template<class Real>
Real ROL::CompositeStep< Real >::qntol_
private

Definition at line 52 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and computeQuasinormalStep().

◆ pgtol_

template<class Real>
Real ROL::CompositeStep< Real >::pgtol_
private

Definition at line 53 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and solveTangentialSubproblem().

◆ projtol_

template<class Real>
Real ROL::CompositeStep< Real >::projtol_
private

Definition at line 54 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and solveTangentialSubproblem().

◆ tangtol_

template<class Real>
Real ROL::CompositeStep< Real >::tangtol_
private

Definition at line 55 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ tntmax_

template<class Real>
Real ROL::CompositeStep< Real >::tntmax_
private

Definition at line 56 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ zeta_

template<class Real>
Real ROL::CompositeStep< Real >::zeta_
private

Definition at line 59 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and compute().

◆ Delta_

template<class Real>
Real ROL::CompositeStep< Real >::Delta_
private

Definition at line 60 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), compute(), print(), and update().

◆ penalty_

template<class Real>
Real ROL::CompositeStep< Real >::penalty_
private

Definition at line 61 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ eta_

template<class Real>
Real ROL::CompositeStep< Real >::eta_
private

Definition at line 62 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and update().

◆ useConHess_

template<class Real>
bool ROL::CompositeStep< Real >::useConHess_
private

Definition at line 63 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and solveTangentialSubproblem().

◆ ared_

template<class Real>
Real ROL::CompositeStep< Real >::ared_
private

Definition at line 65 of file ROL_CompositeStep.hpp.

Referenced by accept(), and update().

◆ pred_

template<class Real>
Real ROL::CompositeStep< Real >::pred_
private

Definition at line 66 of file ROL_CompositeStep.hpp.

Referenced by accept(), and update().

◆ snorm_

template<class Real>
Real ROL::CompositeStep< Real >::snorm_
private

Definition at line 67 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and update().

◆ nnorm_

template<class Real>
Real ROL::CompositeStep< Real >::nnorm_
private

Definition at line 68 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), print(), and update().

◆ tnorm_

template<class Real>
Real ROL::CompositeStep< Real >::tnorm_
private

Definition at line 69 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), print(), and update().

◆ infoQN_

template<class Real>
bool ROL::CompositeStep< Real >::infoQN_
private

Definition at line 72 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and computeQuasinormalStep().

◆ infoLM_

template<class Real>
bool ROL::CompositeStep< Real >::infoLM_
private

Definition at line 73 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and computeLagrangeMultiplier().

◆ infoTS_

template<class Real>
bool ROL::CompositeStep< Real >::infoTS_
private

Definition at line 74 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and solveTangentialSubproblem().

◆ infoAC_

template<class Real>
bool ROL::CompositeStep< Real >::infoAC_
private

Definition at line 75 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ infoLS_

template<class Real>
bool ROL::CompositeStep< Real >::infoLS_
private

Definition at line 76 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep(), and printInfoLS().

◆ infoALL_

template<class Real>
bool ROL::CompositeStep< Real >::infoALL_
private

Definition at line 77 of file ROL_CompositeStep.hpp.

Referenced by CompositeStep().

◆ totalIterCG_

template<class Real>
int ROL::CompositeStep< Real >::totalIterCG_
private

Definition at line 80 of file ROL_CompositeStep.hpp.

Referenced by accept(), CompositeStep(), and compute().

◆ totalProj_

template<class Real>
int ROL::CompositeStep< Real >::totalProj_
private

Definition at line 81 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ totalNegCurv_

template<class Real>
int ROL::CompositeStep< Real >::totalNegCurv_
private

Definition at line 82 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ totalRef_

template<class Real>
int ROL::CompositeStep< Real >::totalRef_
private

Definition at line 83 of file ROL_CompositeStep.hpp.

Referenced by accept(), and CompositeStep().

◆ totalCallLS_

template<class Real>
int ROL::CompositeStep< Real >::totalCallLS_
private

◆ totalIterLS_

template<class Real>
int ROL::CompositeStep< Real >::totalIterLS_
private

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