gemseo.algos.opt.base_milp_settings module#

Settings for the mixed-integer linear programming algorithms.

Settings BaseMILPSettings(*, 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, disp=False, mip_rel_gap=0.0, node_limit=1000, presolve=True)[source]#

Bases: BaseOptimizerSettings

The mixed-integer linear programming library setting.

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

    By default it is set to 0.01.

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

    By default it is set to 0.0.

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

    By default it is set to 0.0.

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

    By default it is set to 0.0.

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

    By default it is set to 0.0.

  • disp (bool) --

    By default it is set to False.

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

    By default it is set to 0.0.

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

    By default it is set to 1000.

  • presolve (bool) --

    By default it is set to True.

Return type:

None

disp: bool = False#

Whether to print optimization status during optimization.

mip_rel_gap: NonNegativeFloat = 0.0#

The termination criterion for MIP solver.

The solver will terminate when the gap between the primal objective value and the dual objective bound, scaled by the primal objective value, is <= mip_rel_gap.

Constraints:
  • ge = 0

node_limit: PositiveInt = 1000#

The maximum number of nodes to solve before stopping.

Constraints:
  • gt = 0

presolve: bool = True#

Whether to perform a preliminary analysis on the problem before solving.

It attempts to detect infeasibility, unboundedness or problem simplifications.