equation_optimizer Derived Type

type, public, abstract :: equation_optimizer

A base class for optimization of an equation of multiple variables.


Contents


Type-Bound Procedures

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 :: 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(nonlin_optimize_fcn), public, deferred, pass :: solve

  • subroutine nonlin_optimize_fcn(this, fcn, x, fout, ib, err) Prototype

    Describes the interface of a routine for optimizing an equation of N variables.

    Arguments

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

    The equation_optimizer 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.