Configuration classes#
The sections of the input dictionary are unpacked into these classes.
- class OMADS._setup._options.Options(seed=0, budget=1000, tol=1e-09, psize_init=1.0, display=False, opportunistic=False, check_cache=False, store_cache=False, collect_y=False, rich_direction=False, precision='high', save_results=False, save_coordinates=False, save_all_best=False, parallel_mode=False, np=1, extend=None, is_verbose=False, anisotropy_factor=0.1, anistropic_mesh=True, refine_freq=1, use_dms_success=False, use_omads_partial_success=True, use_penalty_approach=False, noutbound_hits_max=60000, use_dom_trigger=True, direction_type='ORTHO_2N', search_every=1)[source]#
Bases:
objectThe running study and algorithmic options of OMADS
- Parameters:
seed (int) – Random generator seed
budget (int) – The evaluation budget
tol (float) – The threshold of the minimum frame (poll) or mesh (search) size at which the run is terminated
psize_init (float) – Initial frame size of the orthogonal mesh
display (bool) – Print the evaluation of the starting point and a run summary
opportunistic (bool) – Stop evaluating the current poll or search set as soon as a full success is found
check_cache (bool) – Check the cache before evaluating points to avoid duplicates
store_cache (bool) – Store evaluated points in the cache (required by the
madsandsearchsolvers to locate frame centres)collect_y (bool) – Reserved (collect coupling variables for DMDO)
rich_direction (bool) – Use random Householder poll directions, which are asymptotically dense
precision (str) – Floating-point precision: “high”, “medium” or “low”
save_results (bool) – Write every evaluation to
<post_dir>/<name>_run/<name>_all.outsave_coordinates (bool) – Write the poll points of each iteration to
coords.json(used to animate the poll trajectory;pollsolver)save_all_best (bool) – Reserved
parallel_mode (bool) – Evaluate candidate sets in parallel processes
np (int) – The number of worker processes (capped at the CPU count)
extend (Any) – Reserved (a
Dirs2ninstance to continue a run)is_verbose (bool) – Write extra diagnostics to
OMADS.loganisotropy_factor (float) – GMESH: threshold of the anisotropic frame enlargement rule
anistropic_mesh (bool) – GMESH: enable anisotropic frame enlargement
refine_freq (int) – GMESH: refine the frame every
refine_frequnsuccessful iterationsuse_dms_success (bool) – Count any improvement of the non-dominated set as a full success
use_omads_partial_success (bool) – When False, an unsuccessful iteration becomes a partial success if an infeasible point has a lower violation than the infeasible frame centre
use_penalty_approach (bool) – Reserved
noutbound_hits_max (int) – Stop after this many trial points hit the bounds
use_dom_trigger (bool) – Choose the primary frame centre with the dominance-distance trigger of the progressive barrier
direction_type (str) – Poll directions: “ORTHO_2N” (2n orthogonal directions) or “ORTHO_N+1” (n of them plus their negative sum; real variables only, falls back to ORTHO_2N otherwise)
search_every (int) – In
mads, run the sampling search only after everysearch_every-th consecutive unsuccessful poll (1: after every one)
- class OMADS._setup._parameters.Parameters(baseline=None, lb=None, ub=None, var_names=None, fun_names=None, design_criteria=None, function_weights=None, scaling=10.0, post_dir='C:\\Projects\\SW\\Dev\\AB\\OMADS-2608\\OMADS', var_type=None, var_sets=None, constants=None, constants_name=None, failure_stop=None, problem_name='unknown', best_known=None, constraints_type=None, h_max=inf, rho=5e-05, lambda_multipliers=None, name='undefined', mesh_type='ORTHO', fixed_variables=None, granularity=None, min_mesh_size=None, min_frame_size=None, initial_mesh_size=None, initial_frame_size=None, is_pareto=False, nobj=1, incumbent_selection_param=1, barrier_initialized_from_cache=True, ref_point=None, lhs_search_initialization=False, mesh_adjustment=2.0, w_min=1)[source]#
Bases:
objectVariables and algorithmic parameters
- Parameters:
baseline (List[float]) – Baseline design point (initial point
x0), or a list of starting pointslb (List[float]) – The variables lower bound
ub (List[float]) – The variables upper bound
var_names (List[str]) – The variables name
fun_names (List[str]) – The objective names (one per objective)
scaling (float) – Scaling factor (can be defined as a list (assigning a factor for each variable) or a scalar value that will be applied on all variables). Poll steps are expressed in units of
(ub - lb) / scalingpost_dir (str) – The location and name of the post directory where the output results file will live in (if any)
var_type (List[str]) – Variable types: “R” (real), “I” (integer), “D_<set>” (discrete), “C_<set>” (categorical), “O” (ordinal) or “B” (binary)
var_sets (Dict) – Named value lists used by discrete and categorical variables
constants (List) – Constant parameters passed to the blackbox callable
constraints_type (List[BARRIER_TYPES]) – Barrier type of each constraint: “PB” (progressive) or “EB” (extreme); “PEB” and “RB” behave like “PB”
h_max (float) – Initial barrier threshold
rho (float) – Trigger of the infeasible frame centre and penalty parameter
lambda_multipliers (List[float]) – Initial Lagrange multipliers of the penalty
name (str) – Run name, used to name the output files
mesh_type (str) – “ORTHO” (orthogonal mesh) or “GMESH” (granular mesh)
granularity (List[float]) – GMESH: per-variable granularity (0 for continuous)
min_mesh_size (List[float]) – GMESH: minimum mesh size per variable
min_frame_size (List[float]) – GMESH: minimum frame size per variable
initial_mesh_size (List[float]) – GMESH: initial mesh size per variable
initial_frame_size (List[float]) – GMESH: initial frame size per variable
is_pareto (bool) – Run a Pareto (multi-objective) study
nobj (int) – Number of objectives
ref_point (List[float]) – Reference point of the hypervolume indicator
lhs_search_initialization (bool) – Use (n+1)(n+2) Latin hypercube samples at the first search step
w_min (int) – Frame-size ratio (
10**-w_min) below which a feasible point is not selected as frame centredesign_criteria (Dict[str, DESIGN_CRITERIA])
function_weights (List[float])
constants_name (List)
failure_stop (bool)
problem_name (str)
best_known (List[float])
fixed_variables (List[float])
incumbent_selection_param (int)
barrier_initialized_from_cache (bool)
mesh_adjustment (float)
- set_initial_mesh_parameters()[source]#
Set the initial mesh parameters
- Raises:
IOError – _description_
IOError – _description_
IOError – _description_
IOError – _description_
- set_min_mesh_parameters()[source]#
Set minimum mesh parameters
- Raises:
IOError – _description_
IOError – _description_
IOError – _description_
- set_min_frame_parameters()[source]#
Minimum frame size parameters
- Raises:
IOError – _description_
IOError – _description_
IOError – _description_
- to_be_checked()[source]#
Check whther parameters been initialized and checked
- Returns:
_description_
- Return type:
bool
- get_barrier_type()[source]#
Get the constraints barrier type
- Returns:
_description_
- Return type:
_type_
- property n: int#
Get the problem number of dimensions
- Returns:
_description_
- Return type:
int
- class OMADS._evaluator._evaluator.Evaluator(blackbox='BB', command_options=None, internal=None, path='..\\tests\\Rosen', input='input.inp', output='output.out', constants=None, bb_eval=0, _dtype=None, timeout=1000000, local_exec_jobs=None, candidates=None, directions=None, mesh=None, incumbent=None)[source]#
Bases:
objectDefine the evaluator attributes and settings :param blackbox: The blackbox name (it can be a callable function or an executable file) :param commandOptions: Define options that will be added to the execution command of the executable file. Command options should be defined as a string in one line :param internal: If the blackbox callable function is part of the internal benchmarking library :param path: The path of the executable file (if any) :param input: The input file name – should include the file extension :param output: The output file name – should include the file extension :param constants: Define constant parameters list, see the documentation in Tutorials->Blackbox evaluation->User parameters :param _dtype: The precision delegator of the numpy library :param timeout: The time out of the evaluation process
- shutdown_executor()[source]#
Tear down the reusable process pool (call once the run’s main loop over poll/search iterations has finished).
- eval(values)[source]#
Evaluate the poll point.
- Parameters:
values (List[float]) – Poll point coordinates (design vector)
- Returns:
Evaluated optimization functions and error flag
- Return type:
Tuple[List[float], bool]
- class OMADS._heuristics._exploration.search_sampling(s_method='LH', ns=3, visualize=False, criterion=None, weights=None, type='SAMPLING', batch=None)[source]#
Bases:
objectOptions of the search step (the
searchsection of the input).- Parameters:
s_method (str) – Sampling method: “ACTIVE”, “LH”, “RS”, “HALTON” or “FULLFACTORIAL”
ns (int) – Number of samples per search step (None: (n+1)(n+2)/4)
visualize (bool) – Reserved
criterion (str | None) – Space-filling criterion of the Latin hypercube sampler
weights (List[float] | None) – Level weights of the full-factorial sampler
type (str) – “VNS” for the variable neighbourhood search, any other value for the sampling search
batch (int | None) – Number of BiTPE proposals per ACTIVE search step, capped by the remaining budget (None: 10)