44 #ifndef ROL_COMPOSITESTEPSQP_H
45 #define ROL_COMPOSITESTEPSQP_H
51 #include "Teuchos_SerialDenseMatrix.hpp"
52 #include "Teuchos_LAPACK.hpp"
67 Teuchos::RCP<Vector<Real> >
xvec_;
68 Teuchos::RCP<Vector<Real> >
gvec_;
69 Teuchos::RCP<Vector<Real> >
cvec_;
70 Teuchos::RCP<Vector<Real> >
lvec_;
117 template <
typename T>
int sgn(T val) {
118 return (T(0) < val) - (val < T(0));
123 std::stringstream hist;
124 hist << std::scientific << std::setprecision(8);
125 hist <<
"\n Augmented System Solver:\n";
126 hist <<
" True Residual\n";
127 for (
unsigned j=0; j<res.size(); j++) {
128 hist <<
" " << std::left << std::setw(14) << res[j] <<
"\n";
131 std::cout << hist.str();
145 Real nominal_tol = parlist.get(
"Nominal SQP Optimality Solver Tolerance", 1e-3);
147 maxiterCG_ = parlist.get(
"Maximum Number of Krylov Iterations",20);
148 tolCG_ = parlist.get(
"Absolute Krylov Tolerance",1e-2);
198 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
199 Teuchos::RCP<Vector<Real> > gl =
gvec_->clone();
201 algo_state.
nfval = 0;
202 algo_state.
ncval = 0;
203 algo_state.
ngrad = 0;
220 gl->set(*
gvec_); gl->plus(*ajl);
222 algo_state.
gnorm = gl->norm();
233 Teuchos::RCP<Vector<Real> > n =
xvec_->clone();
234 Teuchos::RCP<Vector<Real> > c =
cvec_->clone();
235 Teuchos::RCP<Vector<Real> > t =
xvec_->clone();
236 Teuchos::RCP<Vector<Real> > tCP =
xvec_->clone();
237 Teuchos::RCP<Vector<Real> > g =
gvec_->clone();
238 Teuchos::RCP<Vector<Real> > gf =
gvec_->clone();
239 Teuchos::RCP<Vector<Real> > Wg =
xvec_->clone();
240 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
243 Teuchos::RCP<Vector<Real> > l_new =
lvec_->clone();
244 Teuchos::RCP<Vector<Real> > c_new =
cvec_->clone();
245 Teuchos::RCP<Vector<Real> > g_new =
gvec_->clone();
246 Teuchos::RCP<Vector<Real> > gf_new =
gvec_->clone();
249 f = obj.
value(x, zerotol);
254 con.
value(*c, x, zerotol);
270 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);
285 Teuchos::RCP<Vector<Real> > g =
gvec_->clone();
286 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
287 Teuchos::RCP<Vector<Real> > gl =
gvec_->clone();
288 Teuchos::RCP<Vector<Real> > c =
cvec_->clone();
293 if ((std::abs(
ared_) < 1e-12) && std::abs(
pred_) < 1e-12) {
301 else if (ratio >= 0.8) {
315 Real val = obj.
value(x, zerotol);
320 gl->set(*g); gl->plus(*ajl);
322 con.
value(*c, x, zerotol);
324 algo_state.
value = val;
325 algo_state.
gnorm = gl->norm();
326 algo_state.
cnorm = c->norm();
351 std::stringstream hist;
353 hist << std::setw(6) << std::left <<
"iter";
354 hist << std::setw(15) << std::left <<
"fval";
355 hist << std::setw(15) << std::left <<
"cnorm";
356 hist << std::setw(15) << std::left <<
"gLnorm";
357 hist << std::setw(15) << std::left <<
"snorm";
358 hist << std::setw(10) << std::left <<
"delta";
359 hist << std::setw(10) << std::left <<
"nnorm";
360 hist << std::setw(10) << std::left <<
"tnorm";
361 hist << std::setw(8) << std::left <<
"#fval";
362 hist << std::setw(8) << std::left <<
"#grad";
363 hist << std::setw(8) << std::left <<
"iterCG";
364 hist << std::setw(8) << std::left <<
"flagCG";
365 hist << std::setw(8) << std::left <<
"accept";
366 hist << std::setw(8) << std::left <<
"linsys";
372 std::stringstream hist;
373 hist <<
"\n" <<
" Composite-step trust-region SQP solver";
383 std::stringstream hist;
384 hist << std::scientific << std::setprecision(6);
385 if ( algo_state.
iter == 0 ) {
391 if ( algo_state.
iter == 0 ) {
393 hist << std::setw(6) << std::left << algo_state.
iter;
394 hist << std::setw(15) << std::left << algo_state.
value;
395 hist << std::setw(15) << std::left << algo_state.
cnorm;
396 hist << std::setw(15) << std::left << algo_state.
gnorm;
401 hist << std::setw(6) << std::left << algo_state.
iter;
402 hist << std::setw(15) << std::left << algo_state.
value;
403 hist << std::setw(15) << std::left << algo_state.
cnorm;
404 hist << std::setw(15) << std::left << algo_state.
gnorm;
405 hist << std::setw(15) << std::left << algo_state.
snorm;
406 hist << std::scientific << std::setprecision(2);
407 hist << std::setw(10) << std::left <<
Delta_;
408 hist << std::setw(10) << std::left <<
nnorm_;
409 hist << std::setw(10) << std::left <<
tnorm_;
410 hist << std::scientific << std::setprecision(6);
411 hist << std::setw(8) << std::left << algo_state.
nfval;
412 hist << std::setw(8) << std::left << algo_state.
ngrad;
413 hist << std::setw(8) << std::left <<
iterCG_;
414 hist << std::setw(8) << std::left <<
flagCG_;
415 hist << std::setw(8) << std::left <<
flagAC_;
436 std::vector<Real> augiters;
439 std::stringstream hist;
440 hist <<
"\n SQP_lagrange_multiplier\n";
441 std::cout << hist.str();
445 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
449 Teuchos::RCP<Vector<Real> > b1 =
gvec_->clone();
450 Teuchos::RCP<Vector<Real> > b2 =
cvec_->clone();
452 b1->set(gf); b1->plus(*ajl); b1->scale(-1.0);
457 Teuchos::RCP<Vector<Real> > v1 =
xvec_->clone();
458 Teuchos::RCP<Vector<Real> > v2 =
lvec_->clone();
461 Real b1norm = b1->norm();
502 std::stringstream hist;
503 hist <<
"\n SQP_quasi-normal_step\n";
504 std::cout << hist.str();
510 std::vector<Real> augiters;
513 Teuchos::RCP<Vector<Real> > nCP =
xvec_->clone();
514 Teuchos::RCP<Vector<Real> > nCPdual =
gvec_->clone();
515 Teuchos::RCP<Vector<Real> > nN =
xvec_->clone();
516 Teuchos::RCP<Vector<Real> > ctemp =
cvec_->clone();
517 Teuchos::RCP<Vector<Real> > dualc0 =
lvec_->clone();
518 dualc0->set(c.
dual());
520 nCP->set(nCPdual->dual());
523 Real normsquare_ctemp = ctemp->dot(*ctemp);
524 if (normsquare_ctemp != zero) {
525 nCP->scale( -(nCP->dot(*nCP))/normsquare_ctemp );
530 Real norm_nCP = nCP->norm();
531 if (norm_nCP >= delta) {
533 n.
scale( delta/norm_nCP );
535 std::stringstream hist;
536 hist <<
" taking partial Cauchy step\n";
537 std::cout << hist.str();
547 Real tol =
qntol_*ctemp->norm();
550 nCPdual->set(nCP->dual());
551 nCPdual->scale(-one);
553 Teuchos::RCP<Vector<Real> > dn =
xvec_->clone();
554 Teuchos::RCP<Vector<Real> > y =
lvec_->clone();
566 Real norm_nN = nN->norm();
567 if (norm_nN <= delta) {
571 std::stringstream hist;
572 hist <<
" taking full Newton step\n";
573 std::cout << hist.str();
580 Real aa = dn->dot(*dn);
581 Real bb = dn->dot(*nCP);
582 Real cc = norm_nCP*norm_nCP - delta*delta;
583 Real tau = (-bb+sqrt(bb*bb-aa*cc))/aa;
587 std::stringstream hist;
588 hist <<
" taking dogleg step\n";
589 std::cout << hist.str();
614 bool orthocheck =
true;
616 Real tol_ortho = 0.5;
624 std::vector<Real> augiters;
629 Teuchos::RCP<Vector<Real> > r =
gvec_->clone();
630 Teuchos::RCP<Vector<Real> > pdesc =
xvec_->clone();
631 Teuchos::RCP<Vector<Real> > tprev =
xvec_->clone();
632 Teuchos::RCP<Vector<Real> > Wr =
xvec_->clone();
633 Teuchos::RCP<Vector<Real> > Hp =
gvec_->clone();
634 Teuchos::RCP<Vector<Real> > xtemp =
xvec_->clone();
635 Teuchos::RCP<Vector<Real> > gtemp =
gvec_->clone();
636 Teuchos::RCP<Vector<Real> > ltemp =
lvec_->clone();
637 Teuchos::RCP<Vector<Real> > czero =
cvec_->clone();
640 obj.
hessVec(*gtemp, n, x, zerotol);
644 Real normg = r->norm();
654 std::vector<Teuchos::RCP<Vector<Real > > > p;
655 std::vector<Teuchos::RCP<Vector<Real > > > Hps;
656 std::vector<Teuchos::RCP<Vector<Real > > > rs;
657 std::vector<Teuchos::RCP<Vector<Real > > > Wrs;
662 std::stringstream hist;
663 hist <<
"\n SQP_tangential_subproblem\n";
664 hist << std::setw(6) << std::right <<
"iter" << std::setw(18) <<
"||Wr||/||Wr0||" << std::setw(15) <<
"||s||";
665 hist << std::setw(15) <<
"delta" << std::setw(15) <<
"||c'(x)s||" <<
"\n";
666 std::cout << hist.str();
671 std::stringstream hist;
672 hist <<
" >>> Tangential subproblem: Initial gradient is zero! \n";
673 std::cout << hist.str();
699 Wrs.push_back(
xvec_->clone());
703 if (normWg == zero) {
707 std::stringstream hist;
708 hist <<
" Initial projected residual is close to zero! \n";
709 std::cout << hist.str();
717 rs.push_back(
xvec_->clone());
719 (rs[0])->set(r->dual());
731 Wrs.push_back(
xvec_->clone());
736 normWr[
iterCG_-1] = Wr->norm();
739 Teuchos::RCP<Vector<Real> > ct =
cvec_->clone();
741 Real linc = ct->norm();
742 std::stringstream hist;
743 hist << std::scientific << std::setprecision(6);
744 hist << std::setw(6) << std::right <<
iterCG_-1 << std::setw(18) << normWr[
iterCG_-1]/normWg << std::setw(15) << t.
norm();
745 hist << std::setw(15) << delta << std::setw(15) << linc <<
"\n";
746 std::cout << hist.str();
754 std::stringstream hist;
755 hist <<
" || W(g + H*(n+s)) || <= cgtol*|| W(g + H*n)|| \n";
756 std::cout << hist.str();
766 for (
int i=0; i<
iterCG_; i++) {
767 for (
int j=0; j<
iterCG_; j++) {
768 Wrr(i,j) = (Wrs[i])->dot(*rs[j]);
769 T(i,j) = Wrr(i,j)/(normWr[i]*normWr[j]);
772 Tm1(i,j) = Tm1(i,j) - 1.0;
776 if (Tm1.normOne() >= tol_ortho) {
777 Teuchos::LAPACK<int,Real> lapack;
778 std::vector<int> ipiv(iterCG_);
780 std::vector<Real> work(3*iterCG_);
782 lapack.GETRF(iterCG_, iterCG_, T.values(), T.stride(), &ipiv[0], &info);
783 lapack.GETRI(iterCG_, T.values(), T.stride(), &ipiv[0], &work[0], 3*
iterCG_, &info);
785 for (
int i=0; i<
iterCG_; i++) {
786 Tm1(i,i) = Tm1(i,i) - 1.0;
788 if (Tm1.normOne() > S_max) {
791 std::stringstream hist;
792 hist <<
" large nonorthogonality in W(R)'*R detected \n";
793 std::cout << hist.str();
801 p.push_back(
xvec_->clone());
804 for (
int j=1; j<
iterCG_; j++) {
805 Real scal = (p[iterCG_-1])->dot(*(Hps[j-1])) / (p[j-1])->dot(*(Hps[j-1]));
806 Teuchos::RCP<Vector<Real> > pj =
xvec_->clone();
809 (p[iterCG_-1])->plus(*pj);
813 Hps.push_back(
xvec_->clone());
815 obj.
hessVec(*Hp, *(p[iterCG_-1]), x, zerotol);
820 (Hps[iterCG_-1])->set(Hp->dual());
822 pHp = (p[iterCG_-1])->dot(*(Hps[iterCG_-1]));
824 rp = (p[iterCG_-1])->dot(*(rs[iterCG_-1]));
826 normp = (p[iterCG_-1])->norm();
831 pdesc->set(*(p[iterCG_-1]));
832 if ((std::abs(rp) >= rptol*normp*normr) && (
sgn(rp) == 1)) {
836 Real a = pdesc->dot(*pdesc);
837 Real b = pdesc->dot(t);
838 Real c = t.
dot(t) - delta*delta;
840 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
841 xtemp->set(*(p[iterCG_-1]));
849 std::stringstream hist;
850 hist <<
" negative curvature detected \n";
851 std::cout << hist.str();
857 if (std::abs(rp) < rptol*normp*normr) {
860 std::stringstream hist;
861 hist <<
" Zero alpha due to inexactness. \n";
862 std::cout << hist.str();
871 xtemp->set(*(p[iterCG_-1]));
877 if (normt >= delta) {
878 pdesc->set(*(p[iterCG_-1]));
882 Real a = pdesc->dot(*pdesc);
883 Real b = pdesc->dot(*tprev);
884 Real c = tprev->dot(*tprev) - delta*delta;
886 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
887 xtemp->set(*(p[iterCG_-1]));
897 std::stringstream hist;
898 hist <<
" trust-region condition active \n";
899 std::cout << hist.str();
905 xtemp->set(*(Hps[iterCG_-1]));
908 r->plus(xtemp->dual());
911 rs.push_back(
xvec_->clone());
922 std::stringstream hist;
923 hist <<
" maximum number of iterations reached \n";
924 std::cout << hist.str();
939 Real tol_red_tang = 1e-3;
940 Real tol_red_all = 1e-1;
943 Real tol_fdiff = 1e-12;
948 Real rpred_over_pred = 0.5*(1-
eta_);
951 std::stringstream hist;
952 hist <<
"\n SQP_accept\n";
953 std::cout << hist.str();
961 std::vector<Real> augiters;
966 Real part_pred = zero;
967 Real linc_preproj = zero;
968 Real linc_postproj = zero;
969 Real tangtol_start = zero;
974 bool try_tCP =
false;
977 Teuchos::RCP<Vector<Real> > xtrial =
xvec_->clone();
978 Teuchos::RCP<Vector<Real> > Jl =
gvec_->clone();
979 Teuchos::RCP<Vector<Real> > gfJl =
gvec_->clone();
980 Teuchos::RCP<Vector<Real> > Jnc =
cvec_->clone();
981 Teuchos::RCP<Vector<Real> > t_orig =
xvec_->clone();
982 Teuchos::RCP<Vector<Real> > t_dual =
gvec_->clone();
983 Teuchos::RCP<Vector<Real> > Jt_orig =
cvec_->clone();
984 Teuchos::RCP<Vector<Real> > t_m_tCP =
xvec_->clone();
985 Teuchos::RCP<Vector<Real> > ltemp =
lvec_->clone();
986 Teuchos::RCP<Vector<Real> > xtemp =
xvec_->clone();
987 Teuchos::RCP<Vector<Real> > rt =
cvec_->clone();
988 Teuchos::RCP<Vector<Real> > Hn =
gvec_->clone();
989 Teuchos::RCP<Vector<Real> > Hto =
gvec_->clone();
990 Teuchos::RCP<Vector<Real> > cxxvec =
gvec_->clone();
991 Teuchos::RCP<Vector<Real> > czero =
cvec_->clone();
993 Real Jnc_normsquared = zero;
994 Real c_normsquared = zero;
1001 Jnc_normsquared = Jnc->dot(*Jnc);
1002 c_normsquared = c.
dot(c);
1004 for (
int ct=0; ct<ct_max; ct++) {
1008 t_m_tCP->scale(-one);
1010 if (t_m_tCP->norm() == zero) {
1016 linc_preproj = Jt_orig->norm();
1018 rpred = two*rpred_over_pred*pred;
1021 tangtol_start = tangtol;
1023 while (std::abs(rpred)/pred > rpred_over_pred) {
1026 tangtol = tol_red_tang*tangtol;
1028 if (tangtol < mintol) {
1030 std::stringstream hist;
1031 hist <<
"\n The projection of the tangential step cannot be done with sufficient precision.\n";
1032 hist <<
" Is the quasi-normal step very small? Continuing with no global convergence guarantees.\n";
1033 std::cout << hist.str();
1041 t_dual->set(t_orig->dual());
1048 linc_postproj = rt->norm();
1055 obj.
hessVec(*Hn, n, x, zerotol);
1058 obj.
hessVec(*Hto, *t_orig, x, zerotol);
1067 f_new = obj.
value(*xtrial, zerotol);
1068 obj.
gradient(gf_new, *xtrial, zerotol);
1069 con.
value(c_new, *xtrial, zerotol);
1074 part_pred = - Wg.
dot(*t_orig);
1078 part_pred -= n.
dot(gfJl->dual());
1080 part_pred -= half*n.
dot(Hn->dual());
1082 part_pred -= half*t_orig->dot(Hto->dual());
1084 ltemp->axpy(-one, l);
1086 part_pred -= Jnc->dot(ltemp->dual());
1088 if ( part_pred < -half*
penalty_*(c_normsquared-Jnc_normsquared) ) {
1089 penalty_ = ( -two * part_pred / (c_normsquared-Jnc_normsquared) ) + beta;
1092 pred = part_pred +
penalty_*(c_normsquared-Jnc_normsquared);
1096 rpred = - rt->dot(ltemp->dual()) -
penalty_ * rt->dot(*rt) - two *
penalty_ * rt->dot(*Jnc);
1104 tangtol = tangtol_start;
1110 if ( t_orig->norm()/xtemp->norm() <
tntmax_ ) {
1114 t_m_tCP->set(*t_orig);
1115 t_m_tCP->scale(-one);
1117 if ((t_m_tCP->norm() > 0) && try_tCP) {
1119 std::stringstream hist;
1120 hist <<
" ---> now trying tangential Cauchy point\n";
1121 std::cout << hist.str();
1127 std::stringstream hist;
1128 hist <<
" ---> recomputing quasi-normal step and re-solving tangential subproblem\n";
1129 std::cout << hist.str();
1169 if (std::abs(fdiff / (f+1e-24)) < tol_fdiff) {
1187 std::stringstream hist;
1188 hist <<
"\n Trial step info ...\n";
1189 hist <<
" n_norm = " <<
nnorm_ <<
"\n";
1190 hist <<
" t_norm = " <<
tnorm_ <<
"\n";
1191 hist <<
" s_norm = " <<
snorm_ <<
"\n";
1192 hist <<
" xtrial_norm = " << xtrial->norm() <<
"\n";
1193 hist <<
" f_old = " << f <<
"\n";
1194 hist <<
" f_trial = " << f_new <<
"\n";
1195 hist <<
" f_old-f_trial = " << f-f_new <<
"\n";
1196 hist <<
" ||c_old|| = " << c.
norm() <<
"\n";
1197 hist <<
" ||c_trial|| = " << c_new.
norm() <<
"\n";
1198 hist <<
" ||Jac*t_preproj|| = " << linc_preproj <<
"\n";
1199 hist <<
" ||Jac*t_postproj|| = " << linc_postproj <<
"\n";
1200 hist <<
" ||t_tilde||/||t|| = " << t_orig->norm() / t.
norm() <<
"\n";
1201 hist <<
" ||t_tilde||/||n+t|| = " << t_orig->norm() / snorm_ <<
"\n";
1202 hist <<
" # projections = " << num_proj <<
"\n";
1203 hist <<
" penalty param = " <<
penalty_ <<
"\n";
1204 hist <<
" ared = " << ared_ <<
"\n";
1205 hist <<
" pred = " <<
pred_ <<
"\n";
1206 hist <<
" ared/pred = " << ared_/pred_ <<
"\n";
1207 std::cout << hist.str();
Provides the interface to evaluate objective functions.
std::string printHeader(void) const
Print iterate header.
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, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Check acceptance of subproblem solutions, adjust merit function penalty parameter, ensure global convergence.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual ~CompositeStepSQP()
virtual void scale(const Real alpha)=0
Compute where .
Teuchos::RCP< Vector< Real > > cvec_
void update(Vector< Real > &x, Vector< Real > &l, const Vector< Real > &s, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Update step, if successful.
virtual void plus(const Vector &x)=0
Compute , where .
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
void printInfoLS(std::vector< Real > res)
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.
std::string printName(void) const
Print step name.
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 ...
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void zero()
Set to zero vector.
void computeLagrangeMultiplier(Vector< Real > &l, const Vector< Real > &x, const Vector< Real > &gf, EqualityConstraint< Real > &con)
Compute Lagrange multipliers by solving the least-squares problem minimizing the gradient of the Lagr...
Defines the linear algebra or vector space interface.
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, EqualityConstraint< Real > &con)
Solve tangential subproblem.
virtual Real dot(const Vector &x) const =0
Compute where .
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 ...
State for algorithm class. Will be used for restarts.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
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 operator, and is a zero operator.
Defines the equality constraint operator interface.
void initialize(Vector< Real > &x, const Vector< Real > &g, Vector< Real > &l, const Vector< Real > &c, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step.
Implements the computation of optimization steps with composite-step trust-region SQP methods...
Teuchos::RCP< Vector< Real > > lvec_
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 .
CompositeStepSQP(Teuchos::ParameterList &parlist)
Provides the interface to apply upper and lower bound constraints.
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.
virtual void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .
Teuchos::RCP< Vector< Real > > gvec_
void compute(Vector< Real > &s, const Vector< Real > &x, const Vector< Real > &l, Objective< Real > &obj, EqualityConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step.
virtual void set(const Vector &x)
Set where .
virtual Real norm() const =0
Returns where .
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, bool flag=true, int iter=-1)
Update objective function.
std::string print(AlgorithmState< Real > &algo_state, bool pHeader=false) const
Print iterate status.
Teuchos::RCP< Vector< Real > > xvec_
void computeQuasinormalStep(Vector< Real > &n, const Vector< Real > &c, const Vector< Real > &x, Real delta, EqualityConstraint< Real > &con)
Compute quasi-normal step by minimizing the norm of the linearized constraint.
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.
static const double ROL_EPSILON
Platform-dependent machine epsilon.