ROL
ROL_Solver.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_SOLVER_HPP
11#define ROL_SOLVER_HPP
12
18#include "ROL_Problem.hpp"
19
20#include "ROL_ParameterList.hpp"
21#include "ROL_Stream.hpp"
22
28namespace ROL {
29
30template<typename Real>
31class Solver {
32private:
33
34 const Ptr<Problem<Real>> opt_;
36
37 Ptr<TypeU::Algorithm<Real>> algoU_;
38 Ptr<TypeB::Algorithm<Real>> algoB_;
39 Ptr<TypeE::Algorithm<Real>> algoE_;
40 Ptr<TypeG::Algorithm<Real>> algoG_;
41 Ptr<TypeP::Algorithm<Real>> algoP_;
42
43public:
44
52 Solver( const Ptr<Problem<Real>> &opt,
53 ParameterList &list,
54 const Ptr<Secant<Real>> &secant = nullPtr );
55
63 int solve( const Ptr<StatusTest<Real>> &status = nullPtr,
64 bool combineStatus = true);
65
74 int solve( std::ostream &outStream,
75 const Ptr<StatusTest<Real>> &status = nullPtr,
76 bool combineStatus = true );
77
82 //Ptr<const AlgorithmState<Real>>& getAlgorithmState() const;
83 Ptr<const AlgorithmState<Real>> getAlgorithmState() const;
84
94 void reset();
95
96}; // class Solver
97
98} // namespace ROL
99
100#include "ROL_Solver_Def.hpp"
101
102#endif // ROL_SOLVER_HPP
103
104
Defines a no-output stream class ROL::NullStream and a function makeStreamPtr which either wraps a re...
Provides interface for and implements limited-memory secant operators.
Provides a simplified interface for solving a wide range of optimization problems.
Ptr< TypeG::Algorithm< Real > > algoG_
void reset()
Reset both Algorithm and Step.
Ptr< TypeB::Algorithm< Real > > algoB_
Ptr< TypeE::Algorithm< Real > > algoE_
const Ptr< Problem< Real > > opt_
Ptr< const AlgorithmState< Real > > getAlgorithmState() const
Return the AlgorithmState.
int solve(const Ptr< StatusTest< Real > > &status=nullPtr, bool combineStatus=true)
Solve optimization problem with no iteration output.
const EProblem problemType_
Ptr< TypeP::Algorithm< Real > > algoP_
Ptr< TypeU::Algorithm< Real > > algoU_
Provides an interface to check status of optimization algorithms.