Parameters setting
The settings of a NOMAD optimization process must be entered in an object of the type described below.
NOMAD.NomadProblem — Type
NomadProblem(nb_inputs::Int, nb_outputs::Int, output_types::Vector{String}, eval_bb::Function;
input_types::Vector{String} = ["R" for i in 1:nb_inputs],
granularity::Vector{Float64} = zeros(Float64, nb_inputs),
lower_bound::Vector{Float64} = -Inf * ones(Float64, nb_inputs),
upper_bound::Vector{Float64} = Inf * ones(Float64, nb_inputs),
A::Union{Nothing, Matrix{Float64}} = nothing,
b::Union{Nothing, Vector{Float64}} = nothing,
min_mesh_size::Vector{Float64} = zeros(Float64, nb_inputs),
b::Union{Nothing, Vector{Float64}} = nothing,
initial_mesh_size::Vector{Float64} = Float64[])Struct containing the main information needed to solve a blackbox problem by the Nomad Software.
Attributes:
nb_inputs::Int:
Number of inputs of the blackbox. Is required to be > 0.
No default, needs to be set.
nb_outputs::Int:
Number of outputs of the blackbox. Is required to be > 0.
No default, needs to be set.
output_types::Vector{String}:
A vector containing String objects that define the types of outputs returned by eval_bb (the order is important) :
| String | Output type |
|---|---|
"OBJ" | objective value to be minimized |
"PB" | progressive barrier constraint |
"EB" | extreme barrier constraint |
No default value, needs to be set.
eval_bb::Function:
A function of the form :
(success, count_eval, bb_outputs) = eval(x::Vector{Float64})bb_outputs being a Vector{Float64} containing the values of objective function and constraints for a given input vector x. NOMAD will seek to minimize the objective function and keeping constraints inferior to 0.
success is a Bool set to false if the evaluation failed.
count_eval is a Bool equal to true if the blackbox evaluation counting has to be incremented.
input_types::Vector{String}:
A vector containing String objects that define the types of inputs to be given to eval_bb (the order is important) :
| String | Input type |
|---|---|
"R" | Real/Continuous |
"B" | Binary |
"I" | Integer |
all R by default.
granularity::Vector{Float64}:
The granularity of input variables, that is to say the minimum variation authorized for these variables. A granularity of 0 corresponds to a real variable.
By default, 0 for real variables, 1 for integer and binary ones.
min_mesh_size::Vector{Float64}:
The minimum mesh size to reach allowed by each input variable. When a variable decreases below the threshold, the algorithm stops.
By default, 0 (which corresponds to the Nomad software tolerance).
initial_mesh_size::Vector{Float64}:
The initial mesh size set for each input variable. Can be adjusted if the granularity is set.
Empty by default.
lower_bound::Vector{Float64}:
Lower bound for each coordinate of the blackbox input. -Inf * ones(Float64, nb_inputs), by default.
upper_bound::Vector{Float64}:
Upper bound for each coordinate of the blackbox input.
Inf * ones(Float64, nb_inputs), by default.
A::Union{Nothing, Matrix{Float64}}:
Matrix A in the potential equality constraints Ax = b, where x are the inputs of the blackbox. A must have more columns than lines. If defined, the granularity parameters should be set to default value, i.e. 0.
nothing, by default.
b::Union{Nothing, Vector{Float64}}:
Vector b in the potential equality constraints Ax=b, where x are the inputs of the blackbox. b must be defined when A is defined. In this case, dimensions must match.
nothing, by default.
options::NomadOptions
Nomad options that can be set before running the optimization process.
-> cache_size_max::Int
Maximum number of points stored in the cache.
Inf` by default.
-> display_degree::Int:
Integer between 0 and 3 that sets the level of display.
-> display_all_eval::Bool:
If false, only evaluations that allow to improve the current state are displayed.
false by default.
-> display_infeasible::Bool:
If true, display best infeasible values reached by Nomad until the current step.
false by default.
-> display_unsuccessful::Bool:
If true, display evaluations that are unsuccessful.
false by default.
-> display_stats::Bool:
A vector containing String objects that define the statistics to display when the algorithm is running.
| String | Display Statistics Arguments |
|---|---|
"BBE" | Blackbox evaluations |
"BBO" | Blackbox outputs |
"CACHE_HITS" | Cache hits |
"CACHE_SIZE" | Cache size |
"CONS_H" | Infeasibility (h) value |
"EVAL" | Evaluations (includes cache hits) |
"FEAS_BBE" | Feasible blackbox evaluations |
"GEN_STEP" | Name of the step that generated |
| this point to evaluate | |
"H_MAX" | Max infeasibility (h) acceptable |
"INF_BBE" | Infeasible blackbox evaluations |
"ITER_NUM" | Iteration number in which this |
| evaluation was done | |
"MESH_INDEX" | Mesh index |
"OBJ" | Objective function value |
"PHASE_ONE_SUCC" | Success evaluations during phase one |
| phase | |
"SGTE" | Number of surrogate evaluations since |
| last reset | |
"SOL" | Current feasible iterate (displayed |
| in ()) | |
"SUCCESS_TYPE" | Success type for this evaluation, |
| compared with the frame center | |
"TIME" | Real time in seconds |
"TOTAL_SGTE" | Total number of surrogate evaluations |
Empty by default.
-> max_bb_eval::Int:
Maximum of calls to eval_bb allowed. Must be positive.
20000 by default.
-> sgtelib_model_max_eval::Int:
Maximum number of calls to surrogate models for each optimization of surrogate problem allowed. Must be positive.
1000 by default.
-> eval_opportunistic::Bool
If true, the algorithm performs an opportunistic strategy at each iteration.
true by default.
-> eval_use_cache::Bool:
If true, the algorithm only evaluates one time a given input. Avoids to recalculate a blackbox value if this last one has already be computed.
true by default.
-> eval_sort_type::String:
Order points before evaluation according to one of the following strategies
| String | Eval Sort strategy |
|---|---|
"DIR_LAST_SUCCESS" | Use last success direction |
"LEXICOGRAPHICAL" | Use lexicographical ordering (coordinates) |
"RANDOM" | Do not sort |
"QUADRATIC_MODEL" | Use quadratic models |
"QUADRATIC_MODEL" by default.
-> h_max_0::Float64:
Initial value of the barrier threshold for progressive barrier (PB). Must be positive.
Inf by default.
-> direction_type::String:
Direction type for Mads poll. The following direction types are available
| String | Direction type |
|---|---|
"ORTHO 2N" | OrthoMads with 2n directions |
"ORTHO N+1 NEG" | OrthoMads with n+1 directions. The (n+1)e |
| is the negative sum of the n first. | |
"ORTHO N+1 QUAD" | OrthoMads with n+1 directions. The (n+1)e |
| is found by solving a quadratic subproblem | |
"N+1 UNI" | n+1 uniform distribution of directions |
"SINGLE" | Single direction |
"DOUBLE" | Two opposed directions |
Empty by default (the NOMAD software adopts a "ORTHO N+1 QUAD" strategy by default).
-> direction_type_secondary_poll::String
Direction type for secondary Mads poll for the progressive barrier (PB). The same direction types than direction_type are available.
Empty by default (by default, the NOMAD software adopts a "DOUBLE" strategy if direction_type is set to "ORTHO 2N" or "ORTHO N+1" or a "SINGLE" strategy otherwise).
-> anisotropic_mesh::Bool:
Use anisotropic mesh to generate directions for MADS.
true by default.
-> anisotropy_factor::Float64:
The MADS anisotropy factor for mesh size change. Must be strictly positive.
0.1 by default.
-> lh_search::Tuple{Int, Int}:
LH search parameters.
lh_search[1] is the lh_search_init parameter, i.e. the number of initial search points performed with Latin-Hypercube method.
0 by default.
lh_search[2] is the lh_search_iter parameter, i.e. the number of search points performed at each iteration with Latin-Hypercube method.
0 by default.
-> quad_model_search::Bool:
If true, the algorithm executes a quadratic model search strategy at each iteration. Deactivated when the number of variables is greater than 50.
true by default.
-> sgtelib_model_search::Bool:
If true, the algorithm executes a model search strategy using Sgtelib at each iteration. Deactivated when the number of variables is greater than 50.
false by default.
-> simple_line_search::Bool:
If true, the algorithm executes a line search strategy at each iteration. Does not work with speculative search.
false by default.
-> speculative_search::Bool:
If true, the algorithm executes a speculative search strategy at each iteration.
true by default.
-> speculative_search_base_factor::Float64:
The factor distance to the current incumbent for the MADS speculative search. Must be strictly superior to 1.
4.0 by default.
-> speculative_search_max::Int:
Number of points to generate using the Mads speculative search (when opportunistic strategy). Must be positive.
1 by default.
-> nm_search::Bool:
If true, the algorithm executes a Nelder-Mead search strategy at each iteration.
true by default.
-> nm_delta_e::Float64:
The expansion parameter of the Nelder-Mead search. Must be > 1.
2.0 by default.
-> nm_delta_ic::Float64:
The inside contraction parameter of the Nelder-Mead search. Must be strictly comprised between -1 and 0.
-0.5 by default.
-> nm_delta_oc::Float64:
The outside contraction parameter of the Nelder-Mead search. Must be strictly comprised between 0 and 1.
0.5 by default.
-> nm_gamma::Float64:
The shrink parameter of the Nelder-Mead search. Must be strictly comprised between 0 and 1.
0.5 by default.
-> nm_search_rank_eps::Float64:
The tolerance parameter on the rank of the initial simplex built in the Nelder-Mead search. Must be strictly positive.
0.01 by default.
-> nm_search_max_trial_pts_nfactor::Int:
Nelder-Mead search stops when nm_search_max_trial_pts_nfactor * n evaluations are reached, n being the number of variables of the problem.
80 by default.
-> nm_search_stop_on_success::Bool:
If true, the nm_search strategy stops opportunistically (as soon as a better point is found).
false by default.
-> vns_mads_search::Bool:
If true, the algorithm executes a Variable Neighbourhoold search strategy at each iteration.
false by default.
-> vns_mads_search_max_trial_pts_nfactor::Int:
The VNS strategy, when triggered, stops when this parameter is reached.
100 by default.
-> vns_mads_search_trigger::Float64
Maximum desired ratio of VNS blackbox evaluations over the total number of blackbox evaluations. When 0, the VNS search is never executed; when 1, a search is launched at each iteration.
0.75 by default.
-> vnsmart_mads_search::Bool:
If true, the algorithm executes a Variable Neighbourhoold search strategy under condition of consecutive fails.
false by default.
-> vnsmart_mads_search_threshold::Int:
The Variable Neighbourhoold search (Smart) strategy activates when this threshold is reached.
3 by default.
-> stop_if_feasible::Bool:
Stop algorithm as soon as a feasible solution is found.
false by default.
-> stop_if_phase_one_solution::Bool:
Stop algorithm once a phase one solution is obtained.
false by default.
-> Multiobjective optimization. NOMAD activates multiobjective optimization when the number of objectives is greater than 1. In this case, all search strategies, excepted the speculative search, the NM search and the Quadratic model search are deactivated.
-> dmultimads_nm_strategy::String:
Nelder-Mead search strategies for DMultiMads (multiobjective optimization).
| String | DMultiMads NM search |
|---|---|
"DOM" | Dominance Move strategy |
"MULTI" | MultiMads strategy |
DOM by default.
-> dmultimads_quad_model_strategy::String:
Quadratic model search strategies for DMultiMads (multiobjective optimization).
| String | DMultiMads NM search |
|---|---|
"DMS" | DirectMultiSearch strategy |
"DOM" | Dominance Move strategy |
"MULTI" | MultiMads strategy |
MULTI by default.
-> dmultimads_select_incumbent_threshold::Int:
A parameter that controls the number of points that can be chosen as current incumbents for DMultiMads (multiobjective optimization). The bigger the less restrictive the choice.
1 by default.
-> max_time::Union{Nothing, Int}:
If defined, maximum clock time (in seconds) execution of the algorithm.
false by default.
-> linear_converter::String:
The type of converter to deal with linear equality constraints. Can be SVD or QR.
SVD by default.
-> linear_constraints_atol::Float64:
The tolerance accuracy that x0 must satisfy, when there are linear equality constraints, i.e. A * x0 = b.
0 by default.