44 #ifndef ROL_COMPOSITESTEP_H 45 #define ROL_COMPOSITESTEP_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_;
120 template <
typename T>
int sgn(T val) {
121 return (T(0) < val) - (val < T(0));
126 std::stringstream hist;
127 hist << std::scientific << std::setprecision(8);
128 hist <<
"\n Augmented System Solver:\n";
129 hist <<
" True Residual\n";
130 for (
unsigned j=0; j<res.size(); j++) {
131 hist <<
" " << std::left << std::setw(14) << res[j] <<
"\n";
134 std::cout << hist.str();
155 Teuchos::ParameterList& steplist = parlist.sublist(
"Step").sublist(
"Composite Step");
158 tolOSS_ = steplist.sublist(
"Optimality System Solver").get(
"Nominal Relative Tolerance", 1e-8);
159 tolOSSfixed_ = steplist.sublist(
"Optimality System Solver").get(
"Fix Tolerance",
true);
161 maxiterCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Iteration Limit", 20);
162 tolCG_ = steplist.sublist(
"Tangential Subproblem Solver").get(
"Relative Tolerance", 1e-2);
164 int outLvl = steplist.get(
"Output Level", 0);
212 state->descentVec = x.
clone();
213 state->gradientVec = g.
clone();
214 state->constraintVec = c.
clone();
221 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
222 Teuchos::RCP<Vector<Real> > gl =
gvec_->clone();
224 algo_state.
nfval = 0;
225 algo_state.
ncval = 0;
226 algo_state.
ngrad = 0;
228 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
243 gl->set(*
gvec_); gl->plus(*ajl);
245 algo_state.
gnorm = gl->norm();
254 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
256 Teuchos::RCP<Vector<Real> > n =
xvec_->clone();
257 Teuchos::RCP<Vector<Real> > c =
cvec_->clone();
258 Teuchos::RCP<Vector<Real> > t =
xvec_->clone();
259 Teuchos::RCP<Vector<Real> > tCP =
xvec_->clone();
260 Teuchos::RCP<Vector<Real> > g =
gvec_->clone();
261 Teuchos::RCP<Vector<Real> > gf =
gvec_->clone();
262 Teuchos::RCP<Vector<Real> > Wg =
xvec_->clone();
263 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
266 Teuchos::RCP<Vector<Real> > l_new =
lvec_->clone();
267 Teuchos::RCP<Vector<Real> > c_new =
cvec_->clone();
268 Teuchos::RCP<Vector<Real> > g_new =
gvec_->clone();
269 Teuchos::RCP<Vector<Real> > gf_new =
gvec_->clone();
272 f = obj.
value(x, zerotol);
277 con.
value(*c, x, zerotol);
293 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);
311 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
314 Teuchos::RCP<Vector<Real> > g =
gvec_->clone();
315 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
316 Teuchos::RCP<Vector<Real> > gl =
gvec_->clone();
317 Teuchos::RCP<Vector<Real> > c =
cvec_->clone();
322 if ((std::abs(
ared_) < em12) && std::abs(
pred_) < em12) {
330 else if (ratio >= zp8) {
344 Real val = obj.
value(x, zerotol);
349 gl->set(*g); gl->plus(*ajl);
351 con.
value(*c, x, zerotol);
354 state->gradientVec->set(*gl);
355 state->constraintVec->set(*c);
357 algo_state.
value = val;
358 algo_state.
gnorm = gl->norm();
359 algo_state.
cnorm = c->norm();
384 std::stringstream hist;
386 hist << std::setw(6) << std::left <<
"iter";
387 hist << std::setw(15) << std::left <<
"fval";
388 hist << std::setw(15) << std::left <<
"cnorm";
389 hist << std::setw(15) << std::left <<
"gLnorm";
390 hist << std::setw(15) << std::left <<
"snorm";
391 hist << std::setw(10) << std::left <<
"delta";
392 hist << std::setw(10) << std::left <<
"nnorm";
393 hist << std::setw(10) << std::left <<
"tnorm";
394 hist << std::setw(8) << std::left <<
"#fval";
395 hist << std::setw(8) << std::left <<
"#grad";
396 hist << std::setw(8) << std::left <<
"iterCG";
397 hist << std::setw(8) << std::left <<
"flagCG";
398 hist << std::setw(8) << std::left <<
"accept";
399 hist << std::setw(8) << std::left <<
"linsys";
405 std::stringstream hist;
406 hist <<
"\n" <<
" Composite-step trust-region solver";
416 std::stringstream hist;
417 hist << std::scientific << std::setprecision(6);
418 if ( algo_state.
iter == 0 ) {
424 if ( algo_state.
iter == 0 ) {
426 hist << std::setw(6) << std::left << algo_state.
iter;
427 hist << std::setw(15) << std::left << algo_state.
value;
428 hist << std::setw(15) << std::left << algo_state.
cnorm;
429 hist << std::setw(15) << std::left << algo_state.
gnorm;
434 hist << std::setw(6) << std::left << algo_state.
iter;
435 hist << std::setw(15) << std::left << algo_state.
value;
436 hist << std::setw(15) << std::left << algo_state.
cnorm;
437 hist << std::setw(15) << std::left << algo_state.
gnorm;
438 hist << std::setw(15) << std::left << algo_state.
snorm;
439 hist << std::scientific << std::setprecision(2);
440 hist << std::setw(10) << std::left <<
Delta_;
441 hist << std::setw(10) << std::left <<
nnorm_;
442 hist << std::setw(10) << std::left <<
tnorm_;
443 hist << std::scientific << std::setprecision(6);
444 hist << std::setw(8) << std::left << algo_state.
nfval;
445 hist << std::setw(8) << std::left << algo_state.
ngrad;
446 hist << std::setw(8) << std::left <<
iterCG_;
447 hist << std::setw(8) << std::left <<
flagCG_;
448 hist << std::setw(8) << std::left <<
flagAC_;
469 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
470 std::vector<Real> augiters;
473 std::stringstream hist;
474 hist <<
"\n Lagrange multiplier step\n";
475 std::cout << hist.str();
479 Teuchos::RCP<Vector<Real> > ajl =
gvec_->clone();
483 Teuchos::RCP<Vector<Real> > b1 =
gvec_->clone();
484 Teuchos::RCP<Vector<Real> > b2 =
cvec_->clone();
486 b1->set(gf); b1->plus(*ajl); b1->scale(-one);
491 Teuchos::RCP<Vector<Real> > v1 =
xvec_->clone();
492 Teuchos::RCP<Vector<Real> > v2 =
lvec_->clone();
495 Real b1norm = b1->norm();
536 std::stringstream hist;
537 hist <<
"\n Quasi-normal step\n";
538 std::cout << hist.str();
543 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
544 std::vector<Real> augiters;
547 Teuchos::RCP<Vector<Real> > nCP =
xvec_->clone();
548 Teuchos::RCP<Vector<Real> > nCPdual =
gvec_->clone();
549 Teuchos::RCP<Vector<Real> > nN =
xvec_->clone();
550 Teuchos::RCP<Vector<Real> > ctemp =
cvec_->clone();
551 Teuchos::RCP<Vector<Real> > dualc0 =
lvec_->clone();
552 dualc0->set(c.
dual());
554 nCP->set(nCPdual->dual());
557 Real normsquare_ctemp = ctemp->dot(*ctemp);
558 if (normsquare_ctemp != zero) {
559 nCP->scale( -(nCP->dot(*nCP))/normsquare_ctemp );
564 Real norm_nCP = nCP->norm();
565 if (norm_nCP >= delta) {
567 n.
scale( delta/norm_nCP );
569 std::stringstream hist;
570 hist <<
" taking partial Cauchy step\n";
571 std::cout << hist.str();
584 nCPdual->set(nCP->dual());
585 nCPdual->scale(-one);
587 Teuchos::RCP<Vector<Real> > dn =
xvec_->clone();
588 Teuchos::RCP<Vector<Real> > y =
lvec_->clone();
600 Real norm_nN = nN->norm();
601 if (norm_nN <= delta) {
605 std::stringstream hist;
606 hist <<
" taking full Newton step\n";
607 std::cout << hist.str();
614 Real aa = dn->dot(*dn);
615 Real bb = dn->dot(*nCP);
616 Real cc = norm_nCP*norm_nCP - delta*delta;
617 Real tau = (-bb+sqrt(bb*bb-aa*cc))/aa;
621 std::stringstream hist;
622 hist <<
" taking dogleg step\n";
623 std::cout << hist.str();
648 bool orthocheck =
true;
650 Real tol_ortho = 0.5;
657 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
658 std::vector<Real> augiters;
663 Teuchos::RCP<Vector<Real> > r =
gvec_->clone();
664 Teuchos::RCP<Vector<Real> > pdesc =
xvec_->clone();
665 Teuchos::RCP<Vector<Real> > tprev =
xvec_->clone();
666 Teuchos::RCP<Vector<Real> > Wr =
xvec_->clone();
667 Teuchos::RCP<Vector<Real> > Hp =
gvec_->clone();
668 Teuchos::RCP<Vector<Real> > xtemp =
xvec_->clone();
669 Teuchos::RCP<Vector<Real> > gtemp =
gvec_->clone();
670 Teuchos::RCP<Vector<Real> > ltemp =
lvec_->clone();
671 Teuchos::RCP<Vector<Real> > czero =
cvec_->clone();
674 obj.
hessVec(*gtemp, n, x, zerotol);
678 Real normg = r->norm();
688 std::vector<Teuchos::RCP<Vector<Real > > > p;
689 std::vector<Teuchos::RCP<Vector<Real > > > Hps;
690 std::vector<Teuchos::RCP<Vector<Real > > > rs;
691 std::vector<Teuchos::RCP<Vector<Real > > > Wrs;
696 std::stringstream hist;
697 hist <<
"\n Tangential subproblem\n";
698 hist << std::setw(6) << std::right <<
"iter" << std::setw(18) <<
"||Wr||/||Wr0||" << std::setw(15) <<
"||s||";
699 hist << std::setw(15) <<
"delta" << std::setw(15) <<
"||c'(x)s||" <<
"\n";
700 std::cout << hist.str();
705 std::stringstream hist;
706 hist <<
" >>> Tangential subproblem: Initial gradient is zero! \n";
707 std::cout << hist.str();
733 Wrs.push_back(
xvec_->clone());
737 if (normWg == zero) {
741 std::stringstream hist;
742 hist <<
" Initial projected residual is close to zero! \n";
743 std::cout << hist.str();
751 rs.push_back(
xvec_->clone());
753 (rs[0])->
set(r->dual());
765 Wrs.push_back(
xvec_->clone());
770 normWr[
iterCG_-1] = Wr->norm();
773 Teuchos::RCP<Vector<Real> > ct =
cvec_->clone();
775 Real linc = ct->norm();
776 std::stringstream hist;
777 hist << std::scientific << std::setprecision(6);
778 hist << std::setw(6) << std::right <<
iterCG_-1 << std::setw(18) << normWr[
iterCG_-1]/normWg << std::setw(15) << t.
norm();
779 hist << std::setw(15) << delta << std::setw(15) << linc <<
"\n";
780 std::cout << hist.str();
788 std::stringstream hist;
789 hist <<
" || W(g + H*(n+s)) || <= cgtol*|| W(g + H*n)|| \n";
790 std::cout << hist.str();
800 for (
int i=0; i<
iterCG_; i++) {
801 for (
int j=0; j<
iterCG_; j++) {
802 Wrr(i,j) = (Wrs[i])->dot(*rs[j]);
803 T(i,j) = Wrr(i,j)/(normWr[i]*normWr[j]);
806 Tm1(i,j) = Tm1(i,j) - one;
810 if (Tm1.normOne() >= tol_ortho) {
811 Teuchos::LAPACK<int,Real> lapack;
812 std::vector<int> ipiv(
iterCG_);
814 std::vector<Real> work(3*
iterCG_);
816 lapack.GETRF(
iterCG_,
iterCG_, T.values(), T.stride(), &ipiv[0], &info);
817 lapack.GETRI(
iterCG_, T.values(), T.stride(), &ipiv[0], &work[0], 3*
iterCG_, &info);
819 for (
int i=0; i<
iterCG_; i++) {
820 Tm1(i,i) = Tm1(i,i) - one;
822 if (Tm1.normOne() > S_max) {
825 std::stringstream hist;
826 hist <<
" large nonorthogonality in W(R)'*R detected \n";
827 std::cout << hist.str();
835 p.push_back(
xvec_->clone());
838 for (
int j=1; j<
iterCG_; j++) {
839 Real scal = (p[
iterCG_-1])->dot(*(Hps[j-1])) / (p[j-1])->dot(*(Hps[j-1]));
840 Teuchos::RCP<Vector<Real> > pj =
xvec_->clone();
847 Hps.push_back(
xvec_->clone());
854 (Hps[
iterCG_-1])->
set(Hp->dual());
860 normp = (p[
iterCG_-1])->norm();
866 if ((std::abs(rp) >= rptol*normp*normr) && (
sgn(rp) == 1)) {
870 Real a = pdesc->dot(*pdesc);
871 Real b = pdesc->dot(t);
872 Real c = t.
dot(t) - delta*delta;
874 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
883 std::stringstream hist;
884 hist <<
" negative curvature detected \n";
885 std::cout << hist.str();
891 if (std::abs(rp) < rptol*normp*normr) {
894 std::stringstream hist;
895 hist <<
" Zero alpha due to inexactness. \n";
896 std::cout << hist.str();
911 if (normt >= delta) {
916 Real a = pdesc->dot(*pdesc);
917 Real b = pdesc->dot(*tprev);
918 Real c = tprev->dot(*tprev) - delta*delta;
920 Real theta = (-b + std::sqrt(b*b - a*c)) / a;
931 std::stringstream hist;
932 hist <<
" trust-region condition active \n";
933 std::cout << hist.str();
942 r->plus(xtemp->dual());
945 rs.push_back(
xvec_->clone());
956 std::stringstream hist;
957 hist <<
" maximum number of iterations reached \n";
958 std::cout << hist.str();
973 Real tol_red_tang = 1e-3;
974 Real tol_red_all = 1e-1;
977 Real tol_fdiff = 1e-12;
982 Real rpred_over_pred = 0.5*(1-
eta_);
985 std::stringstream hist;
986 hist <<
"\n Composite step acceptance\n";
987 std::cout << hist.str();
994 Real zerotol = std::sqrt(ROL_EPSILON<Real>());
995 std::vector<Real> augiters;
1000 Real part_pred = zero;
1001 Real linc_preproj = zero;
1002 Real linc_postproj = zero;
1003 Real tangtol_start = zero;
1008 bool try_tCP =
false;
1011 Teuchos::RCP<Vector<Real> > xtrial =
xvec_->clone();
1012 Teuchos::RCP<Vector<Real> > Jl =
gvec_->clone();
1013 Teuchos::RCP<Vector<Real> > gfJl =
gvec_->clone();
1014 Teuchos::RCP<Vector<Real> > Jnc =
cvec_->clone();
1015 Teuchos::RCP<Vector<Real> > t_orig =
xvec_->clone();
1016 Teuchos::RCP<Vector<Real> > t_dual =
gvec_->clone();
1017 Teuchos::RCP<Vector<Real> > Jt_orig =
cvec_->clone();
1018 Teuchos::RCP<Vector<Real> > t_m_tCP =
xvec_->clone();
1019 Teuchos::RCP<Vector<Real> > ltemp =
lvec_->clone();
1020 Teuchos::RCP<Vector<Real> > xtemp =
xvec_->clone();
1021 Teuchos::RCP<Vector<Real> > rt =
cvec_->clone();
1022 Teuchos::RCP<Vector<Real> > Hn =
gvec_->clone();
1023 Teuchos::RCP<Vector<Real> > Hto =
gvec_->clone();
1024 Teuchos::RCP<Vector<Real> > cxxvec =
gvec_->clone();
1025 Teuchos::RCP<Vector<Real> > czero =
cvec_->clone();
1027 Real Jnc_normsquared = zero;
1028 Real c_normsquared = zero;
1035 Jnc_normsquared = Jnc->dot(*Jnc);
1036 c_normsquared = c.
dot(c);
1038 for (
int ct=0; ct<ct_max; ct++) {
1042 t_m_tCP->scale(-one);
1044 if (t_m_tCP->norm() == zero) {
1050 linc_preproj = Jt_orig->norm();
1052 rpred = two*rpred_over_pred*pred;
1055 tangtol_start = tangtol;
1057 while (std::abs(rpred)/pred > rpred_over_pred) {
1060 tangtol = tol_red_tang*tangtol;
1062 if (tangtol < mintol) {
1064 std::stringstream hist;
1065 hist <<
"\n The projection of the tangential step cannot be done with sufficient precision.\n";
1066 hist <<
" Is the quasi-normal step very small? Continuing with no global convergence guarantees.\n";
1067 std::cout << hist.str();
1075 t_dual->set(t_orig->dual());
1082 linc_postproj = rt->norm();
1089 obj.
hessVec(*Hn, n, x, zerotol);
1092 obj.
hessVec(*Hto, *t_orig, x, zerotol);
1101 f_new = obj.
value(*xtrial, zerotol);
1102 obj.
gradient(gf_new, *xtrial, zerotol);
1103 con.
value(c_new, *xtrial, zerotol);
1108 part_pred = - Wg.
dot(*t_orig);
1112 part_pred -= n.
dot(gfJl->dual());
1114 part_pred -= half*n.
dot(Hn->dual());
1116 part_pred -= half*t_orig->dot(Hto->dual());
1118 ltemp->axpy(-one, l);
1120 part_pred -= Jnc->dot(ltemp->dual());
1122 if ( part_pred < -half*
penalty_*(c_normsquared-Jnc_normsquared) ) {
1123 penalty_ = ( -two * part_pred / (c_normsquared-Jnc_normsquared) ) + beta;
1126 pred = part_pred +
penalty_*(c_normsquared-Jnc_normsquared);
1130 rpred = - rt->dot(ltemp->dual()) -
penalty_ * rt->dot(*rt) - two *
penalty_ * rt->dot(*Jnc);
1138 tangtol = tangtol_start;
1144 if ( t_orig->norm()/xtemp->norm() <
tntmax_ ) {
1148 t_m_tCP->set(*t_orig);
1149 t_m_tCP->scale(-one);
1151 if ((t_m_tCP->norm() > 0) && try_tCP) {
1153 std::stringstream hist;
1154 hist <<
" ---> now trying tangential Cauchy point\n";
1155 std::cout << hist.str();
1161 std::stringstream hist;
1162 hist <<
" ---> recomputing quasi-normal step and re-solving tangential subproblem\n";
1163 std::cout << hist.str();
1207 if (std::abs(fdiff / (f+em24)) < tol_fdiff) {
1225 std::stringstream hist;
1226 hist <<
"\n Trial step info ...\n";
1227 hist <<
" n_norm = " <<
nnorm_ <<
"\n";
1228 hist <<
" t_norm = " <<
tnorm_ <<
"\n";
1229 hist <<
" s_norm = " <<
snorm_ <<
"\n";
1230 hist <<
" xtrial_norm = " << xtrial->norm() <<
"\n";
1231 hist <<
" f_old = " << f <<
"\n";
1232 hist <<
" f_trial = " << f_new <<
"\n";
1233 hist <<
" f_old-f_trial = " << f-f_new <<
"\n";
1234 hist <<
" ||c_old|| = " << c.
norm() <<
"\n";
1235 hist <<
" ||c_trial|| = " << c_new.
norm() <<
"\n";
1236 hist <<
" ||Jac*t_preproj|| = " << linc_preproj <<
"\n";
1237 hist <<
" ||Jac*t_postproj|| = " << linc_postproj <<
"\n";
1238 hist <<
" ||t_tilde||/||t|| = " << t_orig->norm() / t.
norm() <<
"\n";
1239 hist <<
" ||t_tilde||/||n+t|| = " << t_orig->norm() /
snorm_ <<
"\n";
1240 hist <<
" # projections = " << num_proj <<
"\n";
1241 hist <<
" penalty param = " <<
penalty_ <<
"\n";
1242 hist <<
" ared = " <<
ared_ <<
"\n";
1243 hist <<
" pred = " <<
pred_ <<
"\n";
1244 hist <<
" ared/pred = " <<
ared_/
pred_ <<
"\n";
1245 std::cout << hist.str();
Provides the interface to evaluate objective functions.
Teuchos::RCP< Vector< Real > > lvec_
virtual void scale(const Real alpha)=0
Compute where .
std::string print(AlgorithmState< Real > &algo_state, bool pHeader=false) const
Print iterate status.
virtual void plus(const Vector &x)=0
Compute , where .
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.
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.
Teuchos::RCP< StepState< Real > > getState(void)
Contains definitions of custom data types in ROL.
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.
std::string printHeader(void) const
Print iterate header.
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
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 i...
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 or Riesz operator...
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Defines the equality constraint operator interface.
std::string printName(void) const
Print step name.
void printInfoLS(const std::vector< Real > &res) const
Teuchos::RCP< Vector< Real > > cvec_
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 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 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 .
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.
Implements the computation of optimization steps with composite-step trust-region methods...
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.
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...
Provides the interface to apply upper and lower bound constraints.
Teuchos::RCP< Vector< Real > > gvec_
CompositeStep(Teuchos::ParameterList &parlist)
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 > > xvec_
Real setTolOSS(const Real intol) const
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.
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.
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.
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.