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

Provides an interface to run the trust-region algorithm of Kelley and Sachs. More...

#include <ROL_TypeB_KelleySachsAlgorithm.hpp>

+ Inheritance diagram for ROL::TypeB::KelleySachsAlgorithm< Real >:

Public Member Functions

 KelleySachsAlgorithm (ParameterList &list, const Ptr< Secant< Real >> &secant=nullPtr)
 
void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) override
 Run algorithm on bound constrained problems (Type-B). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
void run (Problem< Real > &problem, std::ostream &outStream=std::cout) override
 Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface. More...
 
void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, const Vector< Real > &linear_eres, std::ostream &outStream=std::cout) override
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
void writeHeader (std::ostream &os) const override
 Print iterate header. More...
 
void writeName (std::ostream &os) const override
 Print step name. More...
 
void writeOutput (std::ostream &os, const bool write_header=false) const override
 Print iterate status. More...
 
- Public Member Functions inherited from ROL::TypeB::Algorithm< Real >
virtual ~Algorithm ()
 
 Algorithm ()
 Constructor, given a step and a status test. More...
 
void setStatusTest (const Ptr< StatusTest< Real >> &status, const bool combineStatus=false)
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface. More...
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This is the primary Type-B with explicit linear constraints interface. More...
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_icon, Vector< Real > &linear_imul, BoundConstraint< Real > &linear_ibnd, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This is the primary Type-B with explicit linear constraints interface. More...
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_icon, Vector< Real > &linear_imul, BoundConstraint< Real > &linear_ibnd, const Vector< Real > &linear_ires, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method. More...
 
virtual void run (Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, Constraint< Real > &linear_icon, Vector< Real > &linear_imul, BoundConstraint< Real > &linear_ibnd, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This is the primary Type-B with explicit linear constraints interface. More...
 
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &linear_econ, Vector< Real > &linear_emul, const Vector< Real > &linear_eres, Constraint< Real > &linear_icon, Vector< Real > &linear_imul, BoundConstraint< Real > &linear_ibnd, const Vector< Real > &linear_ires, std::ostream &outStream=std::cout)
 Run algorithm on bound constrained problems with explicit linear constraints (Type-B). 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, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout)
 
Real trqsol (const Real xtx, const Real ptp, const Real ptx, const Real del) const
 
Real trpcg (Vector< Real > &w, int &iflag, int &iter, const Vector< Real > &g, const Vector< Real > &x, const Vector< Real > &g0, const Real del, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, Real eps, const Real tol, const int itermax, Vector< Real > &p, Vector< Real > &q, Vector< Real > &r, Vector< Real > &t, Vector< Real > &pwa, Vector< Real > &dwa, std::ostream &outStream=std::cout) const
 
void applyFreeHessian (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, Real eps, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &pwa, Vector< Real > &dwa) const
 
void applyFreePrecond (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, Real eps, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &pwa, Vector< Real > &dwa) const
 

Private Attributes

Ptr< TrustRegionModel_U< Real > > model_
 Container for trust-region model. More...
 
Real delMax_
 Maximum trust-region radius (default: ROL_INF) More...
 
Real eta0_
 Step acceptance threshold (default: 0.05) More...
 
Real eta1_
 Radius decrease threshold (default: 0.05) More...
 
Real eta2_
 Radius increase threshold (default: 0.9) More...
 
Real gamma0_
 Radius decrease rate (negative rho) (default: 0.0625) More...
 
Real gamma1_
 Radius decrease rate (positive rho) (default: 0.25) More...
 
Real gamma2_
 Radius increase rate (default: 2.5) More...
 
Real TRsafe_
 Safeguard size for numerically evaluating ratio (default: 1e2) More...
 
Real eps_
 Safeguard for numerically evaluating ratio. More...
 
TRUtils::ETRFlag TRflag_
 Trust-region exit flag. More...
 
int SPflag_
 Subproblem solver termination flag. More...
 
int SPiter_
 Subproblem solver iteration count. More...
 
ESecant esec_
 Secant type (default: Limited-Memory BFGS) More...
 
bool useSecantPrecond_
 Flag to use secant as a preconditioner (default: false) More...
 
bool useSecantHessVec_
 Flag to use secant as Hessian (default: false) More...
 
int maxit_
 Maximum number of CG iterations (default: 20) More...
 
Real tol1_
 Absolute tolerance for truncated CG (default: 1e-4) More...
 
Real tol2_
 Relative tolerance for truncated CG (default: 1e-2) More...
 
int minit_
 Maximum number of minor (subproblem solve) iterations (default: 10) More...
 
Real mu0_
 Sufficient decrease parameter (default: 1e-2) More...
 
Real mu1_
 Sufficient decrease parameter postsmoothing (default: 0.9999) More...
 
Real eps0_
 Epsilon binding set tolerance (default: 1e-3) More...
 
Real beta_
 Projected search backtracking rate (default: 1e-2) More...
 
Real alpha0_
 Initial step size for projected search (default: 1) More...
 
int nhess_
 Number of Hessian applications. More...
 
unsigned verbosity_
 Output level (default: 0) More...
 
bool writeHeader_
 Flag to write header at every iteration. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::TypeB::Algorithm< Real >
void initialize (const Vector< Real > &x, const Vector< Real > &g)
 
Real optimalityCriterion (const Vector< Real > &x, const Vector< Real > &g, Vector< Real > &primal, std::ostream &outStream=std::cout) const
 
- Protected Attributes inherited from ROL::TypeB::Algorithm< Real >
const Ptr< CombinedStatusTest
< Real > > 
status_
 
const Ptr< AlgorithmState< Real > > state_
 
Ptr< PolyhedralProjection< Real > > proj_
 

Detailed Description

template<typename Real>
class ROL::TypeB::KelleySachsAlgorithm< Real >

Provides an interface to run the trust-region algorithm of Kelley and Sachs.

Definition at line 61 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

Constructor & Destructor Documentation

template<typename Real >
ROL::TypeB::KelleySachsAlgorithm< Real >::KelleySachsAlgorithm ( ParameterList &  list,
const Ptr< Secant< Real >> &  secant = nullPtr 
)

Definition at line 51 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

References ROL::StringToESecant().

Member Function Documentation

template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
std::ostream &  outStream = std::cout 
)
overridevirtual
template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::run ( Problem< Real > &  problem,
std::ostream &  outStream = std::cout 
)
overridevirtual

Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface.

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

Definition at line 291 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

References ROL::Problem< Real >::getPolyhedralProjection(), and ROL::TypeB::Algorithm< Real >::run().

template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::run ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
Constraint< Real > &  linear_econ,
Vector< Real > &  linear_emul,
const Vector< Real > &  linear_eres,
std::ostream &  outStream = std::cout 
)
overridevirtual

Run algorithm on bound constrained problems with explicit linear constraints (Type-B). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.

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

Definition at line 302 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::writeHeader ( std::ostream &  os) const
overridevirtual
template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::writeName ( std::ostream &  os) const
overridevirtual

Print step name.

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

Definition at line 533 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

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

Print iterate status.

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

Definition at line 540 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::initialize ( Vector< Real > &  x,
const Vector< Real > &  g,
Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
std::ostream &  outStream = std::cout 
)
private
template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::trqsol ( const Real  xtx,
const Real  ptp,
const Real  ptx,
const Real  del 
) const
private

Definition at line 314 of file ROL_TypeB_KelleySachsAlgorithm_Def.hpp.

References zero.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::trpcg ( Vector< Real > &  w,
int &  iflag,
int &  iter,
const Vector< Real > &  g,
const Vector< Real > &  x,
const Vector< Real > &  g0,
const Real  del,
TrustRegionModel_U< Real > &  model,
BoundConstraint< Real > &  bnd,
Real  eps,
const Real  tol,
const int  itermax,
Vector< Real > &  p,
Vector< Real > &  q,
Vector< Real > &  r,
Vector< Real > &  t,
Vector< Real > &  pwa,
Vector< Real > &  dwa,
std::ostream &  outStream = std::cout 
) const
private
template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::applyFreeHessian ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
const Vector< Real > &  g,
Real  eps,
TrustRegionModel_U< Real > &  model,
BoundConstraint< Real > &  bnd,
Real &  tol,
Vector< Real > &  pwa,
Vector< Real > &  dwa 
) const
private
template<typename Real >
void ROL::TypeB::KelleySachsAlgorithm< Real >::applyFreePrecond ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
const Vector< Real > &  g,
Real  eps,
TrustRegionModel_U< Real > &  model,
BoundConstraint< Real > &  bnd,
Real &  tol,
Vector< Real > &  pwa,
Vector< Real > &  dwa 
) const
private

Member Data Documentation

template<typename Real >
Ptr<TrustRegionModel_U<Real> > ROL::TypeB::KelleySachsAlgorithm< Real >::model_
private

Container for trust-region model.

Definition at line 63 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::delMax_
private

Maximum trust-region radius (default: ROL_INF)

Definition at line 66 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::eta0_
private

Step acceptance threshold (default: 0.05)

Definition at line 67 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::eta1_
private

Radius decrease threshold (default: 0.05)

Definition at line 68 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::eta2_
private

Radius increase threshold (default: 0.9)

Definition at line 69 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::gamma0_
private

Radius decrease rate (negative rho) (default: 0.0625)

Definition at line 70 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::gamma1_
private

Radius decrease rate (positive rho) (default: 0.25)

Definition at line 71 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::gamma2_
private

Radius increase rate (default: 2.5)

Definition at line 72 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::TRsafe_
private

Safeguard size for numerically evaluating ratio (default: 1e2)

Definition at line 73 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::eps_
private

Safeguard for numerically evaluating ratio.

Definition at line 74 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
TRUtils::ETRFlag ROL::TypeB::KelleySachsAlgorithm< Real >::TRflag_
private

Trust-region exit flag.

Definition at line 77 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
int ROL::TypeB::KelleySachsAlgorithm< Real >::SPflag_
private

Subproblem solver termination flag.

Definition at line 78 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
int ROL::TypeB::KelleySachsAlgorithm< Real >::SPiter_
private

Subproblem solver iteration count.

Definition at line 79 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
ESecant ROL::TypeB::KelleySachsAlgorithm< Real >::esec_
private

Secant type (default: Limited-Memory BFGS)

Definition at line 82 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
bool ROL::TypeB::KelleySachsAlgorithm< Real >::useSecantPrecond_
private

Flag to use secant as a preconditioner (default: false)

Definition at line 83 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
bool ROL::TypeB::KelleySachsAlgorithm< Real >::useSecantHessVec_
private

Flag to use secant as Hessian (default: false)

Definition at line 84 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
int ROL::TypeB::KelleySachsAlgorithm< Real >::maxit_
private

Maximum number of CG iterations (default: 20)

Definition at line 87 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::tol1_
private

Absolute tolerance for truncated CG (default: 1e-4)

Definition at line 88 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::tol2_
private

Relative tolerance for truncated CG (default: 1e-2)

Definition at line 89 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
int ROL::TypeB::KelleySachsAlgorithm< Real >::minit_
private

Maximum number of minor (subproblem solve) iterations (default: 10)

Definition at line 92 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::mu0_
private

Sufficient decrease parameter (default: 1e-2)

Definition at line 93 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::mu1_
private

Sufficient decrease parameter postsmoothing (default: 0.9999)

Definition at line 94 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::eps0_
private

Epsilon binding set tolerance (default: 1e-3)

Definition at line 95 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::beta_
private

Projected search backtracking rate (default: 1e-2)

Definition at line 96 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
Real ROL::TypeB::KelleySachsAlgorithm< Real >::alpha0_
private

Initial step size for projected search (default: 1)

Definition at line 97 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
int ROL::TypeB::KelleySachsAlgorithm< Real >::nhess_
mutableprivate

Number of Hessian applications.

Definition at line 99 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
unsigned ROL::TypeB::KelleySachsAlgorithm< Real >::verbosity_
private

Output level (default: 0)

Definition at line 100 of file ROL_TypeB_KelleySachsAlgorithm.hpp.

template<typename Real >
bool ROL::TypeB::KelleySachsAlgorithm< Real >::writeHeader_
private

Flag to write header at every iteration.

Definition at line 101 of file ROL_TypeB_KelleySachsAlgorithm.hpp.


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