10 #ifndef ROL_COMPOSITESTEP_H
11 #define ROL_COMPOSITESTEP_H
15 #include "ROL_LAPACK.hpp"
16 #include "ROL_LinearAlgebra.hpp"
87 template <
typename T>
int sgn(T val) {
88 return (T(0) < val) - (val < T(0));
93 std::stringstream hist;
94 hist << std::scientific << std::setprecision(8);
95 hist <<
"\n Augmented System Solver:\n";
96 hist <<
" True Residual\n";
97 for (
unsigned j=0; j<res.size(); j++) {
98 hist <<
" " << std::left << std::setw(14) << res[j] <<
"\n";
101 std::cout << hist.str();
122 ROL::ParameterList& steplist = parlist.sublist(
"Step").sublist(
"Composite Step");
125 tolOSS_ = steplist.sublist(
"Optimality System Solver").get(
"Nominal Relative Tolerance", 1e-8);
126 tolOSSfixed_ = steplist.sublist(
"Optimality System Solver").get(
"Fix Tolerance",
true);
128 maxiterCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Iteration Limit", 20);
129 tolCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Relative Tolerance", 1e-2);
130 Delta_ = steplist.get(
"Initial Radius", 1e2);
131 useConHess_ = steplist.get(
"Use Constraint Hessian",
true);
133 int outLvl = steplist.get(
"Output Level", 0);
180 state->descentVec = x.
clone();
181 state->gradientVec = g.
clone();
182 state->constraintVec = c.
clone();
189 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
190 ROL::Ptr<Vector<Real> > gl =
gvec_->clone();
192 algo_state.
nfval = 0;
193 algo_state.
ncval = 0;
194 algo_state.
ngrad = 0;
196 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
211 gl->set(*
gvec_); gl->plus(*ajl);
213 algo_state.
gnorm = gl->norm();
222 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
224 ROL::Ptr<Vector<Real> > n =
xvec_->clone();
225 ROL::Ptr<Vector<Real> > c =
cvec_->clone();
226 ROL::Ptr<Vector<Real> > t =
xvec_->clone();
227 ROL::Ptr<Vector<Real> > tCP =
xvec_->clone();
228 ROL::Ptr<Vector<Real> > g =
gvec_->clone();
229 ROL::Ptr<Vector<Real> > gf =
gvec_->clone();
230 ROL::Ptr<Vector<Real> > Wg =
xvec_->clone();
231 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
234 ROL::Ptr<Vector<Real> > l_new =
lvec_->clone();
235 ROL::Ptr<Vector<Real> > c_new =
cvec_->clone();
236 ROL::Ptr<Vector<Real> > g_new =
gvec_->clone();
237 ROL::Ptr<Vector<Real> > gf_new =
gvec_->clone();
240 f = obj.
value(x, zerotol);
245 con.
value(*c, x, zerotol);
261 accept(s, *n, *t, f_new, *c_new, *gf_new, *l_new, *g_new, x, l, f, *gf, *c, *g, *tCP, *Wg, obj, con, algo_state);
279 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
282 ROL::Ptr<Vector<Real> > g =
gvec_->clone();
283 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
284 ROL::Ptr<Vector<Real> > gl =
gvec_->clone();
285 ROL::Ptr<Vector<Real> > c =
cvec_->clone();
290 if ((std::abs(
ared_) < em12) && std::abs(
pred_) < em12) {
298 else if (ratio >= zp8) {
312 Real val = obj.
value(x, zerotol);
317 gl->set(*g); gl->plus(*ajl);
319 con.
value(*c, x, zerotol);
322 state->gradientVec->set(*gl);
323 state->constraintVec->set(*c);
325 algo_state.
value = val;
326 algo_state.
gnorm = gl->norm();
327 algo_state.
cnorm = c->norm();
352 std::stringstream hist;
354 hist << std::setw(6) << std::left <<
"iter";
355 hist << std::setw(15) << std::left <<
"fval";
356 hist << std::setw(15) << std::left <<
"cnorm";
357 hist << std::setw(15) << std::left <<
"gLnorm";
358 hist << std::setw(15) << std::left <<
"snorm";
359 hist << std::setw(10) << std::left <<
"delta";
360 hist << std::setw(10) << std::left <<
"nnorm";
361 hist << std::setw(10) << std::left <<
"tnorm";
362 hist << std::setw(8) << std::left <<
"#fval";
363 hist << std::setw(8) << std::left <<
"#grad";
364 hist << std::setw(8) << std::left <<
"iterCG";
365 hist << std::setw(8) << std::left <<
"flagCG";
366 hist << std::setw(8) << std::left <<
"accept";
367 hist << std::setw(8) << std::left <<
"linsys";
373 std::stringstream hist;
374 hist <<
"\n" <<
" Composite-step trust-region solver";
384 std::stringstream hist;
385 hist << std::scientific << std::setprecision(6);
386 if ( algo_state.
iter == 0 ) {
392 if ( algo_state.
iter == 0 ) {
394 hist << std::setw(6) << std::left << algo_state.
iter;
395 hist << std::setw(15) << std::left << algo_state.
value;
396 hist << std::setw(15) << std::left << algo_state.
cnorm;
397 hist << std::setw(15) << std::left << algo_state.
gnorm;
402 hist << std::setw(6) << std::left << algo_state.
iter;
403 hist << std::setw(15) << std::left << algo_state.
value;
404 hist << std::setw(15) << std::left << algo_state.
cnorm;
405 hist << std::setw(15) << std::left << algo_state.
gnorm;
406 hist << std::setw(15) << std::left << algo_state.
snorm;
407 hist << std::scientific << std::setprecision(2);
408 hist << std::setw(10) << std::left <<
Delta_;
409 hist << std::setw(10) << std::left <<
nnorm_;
410 hist << std::setw(10) << std::left <<
tnorm_;
411 hist << std::scientific << std::setprecision(6);
412 hist << std::setw(8) << std::left << algo_state.
nfval;
413 hist << std::setw(8) << std::left << algo_state.
ngrad;
414 hist << std::setw(8) << std::left <<
iterCG_;
415 hist << std::setw(8) << std::left <<
flagCG_;
416 hist << std::setw(8) << std::left <<
flagAC_;
437 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
438 std::vector<Real> augiters;
441 std::stringstream hist;
442 hist <<
"\n Lagrange multiplier step\n";
443 std::cout << hist.str();
447 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
451 ROL::Ptr<Vector<Real> > b1 =
gvec_->clone();
452 ROL::Ptr<Vector<Real> > b2 =
cvec_->clone();
454 b1->set(gf); b1->plus(*ajl); b1->scale(-one);
459 ROL::Ptr<Vector<Real> > v1 =
xvec_->clone();
460 ROL::Ptr<Vector<Real> > v2 =
lvec_->clone();
463 Real b1norm = b1->norm();
504 std::stringstream hist;
505 hist <<
"\n Quasi-normal step\n";
506 std::cout << hist.str();
511 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
512 std::vector<Real> augiters;
515 ROL::Ptr<Vector<Real> > nCP =
xvec_->clone();
516 ROL::Ptr<Vector<Real> > nCPdual =
gvec_->clone();
517 ROL::Ptr<Vector<Real> > nN =
xvec_->clone();
518 ROL::Ptr<Vector<Real> > ctemp =
cvec_->clone();
519 ROL::Ptr<Vector<Real> > dualc0 =
lvec_->clone();
520 dualc0->set(c.
dual());
522 nCP->set(nCPdual->dual());
525 Real normsquare_ctemp = ctemp->dot(*ctemp);
526 if (normsquare_ctemp != zero) {
527 nCP->scale( -(nCP->dot(*nCP))/normsquare_ctemp );
532 Real norm_nCP = nCP->norm();
533 if (norm_nCP >= delta) {
535 n.
scale( delta/norm_nCP );
537 std::stringstream hist;
538 hist <<
" taking partial Cauchy step\n";
539 std::cout << hist.str();
552 nCPdual->set(nCP->dual());
553 nCPdual->scale(-one);
555 ROL::Ptr<Vector<Real> > dn =
xvec_->clone();
556 ROL::Ptr<Vector<Real> > y =
lvec_->clone();
568 Real norm_nN = nN->norm();
569 if (norm_nN <= delta) {
573 std::stringstream hist;
574 hist <<
" taking full Newton step\n";
575 std::cout << hist.str();
582 Real aa = dn->dot(*dn);
583 Real bb = dn->dot(*nCP);
584 Real cc = norm_nCP*norm_nCP - delta*delta;
585 Real tau = (-bb+sqrt(bb*bb-aa*cc))/aa;
589 std::stringstream hist;
590 hist <<
" taking dogleg step\n";
591 std::cout << hist.str();
616 bool orthocheck =
true;
618 Real tol_ortho = 0.5;
625 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
626 std::vector<Real> augiters;
631 ROL::Ptr<Vector<Real> > r =
gvec_->clone();
632 ROL::Ptr<Vector<Real> > pdesc =
xvec_->clone();
633 ROL::Ptr<Vector<Real> > tprev =
xvec_->clone();
634 ROL::Ptr<Vector<Real> > Wr =
xvec_->clone();
635 ROL::Ptr<Vector<Real> > Hp =
gvec_->clone();
636 ROL::Ptr<Vector<Real> > xtemp =
xvec_->clone();
637 ROL::Ptr<Vector<Real> > gtemp =
gvec_->clone();
638 ROL::Ptr<Vector<Real> > ltemp =
lvec_->clone();
639 ROL::Ptr<Vector<Real> > czero =
cvec_->clone();
642 obj.
hessVec(*gtemp, n, x, zerotol);
648 Real normg = r->norm();
658 std::vector<ROL::Ptr<Vector<Real > > > p;
659 std::vector<ROL::Ptr<Vector<Real > > > Hps;
660 std::vector<ROL::Ptr<Vector<Real > > > rs;
661 std::vector<ROL::Ptr<Vector<Real > > > Wrs;
666 std::stringstream hist;
667 hist <<
"\n Tangential subproblem\n";
668 hist << std::setw(6) << std::right <<
"iter" << std::setw(18) <<
"||Wr||/||Wr0||" << std::setw(15) <<
"||s||";
669 hist << std::setw(15) <<
"delta" << std::setw(15) <<
"||c'(x)s||" <<
"\n";
670 std::cout << hist.str();
675 std::stringstream hist;
676 hist <<
" >>> Tangential subproblem: Initial gradient is zero! \n";
677 std::cout << hist.str();
703 Wrs.push_back(
xvec_->clone());
707 if (normWg == zero) {
711 std::stringstream hist;
712 hist <<
" Initial projected residual is close to zero! \n";
713 std::cout << hist.str();
721 rs.push_back(
xvec_->clone());
723 (rs[0])->set(r->dual());
735 Wrs.push_back(
xvec_->clone());
740 normWr[
iterCG_-1] = Wr->norm();
743 ROL::Ptr<Vector<Real> > ct =
cvec_->clone();
745 Real linc = ct->norm();
746 std::stringstream hist;
747 hist << std::scientific << std::setprecision(6);
748 hist << std::setw(6) << std::right <<
iterCG_-1 << std::setw(18) << normWr[
iterCG_-1]/normWg << std::setw(15) << t.
norm();
749 hist << std::setw(15) << delta << std::setw(15) << linc <<
"\n";
750 std::cout << hist.str();
758 std::stringstream hist;
759 hist <<
" || W(g + H*(n+s)) || <= cgtol*|| W(g + H*n)|| \n";
760 std::cout << hist.str();
770 for (
int i=0; i<
iterCG_; i++) {
771 for (
int j=0; j<
iterCG_; j++) {
772 Wrr(i,j) = (Wrs[i])->dot(*rs[j]);
773 T(i,j) = Wrr(i,j)/(normWr[i]*normWr[j]);
776 Tm1(i,j) = Tm1(i,j) - one;
780 if (Tm1.normOne() >= tol_ortho) {
781 ROL::LAPACK<int,Real> lapack;
782 std::vector<int> ipiv(iterCG_);
784 std::vector<Real> work(3*iterCG_);
786 lapack.GETRF(iterCG_, iterCG_, T.values(), T.stride(), &ipiv[0], &info);
787 lapack.GETRI(iterCG_, T.values(), T.stride(), &ipiv[0], &work[0], 3*
iterCG_, &info);
789 for (
int i=0; i<
iterCG_; i++) {
790 Tm1(i,i) = Tm1(i,i) - one;
792 if (Tm1.normOne() > S_max) {
795 std::stringstream hist;
796 hist <<
" large nonorthogonality in W(R)'*R detected \n";
797 std::cout << hist.str();
805 p.push_back(
xvec_->clone());
808 for (
int j=1; j<
iterCG_; j++) {
809 Real scal = (p[iterCG_-1])->dot(*(Hps[j-1])) / (p[j-1])->dot(*(Hps[j-1]));
810 ROL::Ptr<Vector<Real> > pj =
xvec_->clone();
813 (p[iterCG_-1])->plus(*pj);
817 Hps.push_back(
xvec_->clone());
819 obj.
hessVec(*Hp, *(p[iterCG_-1]), x, zerotol);
826 (Hps[iterCG_-1])->set(Hp->dual());
828 pHp = (p[iterCG_-1])->dot(*(Hps[iterCG_-1]));
830 rp = (p[iterCG_-1])->dot(*(rs[iterCG_-1]));
832 normp = (p[iterCG_-1])->norm();
837 pdesc->set(*(p[iterCG_-1]));
838 if ((std::abs(rp) >= rptol*normp*normr) && (
sgn(rp) == 1)) {
842 Real a = pdesc->dot(*pdesc);
843 Real b = pdesc->dot(t);
844 Real c = t.
dot(t) - delta*delta;
846 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
847 xtemp->set(*(p[iterCG_-1]));
855 std::stringstream hist;
856 hist <<
" negative curvature detected \n";
857 std::cout << hist.str();
863 if (std::abs(rp) < rptol*normp*normr) {
866 std::stringstream hist;
867 hist <<
" Zero alpha due to inexactness. \n";
868 std::cout << hist.str();
877 xtemp->set(*(p[iterCG_-1]));
883 if (normt >= delta) {
884 pdesc->set(*(p[iterCG_-1]));
888 Real a = pdesc->dot(*pdesc);
889 Real b = pdesc->dot(*tprev);
890 Real c = tprev->dot(*tprev) - delta*delta;
892 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
893 xtemp->set(*(p[iterCG_-1]));
903 std::stringstream hist;
904 hist <<
" trust-region condition active \n";
905 std::cout << hist.str();
911 xtemp->set(*(Hps[iterCG_-1]));
914 r->plus(xtemp->dual());
917 rs.push_back(
xvec_->clone());
928 std::stringstream hist;
929 hist <<
" maximum number of iterations reached \n";
930 std::cout << hist.str();
945 Real tol_red_tang = 1e-3;
946 Real tol_red_all = 1e-1;
949 Real tol_fdiff = 1e-12;
954 Real rpred_over_pred = 0.5*(1-
eta_);
957 std::stringstream hist;
958 hist <<
"\n Composite step acceptance\n";
959 std::cout << hist.str();
966 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
967 std::vector<Real> augiters;
972 Real part_pred =
zero;
973 Real linc_preproj =
zero;
974 Real linc_postproj =
zero;
975 Real tangtol_start =
zero;
980 bool try_tCP =
false;
983 ROL::Ptr<Vector<Real> > xtrial =
xvec_->clone();
984 ROL::Ptr<Vector<Real> > Jl =
gvec_->clone();
985 ROL::Ptr<Vector<Real> > gfJl =
gvec_->clone();
986 ROL::Ptr<Vector<Real> > Jnc =
cvec_->clone();
987 ROL::Ptr<Vector<Real> > t_orig =
xvec_->clone();
988 ROL::Ptr<Vector<Real> > t_dual =
gvec_->clone();
989 ROL::Ptr<Vector<Real> > Jt_orig =
cvec_->clone();
990 ROL::Ptr<Vector<Real> > t_m_tCP =
xvec_->clone();
991 ROL::Ptr<Vector<Real> > ltemp =
lvec_->clone();
992 ROL::Ptr<Vector<Real> > xtemp =
xvec_->clone();
993 ROL::Ptr<Vector<Real> > rt =
cvec_->clone();
994 ROL::Ptr<Vector<Real> > Hn =
gvec_->clone();
995 ROL::Ptr<Vector<Real> > Hto =
gvec_->clone();
996 ROL::Ptr<Vector<Real> > cxxvec =
gvec_->clone();
997 ROL::Ptr<Vector<Real> > czero =
cvec_->clone();
999 Real Jnc_normsquared =
zero;
1000 Real c_normsquared =
zero;
1007 Jnc_normsquared = Jnc->dot(*Jnc);
1008 c_normsquared = c.
dot(c);
1010 for (
int ct=0; ct<ct_max; ct++) {
1014 t_m_tCP->scale(-one);
1016 if (t_m_tCP->norm() ==
zero) {
1022 linc_preproj = Jt_orig->norm();
1024 rpred = two*rpred_over_pred*pred;
1027 tangtol_start = tangtol;
1029 while (std::abs(rpred)/pred > rpred_over_pred) {
1032 tangtol = tol_red_tang*tangtol;
1034 if (tangtol < mintol) {
1036 std::stringstream hist;
1037 hist <<
"\n The projection of the tangential step cannot be done with sufficient precision.\n";
1038 hist <<
" Is the quasi-normal step very small? Continuing with no global convergence guarantees.\n";
1039 std::cout << hist.str();
1047 t_dual->set(t_orig->dual());
1054 linc_postproj = rt->norm();
1061 obj.
hessVec(*Hn, n, x, zerotol);
1066 obj.
hessVec(*Hto, *t_orig, x, zerotol);
1077 f_new = obj.
value(*xtrial, zerotol);
1078 obj.
gradient(gf_new, *xtrial, zerotol);
1079 con.
value(c_new, *xtrial, zerotol);
1084 part_pred = - Wg.
dot(*t_orig);
1088 part_pred -= n.
dot(gfJl->dual());
1090 part_pred -= half*n.
dot(Hn->dual());
1092 part_pred -= half*t_orig->dot(Hto->dual());
1094 ltemp->axpy(-one, l);
1096 part_pred -= Jnc->dot(ltemp->dual());
1098 if ( part_pred < -half*
penalty_*(c_normsquared-Jnc_normsquared) ) {
1099 penalty_ = ( -two * part_pred / (c_normsquared-Jnc_normsquared) ) + beta;
1102 pred = part_pred +
penalty_*(c_normsquared-Jnc_normsquared);
1106 rpred = - rt->dot(ltemp->dual()) -
penalty_ * rt->dot(*rt) - two *
penalty_ * rt->dot(*Jnc);
1114 tangtol = tangtol_start;
1120 if ( t_orig->norm()/xtemp->norm() <
tntmax_ ) {
1124 t_m_tCP->set(*t_orig);
1125 t_m_tCP->scale(-one);
1127 if ((t_m_tCP->norm() > 0) && try_tCP) {
1129 std::stringstream hist;
1130 hist <<
" ---> now trying tangential Cauchy point\n";
1131 std::cout << hist.str();
1137 std::stringstream hist;
1138 hist <<
" ---> recomputing quasi-normal step and re-solving tangential subproblem\n";
1139 std::cout << hist.str();
1183 if (std::abs(fdiff / (f+em24)) < tol_fdiff) {
1201 std::stringstream hist;
1202 hist <<
"\n Trial step info ...\n";
1203 hist <<
" n_norm = " <<
nnorm_ <<
"\n";
1204 hist <<
" t_norm = " <<
tnorm_ <<
"\n";
1205 hist <<
" s_norm = " <<
snorm_ <<
"\n";
1206 hist <<
" xtrial_norm = " << xtrial->norm() <<
"\n";
1207 hist <<
" f_old = " << f <<
"\n";
1208 hist <<
" f_trial = " << f_new <<
"\n";
1209 hist <<
" f_old-f_trial = " << f-f_new <<
"\n";
1210 hist <<
" ||c_old|| = " << c.
norm() <<
"\n";
1211 hist <<
" ||c_trial|| = " << c_new.
norm() <<
"\n";
1212 hist <<
" ||Jac*t_preproj|| = " << linc_preproj <<
"\n";
1213 hist <<
" ||Jac*t_postproj|| = " << linc_postproj <<
"\n";
1214 hist <<
" ||t_tilde||/||t|| = " << t_orig->norm() / t.
norm() <<
"\n";
1215 hist <<
" ||t_tilde||/||n+t|| = " << t_orig->norm() / snorm_ <<
"\n";
1216 hist <<
" # projections = " << num_proj <<
"\n";
1217 hist <<
" penalty param = " <<
penalty_ <<
"\n";
1218 hist <<
" ared = " << ared_ <<
"\n";
1219 hist <<
" pred = " <<
pred_ <<
"\n";
1220 hist <<
" ared/pred = " << ared_/pred_ <<
"\n";
1221 std::cout << hist.str();
Provides the interface to evaluate objective functions.
ROL::Ptr< Vector< Real > > cvec_
void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .
std::string printHeader(void) const
Print iterate header.
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
Real setTolOSS(const Real intol) const
virtual void plus(const Vector &x)=0
Compute , where .
virtual void update(const Vector< Real > &x, UpdateType type, int iter=-1)
Update constraint function.
void accept(Vector< Real > &s, Vector< Real > &n, Vector< Real > &t, Real f_new, Vector< Real > &c_new, Vector< Real > &gf_new, Vector< Real > &l_new, Vector< Real > &g_new, const Vector< Real > &x, const Vector< Real > &l, Real f, const Vector< Real > &gf, const Vector< Real > &c, const Vector< Real > &g, Vector< Real > &tCP, Vector< Real > &Wg, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
Check acceptance of subproblem solutions, adjust merit function penalty parameter, ensure global convergence.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
void compute(Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.
ROL::Ptr< Vector< Real > > xvec_
ROL::Ptr< Vector< Real > > gvec_
virtual Real value(const Vector< Real > &x, Real &tol)=0
Compute value.
Provides the interface to compute optimization steps.
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Contains definitions of custom data types in ROL.
void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step.
CompositeStep(ROL::ParameterList &parlist)
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
virtual void value(Vector< Real > &c, const Vector< Real > &x, Real &tol)=0
Evaluate the constraint operator at .
virtual void update(const Vector< Real > &x, UpdateType type, int iter=-1)
Update objective function.
virtual Real dot(const Vector &x) const =0
Compute where .
void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, Constraint< Real > &con, AlgorithmState< Real > &algo_state)
Update step, if successful.
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
std::string print(AlgorithmState< Real > &algo_state, bool pHeader=false) const
Print iterate status.
State for algorithm class. Will be used for restarts.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
void computeQuasinormalStep(Vector< Real > &n, const Vector< Real > &c, const Vector< Real > &x, Real delta, Constraint< Real > &con)
Compute quasi-normal step by minimizing the norm of the linearized constraint.
virtual void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
ROL::Ptr< StepState< Real > > getState(void)
void update(Vector< Real > &x, const Vector< Real > &s, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Update step, for bound constraints; here only to satisfy the interface requirements, does nothing, needs refactoring.
ROL::Ptr< Vector< Real > > lvec_
Implements the computation of optimization steps with composite-step trust-region methods...
Provides the interface to apply upper and lower bound constraints.
virtual void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
virtual std::vector< Real > solveAugmentedSystem(Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol)
Approximately solves the augmented system where , , , , is an identity or Riesz operator...
void solveTangentialSubproblem(Vector< Real > &t, Vector< Real > &tCP, Vector< Real > &Wg, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &n, const Vector< Real > &l, Real delta, Objective< Real > &obj, Constraint< Real > &con)
Solve tangential subproblem.
virtual void set(const Vector &x)
Set where .
void printInfoLS(const std::vector< Real > &res) const
virtual Real norm() const =0
Returns where .
void computeLagrangeMultiplier(Vector< Real > &l, const Vector< Real > &x, const Vector< Real > &gf, Constraint< Real > &con)
Compute Lagrange multipliers by solving the least-squares problem minimizing the gradient of the Lagr...
Defines the general constraint operator interface.
std::string printName(void) const
Print step name.