10#ifndef ROL_TYPEB_TRUSTREGIONSPGALGORITHM_DEF_HPP
11#define ROL_TYPEB_TRUSTREGIONSPGALGORITHM_DEF_HPP
18template<
typename Real>
25 ParameterList &trlist = list.sublist(
"Step").sublist(
"Trust Region");
27 state_->searchSize = trlist.get(
"Initial Radius", -1.0);
29 eta0_ = trlist.get(
"Step Acceptance Threshold", 0.05);
30 eta1_ = trlist.get(
"Radius Shrinking Threshold", 0.05);
31 eta2_ = trlist.get(
"Radius Growing Threshold", 0.9);
32 gamma0_ = trlist.get(
"Radius Shrinking Rate (Negative rho)", 0.0625);
33 gamma1_ = trlist.get(
"Radius Shrinking Rate (Positive rho)", 0.25);
34 gamma2_ = trlist.get(
"Radius Growing Rate", 2.5);
35 TRsafe_ = trlist.get(
"Safeguard Size", 100.0);
37 interpRad_ = trlist.get(
"Use Radius Interpolation",
false);
38 verbosity_ = trlist.sublist(
"General").get(
"Output Level", 0);
40 storageNM_ = trlist.get(
"Nonmonotone Storage Size", 0);
43 ROL::ParameterList &lmlist = trlist.sublist(
"SPG");
44 mu0_ = lmlist.get(
"Sufficient Decrease Parameter", 1e-2);
45 spexp_ = lmlist.get(
"Relative Tolerance Exponent", 1.0);
46 spexp_ = std::max(
static_cast<Real
>(1),std::min(
spexp_,
static_cast<Real
>(2)));
47 redlim_ = lmlist.sublist(
"Cauchy Point").get(
"Maximum Number of Reduction Steps", 10);
48 explim_ = lmlist.sublist(
"Cauchy Point").get(
"Maximum Number of Expansion Steps", 10);
49 alpha_ = lmlist.sublist(
"Cauchy Point").get(
"Initial Step Size", 1.0);
50 normAlpha_ = lmlist.sublist(
"Cauchy Point").get(
"Normalize Initial Step Size",
false);
51 interpf_ = lmlist.sublist(
"Cauchy Point").get(
"Reduction Rate", 0.1);
52 extrapf_ = lmlist.sublist(
"Cauchy Point").get(
"Expansion Rate", 10.0);
53 qtol_ = lmlist.sublist(
"Cauchy Point").get(
"Decrease Tolerance", 1e-8);
55 lambdaMin_ = lmlist.sublist(
"Solver").get(
"Minimum Spectral Step Size", 1e-8);
56 lambdaMax_ = lmlist.sublist(
"Solver").get(
"Maximum Spectral Step Size", 1e8);
57 gamma_ = lmlist.sublist(
"Solver").get(
"Sufficient Decrease Tolerance", 1e-4);
58 maxSize_ = lmlist.sublist(
"Solver").get(
"Maximum Storage Size", 10);
59 maxit_ = lmlist.sublist(
"Solver").get(
"Iteration Limit", 25);
60 tol1_ = lmlist.sublist(
"Solver").get(
"Absolute Tolerance", 1e-4);
61 tol2_ = lmlist.sublist(
"Solver").get(
"Relative Tolerance", 1e-2);
62 useMin_ = lmlist.sublist(
"Solver").get(
"Use Smallest Model Iterate",
true);
63 useNMSP_ = lmlist.sublist(
"Solver").get(
"Use Nonmonotone Search",
false);
65 bool useCachyPoint = lmlist.sublist(
"Solver").get(
"Compute Cauchy Point",
true);
68 ParameterList &glist = list.sublist(
"General");
70 useInexact_.push_back(glist.get(
"Inexact Objective Function",
false));
71 useInexact_.push_back(glist.get(
"Inexact Gradient",
false));
72 useInexact_.push_back(glist.get(
"Inexact Hessian-Times-A-Vector",
false));
74 ParameterList &ilist = trlist.sublist(
"Inexact").sublist(
"Gradient");
75 scale0_ = ilist.get(
"Tolerance Scaling",
static_cast<Real
>(0.1));
76 scale1_ = ilist.get(
"Relative Tolerance",
static_cast<Real
>(2));
78 ParameterList &vlist = trlist.sublist(
"Inexact").sublist(
"Value");
79 scale_ = vlist.get(
"Tolerance Scaling",
static_cast<Real
>(1.e-1));
80 omega_ = vlist.get(
"Exponent",
static_cast<Real
>(0.9));
81 force_ = vlist.get(
"Forcing Sequence Initial Value",
static_cast<Real
>(1.0));
82 updateIter_ = vlist.get(
"Forcing Sequence Update Frequency",
static_cast<int>(10));
83 forceFactor_ = vlist.get(
"Forcing Sequence Reduction Factor",
static_cast<Real
>(0.1));
85 verbosity_ = list.sublist(
"General").get(
"Output Level",0);
88 useSecantPrecond_ = list.sublist(
"General").sublist(
"Secant").get(
"Use as Preconditioner",
false);
89 useSecantHessVec_ = list.sublist(
"General").sublist(
"Secant").get(
"Use as Hessian",
false);
94 model_ = makePtr<TrustRegionModel_U<Real>>(list,secant,mode);
95 if (secant == nullPtr) {
96 std::string secantType = list.sublist(
"General").sublist(
"Secant").get(
"Type",
"Limited-Memory BFGS");
101template<
typename Real>
107 std::ostream &outStream) {
109 if (
proj_ == nullPtr)
110 proj_ = makePtr<PolyhedralProjection<Real>>(makePtrFromRef(bnd));
116 state_->iterateVec->set(x);
132 if (
state_->searchSize <=
static_cast<Real
>(0) )
136template<
typename Real>
149 Real eta =
static_cast<Real
>(0.999)*std::min(
eta1_,one-
eta2_);
151 if (inTol > outTol) fold = obj.
value(xold,outTol);
155 Real fval = obj.
value(x,outTol);
159template<
typename Real>
168 std::ostream &outStream)
const {
172 if (accept) gtol = gtol0 + one;
173 else gtol0 =
scale0_*std::min(gnorm,del);
174 while ( gtol > gtol0 ) {
178 gtol0 =
scale0_*std::min(gnorm,del);
190template<
typename Real>
195 std::ostream &outStream ) {
196 const Real
zero(0), one(1);
199 Real ftrial(0), pRed(0), rho(1), q(0);
201 std::vector<std::string> output;
203 Ptr<Vector<Real>> gmod = g.
clone();
204 Ptr<Vector<Real>> pwa1 = x.
clone(), pwa2 = x.
clone();
205 Ptr<Vector<Real>> pwa3 = x.
clone(), pwa4 = x.
clone();
206 Ptr<Vector<Real>> pwa5 = x.
clone(), pwa6 = x.
clone();
207 Ptr<Vector<Real>> pwa7 = x.
clone();
208 Ptr<Vector<Real>> dwa1 = g.
clone(), dwa2 = g.
clone();
210 Real rhoNM(0), sigmac(0), sigmar(0);
224 gmod->set(*
state_->gradientVec);
227 *pwa1,*pwa2,*dwa1,outStream);
232 *
model_,*dwa1,*dwa2,outStream);
240 *pwa1,*pwa2,*pwa3,*pwa4,*pwa5,*pwa6,*pwa7,*dwa1,outStream);
258 rho = (rho < rhoNM ? rhoNM : rho );
284 sigmac += pRed; sigmar += pRed;
285 if (ftrial < fmin) { fmin = ftrial; fc = fmin; sigmac =
zero; L = 0; }
288 if (ftrial > fc) { fc = ftrial; sigmac =
zero; }
289 if (L ==
storageNM_) { fr = fc; sigmar = sigmac; }
295 dwa1->set(*
state_->gradientVec);
298 state_->iterateVec->set(x);
310template<
typename Real>
313 std::ostream &outStream)
const {
316 s.
axpy(
static_cast<Real
>(-1),x);
320template<
typename Real>
329 std::ostream &outStream) {
330 const Real half(0.5);
334 Real gs(0), snorm(0);
336 snorm =
dgpstep(s,g,x,-alpha,outStream);
344 q = half * s.
apply(dwa) + gs;
345 interp = (q >
mu0_*gs);
353 snorm =
dgpstep(s,g,x,-alpha,outStream);
358 q = half * s.
apply(dwa) + gs;
371 snorm =
dgpstep(s,g,x,-alpha,outStream);
372 if (snorm <= del && cnt <
explim_) {
376 q = half * s.
apply(dwa) + gs;
377 if (q <=
mu0_*gs && std::abs(q-qs) >
qtol_*std::abs(qs)) {
395 snorm =
dgpstep(s,g,x,-alpha,outStream);
398 outStream <<
" Cauchy point" << std::endl;
399 outStream <<
" Step length (alpha): " << alpha << std::endl;
400 outStream <<
" Step length (alpha*g): " << snorm << std::endl;
401 outStream <<
" Model decrease (pRed): " << -q << std::endl;
403 outStream <<
" Number of extrapolation steps: " << cnt << std::endl;
409template<
typename Real>
419 std::ostream &outStream) {
429 Real alpha(1), alphaMax(1), s0s0(0), ss0(0), sHs(0), lambdaTmp(1), snorm(0);
436 Real coeff = one/gmod.
norm();
441 Real gs = gmod.
apply(pwa);
442 Real ss = pwa.
dot(pwa);
443 Real gnorm = std::sqrt(ss);
446 const Real gtol = std::min(
tol1_,
tol2_*gnorm);
449 outStream <<
" Spectral Projected Gradient" << std::endl;
457 sHs = dwa.
apply(pwa);
461 if (gnorm >= del-safeguard) {
463 alphaMax = std::min(one, (-ss0 + std::sqrt(ss0*ss0 - ss*(s0s0-del*del)))/ss);
465 if (sHs <= safeguard)
468 alpha = std::min(alphaMax, -gs/sHs);
471 q += alpha * (gs + half * alpha * sHs);
472 gmod.
axpy(alpha,dwa);
476 pwa1.
set(y); pwa1.
axpy(-one,x);
477 s0s0 = pwa1.
dot(pwa1);
478 snorm = std::sqrt(s0s0);
481 outStream << std::endl;
482 outStream <<
" Iterate: " <<
SPiter_ << std::endl;
483 outStream <<
" Spectral step length (lambda): " << lambda << std::endl;
484 outStream <<
" Step length (alpha): " << alpha << std::endl;
485 outStream <<
" Model decrease (pRed): " << -q << std::endl;
486 outStream <<
" Optimality criterion: " << gnorm << std::endl;
487 outStream <<
" Step norm: " << snorm << std::endl;
488 outStream << std::endl;
491 if (snorm >= del - safeguard) {
SPflag_ = 2;
break; }
494 lambdaTmp = (sHs <= safeguard ? one/gmod.
norm() : ss/sHs);
499 gs = gmod.
apply(pwa);
501 gnorm = std::sqrt(ss);
503 if (gnorm <= gtol) {
SPflag_ = 0;
break; }
508template<
typename Real>
523 std::ostream &outStream) {
531 const Real
zero(0), half(0.5), one(1), two(2);
533 Real alpha(1), sHs(0), alphaTmp(1), mmax(0), qmin(0), lambdaTmp(1);
534 std::deque<Real> mqueue; mqueue.push_back(q);
540 pwa.
set(y); pwa.
axpy(-one,pwa1);
541 dproj(pwa,x,del,pwa2,pwa3,pwa4,pwa5,outStream);
543 Real gnorm = pwa.
norm();
544 const Real gtol = std::min(
tol1_,
tol2_*gnorm);
547 Real coeff = one/gmod.
norm();
549 pwa.
set(y); pwa.
axpy(-lambda,pwa1);
550 dproj(pwa,x,del,pwa2,pwa3,pwa4,pwa5,outStream);
552 Real gs = gmod.
apply(pwa);
553 Real ss = pwa.
dot(pwa);
556 outStream <<
" Spectral Projected Gradient" << std::endl;
564 sHs = dwa.
apply(pwa);
568 mmax = *std::max_element(mqueue.begin(),mqueue.end());
569 alphaTmp = (-(one-
gamma_)*gs + std::sqrt(std::pow((one-
gamma_)*gs,two)-two*sHs*(q-mmax)))/sHs;
574 alpha = (sHs >
zero ? std::min(one,std::max(
zero,alphaTmp)) : one);
577 q += alpha * (gs + half * alpha * sHs);
578 gmod.
axpy(alpha,dwa);
583 if (
static_cast<int>(mqueue.size())==
maxSize_) mqueue.pop_front();
585 if (
useMin_ && q <= qmin) { qmin = q; ymin.
set(y); }
590 pwa.
set(y); pwa.
axpy(-one,pwa1);
591 dproj(pwa,x,del,pwa2,pwa3,pwa4,pwa5,outStream);
596 outStream << std::endl;
597 outStream <<
" Iterate: " <<
SPiter_ << std::endl;
598 outStream <<
" Spectral step length (lambda): " << lambda << std::endl;
599 outStream <<
" Step length (alpha): " << alpha << std::endl;
600 outStream <<
" Model decrease (pRed): " << -q << std::endl;
601 outStream <<
" Optimality criterion: " << gnorm << std::endl;
602 outStream << std::endl;
604 if (gnorm < gtol)
break;
608 lambdaTmp = (sHs == 0 ? coeff : ss/sHs);
610 pwa.
set(y); pwa.
axpy(-lambda,pwa1);
611 dproj(pwa,x,del,pwa2,pwa3,pwa4,pwa5,outStream);
613 gs = gmod.
apply(pwa);
620template<
typename Real>
628 std::ostream &outStream)
const {
630 const Real
zero(0), half(0.5), one(1), two(2), three(3);
632 Real f0(0), f1(0), fc(0), t0(0), t1(1), tc(0), d1(1), d2(1), tol(1);
633 Real p(0), q(0), r(0), s(0), m(0);
637 pwa.
set(y1); pwa.
axpy(-one,x0);
644 tc = t0; fc = f0; yc.
set(y0);
648 if (std::abs(fc-del) < std::abs(f1-del)) {
649 t0 = t1; t1 = tc; tc = t0;
650 f0 = f1; f1 = fc; fc = f0;
653 tol = two*eps*std::abs(t1) + half*tol0;
655 if (std::abs(m) <= tol) { code = 1;
break; }
656 if ((f1 >= fudge*del && f1 <= del))
break;
657 if (std::abs(d1) < tol || std::abs(f0-del) <= std::abs(f1-del)) {
661 s = (f1-del)/(f0-del);
667 q = (f0-del)/(fc-del);
668 r = (f1-del)/(fc-del);
669 p = s*(two*m*q*(q-r)-(t1-t0)*(r-one));
670 q = (q-one)*(r-one)*(s-one);
672 if (p >
zero) q = -q;
676 if (two*p < three*m*q-std::abs(tol*q) && p < std::abs(half*s*q)) {
683 t0 = t1; f0 = f1; y0.
set(y1);
684 if (std::abs(d2) > tol) t1 += d2;
685 else if (m >
zero) t1 += tol;
689 pwa.
set(y1); pwa.
axpy(-one,x0);
691 if ((f1 > del && fc > del) || (f1 <= del && fc <= del)) {
692 tc = t0; fc = f0; yc.
set(y0);
696 if (code==1 && f1>del) x.
set(yc);
699 outStream << std::endl;
700 outStream <<
" Trust-Region Subproblem Projection" << std::endl;
701 outStream <<
" Number of polyhedral projections: " <<
state_->nproj-cnt << std::endl;
702 if (code == 1 && f1 > del) {
703 outStream <<
" Transformed Multiplier: " << tc << std::endl;
704 outStream <<
" Dual Residual: " << fc-del << std::endl;
707 outStream <<
" Transformed Multiplier: " << t1 << std::endl;
708 outStream <<
" Dual Residual: " << f1-del << std::endl;
710 outStream <<
" Exit Code: " << code << std::endl;
711 outStream << std::endl;
889template<
typename Real>
891 std::ios_base::fmtflags osFlags(os.flags());
893 os << std::string(114,
'-') << std::endl;
894 os <<
" SPG trust-region method status output definitions" << std::endl << std::endl;
895 os <<
" iter - Number of iterates (steps taken)" << std::endl;
896 os <<
" value - Objective function value" << std::endl;
897 os <<
" gnorm - Norm of the gradient" << std::endl;
898 os <<
" snorm - Norm of the step (update to optimization vector)" << std::endl;
899 os <<
" delta - Trust-Region radius" << std::endl;
900 os <<
" #fval - Number of times the objective function was evaluated" << std::endl;
901 os <<
" #grad - Number of times the gradient was computed" << std::endl;
902 os <<
" #hess - Number of times the Hessian was applied" << std::endl;
903 os <<
" #proj - Number of times the projection was computed" << std::endl;
905 os <<
" tr_flag - Trust-Region flag" << std::endl;
911 os <<
" iterSPG - Number of Spectral Projected Gradient iterations" << std::endl << std::endl;
912 os <<
" flagSPG - Trust-Region Truncated CG flag" << std::endl;
913 os <<
" 0 - Converged" << std::endl;
914 os <<
" 1 - Iteration Limit Exceeded" << std::endl;
915 os << std::string(114,
'-') << std::endl;
918 os << std::setw(6) << std::left <<
"iter";
919 os << std::setw(15) << std::left <<
"value";
920 os << std::setw(15) << std::left <<
"gnorm";
921 os << std::setw(15) << std::left <<
"snorm";
922 os << std::setw(15) << std::left <<
"delta";
923 os << std::setw(10) << std::left <<
"#fval";
924 os << std::setw(10) << std::left <<
"#grad";
925 os << std::setw(10) << std::left <<
"#hess";
926 os << std::setw(10) << std::left <<
"#proj";
927 os << std::setw(10) << std::left <<
"tr_flag";
928 os << std::setw(10) << std::left <<
"iterSPG";
929 os << std::setw(10) << std::left <<
"flagSPG";
934template<
typename Real>
936 std::ios_base::fmtflags osFlags(os.flags());
937 os << std::endl <<
"SPG Trust-Region Method (Type B, Bound Constraints)" << std::endl;
941template<
typename Real>
943 std::ios_base::fmtflags osFlags(os.flags());
944 os << std::scientific << std::setprecision(6);
947 if (
state_->iter == 0 ) {
949 os << std::setw(6) << std::left <<
state_->iter;
950 os << std::setw(15) << std::left <<
state_->value;
951 os << std::setw(15) << std::left <<
state_->gnorm;
952 os << std::setw(15) << std::left <<
"---";
953 os << std::setw(15) << std::left <<
state_->searchSize;
954 os << std::setw(10) << std::left <<
state_->nfval;
955 os << std::setw(10) << std::left <<
state_->ngrad;
956 os << std::setw(10) << std::left <<
nhess_;
957 os << std::setw(10) << std::left <<
state_->nproj;
958 os << std::setw(10) << std::left <<
"---";
959 os << std::setw(10) << std::left <<
"---";
960 os << std::setw(10) << std::left <<
"---";
965 os << std::setw(6) << std::left <<
state_->iter;
966 os << std::setw(15) << std::left <<
state_->value;
967 os << std::setw(15) << std::left <<
state_->gnorm;
968 os << std::setw(15) << std::left <<
state_->snorm;
969 os << std::setw(15) << std::left <<
state_->searchSize;
970 os << std::setw(10) << std::left <<
state_->nfval;
971 os << std::setw(10) << std::left <<
state_->ngrad;
972 os << std::setw(10) << std::left <<
nhess_;
973 os << std::setw(10) << std::left <<
state_->nproj;
974 os << std::setw(10) << std::left <<
TRflag_;
975 os << std::setw(10) << std::left <<
SPiter_;
976 os << std::setw(10) << std::left <<
SPflag_;
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0 zero)()
virtual void initialize(const Vector< Real > &x)
Initialize temporary variables.
Provides the interface to apply upper and lower bound constraints.
Provides the interface to evaluate objective functions.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
virtual Real value(const Vector< Real > &x, Real &tol)=0
Compute value.
virtual void update(const Vector< Real > &x, UpdateType type, int iter=-1)
Update objective function.
Provides interface for and implements limited-memory secant operators.
Provides an interface to check status of optimization algorithms.
Provides the interface to evaluate trust-region model functions.
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Ptr< PolyhedralProjection< Real > > proj_
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
virtual void writeExitStatus(std::ostream &os) const
const Ptr< AlgorithmState< Real > > state_
const Ptr< CombinedStatusTest< Real > > status_
Real gamma0_
Radius decrease rate (negative rho) (default: 0.0625).
Real computeValue(Real inTol, Real &outTol, Real pRed, Real &fold, int iter, const Vector< Real > &x, const Vector< Real > &xold, Objective< Real > &obj)
void initialize(Vector< Real > &x, const Vector< Real > &g, Real ftol, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout)
int explim_
Maximum number of Cauchy point expansion steps (default: 10).
ESecant esec_
Secant type (default: Limited-Memory BFGS).
int SPflag_
Subproblem solver termination flag.
bool writeHeader_
Flag to write header at every iteration.
bool useSecantHessVec_
Flag to use secant as Hessian (default: false).
unsigned verbosity_
Output level (default: 0).
std::vector< bool > useInexact_
Real tol1_
Absolute tolerance for truncated CG (default: 1e-4).
bool interpRad_
Interpolate the trust-region radius if ratio is negative (default: false).
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 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
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)
int maxit_
Maximum number of CG iterations (default: 25).
Real eps_
Safeguard for numerically evaluating ratio.
Real eta0_
Step acceptance threshold (default: 0.05).
TRUtils::ETRFlag TRflag_
Trust-region exit flag.
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)
bool useSecantPrecond_
Flag to use secant as a preconditioner (default: false).
void writeOutput(std::ostream &os, const bool write_header=false) const override
Print iterate status.
Real spexp_
Relative tolerance exponent for subproblem solve (default: 1, range: [1,2]).
Real eta2_
Radius increase threshold (default: 0.9).
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...
Real gamma2_
Radius increase rate (default: 2.5).
Real extrapf_
Extrapolation rate for Cauchy point computation (default: 1e1).
Real alpha_
Initial Cauchy point step length (default: 1.0).
int redlim_
Maximum number of Cauchy point reduction steps (default: 10).
Real TRsafe_
Safeguard size for numerically evaluating ratio (default: 1e2).
int SPiter_
Subproblem solver iteration count.
Real eta1_
Radius decrease threshold (default: 0.05).
TrustRegionSPGAlgorithm(ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
void writeName(std::ostream &os) const override
Print step name.
void writeHeader(std::ostream &os) const override
Print iterate header.
bool normAlpha_
Normalize initial Cauchy point step length (default: false).
Real interpf_
Backtracking rate for Cauchy point computation (default: 1e-1).
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
Real tol2_
Relative tolerance for truncated CG (default: 1e-2).
int nhess_
Number of Hessian applications.
Real delMax_
Maximum trust-region radius (default: ROL_INF).
Real qtol_
Relative tolerance for computed decrease in Cauchy point computation (default: 1-8).
Real gamma1_
Radius decrease rate (positive rho) (default: 0.25).
Ptr< TrustRegionModel_U< Real > > model_
Container for trust-region model.
Real dgpstep(Vector< Real > &s, const Vector< Real > &w, const Vector< Real > &x, const Real alpha, std::ostream &outStream=std::cout) const
Real mu0_
Sufficient decrease parameter (default: 1e-2).
Defines the linear algebra or vector space interface.
virtual Real apply(const Vector< Real > &x) const
Apply to a dual vector. This is equivalent to the call .
virtual Real norm() const =0
Returns where .
virtual void set(const Vector &x)
Set where .
virtual void scale(const Real alpha)=0
Compute where .
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis,...
virtual void plus(const Vector &x)=0
Compute , where .
virtual void zero()
Set to zero vector.
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
virtual Real dot(const Vector &x) const =0
Compute where .
void analyzeRatio(Real &rho, ETRFlag &flag, const Real fold, const Real ftrial, const Real pRed, const Real epsi, std::ostream &outStream=std::cout, const bool print=false)
std::string ETRFlagToString(ETRFlag trf)
Real interpolateRadius(const Vector< Real > &g, const Vector< Real > &s, const Real snorm, const Real pRed, const Real fold, const Real ftrial, const Real del, const Real gamma0, const Real gamma1, const Real eta2, std::ostream &outStream=std::cout, const bool print=false)
std::string NumberToString(T Number)
Real ROL_EPSILON(void)
Platform-dependent machine epsilon.
ESecant StringToESecant(std::string s)
Real ROL_OVERFLOW(void)
Platform-dependent maximum double.