RobWorkProject  23.9.11-
Classes | Public Types | Static Public Member Functions | List of all members
BFGS Class Reference

BFGS is a class including the BFGS minimization algorithm. More...

#include <BFGS.hpp>

Classes

struct  BFGS_function_struct
 Minimisation function struct. More...
 

Public Types

enum  OPTM_STATUS { GRADIENTWARNING = 0 , SUCCESS }
 Optimization status. More...
 
typedef Eigen::VectorXd vector
 Vector type used in the minimazation algorithm.
 
typedef Eigen::MatrixXd matrix
 MAtrix type used in the minimazation algorithm.
 

Static Public Member Functions

static int optimizer (vector &startguess, BFGS_function_struct function, double tolerance, unsigned int iterationLimit, double initialStepsize=1.0, double c1=1e-4, double c2=0.9, double alphamax=1.0)
 Minimize a function using the BFGS algorithm. More...
 

Detailed Description

BFGS is a class including the BFGS minimization algorithm.

The BFGS minimization algorithm has been implemented as described in "Numerical Optimization - by Jorge Nocedal and Stephen J. Wright" chapter 6+3.

See also
../example/bfgsApp/bfgsExample.cpp

Member Enumeration Documentation

◆ OPTM_STATUS

Optimization status.

Enumerator
GRADIENTWARNING 

Indicating a problem with the numerical precision when evaluating the gradient.

SUCCESS 

Indicating a successfully minimization.

Member Function Documentation

◆ optimizer()

static int optimizer ( vector startguess,
BFGS_function_struct  function,
double  tolerance,
unsigned int  iterationLimit,
double  initialStepsize = 1.0,
double  c1 = 1e-4,
double  c2 = 0.9,
double  alphamax = 1.0 
)
static

Minimize a function using the BFGS algorithm.

Parameters
startguessStart guess for the minimizer parameters. Replaced with minima solution at end of minimization.
functionBFGS_function_struct including pointers to the minimization function f, df and a void pointer to other data for the minimization function.
toleranceIndicating when an acceptable minima has been found by evaluating if \( tolerance>||\Delta f(x)||_2 \).
iterationLimitMaximum number of iterations for the BFGS algorithm.
initialStepsizeInitial step size for the BFGS algorithm.
c1Value used to ensure the "strong Wolfe conditions" are satisfied with the value c1. See "Numerical Optimization - by Jorge Nocedal and Stephen J. Wright" chapter 3. Typical value = 1e-4.
c2Value used to ensure the "strong Wolfe conditions" are satisfied with the value c2. See "Numerical Optimization - by Jorge Nocedal and Stephen J. Wright" chapter 3. Typical value = 0.9.
alphamaxMaximum stepsize used in iterations. Typical value of 1.0 is used to produce superlinear convergence of the overall algorithm.
Returns
GRADIENTWARNING on numerically precision problems SUCCESS when a minima is found.
Examples
bfgsExample.cpp.

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