ROL
ROL_TypeB_MoreauYosidaAlgorithm.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_TYPEB_MOREAUYOSIDAALGORITHM_HPP
11#define ROL_TYPEB_MOREAUYOSIDAALGORITHM_HPP
12
15#include "ROL_Secant.hpp"
16
20
21namespace ROL {
22namespace TypeB {
23
24template<typename Real>
26private:
27 const Ptr<Secant<Real>> secant_;
29 Real gnorm_;
31 Real tau_;
32 bool print_;
35
36 ROL::ParameterList list_;
38
39 std::string stepname_;
40
43
45
46 using TypeB::Algorithm<Real>::status_;
47 using TypeB::Algorithm<Real>::state_;
48 using TypeB::Algorithm<Real>::proj_;
49
51 const Vector<Real> &g,
54 Vector<Real> &pwa,
55 std::ostream &outStream = std::cout);
56
57 void updateState(const Vector<Real> &x,
60 Vector<Real> &pwa,
61 std::ostream &outStream = std::cout);
62public:
63
64 MoreauYosidaAlgorithm(ParameterList &list, const Ptr<Secant<Real>> &secant = nullPtr);
65
66 using TypeB::Algorithm<Real>::run;
67 void run( Vector<Real> &x,
68 const Vector<Real> &g,
69 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 write_header = false ) const override;
78
79}; // class ROL::TypeB::MoreauYosidaAlgorithm
80
81} // namespace TypeB
82} // namespace ROL
83
85
86#endif
Provides the interface to apply upper and lower bound constraints.
Provides the interface to evaluate the Moreau-Yosida penalty function.
Provides the interface to evaluate objective functions.
Provides interface for and implements limited-memory secant operators.
Provides an interface to run bound constrained optimization algorithms.
Ptr< PolyhedralProjection< Real > > proj_
const Ptr< AlgorithmState< Real > > state_
const Ptr< CombinedStatusTest< Real > > status_
void updateState(const Vector< Real > &x, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Vector< Real > &pwa, std::ostream &outStream=std::cout)
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) override
Run algorithm on bound constrained problems (Type-B). This general interface supports the use of dual...
MoreauYosidaAlgorithm(ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
void writeName(std::ostream &os) const override
Print step name.
void initialize(Vector< Real > &x, const Vector< Real > &g, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Vector< Real > &pwa, std::ostream &outStream=std::cout)
void writeOutput(std::ostream &os, const bool write_header=false) const override
Print iterate status.
void writeHeader(std::ostream &os) const override
Print iterate header.
Defines the linear algebra or vector space interface.