gemseo.algos.opt.scipy_local.settings.tnc module#

Settings for the SciPy TNC algorithm.

Settings TNC_Settings(*, kkt_tol_abs=inf, kkt_tol_rel=inf, enable_progress_bar=None, eq_tolerance=1e-06, 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-09, ftol_abs=1e-09, max_iter=1000, scaling_threshold=None, stop_crit_n_x=3, xtol_rel=1e-09, xtol_abs=1e-09, disp=False, offset=None, maxCGit=-1, eta=-1, stepmx=0.0, accuracy=0.0, minfev=0.0, gtol=1e-06, rescale=1.3)[source]#

Bases: BaseScipyLocalSettings, BaseGradientBasedAlgorithmSettings

Settings for the SciPy TNC algorithm.

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:
  • kkt_tol_abs (Annotated[float, Ge(ge=0)]) --

    By default it is set to inf.

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

    By default it is set to inf.

  • enable_progress_bar (bool | None)

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

    By default it is set to 1e-06.

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

    By default it is set to 1e-09.

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

    By default it is set to 1e-09.

  • max_iter (Annotated[int, Gt(gt=0), Gt(gt=0), 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), Ge(ge=0), Ge(ge=0), Ge(ge=0), Ge(ge=0), Ge(ge=0), Ge(ge=0)]) --

    By default it is set to 1e-09.

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

    By default it is set to 1e-09.

  • disp (bool) --

    By default it is set to False.

  • offset (float | None)

  • maxCGit (int) --

    By default it is set to -1.

  • eta (float) --

    By default it is set to -1.

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

    By default it is set to 0.0.

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

    By default it is set to 0.0.

  • minfev (float) --

    By default it is set to 0.0.

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

    By default it is set to 1e-06.

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

    By default it is set to 1.3.

Return type:

None

accuracy: NonNegativeFloat = 0.0#

The relative precision for finite difference calculations.

Constraints:
  • ge = 0

eta: float = -1#

The severity of the line search.

gtol: NonNegativeFloat = 1e-06#

The precision goal for the projected gradient value to stop the algorithm.

Constraints:
  • ge = 0

maxCGit: int = -1#

The maximum number of hessian-vector evaluations per main iteration.

minfev: float = 0.0#

The minimum function value estimate.

offset: float | None = None#

The value to subtract from each variable.

If None, the offsets are (up+low)/2 for interval bounded variables and x for the others.

rescale: NonNegativeFloat = 1.3#

The log10 scaling factor used to trigger the objectiv function rescaling.

Constraints:
  • ge = 0

stepmx: NonNegativeFloat = 0.0#

The maximum step for the line search (may be increased during call).

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