gemseo.algos.opt.nlopt.settings.base_gradient_free_nlopt_settings module#

Settings for the gradient-free NLopt algorithms.

Settings BaseGradientFreeNLoptSettings(*, enable_progress_bar=None, eq_tolerance=0.01, ineq_tolerance=0.0001, log_problem=True, max_time=0.0, normalize_design_space=True, reset_iteration_counters=True, round_ints=True, use_database=True, use_one_line_progress_bar=False, store_jacobian=True, ftol_rel=1e-08, ftol_abs=1e-14, max_iter=1000, scaling_threshold=None, stop_crit_n_x=None, xtol_rel=1e-08, xtol_abs=1e-14, stopval=-inf, init_step=0.25)[source]#

Bases: BaseNLoptSettings

The NLopt optimization library settings for gradient-free algorithms.

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), 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 True.

  • 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), Ge(ge=0), Ge(ge=0), Ge(ge=0)]) --

    By default it is set to 1e-08.

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

    By default it is set to 1e-14.

  • 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 | None, Ge(ge=2)])

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

    By default it is set to 1e-08.

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

    By default it is set to 1e-14.

  • stopval (float) --

    By default it is set to -inf.

  • init_step (Annotated[float, Gt(gt=0)] | _NDArrayPydantic[Any, dtype[Annotated[float, Gt(gt=0)]]]) --

    By default it is set to 0.25.

Return type:

None

init_step: PositiveFloat | NDArrayPydantic[PositiveFloat] = 0.25#

The initial step size for derivative-free algorithms.

It can be an array of the initial steps for each dimension, or a single number if the same step will be used for all of them.

For derivative-free local-optimization algorithms, the optimizer must somehow decide on some initial step size to perturb x by when it begins the optimization. This step size should be big enough so that the value of the objective significantly changes, but not too big if you want to find the local optimum nearest to x.