ROL
ROL_TypeU_BundleAlgorithm.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Rapid Optimization Library (ROL) Package
4 //
5 // Copyright 2014 NTESS and the ROL contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef ROL_TYPEU_BUNDLEALGORITHM_H
11 #define ROL_TYPEU_BUNDLEALGORITHM_H
12 
13 #include "ROL_TypeU_Algorithm.hpp"
14 #include "ROL_Bundle_U.hpp"
15 #include "ROL_LineSearch_U.hpp"
16 
22 namespace ROL {
23 namespace TypeU {
24 
25 template<typename Real>
26 class BundleAlgorithm : public Algorithm<Real> {
27 private:
28  // Bundle
29  Ptr<Bundle_U<Real>> bundle_; // Bundle of subgradients and linearization errors
30  Ptr<LineSearch_U<Real>> lineSearch_; // Line-search object for nonconvex problems
31 
32  // Dual cutting plane solution
33  unsigned QPiter_; // Number of QP solver iterations
34  unsigned QPmaxit_; // Maximum number of QP iterations
35  Real QPtol_; // QP subproblem tolerance
36 
37  // Step flag
38  int step_flag_; // Whether serious or null step
39 
40  // Aggregate subgradients, linearizations, and distance measures
41 
42  // Algorithmic parameters
43  Real T_;
44  Real tol_;
45  Real m1_;
46  Real m2_;
47  Real m3_;
48  Real nu_;
49 
50  // Line-search parameters
51  int ls_maxit_;
52 
54  bool isConvex_;
55 
58 
62 
63 public:
64 
65  BundleAlgorithm( ParameterList &parlist,
66  const Ptr<LineSearch_U<Real>> &lineSearch = nullPtr );
67 
68  void run( Vector<Real> &x,
69  const Vector<Real> &g,
70  Objective<Real> &obj,
71  std::ostream &outStream = std::cout) override;
72 
73  void writeHeader( std::ostream& os ) const override;
74 
75  void writeName( std::ostream& os) const override;
76 
77  void writeOutput( std::ostream& os, const bool print_header = false ) const override;
78 
79 private:
80 
81  void initialize(const Vector<Real> &x, const Vector<Real> &g,
82  Objective<Real> &obj, std::ostream &outStream = std::cout);
83 
84 }; // class ROL::BundleAlgorithm
85 } // namespace TypeU
86 } // namespace ROL
87 
89 
90 #endif
Provides interface for and implements line searches.
Provides the interface to evaluate objective functions.
void writeName(std::ostream &os) const override
Print step name.
BundleAlgorithm(ParameterList &parlist, const Ptr< LineSearch_U< Real >> &lineSearch=nullPtr)
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
void initialize(const Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout)
void writeHeader(std::ostream &os) const override
Print iterate header.
Provides an interface to run unconstrained optimization algorithms.
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout) override
Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual opt...
void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
Provides an interface to run trust-bundle methods for unconstrained optimization algorithms.
Ptr< LineSearch_U< Real > > lineSearch_