gemseo.algos.opt.mnbi.settings.mnbi_settings module#

Settings for the mNBI algorithm.

Settings MNBI_Settings(*, enable_progress_bar=None, eq_tolerance=0.01, ineq_tolerance=0.0001, log_problem=True, max_time=0.0, normalize_design_space=False, reset_iteration_counters=True, round_ints=True, use_database=True, use_one_line_progress_bar=False, store_jacobian=True, ftol_rel=0.0, ftol_abs=0.0, max_iter=1000, scaling_threshold=None, stop_crit_n_x=3, xtol_rel=0.0, xtol_abs=0.0, sub_optim_algo, n_sub_optim=1, sub_optim_algo_settings=<factory>, sub_optim_max_iter=0, doe_algo='PYDOE_FULLFACT', doe_algo_settings=<factory>, debug=False, debug_file_path='debug_history.h5', skip_betas=True, custom_anchor_points=(), custom_phi_betas=(), n_processes=1)[source]#

Bases: BaseOptimizerSettings

The mNBI algorithm settings.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • enable_progress_bar (bool | None)

  • eq_tolerance (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.01.

  • ineq_tolerance (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0001.

  • log_problem (bool) --

    By default it is set to True.

  • max_time (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0.

  • normalize_design_space (bool) --

    By default it is set to False.

  • reset_iteration_counters (bool) --

    By default it is set to True.

  • round_ints (bool) --

    By default it is set to True.

  • use_database (bool) --

    By default it is set to True.

  • use_one_line_progress_bar (bool) --

    By default it is set to False.

  • store_jacobian (bool) --

    By default it is set to True.

  • ftol_rel (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0.

  • ftol_abs (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0.

  • max_iter (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1000.

  • scaling_threshold (Annotated[float, Ge(ge=0)] | None)

  • stop_crit_n_x (Annotated[int, Ge(ge=2)]) --

    By default it is set to 3.

  • xtol_rel (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0.

  • xtol_abs (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0.

  • sub_optim_algo (str)

  • n_sub_optim (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1.

  • sub_optim_algo_settings (Mapping[str, Any]) --

    By default it is set to <factory>.

  • sub_optim_max_iter (Annotated[int, Ge(ge=0)]) --

    By default it is set to 0.

  • doe_algo (str) --

    By default it is set to "PYDOE_FULLFACT".

  • doe_algo_settings (Mapping[str, Any]) --

    By default it is set to <factory>.

  • debug (bool) --

    By default it is set to False.

  • debug_file_path (str | Path) --

    By default it is set to "debug_history.h5".

  • skip_betas (bool) --

    By default it is set to True.

  • custom_anchor_points (Sequence[_NDArrayPydantic[Any, dtype[_ScalarType_co]]]) --

    By default it is set to ().

  • custom_phi_betas (Sequence[_NDArrayPydantic[Any, dtype[_ScalarType_co]]]) --

    By default it is set to ().

  • n_processes (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1.

Return type:

None

custom_anchor_points: Sequence[NDArrayPydantic] = ()#

The bounding points of the custom phi simplex for the optimization.

custom_phi_betas: Sequence[NDArrayPydantic] = ()#

The custom values of \(\Phi \beta\) to be used in the optimization.

debug: bool = False#

Whether to output the sub-optimization optima in a database hdf file.

debug_file_path: str | Path = 'debug_history.h5'#

The path to the debug file if debug mode is active.

doe_algo: str = 'PYDOE_FULLFACT'#

The design of experiments algo for the target points on the Pareto front.

A fullfactorial DOE is used default as these tend to be low dimensions, usually not more than 3 objectives for a given problem. This setting is relevant only for problems with more than 2 objectives.

doe_algo_settings: StrKeyMapping [Optional]#

The settings for the DOE algorithm.

n_processes: PositiveInt = 1#

The maximum number of processes used to parallelize the sub-optimizations.

Constraints:
  • gt = 0

n_sub_optim: PositiveInt = 1#

The number of sub-optimizations points.

mNBI generates n_sub_optim points on the Pareto front between the n-objective individual minima. This value must be strictly greater than the number of objectives of the problem.

Constraints:
  • gt = 0

normalize_design_space: bool = False#

Whether to normalize the design space variables between 0 and 1.

The mNBI algorithm does not allow to normalize the design space at the top level, only the sub-optimizations accept design space normalization. To do this, pass the setting normalize_design_space to sub_optim_algo_settings.

skip_betas: bool = True#

Whether to skip the sub-optimizations of relevant.

The sub-optimizations are skipped if they correspond to values of beta for which the theoretical result has already been found.

sub_optim_algo: str [Required]#

The optimization algorithm used to solve the sub-optimization problems.

sub_optim_algo_settings: StrKeyMapping [Optional]#

The settings for the sub-optimization algorithm.

sub_optim_max_iter: NonNegativeInt = 0#

The maximum number of iterations of the sub-optimization algorithms.

If 0, the max_iter value is used.

Constraints:
  • ge = 0

model_post_init(context, /)#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that's what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) -- The BaseModel instance.

  • context (Any) -- The context.

Return type:

None