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.

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]
result = solve(p, [5.0;5.0])
source