Optimization algorithms#
Warning
Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.
Warning
All the features of the wrapped libraries may not be exposed through GEMSEO.
Note
The algorithm settings can be passed to a function of the form
function(..., settings_model: AlgorithmSettings | None = None, **settings: Any)
either one by one:
function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
or using the argument name "settings_model"
and the Pydantic model associated with the algorithm:
settings_model = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
function(..., settings_model=settings_model)
Overview
Display in the table the optimization algorithms thatAlgorithm ▲▼ |
Library ▲▼ |
Name in GEMSEO ▲▼ |
Package ▲▼ |
---|---|---|---|
Augmented_Lagrangian_order_0 | Augmented_Lagrangian_order_0 | gemseo | |
Augmented_Lagrangian_order_1 | Augmented_Lagrangian_order_1 | gemseo | |
COBYQA | SciPy Local | COBYQA | gemseo |
Differential evolution | SciPy Global Optimization | DIFFERENTIAL_EVOLUTION | gemseo |
Dual annealing | SciPy Global Optimization | DUAL_ANNEALING | gemseo |
Dual simplex | SciPy Linear Programming | DUAL_SIMPLEX | gemseo |
Interior point method | SciPy Linear Programming | INTERIOR_POINT | gemseo |
L-BFGS-B | SciPy Local | L-BFGS-B | gemseo |
MMA | MMA | MMA | gemseo_mma |
mNBI | MNBI | MNBI | gemseo |
Multi-start optimization | MultiStart | gemseo | |
NELDER-MEAD | SciPy Local | NELDER-MEAD | gemseo |
BFGS | NLopt | NLOPT_BFGS | gemseo |
BOBYQA | NLopt | NLOPT_BOBYQA | gemseo |
COBYLA | NLopt | NLOPT_COBYLA | gemseo |
MMA | NLopt | NLOPT_MMA | gemseo |
NEWUOA | NLopt | NLOPT_NEWUOA | gemseo |
SLSQP | NLopt | NLOPT_SLSQP | gemseo |
SHGO | SciPy Global Optimization | SHGO | gemseo |
SLSQP | SciPy Local | SLSQP | gemseo |
Branch & Cut algorithm | SciPy Mixed-Integer Linear Programming | Scipy_MILP | gemseo |
TNC | SciPy Local | TNC | gemseo |
Augmented_Lagrangian_order_0#
Module: gemseo.algos.opt.augmented_lagrangian.augmented_lagrangian_order_0
Augmented Lagrangian algorithm for gradient-less functions.
from gemseo.settings.opt import Augmented_Lagrangian_order_0_Settings
- Required settings
sub_algorithm_name : <class 'str'>
The name of the optimizer used to solve each sub-problem.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
gamma : <class 'float'>, optional
The penalty increase factor.
By default it is set to 1.5.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
initial_rho : <class 'float'>, optional
The initial penalty value.
By default it is set to 10.0.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_rho : <class 'float'>, optional
The maximum penalty value.
By default it is set to 10000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
sub_algorithm_settings : collections.abc.Mapping[str, typing.Any], optional
The settings of the optimizer used to solve each sub-problem.
By default it is set to {}.
sub_problem_constraints : collections.abc.Iterable[str], optional
The constraints to keep in the sub-problem.
If
empty
, all constraints are handled by the Augmented Lagrangian method which implies that the sub-problem is unconstrained.By default it is set to ().
tau : <class 'float'>, optional
The threshold to increase the penalty.
By default it is set to 0.9.
update_options_callback : typing.Optional[typing.Annotated[typing.Callable[[typing.Any], typing.Any], WithJsonSchema(json_schema={}, mode=None)]], optional
A callable for updating parameters or a function call.
By default it is set to None.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
Augmented_Lagrangian_order_1#
Module: gemseo.algos.opt.augmented_lagrangian.augmented_lagrangian_order_1
Augmented Lagrangian algorithm using gradient information
from gemseo.settings.opt import Augmented_Lagrangian_order_1_Settings
- Required settings
sub_algorithm_name : <class 'str'>
The name of the optimizer used to solve each sub-problem.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
gamma : <class 'float'>, optional
The penalty increase factor.
By default it is set to 1.5.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
initial_rho : <class 'float'>, optional
The initial penalty value.
By default it is set to 10.0.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_rho : <class 'float'>, optional
The maximum penalty value.
By default it is set to 10000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
sub_algorithm_settings : collections.abc.Mapping[str, typing.Any], optional
The settings of the optimizer used to solve each sub-problem.
By default it is set to {}.
sub_problem_constraints : collections.abc.Iterable[str], optional
The constraints to keep in the sub-problem.
If
empty
, all constraints are handled by the Augmented Lagrangian method which implies that the sub-problem is unconstrained.By default it is set to ().
tau : <class 'float'>, optional
The threshold to increase the penalty.
By default it is set to 0.9.
update_options_callback : typing.Optional[typing.Annotated[typing.Callable[[typing.Any], typing.Any], WithJsonSchema(json_schema={}, mode=None)]], optional
A callable for updating parameters or a function call.
By default it is set to None.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
COBYQA#
Module: gemseo.algos.opt.scipy_local.scipy_local
Derivative-free trust-region SQP method based on quadratic models for constrained optimization.
from gemseo.settings.opt import COBYQA_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.minimize-cobyqa.html.
- Optional settings
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
f_target : <class 'float'>, optional
The target value for the objective function.
The optimization procedure is terminated when the objective function value of a feasible point is less than or equal to this target.
By default it is set to -inf.
final_tr_radius : <class 'float'>, optional
The final trust-region radius.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
initial_tr_radius : <class 'float'>, optional
The initial trust-region radius.
By default it is set to 1.0.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
DIFFERENTIAL_EVOLUTION#
Module: gemseo.algos.opt.scipy_global.scipy_global
Differential Evolution algorithm
from gemseo.settings.opt import DIFFERENTIAL_EVOLUTION_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.differential_evolution.html.
- Optional settings
atol : <class 'float'>, optional
The absolute tolerance for convergence.
By default it is set to 0.0.
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
init : str | gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]], optional
- The method to perform the population initialization as a string
or the initial population as an array.
By default it is set to latinhypercube.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 9223372036854775807.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mutation : float | tuple[float, float], optional
The mutation constant.
If specified as a float it should be in the range [0, 2]. If specified as a tuple(min, max) dithering is employed.
By default it is set to (0.5, 1.0).
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
polish : <class 'bool'>, optional
Whether to polish the best population member at the end.
By default it is set to True.
popsize : <class 'int'>, optional
The multiplier for setting the total population size.
By default it is set to 15.
recombination : <class 'float'>, optional
The recombination constant.
By default it is set to 0.7.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
seed : <class 'int'>, optional
The random seed.
By default it is set to 0.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
strategy : <class 'str'>, optional
The differential evolution strategy to use.
By default it is set to best1bin.
tol : <class 'float'>, optional
The relative tolerance for convergence.
By default it is set to 0.01.
updating : <class 'str'>, optional
The best solution vector updating strategy.
By default it is set to immediate.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
workers : <class 'int'>, optional
The number of parallel workers the population is subdivided in.
By default it is set to 1.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
DUAL_ANNEALING#
Module: gemseo.algos.opt.scipy_global.scipy_global
Dual annealing
from gemseo.settings.opt import DUAL_ANNEALING_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.dual_annealing.html.
- Optional settings
accept : <class 'float'>, optional
The acceptance distribution parameter.
The lower the acceptance parameter, the smaller the probability of acceptance.
By default it is set to -5.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
initial_temp : <class 'float'>, optional
The initial temperature.
Use higher values to facilitates a wider search of the energy landscape.
By default it is set to 5230.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 9223372036854775807.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
no_local_search : <class 'bool'>, optional
Whether to perform local search.
By default it is set to False.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
restart_temp_ratio : <class 'float'>, optional
The temperature ratio under which the reannealing process is triggered.
By default it is set to 2e-05.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
seed : <class 'int'>, optional
The random seed.
By default it is set to 0.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
visit : <class 'float'>, optional
The visiting distribution parameter.
Higher values give the visiting distribution a heavier tail, this makes the algorithm jump to a more distant region.
By default it is set to 2.62.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
DUAL_SIMPLEX#
Module: gemseo.algos.opt.scipy_linprog.scipy_linprog
Linear programming using the HiGHS dual simplex solver.
from gemseo.settings.opt import DUAL_SIMPLEX_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.linprog-highs-ds.html.
- Optional settings
autoscale : <class 'bool'>, optional
Whether to perform auto-scaling of the constraints.
By default it is set to False.
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
dual_feasibility_tolerance : <class 'float'>, optional
The dual feasability tolerance.
By default it is set to 1e-07.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 0.0.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 0.0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
presolve : <class 'bool'>, optional
Whether to perform a preliminary analysis on the problem before solving.
It attempts to detect infeasibility, unboundedness or problem simplifications.
By default it is set to True.
primal_feasibility_tolerance : <class 'float'>, optional
The primal feasability tolerance.
By default it is set to 1e-07.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
rr : <class 'bool'>, optional
Whether to remove linearly dependent equality-constraints.
By default it is set to True.
rr_method : typing.Optional[typing.Literal['SVD', 'pivot', 'ID']], optional
The method to remove redundancy, either 'SVD', 'pivot' or 'ID'.
If
None
, use “SVD” if the matrix is nearly full rank. If not, uses “pivot”. The behavior of this default is subject to change without prior notice.By default it is set to None.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
simplex_dual_edge_weight_strategy : <class 'str'>, optional
Strategy for simplex dual edge weights.
Available strategies: dantzig, devex, steepest and steepest-devex.
By default it is set to steepest-devex.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 0.0.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 0.0.
INTERIOR_POINT#
Module: gemseo.algos.opt.scipy_linprog.scipy_linprog
Linear programming using the HiGHS interior point solver.
from gemseo.settings.opt import INTERIOR_POINT_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.linprog-highs-ipm.html.
- Optional settings
autoscale : <class 'bool'>, optional
Whether to perform auto-scaling of the constraints.
By default it is set to False.
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
dual_feasibility_tolerance : <class 'float'>, optional
The tolerance on the feasibility of the dual problem.
By default it is set to 1e-07.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 0.0.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 0.0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
ipm_optimality_tolerance : <class 'float'>, optional
Optimality tolerance.
By default it is set to 1e-08.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
presolve : <class 'bool'>, optional
Whether to perform a preliminary analysis on the problem before solving.
It attempts to detect infeasibility, unboundedness or problem simplifications.
By default it is set to True.
primal_feasibility_tolerance : <class 'float'>, optional
The tolerance on the feasibility of the primal problem.
By default it is set to 1e-07.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
rr : <class 'bool'>, optional
Whether to remove linearly dependent equality-constraints.
By default it is set to True.
rr_method : typing.Optional[typing.Literal['SVD', 'pivot', 'ID']], optional
The method to remove redundancy, either 'SVD', 'pivot' or 'ID'.
If
None
, use “SVD” if the matrix is nearly full rank. If not, uses “pivot”. The behavior of this default is subject to change without prior notice.By default it is set to None.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 0.0.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 0.0.
L-BFGS-B#
Module: gemseo.algos.opt.scipy_local.scipy_local
Limited-memory BFGS algorithm implemented in the SciPy library
from gemseo.settings.opt import L_BFGS_B_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.minimize-lbfgsb.html.
- Optional settings
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
gtol : <class 'float'>, optional
The precision goal for the projected gradient value to stop the algorithm.
By default it is set to 1e-06.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
iprint : <class 'int'>, optional
The flag to control the frequency of output.
Default is no output.
By default it is set to -1.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
maxcor : <class 'int'>, optional
The maximum number of corrections for the limited memory matrix.
By default it is set to 20.
maxls : <class 'int'>, optional
The maximum number of line search steps per iteration.
By default it is set to 20.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
MMA#
Note
The plugin gemseo_mma is required.
Module: gemseo_mma.opt.mma
The Method of Moving Asymptotes
from gemseo.settings.opt import MMASvanbergSettings
- Optional settings
asymptotes_distance_amplification_coefficient : <class 'float'>, optional
The amplification factor for successful iterations.
By default it is set to 1.2.
asymptotes_distance_reduction_coefficient : <class 'float'>, optional
The decremental factor for unsuccessful iterations.
By default it is set to 0.7.
conv_tol : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
If provided, control all other convergence tolerances.
Otherwise, the other convergence tolerances are used.
By default it is set to None.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.01.
initial_asymptotes_distance : <class 'float'>, optional
- The initial asymptotes distance from the current design variable
value.
By default it is set to 0.5.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_asymptote_distance : <class 'float'>, optional
- The maximum distance of the asymptotes from the current design variable
value.
By default it is set to 10.0.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_optimization_step : <class 'float'>, optional
The maximum optimization step.
By default it is set to 0.1.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
min_asymptote_distance : <class 'float'>, optional
- The minimum distance of the asymptotes from the current design variable
value.
By default it is set to 0.01.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
tol : <class 'float'>, optional
- The tolerance of convergence used in MMA to be compared with the KKT
residual.
By default it is set to 0.01.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
MNBI#
Module: gemseo.algos.opt.mnbi.mnbi
Modified Normal Boundary Intersection (mNBI) method
from gemseo.settings.opt import MNBI_Settings
- Required settings
sub_optim_algo : <class 'str'>
The optimization algorithm used to solve the sub-optimization problems.
- Optional settings
custom_anchor_points : collections.abc.Sequence[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], optional
The bounding points of the custom phi simplex for the optimization.
By default it is set to ().
custom_phi_betas : collections.abc.Sequence[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]]], optional
The custom values of \(\\Phi \beta\) to be used in the optimization.
By default it is set to ().
debug : <class 'bool'>, optional
Whether to output the sub-optimization optima in a database hdf file.
By default it is set to False.
debug_file_path : str | pathlib.Path, optional
The path to the debug file if debug mode is active.
By default it is set to debug_history.h5.
doe_algo : <class 'str'>, optional
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.By default it is set to PYDOE_FULLFACT.
doe_algo_settings : collections.abc.Mapping[str, typing.Any], optional
The settings for the DOE algorithm.
By default it is set to {}.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 0.0.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 0.0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
n_processes : <class 'int'>, optional
The maximum number of processes used to parallelize the sub-optimizations.
By default it is set to 1.
n_sub_optim : <class 'int'>, optional
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.By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
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
tosub_optim_algo_settings
.By default it is set to False.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
skip_betas : <class 'bool'>, optional
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.
By default it is set to True.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
sub_optim_algo_settings : collections.abc.Mapping[str, typing.Any], optional
The settings for the sub optimization algorithm.
By default it is set to {}.
sub_optim_max_iter : <class 'int'>, optional
The maximum number of iterations of the sub-optimization algorithms.
If 0, the
max_iter
value is used.By default it is set to 0.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 0.0.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 0.0.
MultiStart#
Module: gemseo.algos.opt.multi_start.multi_start
The optimization algorithm multistart
generates starting points using a DOE algorithmand run a sub-optimization algorithm from each starting point.Depending on the sub-optimization algorithm,``multistart`` can handle integer design variables,equality and inequality constraintsas well as multi-objective functions.
from gemseo.settings.opt import MultiStart_Settings
- Optional settings
doe_algo_name : <class 'str'>, optional
The name of the DOE algorithm.
The DOE algorthm is used to generate the sub-optimizations starting points.
By default it is set to LHS.
doe_algo_settings : collections.abc.Mapping[str, typing.Any], optional
The settings of the DOE algorithm.
By default it is set to {}.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 0.0.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 0.0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
multistart_file_path : str | pathlib.Path
The database file path to save the local optima.
If empty, do not save the local optima.
By default it is set to .
n_processes : <class 'int'>, optional
The maximum number of processes used to parallelize the sub-optimizations.
By default it is set to 1.
n_start : <class 'int'>, optional
The number of sub-optimizations.
By default it is set to 5.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to False.
opt_algo_max_iter : <class 'int'>, optional
The maximum number of iterations for each sub-optimization.
If 0, this number is
int(max_iter/n_start)
.By default it is set to 0.
opt_algo_name : <class 'str'>, optional
The name of the sub-optimization algorithm.
By default it is set to SLSQP.
opt_algo_settings : collections.abc.Mapping[str, typing.Any], optional
The settings of the sub-optimization algorithm.
By default it is set to {}.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 0.0.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 0.0.
NELDER-MEAD#
Module: gemseo.algos.opt.scipy_local.scipy_local
Nelder-Mead algorithm implemented in the SciPy library
from gemseo.settings.opt import NELDER_MEAD_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.minimize-neldermead.html.
- Optional settings
adaptive : <class 'bool'>, optional
Whether to adapt the algorithm parameters to dimensionality of problem.
By default it is set to False.
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
initial_simplex : collections.abc.Sequence[float] | gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]] | None, optional
The initial simplex.
If provided, the expected shape is (N+1, N) where N is the problem dimension.
By default it is set to None.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
return_all : <class 'bool'>, optional
Whether to return a list of the best solution at each of the iterations.
By default it is set to False.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
NLOPT_BFGS#
Module: gemseo.algos.opt.nlopt.nlopt
Broyden-Fletcher-Goldfarb-Shanno method (BFGS) implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_BFGS_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#low-storage-bfgs.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
NLOPT_BOBYQA#
Module: gemseo.algos.opt.nlopt.nlopt
Bound Optimization BY Quadratic Approximation (BOBYQA) implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_BOBYQA_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#bobyqa.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
init_step : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
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.
By default it is set to 0.25.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
NLOPT_COBYLA#
Module: gemseo.algos.opt.nlopt.nlopt
Constrained Optimization BY Linear Approximations (COBYLA) implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_COBYLA_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#cobyla-constrained-optimization-by-linear-approximations.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
init_step : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
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.
By default it is set to 0.25.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
NLOPT_MMA#
Module: gemseo.algos.opt.nlopt.nlopt
Method of Moving Asymptotes (MMA)implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_MMA_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#mma-method-of-moving-asymptotes-and-ccsa.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
inner_maxeval : <class 'int'>, optional
The maximum number of inner iterations of the algorithm.
The value 0 means that there is no limit.
By default it is set to 0.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
NLOPT_NEWUOA#
Module: gemseo.algos.opt.nlopt.nlopt
NEWUOA + bound constraints implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_NEWUOA_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#newuoa-bound-constraints.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
init_step : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
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.
By default it is set to 0.25.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
NLOPT_SLSQP#
Module: gemseo.algos.opt.nlopt.nlopt
Sequential Least-Squares Quadratic Programming (SLSQP) implemented in the NLOPT library
from gemseo.settings.opt import NLOPT_SLSQP_Settings
More details about the algorithm and its settings on https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/#slsqp.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-14.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-08.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : int | None, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to None.
stopval : <class 'float'>, optional
The objective value at which the optimization will stop.
By default it is set to -inf.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-14.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-08.
SHGO#
Module: gemseo.algos.opt.scipy_global.scipy_global
Simplicial homology global optimization
from gemseo.settings.opt import SHGO_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.shgo.html.
- Optional settings
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
iters : <class 'int'>, optional
The number of iterations used to construct the simplicial complex.
By default it is set to 1.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 9223372036854775807.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
n : <class 'int'>, optional
The number of samples used to construct the simplicial complex.
By default it is set to 100.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
options : collections.abc.Mapping[str, typing.Any], optional
The options for the local optimization algorithm.
By default it is set to {}.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
sampling_method : <class 'str'>, optional
The sampling method.
By default it is set to simplicial.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
workers : <class 'int'>, optional
The number workers to parallelize on.
By default it is set to 1.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
SLSQP#
Module: gemseo.algos.opt.scipy_local.scipy_local
Sequential Least-Squares Quadratic Programming (SLSQP) implemented in the SciPy library
from gemseo.settings.opt import SLSQP_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.minimize-slsqp.html.
- Optional settings
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
iprint : <class 'int'>, optional
The flag to control the frequency of output.
Default is no output.
By default it is set to -1.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.
Scipy_MILP#
Module: gemseo.algos.opt.scipy_milp.scipy_milp
Mixed-integer linear programming
from gemseo.settings.opt import SciPyMILP_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/scipy.optimize.milp.html.
- Optional settings
disp : <class 'bool'>, optional
Whether to print optimization status during optimization.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 0.0.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 0.0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mip_rel_gap : <class 'float'>, optional
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.
By default it is set to 0.0.
node_limit : <class 'int'>, optional
The maximum number of nodes to solve before stopping.
By default it is set to 1000.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
presolve : <class 'bool'>, optional
Whether to perform a preliminary analysis on the problem before solving.
It attempts to detect infeasibility, unboundedness or problem simplifications.
By default it is set to True.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 0.0.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 0.0.
TNC#
Module: gemseo.algos.opt.scipy_local.scipy_local
Truncated Newton (TNC) algorithm implemented in SciPy library
from gemseo.settings.opt import TNC_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/optimize.minimize-tnc.html.
- Optional settings
accuracy : <class 'float'>, optional
The relative precision for finite difference calculations.
By default it is set to 0.0.
disp : <class 'bool'>, optional
Whether to print convergence messages.
By default it is set to False.
enable_progress_bar : bool | None, optional
Whether to enable the progress bar in the optimization log.
If
None
, use the global value ofenable_progress_bar
(see theconfigure
function to change it globally).By default it is set to None.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 1e-06.
eta : <class 'float'>, optional
The severity of the line search.
By default it is set to -1.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-09.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-09.
gtol : <class 'float'>, optional
The precision goal for the projected gradient value to stop the algorithm.
By default it is set to 1e-06.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
kkt_tol_abs : <class 'float'>, optional
The absolute tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
kkt_tol_rel : <class 'float'>, optional
The relative tolerance on the KKT residual norm.
If
inf
this criterion is not activated.By default it is set to inf.
log_problem : <class 'bool'>, optional
Whether to log the definition and result of the problem.
By default it is set to True.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 1000.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
maxCGit : <class 'int'>, optional
The maximum number of hessian-vector evaluations per main iteration.
By default it is set to -1.
minfev : <class 'float'>, optional
The minimum function value estimate.
By default it is set to 0.0.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
offset : float | None, optional
The value to subtract from each variable.
If
None
, the offsets are (up+low)/2 for interval bounded variables and x for the others.By default it is set to None.
rescale : <class 'float'>, optional
The log10 scaling factor used to trigger the objectiv function rescaling.
By default it is set to 1.3.
reset_iteration_counters : <class 'bool'>, optional
Whether to reset the iteration counters before each execution.
By default it is set to True.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scaling_threshold : typing.Optional[typing.Annotated[float, Ge(ge=0)]], optional
The threshold on the reference function value that triggers scaling.
If
None
, do not scale the functions.By default it is set to None.
stepmx : <class 'float'>, optional
The maximum step for the line search (may be increased during call).
By default it is set to 0.0.
stop_crit_n_x : <class 'int'>, optional
The minimum number of design vectors to consider in the stopping criteria.
By default it is set to 3.
store_jacobian : <class 'bool'>, optional
Whether to store the Jacobian matrices in the database.
This argument is ignored when the
use_database
option isFalse
. If a gradient-based algorithm is used, this option cannot be set along with kkt options.By default it is set to True.
use_database : <class 'bool'>, optional
Whether to wrap the functions in the database.
By default it is set to True.
use_one_line_progress_bar : <class 'bool'>, optional
Whether to log the progress bar on a single line.
By default it is set to False.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-09.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-09.