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
14#include "ROL_Bundle_U.hpp"
15#include "ROL_LineSearch_U.hpp"
16
22namespace ROL {
23namespace TypeU {
24
25template<typename Real>
26class BundleAlgorithm : public Algorithm<Real> {
27private:
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
52
55
58
59 using Algorithm<Real>::state_;
60 using Algorithm<Real>::status_;
61 using Algorithm<Real>::initialize;
62
63public:
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
79private:
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.
Provides an interface to run unconstrained optimization algorithms.
const Ptr< CombinedStatusTest< Real > > status_
const Ptr< AlgorithmState< Real > > state_
Provides an interface to run trust-bundle methods for unconstrained optimization algorithms.
Ptr< LineSearch_U< Real > > lineSearch_
void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
void writeHeader(std::ostream &os) const override
Print iterate header.
void initialize(const Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout)
void writeName(std::ostream &os) const override
Print step name.
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...
Defines the linear algebra or vector space interface.