gemseo.algos.opt.base_optimizer_settings module#

Settings for the optimization algorithms.

Settings BaseOptimizerSettings(*, 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=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)#

Bases: BaseDriverSettings

The common parameters for all optimization libraries.

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 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)]) --

    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.

Return type:

None

ftol_abs: NonNegativeFloat = 0.0#

The absolute tolerance on the objective function.

Constraints:
  • ge = 0

ftol_rel: NonNegativeFloat = 0.0#

The relative tolerance on the objective function.

Constraints:
  • ge = 0

max_iter: PositiveInt = 1000#

The maximum number of iterations.

Constraints:
  • gt = 0

scaling_threshold: NonNegativeFloat | None = None#

The threshold on the reference function value that triggers scaling.

If None, do not scale the functions.

stop_crit_n_x: int = 3#

The minimum number of design vectors to consider in the stopping criteria.

Constraints:
  • ge = 2

xtol_abs: NonNegativeFloat = 0.0#

The absolute tolerance on the design parameters.

Constraints:
  • ge = 0

xtol_rel: NonNegativeFloat = 0.0#

The relative tolerance on the design parameters.

Constraints:
  • ge = 0

model_post_init(context, /)#

We need to both initialize private attributes and call the user-defined model_post_init method.

Parameters:
  • self (BaseModel)

  • context (Any)

Return type:

None