Index

Reference

Basinhopping.BasinhoppingOutcomeType

Basinhopping algorithm outcomes

  • niter_completed: Maximum number of local optimisatiosn reached
  • early_stop: Callback function requested an early stop to the algorithm
  • success_condition: Same minimum found more than specified number of times
Basinhopping.BasinhoppingParamsType
struct BasinhoppingParams{T<:StepTaker,U<:AcceptanceTest,C<:Function}

Optional parameters to Basinhopping algorithm

Fields

  • niter::Int64: Total number of local optimisations performed.
  • step_taker::T: Total number of local optimizations performed.
  • test::U: Test determining whether local optimization is accepted.
  • callback::C: Function to be called after each local optimization. Signature: (x, minimum, parameters_after_local_opt, minimum_after_local_opt, test_result) -> bool. If this returns true the algorithm is stopped.
  • niter_success::Int64: Stop if the global minimum candidate remains the same for this number of iterations.
Basinhopping.BasinhoppingParamsMethod
function BasinhoppingParams(;<keyword arguments>)

Keyword arguments

  • niter: Default: 20.
  • step_taker: Default RandomDisplacement(0.5, Random.GLOBAL_RNG, 50, 0.5, 0.9).
  • test: Default: MetropolisTest(1.0, Random.GLOBAL_RNG).
  • callback::Int64: Default: (...) -> false.
  • niter_success::Int64: Default: 2
Basinhopping.BasinhoppingResultType

Basinhopping algorithm result

Fields

  • minimization_result: local optimization result identified as global minimum
  • total_iterations::Int64: total number of local optimizations performed
  • f_calls::Int64: total number of function evaluations
  • g_calls::Int64: total number of gradient calls
  • h_calls::Int64: total number of Hessian evaluations
  • exit_code::BasinhoppingOutcome: Result of algorithm (see BasinhoppingOutcome documentation)
Basinhopping.RandomDisplacementType

Random displacement of parameters.

Fields

  • stepsize::Float64: Size of random displacement.
  • rng::RNG: Source of pseudorandomness.
  • interval::Int64: total number of function evaluations.
  • target_accept_rate::Float64: Ratio between local minima being accepted and all local optimizations.
  • factor::Float64: Factor by which to adjust step size when updating.
Basinhopping.TestType

Result of applying acceptance test

  • accept: Test passed, local minimum accepted
  • reject: Test failed, local minimum rejected
  • force: Forced acceptance of local minimum
Base.minimumMethod

Returns global minimum found by basinhopping

Base.showMethod

Show global minimum found

Basinhopping.apply_testMethod
function apply_test(test,
                    minimum_after_local_opt,
                    x_after_local_opt,
                    minimum,
                    x)

Apply acceptance test.

Arguments

  • optimizer: an optimization routine; must be a callable accepting a single argument, the initial parameters for a local optimization
  • x0: initial parameters for first local optimization
  • parameters: optional parameters; see BasinhoppingParams
Basinhopping.apply_testMethod
function apply_test(test::CompositeTest,
                    minimum_after_local_opt,
                    x_after_local_opt,
                    minimum,
                    x)

Evaluates composite acceptace test; test is accepted either if all tests are accepted or if one test forces the acceptance by returning force.

Basinhopping.basinhoppingFunction
function basinhopping(optimizer, x0[, parameters])

Basinhopping optimization algorithm.

Arguments

  • optimizer: an optimization routine; must be a callable accepting a single argument, the initial parameters for a local optimization
  • x0: initial parameters for first local optimization
  • parameters: optional parameters; see BasinhoppingParams
Basinhopping.take_step!Method
take_step!(d::RandomDisplacement, x)

Random perturbation in every coordinate of x.

Basinhopping.update!Method
update!(d::StepTaker, nstep, naccept)

Updates step taking routine.

Arguments

  • d::StepTaker:
  • nstep::Int: Number of local optimizations performed so far.
  • naccept::Int: Number of local minima accepted so far.
Optim.f_callsMethod

Returns total number of function evaluations

Optim.g_callsMethod

Returns total number of gradient evaluations

Optim.h_callsMethod

Returns total number of Hessian evaluations

Optim.minimizerMethod

Returns parameters at which global minimum was found