Run the optimization

A NOMAD optimization process can be run by using the solve() method described below.

NOMAD.solveMethod
solve(p::NomadProblem, x0::Vector{Float64})

-> Run NOMAD with settings defined by NomadProblem p from starting point x0.

-> Display stats from NOMAD in the REPL.

-> Return a NamedTuple that contains info about the run, specifically:

  • status::Int:
ValueMeaning
1Objective target reached OR Mads converged
(mesh criterion) to a feasible point (true problem).
0At least one feasible point obtained and evaluation
budget spent or max iteration (user option) reached.
-1Mads mesh converged but no feasible point obtained
(only infeasible) for the true problem.
-2No feasible point obtained (only infeasible) and
evaluation budget (single bb or block of bb) spent
or max iteration (user option) reached.
-3Initial point failed to evaluate.
-4Time limit reached (user option).
-5CTRL-C or user stopped (callback function).
-6Stop on feasible point (user option).
-7Wrong parameters.
-8Something has gone wrong with the optimization.

All the other fields are populated if status ∉ [-3, -7, -8].

  • feasible::Bool:

Indicates if the set of solutions returned by the algorithm is feasible.

Arguments:

  • p::NomadProblem

The problem to solve.

  • x0::Vector{Float64}

The starting point. Must satisfy lb <= x0 <= ub where lb and ub are respectively the lower and upper bounds of the NomadProblem p. When A and b are defined, it must satisfy A * x0 = b.

Example:

using NOMAD

function eval_fct(x)
    f = x[1]^2 + x[2]^2
    c = 1 - x[1]
    success = true
    count_eval = true
    bb_outputs = [f,c]
    return (success, count_eval, bb_outputs)
end

# creation of a blackbox of dimensions 2*2 with one objective ("OBJ")
# and a constraint treated with the extreme barrier approach ("EB")
p = NomadProblem(2, 2, ["OBJ", "EB"], eval_fct)

# solve problem starting from the point [5.0;5.0]
stats = solve(p, [5.0;5.0])
source