ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::TypeE::CompositeStepAlgorithm< Real > Class Template Reference

Provides an interface to run equality constrained optimization algorithms using the Composite-Step Trust-Region Sequential Quadratic Programming (SQP) method. More...

#include <ROL_TypeE_CompositeStepAlgorithm.hpp>

+ Inheritance diagram for ROL::TypeE::CompositeStepAlgorithm< Real >:

Public Member Functions

 CompositeStepAlgorithm (ParameterList &list)
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, Constraint< Real > &econ, Vector< Real > &emul, const Vector< Real > &eres, std::ostream &outStream=std::cout) override
 Run algorithm on equality constrained problems (Type-E). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
virtual void writeHeader (std::ostream &os) const override
 Print iterate header. More...
 
virtual void writeName (std::ostream &os) const override
 Print step name. More...
 
virtual void writeOutput (std::ostream &os, const bool print_header=false) const override
 Print iterate status. More...
 
- Public Member Functions inherited from ROL::TypeE::Algorithm< Real >
virtual ~Algorithm ()
 
 Algorithm ()
 Constructor, given a step and a status test. More...
 
void setStatusTest (const Ptr< StatusTest< Real >> &status, bool combineStatus=false)
 
virtual void run (Problem< Real > &problem, std::ostream &outStream=std::cout)
 Run algorithm on equality constrained problems (Type-E). This is the primary Type-E interface. More...
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, Constraint< Real > &econ, Vector< Real > &emul, std::ostream &outStream=std::cout)
 Run algorithm on equality constrained problems (Type-E). This is the primary Type-E interface. More...
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, Constraint< Real > &econ, Vector< Real > &emul, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, std::ostream &outStream=std::cout)
 Run algorithm on equality constrained problems with explicit linear equality constraints (Type-E). This is the primary Type-E with explicit linear equality constraints interface. More...
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, Constraint< Real > &econ, Vector< Real > &emul, const Vector< Real > &eres, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, const Vector< Real > &linear_eres, std::ostream &outStream=std::cout)
 Run algorithm on equality constrained problems with explicit linear equality constraints (Type-E). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
virtual void writeExitStatus (std::ostream &os) const
 
Ptr< const AlgorithmState< Real > > getState () const
 
void reset ()
 

Private Member Functions

void initialize (Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, std::ostream &outStream=std::cout)
 Initialize algorithm by computing a few quantities. More...
 
void computeTrial (Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, std::ostream &os)
 Compute trial step. More...
 
void updateRadius (Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, std::ostream &os)
 Update trust-region radius, take step, etc. More...
 
void computeLagrangeMultiplier (Vector< Real > &l, const Vector< Real > &x, const Vector< Real > &gf, Constraint< Real > &con, std::ostream &os)
 Compute Lagrange multipliers by solving the least-squares problem minimizing the gradient of the Lagrangian, via the augmented system formulation. More...
 
void computeQuasinormalStep (Vector< Real > &n, const Vector< Real > &c, const Vector< Real > &x, Real delta, Constraint< Real > &con, std::ostream &os)
 Compute quasi-normal step by minimizing the norm of the linearized constraint. More...
 
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, std::ostream &os)
 Solve tangential subproblem. More...
 
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, std::ostream &os)
 Check acceptance of subproblem solutions, adjust merit function penalty parameter, ensure global convergence. More...
 
template<typename T >
int sgn (T val) const
 
void printInfoLS (const std::vector< Real > &res, std::ostream &os) const
 
Real setTolOSS (const Real intol) const
 

Private Attributes

ParameterList list_
 
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_
 
int verbosity_
 
bool printHeader_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::TypeE::Algorithm< Real >
void initialize (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &mul, const Vector< Real > &c)
 
- Protected Attributes inherited from ROL::TypeE::Algorithm< Real >
const Ptr< CombinedStatusTest
< Real > > 
status_
 
const Ptr< AlgorithmState< Real > > state_
 

Detailed Description

template<typename Real>
class ROL::TypeE::CompositeStepAlgorithm< Real >

Provides an interface to run equality constrained optimization algorithms using the Composite-Step Trust-Region Sequential Quadratic Programming (SQP) method.

Definition at line 59 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

Constructor & Destructor Documentation

template<typename Real >
ROL::TypeE::CompositeStepAlgorithm< Real >::CompositeStepAlgorithm ( ParameterList &  list)

Definition at line 51 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

References ROL::TypeE::CompositeStepAlgorithm< Real >::Delta_, ROL::TypeE::CompositeStepAlgorithm< Real >::eta_, ROL::TypeE::CompositeStepAlgorithm< Real >::flagAC_, ROL::TypeE::CompositeStepAlgorithm< Real >::flagCG_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoAC_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoALL_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoLM_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoLS_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoQN_, ROL::TypeE::CompositeStepAlgorithm< Real >::infoTS_, ROL::TypeE::CompositeStepAlgorithm< Real >::iterCG_, ROL::TypeE::CompositeStepAlgorithm< Real >::list_, ROL::TypeE::CompositeStepAlgorithm< Real >::lmhtol_, ROL::TypeE::CompositeStepAlgorithm< Real >::maxiterCG_, ROL::TypeE::CompositeStepAlgorithm< Real >::nnorm_, ROL::TypeE::CompositeStepAlgorithm< Real >::penalty_, ROL::TypeE::CompositeStepAlgorithm< Real >::pgtol_, ROL::TypeE::CompositeStepAlgorithm< Real >::printHeader_, ROL::TypeE::CompositeStepAlgorithm< Real >::projtol_, ROL::TypeE::CompositeStepAlgorithm< Real >::qntol_, ROL::TypeE::CompositeStepAlgorithm< Real >::snorm_, ROL::TypeE::Algorithm< Real >::status_, ROL::TypeE::CompositeStepAlgorithm< Real >::tangtol_, ROL::TypeE::CompositeStepAlgorithm< Real >::tnorm_, ROL::TypeE::CompositeStepAlgorithm< Real >::tntmax_, ROL::TypeE::CompositeStepAlgorithm< Real >::tolCG_, ROL::TypeE::CompositeStepAlgorithm< Real >::tolOSS_, ROL::TypeE::CompositeStepAlgorithm< Real >::tolOSSfixed_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalCallLS_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalIterCG_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalIterLS_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalNegCurv_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalProj_, ROL::TypeE::CompositeStepAlgorithm< Real >::totalRef_, ROL::TypeE::CompositeStepAlgorithm< Real >::useConHess_, ROL::TypeE::CompositeStepAlgorithm< Real >::verbosity_, zero, and ROL::TypeE::CompositeStepAlgorithm< Real >::zeta_.

Member Function Documentation

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::initialize ( Vector< Real > &  x,
const Vector< Real > &  g,
Vector< Real > &  l,
const Vector< Real > &  c,
Objective< Real > &  obj,
Constraint< Real > &  con,
std::ostream &  outStream = std::cout 
)
private
template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::computeTrial ( Vector< Real > &  s,
const Vector< Real > &  x,
const Vector< Real > &  l,
Objective< Real > &  obj,
Constraint< Real > &  con,
std::ostream &  os 
)
private
template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::updateRadius ( Vector< Real > &  x,
Vector< Real > &  l,
const Vector< Real > &  s,
Objective< Real > &  obj,
Constraint< Real > &  con,
std::ostream &  os 
)
private
template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::computeLagrangeMultiplier ( Vector< Real > &  l,
const Vector< Real > &  x,
const Vector< Real > &  gf,
Constraint< Real > &  con,
std::ostream &  os 
)
private

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

Definition at line 167 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

References ROL::Constraint< Real >::applyAdjointJacobian(), ROL::Vector< Real >::plus(), and ROL::Constraint< Real >::solveAugmentedSystem().

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::computeQuasinormalStep ( Vector< Real > &  n,
const Vector< Real > &  c,
const Vector< Real > &  x,
Real  delta,
Constraint< Real > &  con,
std::ostream &  os 
)
private

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 217 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

References ROL::Constraint< Real >::applyAdjointJacobian(), ROL::Constraint< Real >::applyJacobian(), ROL::Vector< Real >::axpy(), ROL::Vector< Real >::dual(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), ROL::Constraint< Real >::solveAugmentedSystem(), and zero.

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< 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,
std::ostream &  os 
)
private

Solve tangential subproblem.

Parameters
[out]tis the solution of the tangential subproblem; an optimization-space vector
[out]tCPis the Cauchy point for the tangential subproblem; an optimization-space vector
[out]Wgis the dual of the projected gradient of the Lagrangian; an optimization-space vector
[in]xis the current iterate; an optimization-space vector
[in]gis the gradient of the Lagrangian; a dual optimization-space vector
[in]nis the quasi-normal step; an optimization-space vector
[in]lis the Lagrange multiplier; a dual constraint-space vector
[in]deltais the trust-region radius for the tangential subproblem
[in]objis the objective function
[in]conis the equality constraint object

Definition at line 320 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

References ROL::Constraint< Real >::applyAdjointHessian(), ROL::Constraint< Real >::applyJacobian(), ROL::Vector< Real >::dot(), ROL::Vector< Real >::dual(), ROL::Objective< Real >::hessVec(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::plus(), ROL::Vector< Real >::set(), ROL::Constraint< Real >::solveAugmentedSystem(), zero, and ROL::Vector< Real >::zero().

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< 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,
std::ostream &  os 
)
private
template<typename Real >
template<typename T >
int ROL::TypeE::CompositeStepAlgorithm< Real >::sgn ( val) const
private

Definition at line 1193 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::printInfoLS ( const std::vector< Real > &  res,
std::ostream &  os 
) const
private

Definition at line 1199 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

template<typename Real >
Real ROL::TypeE::CompositeStepAlgorithm< Real >::setTolOSS ( const Real  intol) const
private

Definition at line 1215 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
Constraint< Real > &  econ,
Vector< Real > &  emul,
const Vector< Real > &  eres,
std::ostream &  outStream = std::cout 
)
overridevirtual

Run algorithm on equality constrained problems (Type-E). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.

Implements ROL::TypeE::Algorithm< Real >.

Definition at line 1064 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

References ROL::Vector< Real >::clone(), and ROL::TypeE::Algorithm< Real >::writeExitStatus().

Referenced by main().

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::writeHeader ( std::ostream &  os) const
overridevirtual

Print iterate header.

Reimplemented from ROL::TypeE::Algorithm< Real >.

Definition at line 1093 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::writeName ( std::ostream &  os) const
overridevirtual

Print step name.

Reimplemented from ROL::TypeE::Algorithm< Real >.

Definition at line 1135 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeE::CompositeStepAlgorithm< Real >::writeOutput ( std::ostream &  os,
const bool  write_header = false 
) const
overridevirtual

Print iterate status.

Reimplemented from ROL::TypeE::Algorithm< Real >.

Definition at line 1144 of file ROL_TypeE_CompositeStepAlgorithm_Def.hpp.

Member Data Documentation

template<typename Real>
ParameterList ROL::TypeE::CompositeStepAlgorithm< Real >::list_
private
template<typename Real>
ROL::Ptr<Vector<Real> > ROL::TypeE::CompositeStepAlgorithm< Real >::xvec_
private

Definition at line 65 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
ROL::Ptr<Vector<Real> > ROL::TypeE::CompositeStepAlgorithm< Real >::gvec_
private

Definition at line 66 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
ROL::Ptr<Vector<Real> > ROL::TypeE::CompositeStepAlgorithm< Real >::cvec_
private

Definition at line 67 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
ROL::Ptr<Vector<Real> > ROL::TypeE::CompositeStepAlgorithm< Real >::lvec_
private

Definition at line 68 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::flagCG_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::flagAC_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::iterCG_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::maxiterCG_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::maxiterOSS_
private

Definition at line 77 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::tolCG_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::tolOSS_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::tolOSSfixed_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::lmhtol_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::qntol_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::pgtol_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::projtol_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::tangtol_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::tntmax_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::zeta_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::Delta_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::penalty_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::eta_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::useConHess_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::ared_
private

Definition at line 97 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::pred_
private

Definition at line 98 of file ROL_TypeE_CompositeStepAlgorithm.hpp.

template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::snorm_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::nnorm_
private
template<typename Real>
Real ROL::TypeE::CompositeStepAlgorithm< Real >::tnorm_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoQN_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoLM_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoTS_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoAC_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoLS_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::infoALL_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalIterCG_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalProj_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalNegCurv_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalRef_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalCallLS_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::totalIterLS_
private
template<typename Real>
int ROL::TypeE::CompositeStepAlgorithm< Real >::verbosity_
private
template<typename Real>
bool ROL::TypeE::CompositeStepAlgorithm< Real >::printHeader_
private

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