ROL
|
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_ |
Provides a simplified interface for solving a wide range of optimization problems.
Definition at line 29 of file ROL_OptimizationSolver.hpp.
|
inline |
Constructor.
[in] | opt | the OptimizationProblem to be solved |
[in] | parlist | algorithm and step input parameters |
Definition at line 64 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_.
|
inline |
Returns iteration history as a vector of strings.
Definition at line 169 of file ROL_OptimizationSolver.hpp.
References ROL::OptimizationSolver< Real >::output_.
|
inline |
Solve optimization problem with no iteration output.
[in] | status | is a user-defined StatusTest |
[in] | combineStatus | if true, the user-defined StatusTest will be combined with the default StatusTest |
Definition at line 180 of file ROL_OptimizationSolver.hpp.
Referenced by main(), and ROL::SROMGenerator< Real >::SROMGenerator().
|
inline |
Solve optimization problem.
[in] | outStream | is the output stream to collect iteration history |
[in] | status | is a user-defined StatusTest |
[in] | combineStatus | if true, the user-defined StatusTest will be combined with the default StatusTest |
Definition at line 194 of file ROL_OptimizationSolver.hpp.
References ROL::OptimizationSolver< Real >::algo_, ROL::OptimizationSolver< Real >::bnd_, ROL::OptimizationSolver< Real >::c_, ROL::OptimizationSolver< Real >::con_, ROL::OptimizationSolver< Real >::g_, ROL::OptimizationSolver< Real >::l_, ROL::OptimizationSolver< Real >::obj_, ROL::OptimizationSolver< Real >::output_, ROL::OptimizationSolver< Real >::problemType_, ROL::OptimizationSolver< Real >::state_, ROL::OptimizationSolver< Real >::status0_, ROL::OptimizationSolver< Real >::status_, ROL::OptimizationSolver< Real >::step_, ROL::TYPE_B, ROL::TYPE_E, ROL::TYPE_EB, ROL::TYPE_LAST, ROL::TYPE_U, and ROL::OptimizationSolver< Real >::x_.
|
inline |
Return the AlgorithmState.
Definition at line 237 of file ROL_OptimizationSolver.hpp.
References ROL::OptimizationSolver< Real >::state_.
Referenced by main().
|
inline |
Reset the AlgorithmState.
This function does not reset the Step or the StepState.
Definition at line 247 of file ROL_OptimizationSolver.hpp.
References ROL::OptimizationSolver< Real >::state_.
Referenced by ROL::OptimizationSolver< Real >::reset().
|
inline |
Reset both Algorithm and Step.
[in] | resetAlgo | if 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 262 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_.
|
inline |
Grab step name (after check for consistency).
[out] | stepname | Name of step |
This function returns the algorithmic step name.
Definition at line 289 of file ROL_OptimizationSolver.hpp.
References ROL::OptimizationSolver< Real >::stepname_.
|
private |
Definition at line 32 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 33 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), ROL::OptimizationSolver< Real >::reset(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 34 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 35 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
|
private |
Definition at line 38 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 39 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 40 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), ROL::OptimizationSolver< Real >::reset(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 41 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 43 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), ROL::OptimizationSolver< Real >::reset(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 44 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 45 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 47 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::getOutput(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 49 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::solve().
|
private |
Definition at line 50 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::reset().
|
private |
Definition at line 51 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::getStepName(), and ROL::OptimizationSolver< Real >::OptimizationSolver().
|
private |
Definition at line 53 of file ROL_OptimizationSolver.hpp.
Referenced by ROL::OptimizationSolver< Real >::OptimizationSolver(), and ROL::OptimizationSolver< Real >::reset().