ROL
Public Member Functions | Private Attributes | List of all members
ROL::OptimizationSolver< Real > Class Template Reference

Provides a simplified interface for solving a wide range of optimization problems. More...

#include <ROL_OptimizationSolver.hpp>

Public Member Functions

 OptimizationSolver (OptimizationProblem< Real > &opt, ROL::ParameterList &parlist)
 Constructor.
 
std::vector< std::string > getOutput (void) const
 Returns iteration history as a vector of strings.
 
int solve (const ROL::Ptr< StatusTest< Real > > &status=ROL::nullPtr, const bool combineStatus=true)
 Solve optimization problem with no iteration output.
 
int solve (std::ostream &outStream, const ROL::Ptr< StatusTest< Real > > &status=ROL::nullPtr, const bool combineStatus=true)
 Solve optimization problem.
 
ROL::Ptr< const AlgorithmState< Real > > getAlgorithmState (void) const
 Return the AlgorithmState.
 
void resetAlgorithmState (void)
 Reset the AlgorithmState.
 
void reset (const bool resetAlgo=true)
 Reset both Algorithm and Step.
 
std::string getStepName (void) const
 Grab step name (after check for consistency).
 

Private Attributes

ROL::Ptr< Algorithm< Real > > algo_
 
ROL::Ptr< Step< Real > > step_
 
ROL::Ptr< StatusTest< Real > > status0_
 
ROL::Ptr< CombinedStatusTest< Real > > status_
 
ROL::Ptr< AlgorithmState< Real > > state_
 
ROL::Ptr< Vector< Real > > x_
 
ROL::Ptr< Vector< Real > > g_
 
ROL::Ptr< Vector< Real > > l_
 
ROL::Ptr< Vector< Real > > c_
 
ROL::Ptr< Objective< Real > > obj_
 
ROL::Ptr< BoundConstraint< Real > > bnd_
 
ROL::Ptr< Constraint< Real > > con_
 
std::vector< std::string > output_
 
EProblem problemType_
 
EStep stepType_
 
std::string stepname_
 
Real pen_
 

Detailed Description

template<class Real>
class ROL::OptimizationSolver< Real >

Provides a simplified interface for solving a wide range of optimization problems.

Definition at line 63 of file ROL_OptimizationSolver.hpp.

Constructor & Destructor Documentation

◆ OptimizationSolver()

template<class Real >
ROL::OptimizationSolver< Real >::OptimizationSolver ( OptimizationProblem< Real > &  opt,
ROL::ParameterList &  parlist 
)
inline

Member Function Documentation

◆ getOutput()

template<class Real >
std::vector< std::string > ROL::OptimizationSolver< Real >::getOutput ( void  ) const
inline

Returns iteration history as a vector of strings.


Definition at line 203 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::output_.

◆ solve() [1/2]

template<class Real >
int ROL::OptimizationSolver< Real >::solve ( const ROL::Ptr< StatusTest< Real > > &  status = ROL::nullPtr,
const bool  combineStatus = true 
)
inline

Solve optimization problem with no iteration output.

Parameters
[in]statusis a user-defined StatusTest
[in]combineStatusif true, the user-defined StatusTest will be combined with the default StatusTest

Definition at line 214 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::solve().

Referenced by main(), ROL::OptimizationSolver< Real >::solve(), and ROL::SROMGenerator< Real >::SROMGenerator().

◆ solve() [2/2]

template<class Real >
int ROL::OptimizationSolver< Real >::solve ( std::ostream &  outStream,
const ROL::Ptr< StatusTest< Real > > &  status = ROL::nullPtr,
const bool  combineStatus = true 
)
inline

◆ getAlgorithmState()

template<class Real >
ROL::Ptr< const AlgorithmState< Real > > ROL::OptimizationSolver< Real >::getAlgorithmState ( void  ) const
inline

Return the AlgorithmState.


Definition at line 271 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::state_.

Referenced by main().

◆ resetAlgorithmState()

template<class Real >
void ROL::OptimizationSolver< Real >::resetAlgorithmState ( void  )
inline

Reset the AlgorithmState.

This function does not reset the Step or the StepState.


Definition at line 281 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::state_.

Referenced by ROL::OptimizationSolver< Real >::reset().

◆ reset()

template<class Real >
void ROL::OptimizationSolver< Real >::reset ( const bool  resetAlgo = true)
inline

◆ getStepName()

template<class Real >
std::string ROL::OptimizationSolver< Real >::getStepName ( void  ) const
inline

Grab step name (after check for consistency).

Parameters
[out]stepnameName of step

This function returns the algorithmic step name.


Definition at line 323 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::stepname_.

Member Data Documentation

◆ algo_

template<class Real >
ROL::Ptr<Algorithm<Real> > ROL::OptimizationSolver< Real >::algo_
private

Definition at line 66 of file ROL_OptimizationSolver.hpp.

Referenced by ROL::OptimizationSolver< Real >::solve().

◆ step_

template<class Real >
ROL::Ptr<Step<Real> > ROL::OptimizationSolver< Real >::step_
private

◆ status0_

template<class Real >
ROL::Ptr<StatusTest<Real> > ROL::OptimizationSolver< Real >::status0_
private

◆ status_

template<class Real >
ROL::Ptr<CombinedStatusTest<Real> > ROL::OptimizationSolver< Real >::status_
private

◆ state_

template<class Real >
ROL::Ptr<AlgorithmState<Real> > ROL::OptimizationSolver< Real >::state_
private

◆ x_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::OptimizationSolver< Real >::x_
private

◆ g_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::OptimizationSolver< Real >::g_
private

◆ l_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::OptimizationSolver< Real >::l_
private

◆ c_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::OptimizationSolver< Real >::c_
private

◆ obj_

template<class Real >
ROL::Ptr<Objective<Real> > ROL::OptimizationSolver< Real >::obj_
private

◆ bnd_

template<class Real >
ROL::Ptr<BoundConstraint<Real> > ROL::OptimizationSolver< Real >::bnd_
private

◆ con_

template<class Real >
ROL::Ptr<Constraint<Real> > ROL::OptimizationSolver< Real >::con_
private

◆ output_

template<class Real >
std::vector<std::string> ROL::OptimizationSolver< Real >::output_
private

◆ problemType_

template<class Real >
EProblem ROL::OptimizationSolver< Real >::problemType_
private

◆ stepType_

template<class Real >
EStep ROL::OptimizationSolver< Real >::stepType_
private

◆ stepname_

template<class Real >
std::string ROL::OptimizationSolver< Real >::stepname_
private

◆ pen_

template<class Real >
Real ROL::OptimizationSolver< Real >::pen_
private

The documentation for this class was generated from the following file: