44 #ifndef ROL_BUNDLE_STEP_H
45 #define ROL_BUNDLE_STEP_H
55 #include "Teuchos_ParameterList.hpp"
56 #include "Teuchos_RCP.hpp"
81 Teuchos::RCP<Vector<Real> >
y_;
111 ls_maxit_ = parlist.get(
"Maximum Number of Function Evaluations",20);
138 state->searchSize = parlist.get(
"Bundle Step: Initial Trust-Region Parameter",1.e3);
139 T_ = parlist.get(
"Bundle Step: Maximum Trust-Region Parameter",1.e8);
140 tol_ = parlist.get(
"Bundle Step: Epsilon Solution Tolerance",1.e-6);
141 m1_ = parlist.get(
"Bundle Step: Upper Threshold for Serious Step",0.1);
142 m2_ = parlist.get(
"Bundle Step: Lower Threshold for Serious Step",0.2);
143 m3_ = parlist.get(
"Bundle Step: Upper Threshold for Null Step",0.9);
144 nu_ = parlist.get(
"Bundle Step: Tolerance for Trust-Region Parameter",1.e-3);
147 Real coeff = parlist.get(
"Bundle Step: Distance Measure Coefficient",0.0);
148 unsigned maxSize = parlist.get(
"Bundle Step: Maximum Bundle Size",200);
149 unsigned remSize = parlist.get(
"Bundle Step: Removal Size for Bundle Update",2);
151 isConvex_ = ((coeff == 0.0) ?
true :
false);
154 QPtol_ = parlist.get(
"Bundle Step: Cutting Plane Solver Tolerance",1.e-8);
155 QPmaxit_ = parlist.get(
"Bundle Step: Cutting Plane Solver Maximum Number of Iterations",1000);
169 Real searchSize = state->searchSize;
171 state->searchSize = searchSize;
173 bundle_->initialize(*(state->gradientVec));
186 Real v = 0.0, l = 0.0, u =
T_, gd = 0.0;
209 algo_state.
flag =
true;
214 y_->set(x);
y_->plus(s);
221 gd = s.
dot(*(state->gradientVec));
231 bool SS2 = (gd >=
m2_*v || state->searchSize >=
T_-
nu_);
238 l = state->searchSize;
239 state->searchSize = 0.5*(u+l);
243 if ( NS2a || NS2b ) {
250 u = state->searchSize;
251 state->searchSize = 0.5*(u+l);
264 if ( NS2a || NS2b ) {
274 int ls_nfval = 0, ls_ngrad = 0;
290 u = state->searchSize;
291 state->searchSize = 0.5*(u+l);
296 u = state->searchSize;
297 state->searchSize = 0.5*(u+l);
314 if ( !algo_state.
flag ) {
325 Real valueOld = algo_state.
value;
338 algo_state.
gnorm = (state->gradientVec)->norm();
345 std::stringstream hist;
347 hist << std::setw(6) << std::left <<
"iter";
348 hist << std::setw(15) << std::left <<
"value";
349 hist << std::setw(15) << std::left <<
"gnorm";
350 hist << std::setw(15) << std::left <<
"snorm";
351 hist << std::setw(10) << std::left <<
"#fval";
352 hist << std::setw(10) << std::left <<
"#grad";
353 hist << std::setw(15) << std::left <<
"znorm";
354 hist << std::setw(15) << std::left <<
"alpha";
355 hist << std::setw(15) << std::left <<
"TRparam";
356 hist << std::setw(10) << std::left <<
"QPiter";
362 std::stringstream hist;
363 hist <<
"\n" <<
"Bundle Trust-Region Algorithm \n";
369 std::stringstream hist;
370 hist << std::scientific << std::setprecision(6);
373 if ( print_header ) {
377 hist << std::setw(6) << std::left << algo_state.
iter;
378 hist << std::setw(15) << std::left << algo_state.
value;
379 hist << std::setw(15) << std::left << algo_state.
gnorm;
383 if ( print_header ) {
388 hist << std::setw(6) << std::left << algo_state.
iter;
389 hist << std::setw(15) << std::left << algo_state.
value;
390 hist << std::setw(15) << std::left << algo_state.
gnorm;
391 hist << std::setw(15) << std::left << algo_state.
snorm;
392 hist << std::setw(10) << std::left << algo_state.
nfval;
393 hist << std::setw(10) << std::left << algo_state.
ngrad;
396 hist << std::setw(15) << std::left << state->searchSize;
397 hist << std::setw(10) << std::left <<
QPiter_;
Provides the interface to evaluate objective functions.
virtual void scale(const Real alpha)=0
Compute where .
virtual void plus(const Vector &x)=0
Compute , where .
ELineSearch StringToELineSearch(std::string s)
Implements a golden section line search.
virtual Real value(const Vector< Real > &x, Real &tol)=0
Compute value.
Provides the interface to compute optimization steps.
Real aggregateGradientNorm
Teuchos::RCP< StepState< Real > > getState(void)
Contains definitions of custom data types in ROL.
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
ELineSearch
Enumeration of line-search types.
std::string printName(void) const
Print step name.
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 .
State for algorithm class. Will be used for restarts.
virtual void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides an implementation of path-based target leve line search.
virtual Teuchos::RCP< const StepState< Real > > getStepState(void) const
Get state for step object.
Implements a Brent's method line search.
void LineSearchFactory(Teuchos::ParameterList &parlist)
Implements cubic interpolation back tracking line search.
void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
Teuchos::RCP< Vector< Real > > y_
Implements a simple back tracking line search.
std::string printHeader(void) const
Print iterate header.
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, if successful.
std::string print(AlgorithmState< Real > &algo_state, bool print_header=false) const
Print iterate status.
void compute(Vector< Real > &s, const Vector< Real > &x, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Compute step.
Provides the interface to compute bundle trust-region steps.
Teuchos::RCP< Bundle< Real > > bundle_
virtual void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &con, AlgorithmState< Real > &algo_state)
Initialize step with bound constraint.
Teuchos::RCP< Vector< Real > > iterateVec
virtual void set(const Vector &x)
Set where .
Implements a bisection line search.
virtual void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update objective function.
Provides an implementation of iteration scaled line search.
Teuchos::RCP< Vector< Real > > aggSubGradNew_
Teuchos::RCP< LineSearch< Real > > lineSearch_
BundleStep(Teuchos::ParameterList &parlist)
Provides the interface for and implments a bundle.
static const double ROL_EPSILON
Platform-dependent machine epsilon.