Algorithm components#
Steps and updates#
- OMADS._poll._poll_step.poll_cycle(poll, options, param, state, stats, active_barrier, iteration, log, post, bb_handle, out, hashtable, ms=None)[source]#
- Parameters:
poll (Dirs2n)
options (Options)
param (Parameters)
state (MadsState)
stats (MadsStatistics)
active_barrier (AdaptiveBarrier)
iteration (int)
log (logger)
post (PostMADS)
bb_handle (Evaluator)
out (Output)
hashtable (Cache)
ms (MultiSource)
- OMADS._poll._poll_step.poll_step(poll, options, param, state, stats, active_barrier, iteration, frame_center, log, post, hashtable)[source]#
_summary_
- Parameters:
poll (Dirs2n) – The poll step algorithm
options (Options) – The directions class object
param (Parameters) – Algorithmic options
state (MadsState) – Algorithmic parameters
stats (MadsStatistics) – Success status
active_barrier (BarrierMO) – Statistics and metadata class object
iteration (int) – The active barrier class object
xmin (CandidatePoint) – iteration number
log (logger) – current incumbent candidate
post (PostMADS) – updated log
frame_center (int)
hashtable (Cache)
- Returns:
Updated incumbent candidate
- Return type:
- OMADS._search._search_step.search_cycle(search, options, param, state, stats, active_barrier, iteration, log, post, bb_handle, out, hashtable, search_vns=None, ms=None, model_search=False)[source]#
- Parameters:
search (EfficientExploration)
options (Options)
param (Parameters)
state (MadsState)
stats (MadsStatistics)
active_barrier (AdaptiveBarrier)
iteration (int)
log (logger)
post (PostMADS)
bb_handle (Evaluator)
out (Output)
hashtable (Cache)
search_vns (VNS)
ms (MultiSource)
model_search (bool)
- OMADS._search._search_step.search_step(search, options, param, state, stats, active_barrier, iteration, frame_center, log, post, hashtable, search_vns=None, model_search=False)[source]#
_summary_
- Parameters:
poll (Dirs2n) – The poll step algorithm
options (Options) – The directions class object
param (Parameters) – Algorithmic options
state (MadsState) – Algorithmic parameters
stats (MadsStatistics) – Success status
active_barrier (BarrierMO) – Statistics and metadata class object
iteration (int) – The active barrier class object
xmin (CandidatePoint) – iteration number
log (logger) – current incumbent candidate
post (PostMADS) – updated log
search (EfficientExploration)
frame_center (int)
hashtable (Cache)
search_vns (VNS)
model_search (bool)
- Returns:
Updated incumbent candidate
- Return type:
- OMADS._updates._updates.set_frame_centers_and_hvalues(state, active_barrier, param, options=None)[source]#
_summary_
- Parameters:
state (MadsState) – _description_
active_barrier (BarrierMO) – _description_
param (Parameters) – _description_
options (Options)
- OMADS._updates._updates.update(sampler, state, options, active_barrier, stats, hashtable=None)[source]#
Update step
- Parameters:
poll (Dirs2n) – poll directions
state (MadsState) – Algorithmic current success state
options (Options) – Algorithmic options
active_barrier (BarrierMO) – Active barrier
stats (MadsStatistics) – Metadata and run statistics
sampler (GenericSamplerBase)
hashtable (Cache)
- OMADS._metrics._success.compute_success(active_barrier, state, options, insertion_flag, v)[source]#
_summary_
- Parameters:
active_barrier (BarrierMO) – Evaluate success criteria and compute the success level
state (MadsState) – The active algorithm session state and metadata
options (Options) – algorithmic options
insertion_flag (str) – The update of non-dominated solutions or prim/sec incumbents
v (CandidatePoint)
- Returns:
The success level
- Return type:
Preprocessing#
- class OMADS._pre._preprocess.preprocess(data={}, log=None, sampler_t=None)[source]#
Bases:
objectPreprocessor for setting up optimization settings and parameters
- Parameters:
data (Dict[Any, Any])
log (logger | None)
sampler_t (SAMPLER_TYPE)
- sampler_preparation_and_initialization(param, x_start, is_xs, options, B, iteration, state, stats, ev, ms)[source]#
_summary_
- Parameters:
param (Parameters)
x_start (CandidatePoint)
is_xs (bool)
options (Options)
B (AdaptiveBarrier)
iteration (int)
state (MadsState)
stats (MadsStatistics)
ev (Evaluator)
ms (MultiSource)
Adaptive barrier#
- class OMADS._barriers._barriers.AdaptiveBarrier(param, options, max_size=30000)[source]#
Bases:
object- Parameters:
param (Parameters)
options (Options)
max_size (int)
Poll directions#
- class OMADS._directions._directions.Dirs2n[source]#
Bases:
GenericSamplerBaseData,GenericSamplerBaseThis is the orthognal 2n-directions class used for the poll step
- Parameters:
_poll_dirs – Poll set (list of points)
_point_index – List of point indices
_n – Number of directions
_defined – A boolean that indicate if the poll points are defined
- property bb_output: List[float]#
Evaluated blackbox functions
- Returns:
List of evaluated blackbox functions
- Return type:
List[float]
- property frame_size#
Frame size getter
- property candidate_points_set#
Candidates getter
- generate_candidate_points()[source]#
Candidates generation abstract method
- Returns:
_description_
- Return type:
List[CandidatePoint]
- postprocess_evaluated_candidates()[source]#
Postprocess and evaluate design criteria abstract method
- create_housholder(is_rich, domain=None, is_one_dir=False, n_plus_1=False)[source]#
Create householder matrix
- Parameters:
is_rich (bool) – A flag that indicates if the rich direction option is enabled
domain (List[int])
is_one_dir (bool)
n_plus_1 (bool)
- Returns:
The householder matrix
- Return type:
np.ndarray
- create_poll_set(ub, lb, fc, fci, it, var_type, var_sets, var_link, c_types=None, rich_direction=True, direction_type='ORTHO_2N')[source]#
Create the poll directions
- Parameters:
hhm (np.ndarray) – Householder matrix
ub (List[float]) – Variables upper bound
lb (List[float]) – Variables lower bound
it (int) – iteration
fc (CandidatePoint)
fci (int)
var_type (List)
var_sets (Dict)
var_link (List[str])
c_types (List[BARRIER_TYPES])
rich_direction (bool)
direction_type (str)
- scale(ub, lb, factor=10.0)[source]#
Scaling abstract method
- Parameters:
ub (List[float]) – _description_
lb (List[float]) – _description_
factor (float, optional) – _description_, defaults to 10.0
- gauss_perturbation(p, npts=5)[source]#
Gaussian perturbation abstract method
- Parameters:
p (CandidatePoint) – _description_
npts (int, optional) – _description_, defaults to 5
- Returns:
_description_
- Return type:
List[CandidatePoint]
- omit_duplicates(n_total_evals=0, stats=None, hashtable=None)[source]#
Omitting duplicate designs generated
- Parameters:
n_total_evals (int)
stats (MadsStatistics)
hashtable (Cache)
Search samplers#
- class OMADS._heuristics._exploration.EfficientExploration[source]#
Bases:
GenericSamplerBaseData,GenericSamplerBaseEfficient exploration class
- Parameters:
GenericSamplerBase (Class object) – Generic sampler base class
- generate_quad_model_points(hashtable, fc, x_parent=None)[source]#
Cheap search, meant to run first every iteration (at most two evaluations):
speculative search: right after a success (x_parent is the point the incumbent was generated from), repeat that successful step once more from the incumbent;
quadratic model search (see _quad_model_point).
Single-objective only. With constraints (constraints_type set), the constraints are modelled too and the frame center may be infeasible (see _constrained_quad_model_point); otherwise the incumbent must be feasible. Leaves the candidate set empty when there is nothing worth evaluating.
- Parameters:
hashtable (Cache)
fc (CandidatePoint)
x_parent (List[float] | None)
- generate_candidate_points()[source]#
Candidates generation abstract method
- Returns:
_description_
- Return type:
List[CandidatePoint]
- postprocess_evaluated_candidates()[source]#
Postprocess and evaluate design criteria abstract method
- property candidate_points_set#
Candidates getter
- scale(ub, lb, factor=10.0)[source]#
Scaling abstract method
- Parameters:
ub (List[float]) – _description_
lb (List[float]) – _description_
factor (float, optional) – _description_, defaults to 10.0
- generate_sample_points(active_barrier, hashtable, ub, lb, fc, fci, it, var_type, var_sets, var_link, c_types=None, last_success=SUCCESS_TYPES.US, nsamples=None)[source]#
Generate the sample points
- Parameters:
active_barrier (AdaptiveBarrier)
hashtable (Cache)
ub (List[float])
lb (List[float])
fc (CandidatePoint)
fci (int)
it (int)
var_type (List)
var_sets (Dict)
var_link (List[str])
c_types (List[BARRIER_TYPES])
last_success (SUCCESS_TYPES)
nsamples (int)
- gauss_perturbation(p, npts=5)[source]#
Gaussian perturbation abstract method
- Parameters:
p (CandidatePoint) – _description_
npts (int, optional) – _description_, defaults to 5
- Returns:
_description_
- Return type:
List[CandidatePoint]
- omit_duplicates(n_total_evals=0, stats=None, hashtable=None)[source]#
Omitting duplicate designs generated
- Parameters:
n_total_evals (int)
stats (MadsStatistics)
hashtable (Cache)
- class OMADS._heuristics._exploration.VNS(stop=False, params=None, x_inc=None, seed=12345, rho=0.1)[source]#
Bases:
VNSData- Parameters:
stop (bool)
params (Parameters | None)
x_inc (CandidatePoint)
seed (int)
rho (int)
- draw_from_gauss(mean)[source]#
_summary_
- Parameters:
mean (CandidatePoint)
- Return type:
List[CandidatePoint]
- draw_from_gamma(mean)[source]#
_summary_
- Parameters:
mean (CandidatePoint)
- Return type:
List[CandidatePoint]
- draw_from_exp(mean)[source]#
_summary_
- Parameters:
mean (CandidatePoint)
- Return type:
List[CandidatePoint]
- draw_from_poisson(mean)[source]#
_summary_
- Parameters:
mean (CandidatePoint)
- Return type:
List[CandidatePoint]
- draw_from_binomial(mean)[source]#
_summary_
- Parameters:
mean (CandidatePoint)
- Return type:
List[CandidatePoint]
- generate_samples(active_barrier=None, dist=None)[source]#
_summary_
- Parameters:
active_barrier (AdaptiveBarrier)
dist (DIST_TYPE)
- Return type:
List[float] | None
Meshes#
- class OMADS._mesh._mesh.Mesh(pb_params, limit_min_mesh_index, limit_max_mesh_index)[source]#
Bases:
ABC- Parameters:
pb_params (Parameters)
limit_min_mesh_index (int)
limit_max_mesh_index (int)
- class OMADS._mesh._omesh.Omesh(pb_param, run_options)[source]#
Bases:
MeshMesh coarsness update class
- Parameters:
_delta – mesh size
_Delta – poll size
_rho – poll size to mesh size ratio
_exp – manage the poll size granularity for discrete variables. See Audet et. al, The mesh adaptive direct search algorithm for granular and discrete variable
_mantissa – Same as
_exppsize_max – Maximum poll size
psize_success – Poll size at successful evaluation
_dtype – numpy double data type precision
pb_param (Parameters)
run_options (Options)
- class OMADS._mesh._gmesh.Gmesh(pb_param, run_options)[source]#
Bases:
MeshGMesh: Granular mesh
- Parameters:
pb_param (Parameters)
run_options (Options)
- get_delta(i)[source]#
Access to the mesh size parameter delta^k. :param delta: The mesh size parameter delta^k – OUT. :param i: The index of the mesh size
- Parameters:
i (int)