Solvers#
from OMADS import mads, poll, search
All three functions take a single argument, the problem dictionary or the path to a JSON file (see Configuration reference), and return a tuple whose first item is the results dictionary (see Outputs).
OMADS.mads#
- OMADS._mads.mads.main(*args)[source]#
Run the full MADS algorithm: model search, poll and sampling search.
Each iteration selects the frame centres from the adaptive barrier, runs a cheap speculative and quadratic-model search (at most two evaluations), then the poll step unless the previous sampling search succeeded, and the sampling search after an unsuccessful poll.
- Parameters:
args –
args[0]is the problem, either a dictionary with theevaluator,param,optionsandsearchsections or the path to a JSON file holding them. An optionalargs[3]overrides the random seed.- Returns:
(output, poll_sampler, search_sampler)whereoutputis a dictionary with the keysxmin,fmin,hmin,nbb_evals,niterations,nb_success,psize,psuccess,msizeandHV(hypervolume,"NA"for single-objective problems).- Return type:
tuple
Example:
from OMADS import mads out, poll_step, search_step = mads.main(data)
OMADS.poll#
- OMADS._poll.poll.main(*args)[source]#
Run MADS with the poll step only (no search step).
Each iteration selects the frame centres from the adaptive barrier, polls around them with orthogonal Householder directions (
ORTHO_2NorORTHO_N+1) and updates the mesh and the barrier threshold. This solver also supports Pareto studies (param["is_pareto"]) and writing the poll trajectory (options["save_coordinates"]).- Parameters:
args –
args[0]is the problem, either a dictionary with theevaluator,paramandoptionssections or the path to a JSON file holding them. An optionalargs[3]overrides the random seed.- Raises:
IOError – if the barrier is empty at the end of the run.
- Returns:
(output, poll_sampler)whereoutputis the results dictionary (seeOMADS._mads.mads.main()), with the extra keysSecondary fminandSecondary hminfor the best infeasible point.- Return type:
tuple
OMADS.search#
- OMADS._search.search.main(*args)[source]#
Run MADS with the sampling search step only (no poll step).
Each iteration draws
search["ns"]points with the sampler selected bysearch["type"]andsearch["s_method"](ACTIVE,LH,RS,HALTON,FULLFACTORIALorVNS), projects them on the mesh, evaluates them and updates the mesh and the barrier threshold.- Parameters:
args –
args[0]is the problem, either a dictionary with theevaluator,param,optionsandsearchsections or the path to a JSON file holding them. An optionalargs[3]overrides the random seed.- Returns:
(output, search_sampler)whereoutputis the results dictionary (seeOMADS._mads.mads.main()).- Return type:
tuple