ROL
ROL::ROL::TypeU::TrustRegionAlgorithm< Real > Class Template Reference

#include <ROL_Constraint_SerialSimOpt.hpp>

Inheritance diagram for ROL::ROL::TypeU::TrustRegionAlgorithm< Real >:

Public Member Functions

 TrustRegionAlgorithm (ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, std::ostream &outStream=std::cout) override
 Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.
void writeHeader (std::ostream &os) const override
 Print iterate header.
void writeName (std::ostream &os) const override
 Print step name.
void writeOutput (std::ostream &os, const bool print_header=false) const override
 Print iterate status.
Public Member Functions inherited from ROL::ROL::TypeU::Algorithm< Real >
virtual ~Algorithm ()
 Algorithm ()
 Constructor, given a step and a status test.
void setStatusTest (const Ptr< StatusTest< Real > > &status, bool combineStatus=false)
virtual void run (Problem< Real > &problem, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface.
virtual void run (Vector< Real > &x, Objective< Real > &obj, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems (Type-U). This is the primary Type-U interface.
virtual void run (Vector< Real > &x, Objective< Real > &obj, Constraint< Real > &linear_con, Vector< Real > &linear_mul, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems with explicit linear equality constraints (Type-U). This is the primary Type-U with explicit linear equality constraints interface.
virtual void run (Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, Constraint< Real > &linear_con, Vector< Real > &linear_mul, const Vector< Real > &linear_c, std::ostream &outStream=std::cout)
 Run algorithm on unconstrained problems with explicit linear equality constraints (Type-U). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.
virtual void writeExitStatus (std::ostream &os) const
Ptr< const AlgorithmState< Real > > getState () const
void reset ()

Private Member Functions

void initialize (const Vector< Real > &x, const Vector< Real > &g, Vector< Real > &Bg, Objective< Real > &obj, std::ostream &outStream=std::cout)
Real computeValue (const Vector< Real > &x, Objective< Real > &obj, Real pRed)
void computeGradient (const Vector< Real > &x, Objective< Real > &obj, bool accept)
 Compute gradient to iteratively satisfy inexactness condition.

Private Attributes

Ptr< TrustRegion_U< Real > > solver_
 Container for trust-region solver object.
Ptr< TrustRegionModel_U< Real > > model_
 Container for trust-region model.
ETrustRegionU etr_
 Trust-region subproblem solver type.
Real delMax_
 Maximum trust-region radius.
Real eta0_
 Step acceptance threshold.
Real eta1_
 Radius decrease threshold.
Real eta2_
 Radius increase threshold.
Real gamma0_
 Radius decrease rate (negative rho).
Real gamma1_
 Radius decrease rate (positive rho).
Real gamma2_
 Radius increase rate.
Real TRsafe_
 Safeguard size for numerically evaluating ratio.
Real eps_
 Safeguard for numerically evaluating ratio.
TRUtils::ETRFlag TRflag_
 Trust-region exit flag.
int SPflag_
 Subproblem solver termination flag.
int SPiter_
 Subproblem solver iteration count.
bool useNM_
int NMstorage_
ESecant esec_
 Secant type.
bool useSecantPrecond_
bool useSecantHessVec_
std::vector< bool > useInexact_
 Flags for inexact (0) objective function, (1) gradient, (2) Hessian.
Real scale0_
 Scale for inexact gradient computation.
Real scale1_
 Scale for inexact gradient computation.
Real scale_
Real omega_
Real force_
Real forceFactor_
int updateIter_
Real gtol_
int verbosity_
 Print additional information to screen if > 0.
bool printHeader_
 Print header at every iteration.

Additional Inherited Members

Protected Member Functions inherited from ROL::ROL::TypeU::Algorithm< Real >
void initialize (const Vector< Real > &x, const Vector< Real > &g)
Protected Attributes inherited from ROL::ROL::TypeU::Algorithm< Real >
const Ptr< CombinedStatusTest< Real > > status_
const Ptr< AlgorithmState< Real > > state_

Detailed Description

template<typename Real>
class ROL::ROL::TypeU::TrustRegionAlgorithm< Real >

Definition at line 28 of file ROL_Constraint_SerialSimOpt.hpp.

Constructor & Destructor Documentation

◆ TrustRegionAlgorithm()

template<typename Real>
ROL::TypeU::TrustRegionAlgorithm< Real >::TrustRegionAlgorithm ( ParameterList & parlist,
const Ptr< Secant< Real > > & secant = nullPtr )

Definition at line 19 of file ROL_Constraint_SerialSimOpt.hpp.

Member Function Documentation

◆ run()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::run ( Vector< Real > & x,
const Vector< Real > & g,
Objective< Real > & obj,
std::ostream & outStream = std::cout )
overridevirtual

Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual optimization vector spaces, where the user does not define the dual() method.

Implements ROL::ROL::TypeU::Algorithm< Real >.

Definition at line 157 of file ROL_Constraint_SerialSimOpt.hpp.

◆ writeHeader()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::writeHeader ( std::ostream & os) const
overridevirtual

Print iterate header.

Reimplemented from ROL::ROL::TypeU::Algorithm< Real >.

Definition at line 242 of file ROL_Constraint_SerialSimOpt.hpp.

◆ writeName()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::writeName ( std::ostream & os) const
overridevirtual

Print step name.

Reimplemented from ROL::ROL::TypeU::Algorithm< Real >.

Definition at line 298 of file ROL_Constraint_SerialSimOpt.hpp.

◆ writeOutput()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::writeOutput ( std::ostream & os,
const bool write_header = false ) const
overridevirtual

Print iterate status.

Reimplemented from ROL::ROL::TypeU::Algorithm< Real >.

Definition at line 319 of file ROL_Constraint_SerialSimOpt.hpp.

◆ initialize()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::initialize ( const Vector< Real > & x,
const Vector< Real > & g,
Vector< Real > & Bg,
Objective< Real > & obj,
std::ostream & outStream = std::cout )
private

Definition at line 77 of file ROL_Constraint_SerialSimOpt.hpp.

◆ computeValue()

template<typename Real>
Real ROL::TypeU::TrustRegionAlgorithm< Real >::computeValue ( const Vector< Real > & x,
Objective< Real > & obj,
Real pRed )
private

Definition at line 111 of file ROL_Constraint_SerialSimOpt.hpp.

◆ computeGradient()

template<typename Real>
void ROL::TypeU::TrustRegionAlgorithm< Real >::computeGradient ( const Vector< Real > & x,
Objective< Real > & obj,
bool accept )
private

Compute gradient to iteratively satisfy inexactness condition.

This function attempts to ensure that the inexact gradient condition,

\[ \|g_k-\nabla J(x_k)\|_{\mathcal{X}} \le \kappa_1\min\{\,\|g_k\|_{\mathcal{X}},\,\Delta_k\,\}, \]

is satisfied. This function works under the assumption that the gradient function returns a gradient approximation which satisfies the error tolerance prescribed by the tol input parameter.

Parameters
[in]xis the current optimization variable.
[in]objis the objective function.

Definition at line 133 of file ROL_Constraint_SerialSimOpt.hpp.

Member Data Documentation

◆ solver_

template<typename Real>
Ptr<TrustRegion_U<Real> > ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::solver_
private

Container for trust-region solver object.

Definition at line 31 of file ROL_Constraint_SerialSimOpt.hpp.

◆ model_

template<typename Real>
Ptr<TrustRegionModel_U<Real> > ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::model_
private

Container for trust-region model.

Definition at line 32 of file ROL_Constraint_SerialSimOpt.hpp.

◆ etr_

template<typename Real>
ETrustRegionU ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::etr_
private

Trust-region subproblem solver type.

Definition at line 33 of file ROL_Constraint_SerialSimOpt.hpp.

◆ delMax_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::delMax_
private

Maximum trust-region radius.

Definition at line 34 of file ROL_Constraint_SerialSimOpt.hpp.

◆ eta0_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::eta0_
private

Step acceptance threshold.

Definition at line 35 of file ROL_Constraint_SerialSimOpt.hpp.

◆ eta1_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::eta1_
private

Radius decrease threshold.

Definition at line 36 of file ROL_Constraint_SerialSimOpt.hpp.

◆ eta2_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::eta2_
private

Radius increase threshold.

Definition at line 37 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gamma0_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::gamma0_
private

Radius decrease rate (negative rho).

Definition at line 38 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gamma1_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::gamma1_
private

Radius decrease rate (positive rho).

Definition at line 39 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gamma2_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::gamma2_
private

Radius increase rate.

Definition at line 40 of file ROL_Constraint_SerialSimOpt.hpp.

◆ TRsafe_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::TRsafe_
private

Safeguard size for numerically evaluating ratio.

Definition at line 41 of file ROL_Constraint_SerialSimOpt.hpp.

◆ eps_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::eps_
private

Safeguard for numerically evaluating ratio.

Definition at line 42 of file ROL_Constraint_SerialSimOpt.hpp.

◆ TRflag_

template<typename Real>
TRUtils::ETRFlag ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::TRflag_
private

Trust-region exit flag.

Definition at line 43 of file ROL_Constraint_SerialSimOpt.hpp.

◆ SPflag_

template<typename Real>
int ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::SPflag_
private

Subproblem solver termination flag.

Definition at line 44 of file ROL_Constraint_SerialSimOpt.hpp.

◆ SPiter_

template<typename Real>
int ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::SPiter_
private

Subproblem solver iteration count.

Definition at line 45 of file ROL_Constraint_SerialSimOpt.hpp.

◆ useNM_

template<typename Real>
bool ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::useNM_
private

Definition at line 48 of file ROL_Constraint_SerialSimOpt.hpp.

◆ NMstorage_

template<typename Real>
int ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::NMstorage_
private

Definition at line 49 of file ROL_Constraint_SerialSimOpt.hpp.

◆ esec_

template<typename Real>
ESecant ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::esec_
private

Secant type.

Definition at line 52 of file ROL_Constraint_SerialSimOpt.hpp.

◆ useSecantPrecond_

template<typename Real>
bool ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::useSecantPrecond_
private

Definition at line 53 of file ROL_Constraint_SerialSimOpt.hpp.

◆ useSecantHessVec_

template<typename Real>
bool ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::useSecantHessVec_
private

Definition at line 54 of file ROL_Constraint_SerialSimOpt.hpp.

◆ useInexact_

template<typename Real>
std::vector<bool> ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::useInexact_
private

Flags for inexact (0) objective function, (1) gradient, (2) Hessian.

Definition at line 57 of file ROL_Constraint_SerialSimOpt.hpp.

◆ scale0_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::scale0_
private

Scale for inexact gradient computation.

Definition at line 58 of file ROL_Constraint_SerialSimOpt.hpp.

◆ scale1_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::scale1_
private

Scale for inexact gradient computation.

Definition at line 59 of file ROL_Constraint_SerialSimOpt.hpp.

◆ scale_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::scale_
private

Definition at line 60 of file ROL_Constraint_SerialSimOpt.hpp.

◆ omega_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::omega_
private

Definition at line 60 of file ROL_Constraint_SerialSimOpt.hpp.

◆ force_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::force_
private

Definition at line 60 of file ROL_Constraint_SerialSimOpt.hpp.

◆ forceFactor_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::forceFactor_
private

Definition at line 60 of file ROL_Constraint_SerialSimOpt.hpp.

◆ updateIter_

template<typename Real>
int ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::updateIter_
private

Definition at line 61 of file ROL_Constraint_SerialSimOpt.hpp.

◆ gtol_

template<typename Real>
Real ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::gtol_
private

Definition at line 62 of file ROL_Constraint_SerialSimOpt.hpp.

◆ verbosity_

template<typename Real>
int ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::verbosity_
private

Print additional information to screen if > 0.

Definition at line 65 of file ROL_Constraint_SerialSimOpt.hpp.

◆ printHeader_

template<typename Real>
bool ROL::ROL::TypeU::TrustRegionAlgorithm< Real >::printHeader_
private

Print header at every iteration.

Definition at line 66 of file ROL_Constraint_SerialSimOpt.hpp.


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