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

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 61 of file ROL_OptimizationSolver.hpp.

Constructor & Destructor Documentation

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

Constructor.

Parameters
[in]optthe OptimizationProblem to be solved
[in]parlistalgorithm and step input parameters

Definition at line 96 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::bnd_, ROL::OptimizationSolver< Real >::c_, ROL::OptimizationSolver< Real >::con_, ROL::EStepToString(), ROL::OptimizationSolver< Real >::g_, ROL::OptimizationProblem< Real >::getBoundConstraint(), ROL::OptimizationProblem< Real >::getConstraint(), ROL::OptimizationProblem< Real >::getMultiplierVector(), ROL::OptimizationProblem< Real >::getObjective(), ROL::OptimizationProblem< Real >::getProblemType(), ROL::OptimizationProblem< Real >::getSolutionVector(), ROL::StatusTestFactory< Real >::getStatusTest(), ROL::StepFactory< Real >::getStep(), ROL::isCompatibleStep(), ROL::OptimizationSolver< Real >::l_, ROL::OptimizationSolver< Real >::obj_, ROL::OptimizationSolver< Real >::pen_, ROL::OptimizationSolver< Real >::problemType_, ROL::OptimizationSolver< Real >::state_, ROL::OptimizationSolver< Real >::status0_, ROL::OptimizationSolver< Real >::status_, ROL::OptimizationSolver< Real >::step_, ROL::STEP_AUGMENTEDLAGRANGIAN, ROL::STEP_BUNDLE, ROL::STEP_COMPOSITESTEP, ROL::STEP_FLETCHER, ROL::STEP_INTERIORPOINT, ROL::STEP_MOREAUYOSIDAPENALTY, ROL::STEP_TRUSTREGION, ROL::stepFactory(), ROL::OptimizationSolver< Real >::stepname_, ROL::OptimizationSolver< Real >::stepType_, ROL::StringToEStep(), ROL::TYPE_B, ROL::TYPE_E, ROL::TYPE_EB, ROL::TYPE_LAST, ROL::TYPE_U, and ROL::OptimizationSolver< Real >::x_.

Member Function Documentation

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 201 of file ROL_OptimizationSolver.hpp.

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

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 212 of file ROL_OptimizationSolver.hpp.

Referenced by main(), ROL::ProgressiveHedging< Real >::presolve(), and ROL::SROMGenerator< Real >::SROMGenerator().

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

Return the AlgorithmState.


Definition at line 270 of file ROL_OptimizationSolver.hpp.

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

Referenced by main().

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 280 of file ROL_OptimizationSolver.hpp.

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

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

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

Reset both Algorithm and Step.

Parameters
[in]resetAlgoif true, then AlgorithmState will be reset

This function will reset the AlgorithmState and reinitialize the Step. This function does not permit changing the Step specified upon construction. To change the Step, reinitialize the OptimizationSolver.


Definition at line 295 of file ROL_OptimizationSolver.hpp.

References ROL::OptimizationSolver< Real >::l_, ROL::OptimizationSolver< Real >::obj_, ROL::OptimizationSolver< Real >::pen_, ROL::OptimizationSolver< Real >::resetAlgorithmState(), ROL::OptimizationSolver< Real >::step_, ROL::STEP_AUGMENTEDLAGRANGIAN, ROL::STEP_INTERIORPOINT, ROL::STEP_MOREAUYOSIDAPENALTY, and ROL::OptimizationSolver< Real >::stepType_.

Referenced by ROL::ProgressiveHedging< Real >::presolve().

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 322 of file ROL_OptimizationSolver.hpp.

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

Member Data Documentation

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

Definition at line 64 of file ROL_OptimizationSolver.hpp.

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

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

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