- 3.0.2 optimal control module.
ct::optcon::LineSearchSettings Struct Reference

GNMS Line Search Settings. More...

#include <NLOptConSettings.hpp>

Public Types

enum  TYPE {
  NONE = 0, SIMPLE, ARMIJO, GOLDSTEIN,
  NUM_TYPES
}
 types of backtracking line-search More...
 

Public Member Functions

 LineSearchSettings ()
 default constructor for the NLOptCon line-search settings More...
 
bool parametersOk () const
 check if the currently set line-search parameters are meaningful More...
 
void print () const
 print the current line search settings to console More...
 
void load (const std::string &filename, bool verbose=true, const std::string &ns="line_search")
 load line search settings from file More...
 

Public Attributes

std::map< TYPE, std::string > lineSearchTypeToString
 mappings for line-search types More...
 
std::map< std::string, TYPEstringToLineSearchType
 
TYPE type
 
bool adaptive
 
size_t maxIterations
 
double alpha_0
 
double alpha_max
 
double n_alpha
 
double armijo_parameter
 
bool debugPrint
 

Detailed Description

GNMS Line Search Settings.

The Line Search Settings are part of the general settings struct and hold parameters to customize the line-search for the NLOptCon controller update.

Member Enumeration Documentation

◆ TYPE

types of backtracking line-search

Enumerator
NONE 
SIMPLE 

take full-step updates

ARMIJO 

simple backtracking using cost or merit function

GOLDSTEIN 

backtracking including riccati matrix measure

NUM_TYPES 

backtracking including riccati matrix measure and defects

Constructor & Destructor Documentation

◆ LineSearchSettings()

ct::optcon::LineSearchSettings::LineSearchSettings ( )
inline

default constructor for the NLOptCon line-search settings

Member Function Documentation

◆ parametersOk()

bool ct::optcon::LineSearchSettings::parametersOk ( ) const
inline

check if the currently set line-search parameters are meaningful

References alpha_0, alpha_max, and n_alpha.

Referenced by ct::optcon::NLOptConSettings::parametersOk().

◆ print()

void ct::optcon::LineSearchSettings::print ( ) const
inline

print the current line search settings to console

Referenced by load(), ct::optcon::NLOptConSettings::load(), and ct::optcon::NLOptConSettings::print().

◆ load()

void ct::optcon::LineSearchSettings::load ( const std::string &  filename,
bool  verbose = true,
const std::string &  ns = "line_search" 
)
inline

load line search settings from file

References alpha_0, n_alpha, print(), and ct::optcon::example::verbose.

Referenced by ct::optcon::NLOptConSettings::load().

Member Data Documentation

◆ lineSearchTypeToString

std::map<TYPE, std::string> ct::optcon::LineSearchSettings::lineSearchTypeToString
Initial value:
= {{NONE, "NONE (take full-step updates with alpha=1.0)"},
{SIMPLE, "Simple Backtracking with cost/merit"}, {ARMIJO, "ARMIJO-style Backtracking for single-shooting"},
{GOLDSTEIN, "GOLDSTEIN backtracking using Riccati matrices"}}

mappings for line-search types

◆ stringToLineSearchType

std::map<std::string, TYPE> ct::optcon::LineSearchSettings::stringToLineSearchType
Initial value:
= {
{"NONE", NONE}, {"SIMPLE", SIMPLE}, {"ARMIJO", ARMIJO}, {"GOLDSTEIN", GOLDSTEIN}}

◆ type

◆ adaptive

bool ct::optcon::LineSearchSettings::adaptive

Flag whether alpha_0 gets updated based on previous iteration

◆ maxIterations

◆ alpha_0

◆ alpha_max

double ct::optcon::LineSearchSettings::alpha_max

Maximum step size for line search. This is the limit when adapting alpha_0.

Referenced by parametersOk().

◆ n_alpha

double ct::optcon::LineSearchSettings::n_alpha

◆ armijo_parameter

double ct::optcon::LineSearchSettings::armijo_parameter

"Control Parameter" in Armijo line search condition.

Referenced by ct::optcon::NLOCBackendBase< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::acceptStep().

◆ debugPrint


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