Constants and enumerations#
# ————————————————————————————# # Mesh Adaptive Direct Search - (MADS) # # # # Author: Ahmed H. Bayoumy # # email: ahmed.bayoumy@mail.mcgill.ca # # # # This program is free software: you can redistribute it and/or modify it under the # # terms of the BSD 3-Clause License as published by the Free Software # # Foundation, either version 3 of the License, or (at your option) any later # # version. # # # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A # # PARTICULAR PURPOSE. See the BSD 3-Clause License for more details. # # # # You should have received a copy of the BSD 3-Clause License along # # with this program. If not, see <https://opensource.org/license/bsd-3-clause/>. # # # # You can find information on OMADS at # # Ahmed-Bayoumy/OMADS # # Copyright (C) 2026 Ahmed H. Bayoumy # # ————————————————————————————#
- exception OMADS._utils._globals.PassException[source]#
Bases:
ExceptionCustom exception that can be used to pass silently.
- class OMADS._utils._globals.DType(prec='medium')[source]#
Bases:
objectA numpy data type delegator for decimal precision control
- Parameters:
prec (str, optional) – Default precision option can be set to “high”, “medium” or “low” precision resolution, defaults to “medium”
dtype (np.dtype, optional) – Numpy double data type precision, defaults to np.float64
itype (np.dtype, optional) – Numpy integer data type precision, defaults to np.int
zero (float, optional) – Zero value resolution, defaults to np.finfo(np.float64).resolution
- property zero: float#
This is the mantissa value of the machine zero
- Returns:
machine precision zero resolution
- Return type:
float
- property precision#
Set/get precision resolution level
- Returns:
float precision value
- Return type:
numpy float
- Note:
MS Windows does not support precision with the {1e-18} high resolution of the python numerical library (numpy) so high precision will be changed to medium precision which supports {1e-15} resolution check: https://numpy.org/doc/stable/user/basics.types.html
- property dtype#
Set/get the double formate type
- Returns:
float precision value
- Return type:
numpy float
- property itype#
Set/Get for the integer formate type
- Returns:
integer precision value
- Return type:
numpy float
- class OMADS._utils._globals.VAR_TYPE(*values)[source]#
Bases:
Enum- REAL = 1#
- INTEGER = 2#
- DISCRETE = 3#
- BINARY = 4#
- CATEGORICAL = 5#
- ORDINAL = 6#
- class OMADS._utils._globals.BARRIER_TYPES(*values)[source]#
Bases:
Enum- EB = 1#
- PB = 2#
- PEB = 3#
- RB = 4#
- class OMADS._utils._globals.DESIGN_STATUS(*values)[source]#
Bases:
Enum- FEASIBLE = 1#
- INFEASIBLE = 2#
- ERROR = 3#
- UNEVALUATED = 4#
- class OMADS._utils._globals.DESIGN_CRITERIA(*values)[source]#
Bases:
Enum- OBJECTIVE = 1#
- INEQUALITY_CONSTRAINT = 2#
- EQALITY_CONSTRAINT = 3#
- UNDEFINED = 4#
- class OMADS._utils._globals.BB_EVAL_STATUS(*values)[source]#
Bases:
Enum- SUCCESS = 1#
- ERROR = 2#
- UNEVALUATED = 3#
- class OMADS._utils._globals.MSG_TYPE(*values)[source]#
Bases:
Enum- DEBUG = 1#
- WARNING = 2#
- ERROR = 3#
- INFO = 4#
- CRITICAL = 5#
- class OMADS._utils._globals.SAMPLING_METHOD(*values)[source]#
Bases:
Enum- FULLFACTORIAL: int = 1#
- LH: int = 2#
- RS: int = 3#
- HALTON: int = 4#
- ACTIVE: int = 5#
- class OMADS._utils._globals.SEARCH_TYPE(*values)[source]#
Bases:
Enum- SAMPLING: int = 1#
- SURROGATE: int = 2#
- VNS: int = 3#
- BAYESIAN: int = 4#
- NM: int = 5#
- PSO: int = 6#
- class OMADS._utils._globals.DIST_TYPE(*values)[source]#
Bases:
Enum- GAUSS: int = 1#
- GAMMA: int = 2#
- EXPONENTIAL: int = 3#
- BIONOMIAL: int = 4#
- POISSON: int = 5#
- class OMADS._utils._globals.SAMPLER_TYPE(*values)[source]#
Bases:
Enum- POLL: int = 1#
- SEARCH: int = 2#
- class OMADS._utils._globals.STOP_TYPE(*values)[source]#
Bases:
Enum- NO_STOP: int = 1#
- ERROR: int = 2#
- UNKNOWN_STOP_REASON: int = 3#
- CTRL_C: int = 4#
- USER_STOPPED: int = 5#
- MESH_PREC_REACHED: int = 6#
- X0_FAIL: int = 7#
- P1_FAIL: int = 8#
- DELTA_M_MIN_REACHED: int = 9#
- DELTA_P_MIN_REACHED: int = 10#
- MAX_TIME_REACHED: int = 11#
- MAX_BB_EVAL_REACHED: int = 12#
- MAX_SGTE_EVAL_REACHED: int = 13#
- F_TARGET_REACHED: int = 14#
- MAX_CACHE_MEMORY_REACHED: int = 15#
- GL_LIMITS_REACHED: int = 16#
- STOP_IF_FEASIBLE: int = 17#
- NO_INIT_CANDIDATES: int = 18#
- MAX_BB_OUTBOUND_REACHED: int = 19#
- MIN_MESH_REACHED: int = 20#
- class OMADS._utils._globals.MESH_TYPE(*values)[source]#
Bases:
Enum- ORTHO = 1#
- GMESH = 2#
- XMESH = 3#
- SMESH = 4#