ROL
ROL_TypeG_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_TYPEG_MOREAUYOSIDAALGORITHM_H
11#define ROL_TYPEG_MOREAUYOSIDAALGORITHM_H
12
15#include "ROL_Secant.hpp"
16
20
21namespace ROL {
22namespace TypeG {
23
24template<typename Real>
26private:
27 const Ptr<Secant<Real>> secant_;
28
30 Real gnorm_;
32 Real tau_;
33 bool print_;
36
37 ROL::ParameterList list_;
39
40 std::string stepname_;
41
44
46
47 using TypeG::Algorithm<Real>::status_;
48 using TypeG::Algorithm<Real>::state_;
49 using TypeG::Algorithm<Real>::proj_;
50
52 const Vector<Real> &g,
53 const Vector<Real> &l,
54 const Vector<Real> &c,
58 Vector<Real> &pwa,
59 Vector<Real> &dwa,
60 std::ostream &outStream = std::cout);
61
62 void updateState(const Vector<Real> &x,
63 const Vector<Real> &l,
67 Vector<Real> &pwa,
68 Vector<Real> &dwa,
69 std::ostream &outStream = std::cout);
70public:
71
72 MoreauYosidaAlgorithm(ParameterList &list, const Ptr<Secant<Real>> &secant = nullPtr);
73
74 using TypeG::Algorithm<Real>::run;
75 void run( Vector<Real> &x,
76 const Vector<Real> &g,
77 Objective<Real> &obj,
79 Constraint<Real> &econ,
80 Vector<Real> &emul,
81 const Vector<Real> &eres,
82 std::ostream &outStream = std::cout) override;
83
84 void writeHeader( std::ostream& os ) const override;
85
86 void writeName( std::ostream& os ) const override;
87
88 void writeOutput( std::ostream& os, const bool print_header = false ) const override;
89
90}; // class ROL::TypeG::MoreauYosidaAlgorithm
91
92} // namespace TypeG
93} // namespace ROL
94
96
97#endif
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
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 general constrained optimization algorithms.
const Ptr< CombinedStatusTest< Real > > status_
Ptr< PolyhedralProjection< Real > > proj_
const Ptr< AlgorithmState< Real > > state_
void writeName(std::ostream &os) const override
Print step name.
void initialize(Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &l, const Vector< Real > &c, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Constraint< Real > &con, Vector< Real > &pwa, Vector< Real > &dwa, std::ostream &outStream=std::cout)
void updateState(const Vector< Real > &x, const Vector< Real > &l, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Constraint< Real > &con, Vector< Real > &pwa, Vector< Real > &dwa, std::ostream &outStream=std::cout)
void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &econ, Vector< Real > &emul, const Vector< Real > &eres, std::ostream &outStream=std::cout) override
Run algorithm on general constrained problems (Type-G). This is the primary Type-G interface.
void writeHeader(std::ostream &os) const override
Print iterate header.
MoreauYosidaAlgorithm(ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
Defines the linear algebra or vector space interface.