44 #ifndef ROL_COMPOSITESTEP_H
45 #define ROL_COMPOSITESTEP_H
49 #include "ROL_LAPACK.hpp"
50 #include "ROL_LinearAlgebra.hpp"
121 template <
typename T>
int sgn(T val) {
122 return (T(0) < val) - (val < T(0));
127 std::stringstream hist;
128 hist << std::scientific << std::setprecision(8);
129 hist <<
"\n Augmented System Solver:\n";
130 hist <<
" True Residual\n";
131 for (
unsigned j=0; j<res.size(); j++) {
132 hist <<
" " << std::left << std::setw(14) << res[j] <<
"\n";
135 std::cout << hist.str();
156 ROL::ParameterList& steplist = parlist.sublist(
"Step").sublist(
"Composite Step");
159 tolOSS_ = steplist.sublist(
"Optimality System Solver").get(
"Nominal Relative Tolerance", 1e-8);
160 tolOSSfixed_ = steplist.sublist(
"Optimality System Solver").get(
"Fix Tolerance",
true);
162 maxiterCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Iteration Limit", 20);
163 tolCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Relative Tolerance", 1e-2);
164 Delta_ = steplist.get(
"Initial Radius", 1e2);
165 useConHess_ = steplist.get(
"Use Constraint Hessian",
true);
167 int outLvl = steplist.get(
"Output Level", 0);
214 state->descentVec = x.
clone();
215 state->gradientVec = g.
clone();
216 state->constraintVec = c.
clone();
223 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
224 ROL::Ptr<Vector<Real> > gl =
gvec_->clone();
226 algo_state.
nfval = 0;
227 algo_state.
ncval = 0;
228 algo_state.
ngrad = 0;
230 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
245 gl->set(*
gvec_); gl->plus(*ajl);
247 algo_state.
gnorm = gl->norm();
256 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
258 ROL::Ptr<Vector<Real> > n =
xvec_->clone();
259 ROL::Ptr<Vector<Real> > c =
cvec_->clone();
260 ROL::Ptr<Vector<Real> > t =
xvec_->clone();
261 ROL::Ptr<Vector<Real> > tCP =
xvec_->clone();
262 ROL::Ptr<Vector<Real> > g =
gvec_->clone();
263 ROL::Ptr<Vector<Real> > gf =
gvec_->clone();
264 ROL::Ptr<Vector<Real> > Wg =
xvec_->clone();
265 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
268 ROL::Ptr<Vector<Real> > l_new =
lvec_->clone();
269 ROL::Ptr<Vector<Real> > c_new =
cvec_->clone();
270 ROL::Ptr<Vector<Real> > g_new =
gvec_->clone();
271 ROL::Ptr<Vector<Real> > gf_new =
gvec_->clone();
274 f = obj.
value(x, zerotol);
279 con.
value(*c, x, zerotol);
295 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);
313 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
316 ROL::Ptr<Vector<Real> > g =
gvec_->clone();
317 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
318 ROL::Ptr<Vector<Real> > gl =
gvec_->clone();
319 ROL::Ptr<Vector<Real> > c =
cvec_->clone();
324 if ((std::abs(
ared_) < em12) && std::abs(
pred_) < em12) {
332 else if (ratio >= zp8) {
346 Real val = obj.
value(x, zerotol);
351 gl->set(*g); gl->plus(*ajl);
353 con.
value(*c, x, zerotol);
356 state->gradientVec->set(*gl);
357 state->constraintVec->set(*c);
359 algo_state.
value = val;
360 algo_state.
gnorm = gl->norm();
361 algo_state.
cnorm = c->norm();
386 std::stringstream hist;
388 hist << std::setw(6) << std::left <<
"iter";
389 hist << std::setw(15) << std::left <<
"fval";
390 hist << std::setw(15) << std::left <<
"cnorm";
391 hist << std::setw(15) << std::left <<
"gLnorm";
392 hist << std::setw(15) << std::left <<
"snorm";
393 hist << std::setw(10) << std::left <<
"delta";
394 hist << std::setw(10) << std::left <<
"nnorm";
395 hist << std::setw(10) << std::left <<
"tnorm";
396 hist << std::setw(8) << std::left <<
"#fval";
397 hist << std::setw(8) << std::left <<
"#grad";
398 hist << std::setw(8) << std::left <<
"iterCG";
399 hist << std::setw(8) << std::left <<
"flagCG";
400 hist << std::setw(8) << std::left <<
"accept";
401 hist << std::setw(8) << std::left <<
"linsys";
407 std::stringstream hist;
408 hist <<
"\n" <<
" Composite-step trust-region solver";
418 std::stringstream hist;
419 hist << std::scientific << std::setprecision(6);
420 if ( algo_state.
iter == 0 ) {
426 if ( algo_state.
iter == 0 ) {
428 hist << std::setw(6) << std::left << algo_state.
iter;
429 hist << std::setw(15) << std::left << algo_state.
value;
430 hist << std::setw(15) << std::left << algo_state.
cnorm;
431 hist << std::setw(15) << std::left << algo_state.
gnorm;
436 hist << std::setw(6) << std::left << algo_state.
iter;
437 hist << std::setw(15) << std::left << algo_state.
value;
438 hist << std::setw(15) << std::left << algo_state.
cnorm;
439 hist << std::setw(15) << std::left << algo_state.
gnorm;
440 hist << std::setw(15) << std::left << algo_state.
snorm;
441 hist << std::scientific << std::setprecision(2);
442 hist << std::setw(10) << std::left <<
Delta_;
443 hist << std::setw(10) << std::left <<
nnorm_;
444 hist << std::setw(10) << std::left <<
tnorm_;
445 hist << std::scientific << std::setprecision(6);
446 hist << std::setw(8) << std::left << algo_state.
nfval;
447 hist << std::setw(8) << std::left << algo_state.
ngrad;
448 hist << std::setw(8) << std::left <<
iterCG_;
449 hist << std::setw(8) << std::left <<
flagCG_;
450 hist << std::setw(8) << std::left <<
flagAC_;
471 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
472 std::vector<Real> augiters;
475 std::stringstream hist;
476 hist <<
"\n Lagrange multiplier step\n";
477 std::cout << hist.str();
481 ROL::Ptr<Vector<Real> > ajl =
gvec_->clone();
485 ROL::Ptr<Vector<Real> > b1 =
gvec_->clone();
486 ROL::Ptr<Vector<Real> > b2 =
cvec_->clone();
488 b1->set(gf); b1->plus(*ajl); b1->scale(-one);
493 ROL::Ptr<Vector<Real> > v1 =
xvec_->clone();
494 ROL::Ptr<Vector<Real> > v2 =
lvec_->clone();
497 Real b1norm = b1->norm();
538 std::stringstream hist;
539 hist <<
"\n Quasi-normal step\n";
540 std::cout << hist.str();
545 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
546 std::vector<Real> augiters;
549 ROL::Ptr<Vector<Real> > nCP =
xvec_->clone();
550 ROL::Ptr<Vector<Real> > nCPdual =
gvec_->clone();
551 ROL::Ptr<Vector<Real> > nN =
xvec_->clone();
552 ROL::Ptr<Vector<Real> > ctemp =
cvec_->clone();
553 ROL::Ptr<Vector<Real> > dualc0 =
lvec_->clone();
554 dualc0->set(c.
dual());
556 nCP->set(nCPdual->dual());
559 Real normsquare_ctemp = ctemp->dot(*ctemp);
560 if (normsquare_ctemp != zero) {
561 nCP->scale( -(nCP->dot(*nCP))/normsquare_ctemp );
566 Real norm_nCP = nCP->norm();
567 if (norm_nCP >= delta) {
569 n.
scale( delta/norm_nCP );
571 std::stringstream hist;
572 hist <<
" taking partial Cauchy step\n";
573 std::cout << hist.str();
586 nCPdual->set(nCP->dual());
587 nCPdual->scale(-one);
589 ROL::Ptr<Vector<Real> > dn =
xvec_->clone();
590 ROL::Ptr<Vector<Real> > y =
lvec_->clone();
602 Real norm_nN = nN->norm();
603 if (norm_nN <= delta) {
607 std::stringstream hist;
608 hist <<
" taking full Newton step\n";
609 std::cout << hist.str();
616 Real aa = dn->dot(*dn);
617 Real bb = dn->dot(*nCP);
618 Real cc = norm_nCP*norm_nCP - delta*delta;
619 Real tau = (-bb+sqrt(bb*bb-aa*cc))/aa;
623 std::stringstream hist;
624 hist <<
" taking dogleg step\n";
625 std::cout << hist.str();
650 bool orthocheck =
true;
652 Real tol_ortho = 0.5;
659 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
660 std::vector<Real> augiters;
665 ROL::Ptr<Vector<Real> > r =
gvec_->clone();
666 ROL::Ptr<Vector<Real> > pdesc =
xvec_->clone();
667 ROL::Ptr<Vector<Real> > tprev =
xvec_->clone();
668 ROL::Ptr<Vector<Real> > Wr =
xvec_->clone();
669 ROL::Ptr<Vector<Real> > Hp =
gvec_->clone();
670 ROL::Ptr<Vector<Real> > xtemp =
xvec_->clone();
671 ROL::Ptr<Vector<Real> > gtemp =
gvec_->clone();
672 ROL::Ptr<Vector<Real> > ltemp =
lvec_->clone();
673 ROL::Ptr<Vector<Real> > czero =
cvec_->clone();
676 obj.
hessVec(*gtemp, n, x, zerotol);
682 Real normg = r->norm();
692 std::vector<ROL::Ptr<Vector<Real > > > p;
693 std::vector<ROL::Ptr<Vector<Real > > > Hps;
694 std::vector<ROL::Ptr<Vector<Real > > > rs;
695 std::vector<ROL::Ptr<Vector<Real > > > Wrs;
700 std::stringstream hist;
701 hist <<
"\n Tangential subproblem\n";
702 hist << std::setw(6) << std::right <<
"iter" << std::setw(18) <<
"||Wr||/||Wr0||" << std::setw(15) <<
"||s||";
703 hist << std::setw(15) <<
"delta" << std::setw(15) <<
"||c'(x)s||" <<
"\n";
704 std::cout << hist.str();
709 std::stringstream hist;
710 hist <<
" >>> Tangential subproblem: Initial gradient is zero! \n";
711 std::cout << hist.str();
737 Wrs.push_back(
xvec_->clone());
741 if (normWg == zero) {
745 std::stringstream hist;
746 hist <<
" Initial projected residual is close to zero! \n";
747 std::cout << hist.str();
755 rs.push_back(
xvec_->clone());
757 (rs[0])->set(r->dual());
769 Wrs.push_back(
xvec_->clone());
774 normWr[
iterCG_-1] = Wr->norm();
777 ROL::Ptr<Vector<Real> > ct =
cvec_->clone();
779 Real linc = ct->norm();
780 std::stringstream hist;
781 hist << std::scientific << std::setprecision(6);
782 hist << std::setw(6) << std::right <<
iterCG_-1 << std::setw(18) << normWr[
iterCG_-1]/normWg << std::setw(15) << t.
norm();
783 hist << std::setw(15) << delta << std::setw(15) << linc <<
"\n";
784 std::cout << hist.str();
792 std::stringstream hist;
793 hist <<
" || W(g + H*(n+s)) || <= cgtol*|| W(g + H*n)|| \n";
794 std::cout << hist.str();
804 for (
int i=0; i<
iterCG_; i++) {
805 for (
int j=0; j<
iterCG_; j++) {
806 Wrr(i,j) = (Wrs[i])->dot(*rs[j]);
807 T(i,j) = Wrr(i,j)/(normWr[i]*normWr[j]);
810 Tm1(i,j) = Tm1(i,j) - one;
814 if (Tm1.normOne() >= tol_ortho) {
815 ROL::LAPACK<int,Real> lapack;
816 std::vector<int> ipiv(iterCG_);
818 std::vector<Real> work(3*iterCG_);
820 lapack.GETRF(iterCG_, iterCG_, T.values(), T.stride(), &ipiv[0], &info);
821 lapack.GETRI(iterCG_, T.values(), T.stride(), &ipiv[0], &work[0], 3*
iterCG_, &info);
823 for (
int i=0; i<
iterCG_; i++) {
824 Tm1(i,i) = Tm1(i,i) - one;
826 if (Tm1.normOne() > S_max) {
829 std::stringstream hist;
830 hist <<
" large nonorthogonality in W(R)'*R detected \n";
831 std::cout << hist.str();
839 p.push_back(
xvec_->clone());
842 for (
int j=1; j<
iterCG_; j++) {
843 Real scal = (p[iterCG_-1])->dot(*(Hps[j-1])) / (p[j-1])->dot(*(Hps[j-1]));
844 ROL::Ptr<Vector<Real> > pj =
xvec_->clone();
847 (p[iterCG_-1])->plus(*pj);
851 Hps.push_back(
xvec_->clone());
853 obj.
hessVec(*Hp, *(p[iterCG_-1]), x, zerotol);
860 (Hps[iterCG_-1])->set(Hp->dual());
862 pHp = (p[iterCG_-1])->dot(*(Hps[iterCG_-1]));
864 rp = (p[iterCG_-1])->dot(*(rs[iterCG_-1]));
866 normp = (p[iterCG_-1])->norm();
871 pdesc->set(*(p[iterCG_-1]));
872 if ((std::abs(rp) >= rptol*normp*normr) && (
sgn(rp) == 1)) {
876 Real a = pdesc->dot(*pdesc);
877 Real b = pdesc->dot(t);
878 Real c = t.
dot(t) - delta*delta;
880 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
881 xtemp->set(*(p[iterCG_-1]));
889 std::stringstream hist;
890 hist <<
" negative curvature detected \n";
891 std::cout << hist.str();
897 if (std::abs(rp) < rptol*normp*normr) {
900 std::stringstream hist;
901 hist <<
" Zero alpha due to inexactness. \n";
902 std::cout << hist.str();
911 xtemp->set(*(p[iterCG_-1]));
917 if (normt >= delta) {
918 pdesc->set(*(p[iterCG_-1]));
922 Real a = pdesc->dot(*pdesc);
923 Real b = pdesc->dot(*tprev);
924 Real c = tprev->dot(*tprev) - delta*delta;
926 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
927 xtemp->set(*(p[iterCG_-1]));
937 std::stringstream hist;
938 hist <<
" trust-region condition active \n";
939 std::cout << hist.str();
945 xtemp->set(*(Hps[iterCG_-1]));
948 r->plus(xtemp->dual());
951 rs.push_back(
xvec_->clone());
962 std::stringstream hist;
963 hist <<
" maximum number of iterations reached \n";
964 std::cout << hist.str();
979 Real tol_red_tang = 1e-3;
980 Real tol_red_all = 1e-1;
983 Real tol_fdiff = 1e-12;
988 Real rpred_over_pred = 0.5*(1-
eta_);
991 std::stringstream hist;
992 hist <<
"\n Composite step acceptance\n";
993 std::cout << hist.str();
1000 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
1001 std::vector<Real> augiters;
1006 Real part_pred =
zero;
1007 Real linc_preproj =
zero;
1008 Real linc_postproj =
zero;
1009 Real tangtol_start =
zero;
1014 bool try_tCP =
false;
1017 ROL::Ptr<Vector<Real> > xtrial =
xvec_->clone();
1018 ROL::Ptr<Vector<Real> > Jl =
gvec_->clone();
1019 ROL::Ptr<Vector<Real> > gfJl =
gvec_->clone();
1020 ROL::Ptr<Vector<Real> > Jnc =
cvec_->clone();
1021 ROL::Ptr<Vector<Real> > t_orig =
xvec_->clone();
1022 ROL::Ptr<Vector<Real> > t_dual =
gvec_->clone();
1023 ROL::Ptr<Vector<Real> > Jt_orig =
cvec_->clone();
1024 ROL::Ptr<Vector<Real> > t_m_tCP =
xvec_->clone();
1025 ROL::Ptr<Vector<Real> > ltemp =
lvec_->clone();
1026 ROL::Ptr<Vector<Real> > xtemp =
xvec_->clone();
1027 ROL::Ptr<Vector<Real> > rt =
cvec_->clone();
1028 ROL::Ptr<Vector<Real> > Hn =
gvec_->clone();
1029 ROL::Ptr<Vector<Real> > Hto =
gvec_->clone();
1030 ROL::Ptr<Vector<Real> > cxxvec =
gvec_->clone();
1031 ROL::Ptr<Vector<Real> > czero =
cvec_->clone();
1033 Real Jnc_normsquared =
zero;
1034 Real c_normsquared =
zero;
1041 Jnc_normsquared = Jnc->dot(*Jnc);
1042 c_normsquared = c.
dot(c);
1044 for (
int ct=0; ct<ct_max; ct++) {
1048 t_m_tCP->scale(-one);
1050 if (t_m_tCP->norm() ==
zero) {
1056 linc_preproj = Jt_orig->norm();
1058 rpred = two*rpred_over_pred*pred;
1061 tangtol_start = tangtol;
1063 while (std::abs(rpred)/pred > rpred_over_pred) {
1066 tangtol = tol_red_tang*tangtol;
1068 if (tangtol < mintol) {
1070 std::stringstream hist;
1071 hist <<
"\n The projection of the tangential step cannot be done with sufficient precision.\n";
1072 hist <<
" Is the quasi-normal step very small? Continuing with no global convergence guarantees.\n";
1073 std::cout << hist.str();
1081 t_dual->set(t_orig->dual());
1088 linc_postproj = rt->norm();
1095 obj.
hessVec(*Hn, n, x, zerotol);
1100 obj.
hessVec(*Hto, *t_orig, x, zerotol);
1111 f_new = obj.
value(*xtrial, zerotol);
1112 obj.
gradient(gf_new, *xtrial, zerotol);
1113 con.
value(c_new, *xtrial, zerotol);
1118 part_pred = - Wg.
dot(*t_orig);
1122 part_pred -= n.
dot(gfJl->dual());
1124 part_pred -= half*n.
dot(Hn->dual());
1126 part_pred -= half*t_orig->dot(Hto->dual());
1128 ltemp->axpy(-one, l);
1130 part_pred -= Jnc->dot(ltemp->dual());
1132 if ( part_pred < -half*
penalty_*(c_normsquared-Jnc_normsquared) ) {
1133 penalty_ = ( -two * part_pred / (c_normsquared-Jnc_normsquared) ) + beta;
1136 pred = part_pred +
penalty_*(c_normsquared-Jnc_normsquared);
1140 rpred = - rt->dot(ltemp->dual()) -
penalty_ * rt->dot(*rt) - two *
penalty_ * rt->dot(*Jnc);
1148 tangtol = tangtol_start;
1154 if ( t_orig->norm()/xtemp->norm() <
tntmax_ ) {
1158 t_m_tCP->set(*t_orig);
1159 t_m_tCP->scale(-one);
1161 if ((t_m_tCP->norm() > 0) && try_tCP) {
1163 std::stringstream hist;
1164 hist <<
" ---> now trying tangential Cauchy point\n";
1165 std::cout << hist.str();
1171 std::stringstream hist;
1172 hist <<
" ---> recomputing quasi-normal step and re-solving tangential subproblem\n";
1173 std::cout << hist.str();
1217 if (std::abs(fdiff / (f+em24)) < tol_fdiff) {
1235 std::stringstream hist;
1236 hist <<
"\n Trial step info ...\n";
1237 hist <<
" n_norm = " <<
nnorm_ <<
"\n";
1238 hist <<
" t_norm = " <<
tnorm_ <<
"\n";
1239 hist <<
" s_norm = " <<
snorm_ <<
"\n";
1240 hist <<
" xtrial_norm = " << xtrial->norm() <<
"\n";
1241 hist <<
" f_old = " << f <<
"\n";
1242 hist <<
" f_trial = " << f_new <<
"\n";
1243 hist <<
" f_old-f_trial = " << f-f_new <<
"\n";
1244 hist <<
" ||c_old|| = " << c.
norm() <<
"\n";
1245 hist <<
" ||c_trial|| = " << c_new.
norm() <<
"\n";
1246 hist <<
" ||Jac*t_preproj|| = " << linc_preproj <<
"\n";
1247 hist <<
" ||Jac*t_postproj|| = " << linc_postproj <<
"\n";
1248 hist <<
" ||t_tilde||/||t|| = " << t_orig->norm() / t.
norm() <<
"\n";
1249 hist <<
" ||t_tilde||/||n+t|| = " << t_orig->norm() / snorm_ <<
"\n";
1250 hist <<
" # projections = " << num_proj <<
"\n";
1251 hist <<
" penalty param = " <<
penalty_ <<
"\n";
1252 hist <<
" ared = " << ared_ <<
"\n";
1253 hist <<
" pred = " <<
pred_ <<
"\n";
1254 hist <<
" ared/pred = " << ared_/pred_ <<
"\n";
1255 std::cout << hist.str();
Provides the interface to evaluate objective functions.
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update constraint functions. x is the optimization variable, flag = true if optimization variable is ...
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 .
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 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 .
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
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.