|
ROL
|
Provides an interface to run the affine-scaling trust-region algorithm of Coleman and Li. More...
#include <ROL_TypeB_ColemanLiAlgorithm.hpp>
Public Member Functions | |
| ColemanLiAlgorithm (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, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) |
| Real | dgpstep (Vector< Real > &s, const Vector< Real > &w, const Vector< Real > &x, const Real alpha, std::ostream &outStream=std::cout) const |
| Real | dtrqsol (const Real xtx, const Real ptp, const Real ptx, const Real del) const |
| Real | dtrpcg (Vector< Real > &w, int &iflag, int &iter, const Vector< Real > &g, const Vector< Real > &x, const Vector< Real > &gdual, const Real del, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, const Real tol, const Real stol, Vector< Real > &p, Vector< Real > &q, Vector< Real > &r, Vector< Real > &t, Vector< Real > &pwa1, Vector< Real > &pwa2, Vector< Real > &dwa, std::ostream &outStream=std::cout) const |
| void | applyC (Vector< Real > &Cv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, BoundConstraint< Real > &bnd, Vector< Real > &pwa) const |
| void | applyHessian (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &pwa1, Vector< Real > &pwa2) const |
| void | applyPrecond (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, TrustRegionModel_U< Real > &model, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &dwa, Vector< Real > &pwa) 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). | |
| bool | useNM_ |
| int | storageNM_ |
| 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: 20). | |
| Real | mu0_ |
| Sufficient decrease parameter (default: 1e-2). | |
| Real | spexp_ |
| Relative tolerance exponent for subproblem solve (default: 1, range: [1,2]). | |
| Real | alphaMax_ |
| Maximum value of relaxation parameter (default: 0.999). | |
| int | nhess_ |
| Number of Hessian applications. | |
| unsigned | verbosity_ |
| Output level (default: 0). | |
| bool | writeHeader_ |
| Flag to write header at every iteration. | |
| bool | hasEcon_ |
| Flag signifies if equality constraints exist. | |
| Ptr< ReducedLinearConstraint< Real > > | rcon_ |
| Equality constraint restricted to current active variables. | |
| Ptr< NullSpaceOperator< Real > > | ns_ |
| Null space projection onto reduced equality constraint Jacobian. | |
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 affine-scaling trust-region algorithm of Coleman and Li.
Definition at line 27 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
| ROL::TypeB::ColemanLiAlgorithm< Real >::ColemanLiAlgorithm | ( | ParameterList & | list, |
| const Ptr< Secant< Real > > & | secant = nullPtr ) |
Definition at line 17 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References alphaMax_, delMax_, eps_, esec_, eta0_, eta1_, eta2_, gamma0_, gamma1_, gamma2_, interpRad_, maxit_, model_, mu0_, ROL::ROL_EPSILON(), ROL::ROL_INF(), ROL::SECANTMODE_BOTH, ROL::SECANTMODE_FORWARD, ROL::SECANTMODE_INVERSE, spexp_, ROL::TypeB::Algorithm< Real >::state_, ROL::TypeB::Algorithm< Real >::status_, storageNM_, ROL::StringToESecant(), tol1_, tol2_, TRsafe_, useNM_, useSecantHessVec_, useSecantPrecond_, verbosity_, and writeHeader_.
|
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 112 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::Accept, alphaMax_, ROL::TRUtils::analyzeRatio(), ROL::Vector< Real >::clone(), delMax_, dgpstep(), dtrpcg(), eps_, eta0_, eta2_, gamma0_, gamma1_, gamma2_, ROL::Objective< Real >::gradient(), initialize(), ROL::TRUtils::interpolateRadius(), interpRad_, model_, nhess_, ROL::TRUtils::NPOSPREDNEG, ROL::TypeB::Algorithm< Real >::optimalityCriterion(), ROL::Vector< Real >::plus(), ROL::TRUtils::POSPREDNEG, ROL::Revert, ROL::ROL_EPSILON(), ROL::Vector< Real >::set(), spexp_, SPflag_, SPiter_, ROL::TypeB::Algorithm< Real >::state_, ROL::TypeB::Algorithm< Real >::status_, storageNM_, ROL::TRUtils::SUCCESS, tol1_, tol2_, TRflag_, ROL::Trial, ROL::TRUtils::TRNAN, ROL::Objective< Real >::update(), useNM_, ROL::Objective< Real >::value(), verbosity_, ROL::TypeB::Algorithm< Real >::writeExitStatus(), writeHeader_, writeOutput(), and zero.
|
overridevirtual |
Print iterate header.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 388 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::CG_FLAG_SUCCESS, ROL::CG_FLAG_UNDEFINED, ROL::ECGFlagToString(), ROL::TRUtils::ETRFlagToString(), ROL::NumberToString(), ROL::TRUtils::SUCCESS, ROL::TRUtils::UNDEFINED, and verbosity_.
Referenced by writeOutput().
|
overridevirtual |
Print step name.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 435 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
Referenced by writeOutput().
|
overridevirtual |
Print iterate status.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 442 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References nhess_, SPflag_, SPiter_, ROL::TypeB::Algorithm< Real >::state_, TRflag_, writeHeader(), and writeName().
Referenced by run().
|
private |
Definition at line 68 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::Objective< Real >::gradient(), hasEcon_, ROL::Initial, ROL::TypeB::Algorithm< Real >::initialize(), nhess_, ns_, ROL::TypeB::Algorithm< Real >::proj_, rcon_, ROL::ROL_INF(), ROL::ROL_OVERFLOW(), ROL::TypeB::Algorithm< Real >::state_, ROL::Objective< Real >::update(), and ROL::Objective< Real >::value().
|
private |
Definition at line 235 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::norm(), ROL::TypeB::Algorithm< Real >::proj_, ROL::Vector< Real >::set(), and ROL::TypeB::Algorithm< Real >::state_.
Referenced by run().
|
private |
Definition at line 245 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References zero.
Referenced by dtrpcg().
|
private |
Definition at line 267 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), applyHessian(), applyPrecond(), ROL::Vector< Real >::axpy(), ROL::Vector< Real >::dot(), dtrqsol(), hasEcon_, maxit_, ROL::Vector< Real >::norm(), ROL::Vector< Real >::plus(), ROL::ROL_EPSILON(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), ROL::Vector< Real >::zero(), and zero.
Referenced by run().
|
private |
Definition at line 349 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::BoundConstraint< Real >::applyInverseScalingFunction(), and ROL::BoundConstraint< Real >::applyScalingFunctionJacobian().
Referenced by applyHessian().
|
private |
Definition at line 360 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References applyC(), ROL::Vector< Real >::dual(), ROL::TrustRegionModel_U< Real >::hessVec(), nhess_, and ROL::Vector< Real >::plus().
Referenced by dtrpcg().
|
private |
Definition at line 375 of file ROL_TypeB_ColemanLiAlgorithm_Def.hpp.
References ROL::TrustRegionModel_U< Real >::precond().
Referenced by dtrpcg().
|
private |
Container for trust-region model.
Definition at line 29 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Maximum trust-region radius (default: ROL_INF).
Definition at line 32 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Step acceptance threshold (default: 0.05).
Definition at line 33 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Radius decrease threshold (default: 0.05).
Definition at line 34 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Radius increase threshold (default: 0.9).
Definition at line 35 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Radius decrease rate (negative rho) (default: 0.0625).
Definition at line 36 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Radius decrease rate (positive rho) (default: 0.25).
Definition at line 37 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Radius increase rate (default: 2.5).
Definition at line 38 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Safeguard size for numerically evaluating ratio (default: 1e2).
Definition at line 39 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Safeguard for numerically evaluating ratio.
Definition at line 40 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Interpolate the trust-region radius if ratio is negative (default: false).
Definition at line 41 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Definition at line 44 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Definition at line 45 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Trust-region exit flag.
Definition at line 48 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by run(), and writeOutput().
|
private |
Subproblem solver termination flag.
Definition at line 49 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by run(), and writeOutput().
|
private |
Subproblem solver iteration count.
Definition at line 50 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by run(), and writeOutput().
|
private |
Secant type (default: Limited-Memory BFGS).
Definition at line 53 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Flag to use secant as a preconditioner (default: false).
Definition at line 54 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Flag to use secant as Hessian (default: false).
Definition at line 55 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Absolute tolerance for truncated CG (default: 1e-4).
Definition at line 58 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Relative tolerance for truncated CG (default: 1e-2).
Definition at line 59 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Maximum number of CG iterations (default: 20).
Definition at line 60 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and dtrpcg().
|
private |
Sufficient decrease parameter (default: 1e-2).
Definition at line 63 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm().
|
private |
Relative tolerance exponent for subproblem solve (default: 1, range: [1,2]).
Definition at line 64 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Maximum value of relaxation parameter (default: 0.999).
Definition at line 65 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
mutableprivate |
Number of Hessian applications.
Definition at line 67 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by applyHessian(), initialize(), run(), and writeOutput().
|
private |
Output level (default: 0).
Definition at line 68 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), run(), and writeHeader().
|
private |
Flag to write header at every iteration.
Definition at line 69 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by ColemanLiAlgorithm(), and run().
|
private |
Flag signifies if equality constraints exist.
Definition at line 71 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by dtrpcg(), and initialize().
|
private |
Equality constraint restricted to current active variables.
Definition at line 72 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by initialize().
|
private |
Null space projection onto reduced equality constraint Jacobian.
Definition at line 73 of file ROL_TypeB_ColemanLiAlgorithm.hpp.
Referenced by initialize().