ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
ConstrainedOptPack::DirectLineSearchArmQuad_Strategy Class Reference

Performs a line search using the Armijo condition and uses quadratic interpolation to select each new alpha. More...

#include <ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp>

Inheritance diagram for ConstrainedOptPack::DirectLineSearchArmQuad_Strategy:
Inheritance graph
[legend]

Public Member Functions

 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, eta)
 Set the Armijo cord test fractional reduction parameter. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, min_frac)
 The minimum fraction that alpha is reduced for each line search iteration. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, max_frac)
 The maximum fraction that alpha is reduced for each line search iteration. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, max_out_iter)
 Deterimine if the line search iterations are maxed out or not. More...
 
 DirectLineSearchArmQuad_Strategy (int max_iter=20, value_type eta=1.0e-4, value_type min_frac=0.1, value_type max_frac=0.5, bool max_out_iter=false)
 Constructs with default settings. More...
 
- Public Member Functions inherited from ConstrainedOptPack::DirectLineSearch_Strategy
virtual ~DirectLineSearch_Strategy ()
 

Overridden from DirectLineSearch_Strategy

void set_max_iter (int max_iter)
 
int max_iter () const
 
int num_iterations () const
 
bool do_line_search (const MeritFuncCalc1D &phi, value_type phi_k, value_type *alpha_k, value_type *phi_kp1, std::ostream *out)
 Performs the following line search:
More...
 
void print_algorithm (std::ostream &out, const std::string &leading_str) const
 

Detailed Description

Performs a line search using the Armijo condition and uses quadratic interpolation to select each new alpha.

Definition at line 53 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.hpp.

Constructor & Destructor Documentation

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::DirectLineSearchArmQuad_Strategy ( int  max_iter = 20,
value_type  eta = 1.0e-4,
value_type  min_frac = 0.1,
value_type  max_frac = 0.5,
bool  max_out_iter = false 
)

Constructs with default settings.

Definition at line 59 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

Member Function Documentation

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
eta   
)

Set the Armijo cord test fractional reduction parameter.

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
min_frac   
)

The minimum fraction that alpha is reduced for each line search iteration.

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
max_frac   
)

The maximum fraction that alpha is reduced for each line search iteration.

ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
max_out_iter   
)

Deterimine if the line search iterations are maxed out or not.

This option is really only used for debugging and requires changing the other parameters to make it useful.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::set_max_iter ( int  max_iter)
virtual
int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::max_iter ( ) const
virtual
int ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::num_iterations ( ) const
virtual
bool ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::do_line_search ( const MeritFuncCalc1D phi,
value_type  phi_k,
value_type *  alpha_k,
value_type *  phi_kp1,
std::ostream *  out 
)
virtual

Performs the following line search:

num_iter = 0;
while( phi.value(alpha_k) > phi_k + eta * alpha_k * phi.deriv() ) 
{
   if(num_iter >= max_iter) return true;
   num_iter = num_iter + 1;
   alpha_k = [ min_frac * alpha_k <= quadradic interpolation for alpha  <= max_frac * alpha_k ];
}
return true;<br>

If the maximum number of iterations is exceeded then false will be returned.

The default values for the adjustable parameters (from D&S A6.3.1) are:
max_iter = 20
eta = 1.0e-4
min_frac = 0.1
max_frac = 0.5

Implements ConstrainedOptPack::DirectLineSearch_Strategy.

Definition at line 88 of file ConstrainedOptPack_DirectLineSearchArmQuad_Strategy.cpp.

void ConstrainedOptPack::DirectLineSearchArmQuad_Strategy::print_algorithm ( std::ostream &  out,
const std::string &  leading_str 
) const
virtual

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