bfgs Derived Type

type, public, extends(line_search_optimizer) :: bfgs

Defines a Broyden–Fletcher–Goldfarb–Shanno (BFGS) solver for minimization of functions of multiple variables.

See Also:


Contents


Type-Bound Procedures

procedure, public :: get_line_search => lso_get_line_search

procedure, public :: get_max_fcn_evals => oe_get_max_eval

  • private pure function oe_get_max_eval(this) result(n)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(in) :: this

    The equation_optimizer object.

    Return Value integer(kind=int32)

    The maximum number of function evaluations.

procedure, public :: get_print_status => oe_get_print_status

  • private pure function oe_get_print_status(this) result(x)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(in) :: this

    The equation_optimizer object.

    Return Value logical

    True if the iteration status should be printed; else, false.

procedure, public :: get_tolerance => oe_get_tol

  • private pure function oe_get_tol(this) result(x)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(in) :: this

    The equation_optimizer object.

    Return Value real(kind=real64)

    The tolerance.

procedure, public :: get_use_line_search => lso_get_use_search

  • private pure function lso_get_use_search(this) result(x)

    Gets a value determining if a line-search should be employed.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(in) :: this

    The line_search_optimizer object.

    Return Value logical

    Returns true if a line search should be used; else, false.

procedure, public :: get_var_tolerance => lso_get_var_tol

  • private pure function lso_get_var_tol(this) result(x)

    Gets the convergence on change in variable tolerance.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(in) :: this

    The line_search_optimizer object.

    Return Value real(kind=real64)

    The tolerance value.

procedure, public :: is_line_search_defined => lso_is_line_search_defined

  • private pure function lso_is_line_search_defined(this) result(x)

    Tests to see if a line search module is defined.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(in) :: this

    The line_search_optimizer object.

    Return Value logical

    Returns true if a module is defined; else, false.

procedure, public :: set_default_line_search => lso_set_default

  • private subroutine lso_set_default(this)

    Establishes a default line_search object for the line search module.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(inout) :: this

    The line_search_optimizer object.

procedure, public :: set_line_search => lso_set_line_search

procedure, public :: set_max_fcn_evals => oe_set_max_eval

  • private subroutine oe_set_max_eval(this, n)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(inout) :: this

    The equation_optimizer object.

    integer(kind=int32), intent(in) :: n

    The maximum number of function evaluations.

procedure, public :: set_print_status => oe_set_print_status

  • private subroutine oe_set_print_status(this, x)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(inout) :: this

    The equation_optimizer object.

    logical, intent(in) :: x

    True if the iteration status should be printed; else, false.

procedure, public :: set_tolerance => oe_set_tol

  • private subroutine oe_set_tol(this, x)

    Arguments

    Type IntentOptional Attributes Name
    class(equation_optimizer), intent(inout) :: this

    The equation_optimizer object.

    real(kind=real64), intent(in) :: x

    The tolerance.

procedure, public :: set_use_line_search => lso_set_use_search

  • private subroutine lso_set_use_search(this, x)

    Sets a value determining if a line-search should be employed.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(inout) :: this

    The line_search_optimizer object.

    logical, intent(in) :: x

    Set to true if a line search should be used; else, false.

procedure, public :: set_var_tolerance => lso_set_var_tol

  • private subroutine lso_set_var_tol(this, x)

    Sets the convergence on change in variable tolerance.

    Arguments

    Type IntentOptional Attributes Name
    class(line_search_optimizer), intent(inout) :: this

    The line_search_optimizer object.

    real(kind=real64), intent(in) :: x

    The tolerance value.

procedure, public :: solve => bfgs_solve

  • private module subroutine bfgs_solve(this, fcn, x, fout, ib, err)

    Utilizes the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm for finding a minimum value of the specified function.

    Arguments

    Type IntentOptional Attributes Name
    class(bfgs), intent(inout) :: this

    The bfgs object.

    class(fcnnvar_helper), intent(in) :: fcn

    The fcnnvar_helper object containing the equation to optimize.

    real(kind=real64), intent(inout), dimension(:) :: x

    On input, the initial guess at the optimal point. On output, the updated optimal point estimate.

    real(kind=real64), intent(out), optional :: fout

    An optional output, that if provided, returns the value of the function at x.

    type(iteration_behavior), optional :: ib

    An optional output, that if provided, allows the caller to obtain iteration performance statistics.

    class(errors), intent(inout), optional, target :: err

    An error handling object.