MultistartOptimization

Introduction

Multistart methods perform optimization from multiple starting points. This package implements multistart methods, relying on other packages for local methods. Wrappers are loaded on demand, or you can define them simply with a closure.

Example

using MultistartOptimization, NLopt

f(x) = sum(x -> abs2(x - 1), x)                     # objecive ∑(xᵢ-1)²
P = MinimizationProblem(f, fill(-2, 4), fill(2, 4)) # search in [-2, 2]⁴
local_method = NLopt_local_method(NLopt.LN_BOBYQA)    # loaded on demand with `using NLopt`
multistart_method = TikTak(100)
p = multistart_minimization(multistart_method, local_method, P)
(value = 0.0, location = [1.0, 1.0, 1.0, 1.0], ret = :XTOL_REACHED)

Generic API

MultistartOptimization.MinimizationProblemType
MinimizationProblem(objective, lower_bounds, upper_bounds)

Define a minimization problem.

  • objective is a function that maps ℝᴺ vectors to real numbers. It should accept all AbstractVectors of length N.
  • lower_bounds and upper_bounds define the bounds, and their lengths implicitly define the dimension N.

The fields of the result should be accessible with the names above.

source
MultistartOptimization.local_minimizationFunction

local_minimization(minimization_problem, local_method, x)

Perform a local minimization using local_method, starting from x.

The objective and the bounds are provided in minimization_problem, see MinimizationProblem. x should be an AbstractVector of conforming dimension.

local_method can be a type for which a method is defined (recommended). However, it can also be a closure, in which case it will be called as local_method(minimization_problem, x).

In both cases, it should return nothing, or a value which has the following properties:

  • location, an AbstractVector for the minimizer.

  • value, for the value of the objective at location. Inf (or equivalent) should be used for infeasible regions.

The returned value may have other properties too, these are useful for convergence diagnostics, debugging information, etc, these depend on the local_method.

Returning nothing is equivalent to value == Inf, but in some cases can work better for type inference as the method won't have to construct a counterfactual type.

source

Multistart methods

MultistartOptimization.TikTakType
TikTak(quasirandom_N; keep_ratio, θ_min, θ_max, θ_pow)

The “TikTak” multistart method, as described in Arnoud, Guvenen, and Kleineberg (2019).

This implements the multistart part, can be called with arbitrary local methods, see multistart_minimization.

Arguments

  • quasirandom_N: the number of quasirandom points for the first pass (using a Sobol sequence).

Keyword arguments

  • keep_ratio: the fraction of best quasirandom points which are kept

  • θ_min and θ_max clamp the weight parameter, θ_pow determines the power it is raised to.

The defaults are from the paper cited above.

source

Local methods

Local methods are based on other optimization packages, and loaded on demand.

NLopt

After NLopt is loaded, the following is made available.