ROL
|
Provides an interface to run the line-search algorithm of Byrd, Lu, Nocedal and Zhu (similar to L-BFGS-B). More...
#include <ROL_TypeB_LSecantBAlgorithm.hpp>
Public Member Functions | |
LSecantBAlgorithm (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 | 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 (Problem< Real > &problem, 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, 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, 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. 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 | 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, Secant< Real > &secant, Vector< Real > &dwa, Vector< Real > &dwa1, std::ostream &outStream=std::cout) |
Real | dsrch (Vector< Real > &x, Vector< Real > &s, Real &fnew, Real &beta, Real fold, Real gs, Objective< Real > &obj, Vector< Real > &pwa, std::ostream &outStream=std::cout) |
Real | dpcg (Vector< Real > &w, int &iflag, int &iter, const Vector< Real > &g, const Vector< Real > &x, Secant< Real > &secant, BoundConstraint< Real > &bnd, const Real tol, const Real stol, 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, Secant< Real > &secant, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &pwa) const |
void | applyFreePrecond (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Secant< Real > &secant, BoundConstraint< Real > &bnd, Real &tol, Vector< Real > &dwa, Vector< Real > &pwa) const |
Private Attributes | |
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... | |
Ptr< Secant< Real > > | secant_ |
Secant object. More... | |
Real | tol1_ |
Absolute tolerance for truncated CG (default: 1e-4) More... | |
Real | tol2_ |
Relative tolerance for truncated CG (default: 1e-2) More... | |
int | maxit_ |
Maximum number of CG iterations (default: 20) More... | |
Real | mu0_ |
Sufficient decrease parameter (default: 1e-2) More... | |
Real | spexp_ |
Relative tolerance exponent for subproblem solve (default: 1, range: [1,2]) More... | |
int | redlim_ |
Maximum number of Cauchy point reduction steps (default: 10) More... | |
int | explim_ |
Maximum number of Cauchy point expansion steps (default: 10) More... | |
Real | alpha_ |
Initial Cauchy point step length (default: 1.0) More... | |
bool | normAlpha_ |
Normalize initial Cauchy point step length (default: false) More... | |
Real | interpf_ |
Backtracking rate for Cauchy point computation (default: 1e-1) More... | |
Real | extrapf_ |
Extrapolation rate for Cauchy point computation (default: 1e1) More... | |
Real | qtol_ |
Relative tolerance for computed decrease in Cauchy point computation (default: 1-8) More... | |
Real | interpfPS_ |
Backtracking rate for projected search (default: 0.5) More... | |
unsigned | verbosity_ |
Output level (default: 0) More... | |
bool | writeHeader_ |
Flag to write header at every iteration. More... | |
bool | hasEcon_ |
Flag signifies if equality constraints exist. More... | |
Ptr< ReducedLinearConstraint < Real > > | rcon_ |
Equality constraint restricted to current active variables. More... | |
Ptr< NullSpaceOperator< Real > > | ns_ |
Null space projection onto reduced equality constraint Jacobian. 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_ |
Provides an interface to run the line-search algorithm of Byrd, Lu, Nocedal and Zhu (similar to L-BFGS-B).
Definition at line 61 of file ROL_TypeB_LSecantBAlgorithm.hpp.
ROL::TypeB::LSecantBAlgorithm< Real >::LSecantBAlgorithm | ( | ParameterList & | list, |
const Ptr< Secant< Real >> & | secant = nullPtr |
||
) |
Definition at line 51 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::SECANTMODE_BOTH, 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 131 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Accept, ROL::Vector< Real >::clone(), ROL::Vector< Real >::dual(), ROL::Objective< Real >::gradient(), ROL::TypeB::Algorithm< Real >::optimalityCriterion(), ROL::Vector< Real >::plus(), ROL::BoundConstraint< Real >::pruneActive(), ROL::Vector< Real >::set(), ROL::Objective< Real >::update(), ROL::TypeB::Algorithm< Real >::writeExitStatus(), and zero.
|
overridevirtual |
Print iterate header.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 483 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
|
overridevirtual |
Print step name.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 519 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
|
overridevirtual |
Print iterate status.
Reimplemented from ROL::TypeB::Algorithm< Real >.
Definition at line 526 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
|
private |
Definition at line 90 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Objective< Real >::gradient(), ROL::Initial, ROL::TypeB::Algorithm< Real >::initialize(), ROL::Objective< Real >::update(), and ROL::Objective< Real >::value().
|
private |
Definition at line 233 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::norm(), and ROL::Vector< Real >::set().
|
private |
Definition at line 244 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), ROL::Secant< Real >::applyB(), ROL::Vector< Real >::dot(), and ROL::Vector< Real >::set().
|
private |
Definition at line 320 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::plus(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), ROL::Trial, ROL::Objective< Real >::update(), and ROL::Objective< Real >::value().
|
private |
Definition at line 355 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Vector< Real >::apply(), ROL::Vector< Real >::axpy(), ROL::Vector< Real >::dot(), ROL::BoundConstraint< Real >::isFeasible(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::plus(), ROL::Vector< Real >::scale(), ROL::Vector< Real >::set(), zero, and ROL::Vector< Real >::zero().
|
private |
Definition at line 440 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Secant< Real >::applyB(), ROL::Vector< Real >::dual(), ROL::BoundConstraint< Real >::pruneActive(), ROL::Vector< Real >::set(), and zero.
|
private |
Definition at line 457 of file ROL_TypeB_LSecantBAlgorithm_Def.hpp.
References ROL::Secant< Real >::applyH(), ROL::Vector< Real >::dual(), ROL::BoundConstraint< Real >::pruneActive(), ROL::Vector< Real >::set(), and zero.
|
private |
Subproblem solver termination flag.
Definition at line 64 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Subproblem solver iteration count.
Definition at line 65 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Secant type (default: Limited-Memory BFGS)
Definition at line 68 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Flag to use secant as a preconditioner (default: false)
Definition at line 69 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Flag to use secant as Hessian (default: false)
Definition at line 70 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Secant object.
Definition at line 71 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Absolute tolerance for truncated CG (default: 1e-4)
Definition at line 74 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Relative tolerance for truncated CG (default: 1e-2)
Definition at line 75 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Maximum number of CG iterations (default: 20)
Definition at line 76 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Sufficient decrease parameter (default: 1e-2)
Definition at line 79 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Relative tolerance exponent for subproblem solve (default: 1, range: [1,2])
Definition at line 80 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Maximum number of Cauchy point reduction steps (default: 10)
Definition at line 81 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Maximum number of Cauchy point expansion steps (default: 10)
Definition at line 82 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Initial Cauchy point step length (default: 1.0)
Definition at line 83 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Normalize initial Cauchy point step length (default: false)
Definition at line 84 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Backtracking rate for Cauchy point computation (default: 1e-1)
Definition at line 85 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Extrapolation rate for Cauchy point computation (default: 1e1)
Definition at line 86 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Relative tolerance for computed decrease in Cauchy point computation (default: 1-8)
Definition at line 87 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Backtracking rate for projected search (default: 0.5)
Definition at line 88 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Output level (default: 0)
Definition at line 90 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Flag to write header at every iteration.
Definition at line 91 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Flag signifies if equality constraints exist.
Definition at line 93 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Equality constraint restricted to current active variables.
Definition at line 94 of file ROL_TypeB_LSecantBAlgorithm.hpp.
|
private |
Null space projection onto reduced equality constraint Jacobian.
Definition at line 95 of file ROL_TypeB_LSecantBAlgorithm.hpp.