|
ROL
|
Provides an interface to run the trust-region algorithm. More...
#include <ROL_TypeB_TrustRegionSPGAlgorithm.hpp>
Inheritance diagram for ROL::TypeB::TrustRegionSPGAlgorithm< Real >:Public Member Functions | |
| TrustRegionSPGAlgorithm (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. | |
| void | writeHeader (std::ostream &os) const override |
| Print iterate header. | |
| void | writeName (std::ostream &os) const override |
| Print step name. | |
| void | writeOutput (std::ostream &os, const bool write_header=false) const override |
| Print iterate status. | |
Public Member Functions inherited from ROL::TypeB::Algorithm< Real > | |
| virtual | ~Algorithm () |
| Algorithm () | |
| Constructor, given a step and a status test. | |
| void | setStatusTest (const Ptr< StatusTest< Real > > &status, const bool combineStatus=false) |
| virtual void | run (Problem< Real > &problem, std::ostream &outStream=std::cout) |
| Run algorithm on bound constrained problems (Type-B). This is the primary Type-B interface. | |
| 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. | |
| 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. | |
| 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, 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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, Real ftol, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) |
| Real | computeValue (Real inTol, Real &outTol, Real pRed, Real &fold, int iter, const Vector< Real > &x, const Vector< Real > &xold, Objective< Real > &obj) |
| void | computeGradient (const Vector< Real > &x, Vector< Real > &g, Vector< Real > &pwa, Real del, Objective< Real > &obj, bool accept, Real >ol, Real &gnorm, std::ostream &outStream=std::cout) const |
| Real | dgpstep (Vector< Real > &s, const Vector< Real > &w, const Vector< Real > &x, const Real alpha, std::ostream &outStream=std::cout) const |
| Real | dcauchy (Vector< Real > &s, Real &alpha, Real &q, const Vector< Real > &x, const Vector< Real > &g, const Real del, TrustRegionModel_U< Real > &model, Vector< Real > &dwa, Vector< Real > &dwa1, std::ostream &outStream=std::cout) |
| void | dpsg_simple (Vector< Real > &y, Real &q, Vector< Real > &gmod, const Vector< Real > &x, Real del, TrustRegionModel_U< Real > &model, Vector< Real > &pwa, Vector< Real > &pwa1, Vector< Real > &dwa, std::ostream &outStream=std::cout) |
| void | dpsg (Vector< Real > &y, Real &q, Vector< Real > &gmod, const Vector< Real > &x, Real del, TrustRegionModel_U< Real > &model, Vector< Real > &ymin, Vector< Real > &pwa, Vector< Real > &pwa1, Vector< Real > &pwa2, Vector< Real > &pwa3, Vector< Real > &pwa4, Vector< Real > &pwa5, Vector< Real > &dwa, std::ostream &outStream=std::cout) |
| void | dproj (Vector< Real > &x, const Vector< Real > &x0, Real del, Vector< Real > &y0, Vector< Real > &y1, Vector< Real > &yc, Vector< Real > &pwa, std::ostream &outStream=std::cout) const |
Private Attributes | |
| Ptr< TrustRegionModel_U< Real > > | model_ |
| Container for trust-region model. | |
| Real | delMax_ |
| Maximum trust-region radius (default: ROL_INF) | |
| Real | eta0_ |
| Step acceptance threshold (default: 0.05) | |
| Real | eta1_ |
| Radius decrease threshold (default: 0.05) | |
| Real | eta2_ |
| Radius increase threshold (default: 0.9) | |
| Real | gamma0_ |
| Radius decrease rate (negative rho) (default: 0.0625) | |
| Real | gamma1_ |
| Radius decrease rate (positive rho) (default: 0.25) | |
| Real | gamma2_ |
| Radius increase rate (default: 2.5) | |
| Real | TRsafe_ |
| Safeguard size for numerically evaluating ratio (default: 1e2) | |
| Real | eps_ |
| Safeguard for numerically evaluating ratio. | |
| bool | interpRad_ |
| Interpolate the trust-region radius if ratio is negative (default: false) | |
| TRUtils::ETRFlag | TRflag_ |
| Trust-region exit flag. | |
| int | SPflag_ |
| Subproblem solver termination flag. | |
| int | SPiter_ |
| Subproblem solver iteration count. | |
| ESecant | esec_ |
| Secant type (default: Limited-Memory BFGS) | |
| bool | useSecantPrecond_ |
| Flag to use secant as a preconditioner (default: false) | |
| bool | useSecantHessVec_ |
| Flag to use secant as Hessian (default: false) | |
| Real | tol1_ |
| Absolute tolerance for truncated CG (default: 1e-4) | |
| Real | tol2_ |
| Relative tolerance for truncated CG (default: 1e-2) | |
| int | maxit_ |
| Maximum number of CG iterations (default: 25) | |
| bool | useNM_ |
| int | storageNM_ |
| Real | mu0_ |
| Sufficient decrease parameter (default: 1e-2) | |
| Real | spexp_ |
| Relative tolerance exponent for subproblem solve (default: 1, range: [1,2]) | |
| int | redlim_ |
| Maximum number of Cauchy point reduction steps (default: 10) | |
| int | explim_ |
| Maximum number of Cauchy point expansion steps (default: 10) | |
| Real | alpha_ |
| Initial Cauchy point step length (default: 1.0) | |
| bool | normAlpha_ |
| Normalize initial Cauchy point step length (default: false) | |
| Real | interpf_ |
| Backtracking rate for Cauchy point computation (default: 1e-1) | |
| Real | extrapf_ |
| Extrapolation rate for Cauchy point computation (default: 1e1) | |
| Real | qtol_ |
| Relative tolerance for computed decrease in Cauchy point computation (default: 1-8) | |
| Real | lambdaMin_ |
| Real | lambdaMax_ |
| Real | gamma_ |
| int | maxSize_ |
| bool | useMin_ |
| bool | useNMSP_ |
| bool | useSimpleSPG_ |
| std::vector< bool > | useInexact_ |
| Real | scale0_ |
| Real | scale1_ |
| Real | scale_ |
| Real | omega_ |
| Real | force_ |
| int | updateIter_ |
| Real | forceFactor_ |
| Real | gtol_ |
| int | nhess_ |
| Number of Hessian applications. | |
| unsigned | verbosity_ |
| Output level (default: 0) | |
| bool | writeHeader_ |
| Flag to write header at every iteration. | |
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_ |
Provides an interface to run the trust-region algorithm.
Definition at line 25 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
| ROL::TypeB::TrustRegionSPGAlgorithm< Real >::TrustRegionSPGAlgorithm | ( | ParameterList & | list, |
| const Ptr< Secant< Real > > & | secant = nullPtr |
||
| ) |
Definition at line 19 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::SECANTMODE_BOTH, ROL::SECANTMODE_FORWARD, ROL::SECANTMODE_INVERSE, and ROL::StringToESecant().
|
overridevirtual |
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.
Implements ROL::TypeB::Algorithm< Real >.
Definition at line 191 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Accept, ROL::Vector< Real >::clone(), ROL::TRUtils::NPOSPREDNEG, ROL::Vector< Real >::plus(), ROL::TRUtils::POSPREDNEG, ROL::Revert, ROL::Vector< Real >::set(), ROL::TRUtils::SUCCESS, ROL::TRUtils::TRNAN, ROL::Objective< Real >::update(), ROL::TypeB::Algorithm< Real >::writeExitStatus(), and zero.
|
overridevirtual |
Print iterate header.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 890 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::TRUtils::ETRFlagToString(), ROL::NumberToString(), ROL::TRUtils::SUCCESS, and ROL::TRUtils::UNDEFINED.
|
overridevirtual |
Print step name.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 935 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
|
overridevirtual |
Print iterate status.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 942 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
|
private |
Definition at line 102 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Initial, ROL::TypeB::Algorithm< Real >::initialize(), ROL::Objective< Real >::update(), and ROL::Objective< Real >::value().
|
private |
Definition at line 137 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Trial, ROL::Objective< Real >::update(), and ROL::Objective< Real >::value().
|
private |
Definition at line 160 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Objective< Real >::gradient(), and ROL::TypeB::Algorithm< Real >::optimalityCriterion().
|
private |
Definition at line 311 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::norm(), and ROL::Vector< Real >::set().
|
private |
Definition at line 321 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), ROL::Vector< Real >::dot(), ROL::TrustRegionModel_U< Real >::hessVec(), and ROL::Vector< Real >::set().
|
private |
Definition at line 410 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), ROL::Vector< Real >::axpy(), ROL::Vector< Real >::dot(), ROL::Vector< Real >::dual(), ROL::TrustRegionModel_U< Real >::hessVec(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::set(), and ROL::Vector< Real >::zero().
|
private |
Definition at line 509 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), ROL::Vector< Real >::axpy(), ROL::Vector< Real >::dot(), ROL::Vector< Real >::dual(), ROL::TrustRegionModel_U< Real >::hessVec(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::set(), and zero.
|
private |
Definition at line 621 of file ROL_TypeB_TrustRegionSPGAlgorithm_Def.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), and zero.
|
private |
Container for trust-region model.
Definition at line 27 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Maximum trust-region radius (default: ROL_INF)
Definition at line 30 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Step acceptance threshold (default: 0.05)
Definition at line 31 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Radius decrease threshold (default: 0.05)
Definition at line 32 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Radius increase threshold (default: 0.9)
Definition at line 33 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Radius decrease rate (negative rho) (default: 0.0625)
Definition at line 34 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Radius decrease rate (positive rho) (default: 0.25)
Definition at line 35 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Radius increase rate (default: 2.5)
Definition at line 36 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Safeguard size for numerically evaluating ratio (default: 1e2)
Definition at line 37 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Safeguard for numerically evaluating ratio.
Definition at line 38 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Interpolate the trust-region radius if ratio is negative (default: false)
Definition at line 39 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Trust-region exit flag.
Definition at line 42 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Subproblem solver termination flag.
Definition at line 43 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Subproblem solver iteration count.
Definition at line 44 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Secant type (default: Limited-Memory BFGS)
Definition at line 47 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Flag to use secant as a preconditioner (default: false)
Definition at line 48 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Flag to use secant as Hessian (default: false)
Definition at line 49 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Absolute tolerance for truncated CG (default: 1e-4)
Definition at line 52 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Relative tolerance for truncated CG (default: 1e-2)
Definition at line 53 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Maximum number of CG iterations (default: 25)
Definition at line 54 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 57 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 58 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Sufficient decrease parameter (default: 1e-2)
Definition at line 59 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Relative tolerance exponent for subproblem solve (default: 1, range: [1,2])
Definition at line 60 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Maximum number of Cauchy point reduction steps (default: 10)
Definition at line 61 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Maximum number of Cauchy point expansion steps (default: 10)
Definition at line 62 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Initial Cauchy point step length (default: 1.0)
Definition at line 63 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Normalize initial Cauchy point step length (default: false)
Definition at line 64 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Backtracking rate for Cauchy point computation (default: 1e-1)
Definition at line 65 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Extrapolation rate for Cauchy point computation (default: 1e1)
Definition at line 66 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Relative tolerance for computed decrease in Cauchy point computation (default: 1-8)
Definition at line 67 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 68 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 69 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 70 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 71 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 72 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 73 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 74 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 77 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 78 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 79 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 80 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 81 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 82 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 83 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 84 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Definition at line 85 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
mutableprivate |
Number of Hessian applications.
Definition at line 87 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Output level (default: 0)
Definition at line 88 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.
|
private |
Flag to write header at every iteration.
Definition at line 89 of file ROL_TypeB_TrustRegionSPGAlgorithm.hpp.