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 |
HEXALY | Hexaly | HEXALY | gemseo_hexaly |
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 |
BOBYQA | PDFO | PDFO_BOBYQA | gemseo_pdfo |
COBYLA | PDFO | PDFO_COBYLA | gemseo_pdfo |
NEWUOA | PDFO | PDFO_NEWUOA | gemseo_pdfo |
GA | pymoo | PYMOO_GA | gemseo_pymoo |
NSGA2 | pymoo | PYMOO_NSGA2 | gemseo_pymoo |
NSGA3 | pymoo | PYMOO_NSGA3 | gemseo_pymoo |
RNSGA3 | pymoo | PYMOO_RNSGA3 | gemseo_pymoo |
UNSGA3 | pymoo | PYMOO_UNSGA3 | gemseo_pymoo |
PYOPTSPARSE_SLSQP | pyOptSparse | PYOPTSPARSE_SLSQP | gemseo_pyoptsparse |
PYOPTSPARSE_SNOPT | pyOptSparse | PYOPTSPARSE_SNOPT | gemseo_pyoptsparse |
SBO | gemseo-mlearning | SBO | gemseo_mlearning |
SHGO | SciPy Global Optimization | SHGO | gemseo |
SLSQP | SciPy Local | SLSQP | gemseo |
SMT_EGO | SMT | SMT_EGO | gemseo_mlearning |
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.
HEXALY#
Note
The plugin gemseo_hexaly is required.
Module: gemseo_hexaly.algos.opt.hexaly.hexaly
Commercial black-box Hexaly library. It relies on a global mixed-integer solver.
from gemseo.settings.opt import HexalySettings
More details about the algorithm and its settings on https://www.hexaly.com/docs/last/index.html.
- Optional settings
activate_surrogate : <class 'bool'>, optional
Whether to activate the internal surrogate model.
By default it is set to False.
callback : gemseo_hexaly.algos.opt.hexaly._core.hexaly_callback.HexalyCallback | None, optional
- The callback function called during the optimization algorithm.
If
None
, no callback is given to the Hexaly solver.
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 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.
nb_threads : <class 'int'>, optional
- The number of threads used by Hexaly.
If 0, the number of threads is automatically adapted to your computer and to your optimization model..
By default it is set to 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.
seed : <class 'int'>, optional
The random seed for the optimizer.
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.
verbosity : <class 'int'>, optional
- The verbosity level of the optimizer.
0: All the traces are disabled. 1: Normal verbosity. This is the default level. 2: Detailed verbosity. Displays statistics during the search.
By default it is set to 0.
warm_start : <class 'bool'>, optional
- Whether to consider the current value of the design space
as the initial solution.
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.
PDFO_BOBYQA#
Note
The plugin gemseo_pdfo is required.
Module: gemseo_pdfo.pdfo
Bound Optimization By Quadratic Approximation
from gemseo.settings.opt import PDFO_BOBYQA_Settings
More details about the algorithm and its settings on https://www.pdfo.net/.
- Optional settings
chkfunval : <class 'bool'>, optional
- A flag used when debugging. If both debug
and chkfunval are True, an extra function/constraint evaluation would be performed to check whether the returned values of the objective function and constraint match the returned x.
By default it is set to False.
classical : <class 'bool'>, optional
- The flag indicating whether to call the classical Powell
code or not.
By default it is set to False.
debug : <class 'bool'>, optional
The debugging flag.
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.
ensure_bounds : <class 'bool'>, optional
- Whether to project the design vector
onto the design space before execution.
By default it is set to True.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftarget : <class 'float'>, optional
- The target value of the objective function. If a feasible
iterate achieves an objective function value lower or equal to ftarget, the algorithm stops immediately.
By default it is set to -inf.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-12.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-12.
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 500.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.
normalize_design_space : <class 'bool'>, optional
None
By default it is set to (FieldInfo(annotation=bool, required=False, default=True, description='Whether to normalize the design space variables between 0 and 1.'),).
quiet : <class 'bool'>, optional
- The flag of quietness of the interface. If True,
the output message will not be printed.
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.
rhobeg : <class 'float'>, optional
The initial value of the trust region radius.
By default it is set to 0.5.
rhoend : <class 'float'>, optional
- The final value of the trust region radius. Indicates
the accuracy required in the final values of the variables.
By default it is set to 1e-06.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scale : <class 'bool'>, optional
- The flag indicating whether to scale the problem according to
the bound constraints.
By default it is set to False.
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-12.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-12.
PDFO_COBYLA#
Note
The plugin gemseo_pdfo is required.
Module: gemseo_pdfo.pdfo
Constrained Optimization By Linear Approximations
from gemseo.settings.opt import PDFO_COBYLA_Settings
More details about the algorithm and its settings on https://www.pdfo.net/.
- Optional settings
chkfunval : <class 'bool'>, optional
- A flag used when debugging. If both debug
and chkfunval are True, an extra function/constraint evaluation would be performed to check whether the returned values of the objective function and constraint match the returned x.
By default it is set to False.
classical : <class 'bool'>, optional
- The flag indicating whether to call the classical Powell
code or not.
By default it is set to False.
debug : <class 'bool'>, optional
The debugging flag.
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.
ensure_bounds : <class 'bool'>, optional
- Whether to project the design vector
onto the design space before execution.
By default it is set to True.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftarget : <class 'float'>, optional
- The target value of the objective function. If a feasible
iterate achieves an objective function value lower or equal to ftarget, the algorithm stops immediately.
By default it is set to -inf.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-12.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-12.
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 500.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.
normalize_design_space : <class 'bool'>, optional
None
By default it is set to (FieldInfo(annotation=bool, required=False, default=True, description='Whether to normalize the design space variables between 0 and 1.'),).
quiet : <class 'bool'>, optional
- The flag of quietness of the interface. If True,
the output message will not be printed.
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.
rhobeg : <class 'float'>, optional
The initial value of the trust region radius.
By default it is set to 0.5.
rhoend : <class 'float'>, optional
- The final value of the trust region radius. Indicates
the accuracy required in the final values of the variables.
By default it is set to 1e-06.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scale : <class 'bool'>, optional
- The flag indicating whether to scale the problem according to
the bound constraints.
By default it is set to False.
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-12.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-12.
PDFO_NEWUOA#
Note
The plugin gemseo_pdfo is required.
Module: gemseo_pdfo.pdfo
NEWUOA
from gemseo.settings.opt import PDFO_NEWUOA_Settings
More details about the algorithm and its settings on https://www.pdfo.net/.
- Optional settings
chkfunval : <class 'bool'>, optional
- A flag used when debugging. If both debug
and chkfunval are True, an extra function/constraint evaluation would be performed to check whether the returned values of the objective function and constraint match the returned x.
By default it is set to False.
classical : <class 'bool'>, optional
- The flag indicating whether to call the classical Powell
code or not.
By default it is set to False.
debug : <class 'bool'>, optional
The debugging flag.
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.
ensure_bounds : <class 'bool'>, optional
- Whether to project the design vector
onto the design space before execution.
By default it is set to True.
eq_tolerance : <class 'float'>, optional
The tolerance on the equality constraints.
By default it is set to 0.01.
ftarget : <class 'float'>, optional
- The target value of the objective function. If a feasible
iterate achieves an objective function value lower or equal to ftarget, the algorithm stops immediately.
By default it is set to -inf.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-12.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-12.
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 500.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.
normalize_design_space : <class 'bool'>, optional
None
By default it is set to (FieldInfo(annotation=bool, required=False, default=True, description='Whether to normalize the design space variables between 0 and 1.'),).
quiet : <class 'bool'>, optional
- The flag of quietness of the interface. If True,
the output message will not be printed.
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.
rhobeg : <class 'float'>, optional
The initial value of the trust region radius.
By default it is set to 0.5.
rhoend : <class 'float'>, optional
- The final value of the trust region radius. Indicates
the accuracy required in the final values of the variables.
By default it is set to 1e-06.
round_ints : <class 'bool'>, optional
Whether to round the integer variables.
By default it is set to True.
scale : <class 'bool'>, optional
- The flag indicating whether to scale the problem according to
the bound constraints.
By default it is set to False.
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-12.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-12.
PYMOO_GA#
Note
The plugin gemseo_pymoo is required.
Module: gemseo_pymoo.algos.opt.pymoo
Genetic Algorithm (GA) implemented in the Pymoo library
from gemseo.settings.opt import GASettings
More details about the algorithm and its settings on https://www.pymoo.org/algorithms/soo/ga.html.
- Optional settings
crossover : <MagicMock name='Crossover.__or__()' id='126849001444256'>, optional
The crossover operator used to create offsprings. If None, the algorithm's default is used.
By default it is set to None.
eliminate_duplicates : <class 'bool'>, optional
If True, eliminate duplicates after merging the parent and the offspring population.
By default it is set to True.
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 equality tolerance.
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.
hv_tol_abs : <class 'float'>, optional
hv_tol_abs: A stop criterion, absolute tolerance on the hypervolume convergence check. If norm(xk-xk+1)<= hv_tol_abs: stop.
By default it is set to 1e-09.
hv_tol_rel : <class 'float'>, optional
A stop criterion, the relative tolerance on the hypervolume convergence check. If norm(xk-xk+1)/norm(xk)<= hv_tol_rel: stop.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The inequality tolerance.
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_gen : <class 'int'>, optional
The maximum number of generations.
By default it is set to 10000000.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 999.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mutation : <MagicMock name='Mutation.__or__()' id='126848970018736'>, optional
The mutation operator. If None, the algorithm's default is used.
By default it is set to None.
n_offsprings : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional
Number of offspring that are created through mating. If None, it will be set equal to the population size.
By default it is set to None.
n_processes : <class 'int'>, optional
Number of processes for multiprocess problems.
By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
If True, scale the variables to the range [0, 1].
By default it is set to True.
pop_size : <class 'int'>, optional
The population size.
By default it is set to 100.
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 : typing.Any | None, optional
The sampling process that generates the initial population. If None, the algorithm's default is used
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.
seed : <class 'int'>, optional
The random seed to be used.
By default it is set to 1.
selection : <MagicMock name='Selection.__or__()' id='126848944415008'>, optional
The mating selection operator. If None, the algorithm's default is used.
By default it is set to None.
stop_crit_n_hv : <class 'int'>, optional
The number of generations to account for during the criterion check on the hypervolume indicator.
By default it is set to 5.
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.
PYMOO_NSGA2#
Note
The plugin gemseo_pymoo is required.
Module: gemseo_pymoo.algos.opt.pymoo
Non-Dominated Sorting Genetic Algorithm II (NSGA2) implemented in the Pymoo library
from gemseo.settings.opt import NSGA2Settings
More details about the algorithm and its settings on https://www.pymoo.org/algorithms/moo/nsga2.html.
- Optional settings
crossover : <MagicMock name='Crossover.__or__()' id='126849001444256'>, optional
The crossover operator used to create offsprings. If None, the algorithm's default is used.
By default it is set to None.
eliminate_duplicates : <class 'bool'>, optional
If True, eliminate duplicates after merging the parent and the offspring population.
By default it is set to True.
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 equality tolerance.
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.
hv_tol_abs : <class 'float'>, optional
hv_tol_abs: A stop criterion, absolute tolerance on the hypervolume convergence check. If norm(xk-xk+1)<= hv_tol_abs: stop.
By default it is set to 1e-09.
hv_tol_rel : <class 'float'>, optional
A stop criterion, the relative tolerance on the hypervolume convergence check. If norm(xk-xk+1)/norm(xk)<= hv_tol_rel: stop.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The inequality tolerance.
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_gen : <class 'int'>, optional
The maximum number of generations.
By default it is set to 10000000.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 999.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mutation : <MagicMock name='Mutation.__or__()' id='126848970018736'>, optional
The mutation operator. If None, the algorithm's default is used.
By default it is set to None.
n_offsprings : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional
Number of offspring that are created through mating. If None, it will be set equal to the population size.
By default it is set to None.
n_processes : <class 'int'>, optional
Number of processes for multiprocess problems.
By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
If True, scale the variables to the range [0, 1].
By default it is set to True.
pop_size : <class 'int'>, optional
The population size.
By default it is set to 100.
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 : typing.Any | None, optional
The sampling process that generates the initial population. If None, the algorithm's default is used
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.
seed : <class 'int'>, optional
The random seed to be used.
By default it is set to 1.
selection : <MagicMock name='Selection.__or__()' id='126848944415008'>, optional
The mating selection operator. If None, the algorithm's default is used.
By default it is set to None.
stop_crit_n_hv : <class 'int'>, optional
The number of generations to account for during the criterion check on the hypervolume indicator.
By default it is set to 5.
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.
PYMOO_NSGA3#
Note
The plugin gemseo_pymoo is required.
Module: gemseo_pymoo.algos.opt.pymoo
Non-Dominated Sorting Genetic Algorithm III (NSGA3) implemented in the Pymoo library
from gemseo.settings.opt import NSGA3Settings
More details about the algorithm and its settings on https://www.pymoo.org/algorithms/moo/nsga3.html.
- Optional settings
crossover : <MagicMock name='Crossover.__or__()' id='126849001444256'>, optional
The crossover operator used to create offsprings. If None, the algorithm's default is used.
By default it is set to None.
eliminate_duplicates : <class 'bool'>, optional
If True, eliminate duplicates after merging the parent and the offspring population.
By default it is set to True.
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 equality tolerance.
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.
hv_tol_abs : <class 'float'>, optional
hv_tol_abs: A stop criterion, absolute tolerance on the hypervolume convergence check. If norm(xk-xk+1)<= hv_tol_abs: stop.
By default it is set to 1e-09.
hv_tol_rel : <class 'float'>, optional
A stop criterion, the relative tolerance on the hypervolume convergence check. If norm(xk-xk+1)/norm(xk)<= hv_tol_rel: stop.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The inequality tolerance.
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_gen : <class 'int'>, optional
The maximum number of generations.
By default it is set to 10000000.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 999.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mutation : <MagicMock name='Mutation.__or__()' id='126848970018736'>, optional
The mutation operator. If None, the algorithm's default is used.
By default it is set to None.
n_offsprings : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional
Number of offspring that are created through mating. If None, it will be set equal to the population size.
By default it is set to None.
n_partitions : <class 'int'>, optional
The number of gaps between two consecutive points along an objective axis.
By default it is set to 20.
n_points : typing.Optional[typing.Annotated[int, Gt(gt=0)]], optional
The number of points on the unit simplex.
By default it is set to None.
n_processes : <class 'int'>, optional
Number of processes for multiprocess problems.
By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
If True, scale the variables to the range [0, 1].
By default it is set to True.
partitions : gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]] | None, optional
The custom partitions.
By default it is set to None.
pop_size : <class 'int'>, optional
The population size.
By default it is set to 100.
ref_dirs_name : gemseo_pymoo.algos.opt._base_scaled_pymoo_algorithms_settings.RefDirsNames | None
The reference directions.
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 : typing.Any | None, optional
The sampling process that generates the initial population. If None, the algorithm's default is used
By default it is set to None.
scaling_1 : float | None, optional
The scaling of the first simplex.
By default it is set to None.
scaling_2 : float | None, optional
The scaling of the second simplex.
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.
seed : <class 'int'>, optional
The random seed to be used.
By default it is set to 1.
selection : <MagicMock name='Selection.__or__()' id='126848944415008'>, optional
The mating selection operator. If None, the algorithm's default is used.
By default it is set to None.
stop_crit_n_hv : <class 'int'>, optional
The number of generations to account for during the criterion check on the hypervolume indicator.
By default it is set to 5.
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.
PYMOO_RNSGA3#
Note
The plugin gemseo_pymoo is required.
Module: gemseo_pymoo.algos.opt.pymoo
Reference Point Based NSGA III implemented in the Pymoo library
from gemseo.settings.opt import RNSGA3Settings
More details about the algorithm and its settings on https://www.pymoo.org/algorithms/moo/rnsga3.html.
- Optional settings
crossover : <MagicMock name='Crossover.__or__()' id='126849001444256'>, optional
The crossover operator used to create offsprings. If None, the algorithm's default is used.
By default it is set to None.
eliminate_duplicates : <class 'bool'>, optional
If True, eliminate duplicates after merging the parent and the offspring population.
By default it is set to True.
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 equality tolerance.
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.
hv_tol_abs : <class 'float'>, optional
hv_tol_abs: A stop criterion, absolute tolerance on the hypervolume convergence check. If norm(xk-xk+1)<= hv_tol_abs: stop.
By default it is set to 1e-09.
hv_tol_rel : <class 'float'>, optional
A stop criterion, the relative tolerance on the hypervolume convergence check. If norm(xk-xk+1)/norm(xk)<= hv_tol_rel: stop.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The inequality tolerance.
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_gen : <class 'int'>, optional
The maximum number of generations.
By default it is set to 10000000.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 999.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mu : <class 'float'>, optional
The scaling of the reference lines used during survival selection.
By default it is set to 0.1.
mutation : <MagicMock name='Mutation.__or__()' id='126848970018736'>, optional
The mutation operator. If None, the algorithm's default is used.
By default it is set to None.
n_offsprings : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional
Number of offspring that are created through mating. If None, it will be set equal to the population size.
By default it is set to None.
n_processes : <class 'int'>, optional
Number of processes for multiprocess problems.
By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
If True, scale the variables to the range [0, 1].
By default it is set to True.
pop_per_ref_point : <class 'int'>, optional
The size of the population used for each reference point.
By default it is set to 1.
pop_size : <class 'int'>, optional
The population size.
By default it is set to 100.
ref_points : gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]] | None, optional
The reference points (Aspiration Points) as a NumPy array where each row represents a point and each column a variable.
By default it is set to None.
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 : typing.Any | None, optional
The sampling process that generates the initial population. If None, the algorithm's default is used
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.
seed : <class 'int'>, optional
The random seed to be used.
By default it is set to 1.
selection : <MagicMock name='Selection.__or__()' id='126848944415008'>, optional
The mating selection operator. If None, the algorithm's default is used.
By default it is set to None.
stop_crit_n_hv : <class 'int'>, optional
The number of generations to account for during the criterion check on the hypervolume indicator.
By default it is set to 5.
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.
PYMOO_UNSGA3#
Note
The plugin gemseo_pymoo is required.
Module: gemseo_pymoo.algos.opt.pymoo
Unified NSGA III implemented in the Pymoo library
from gemseo.settings.opt import UNSGA3Settings
More details about the algorithm and its settings on https://www.pymoo.org/algorithms/moo/unsga3.html.
- Optional settings
crossover : <MagicMock name='Crossover.__or__()' id='126849001444256'>, optional
The crossover operator used to create offsprings. If None, the algorithm's default is used.
By default it is set to None.
eliminate_duplicates : <class 'bool'>, optional
If True, eliminate duplicates after merging the parent and the offspring population.
By default it is set to True.
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 equality tolerance.
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.
hv_tol_abs : <class 'float'>, optional
hv_tol_abs: A stop criterion, absolute tolerance on the hypervolume convergence check. If norm(xk-xk+1)<= hv_tol_abs: stop.
By default it is set to 1e-09.
hv_tol_rel : <class 'float'>, optional
A stop criterion, the relative tolerance on the hypervolume convergence check. If norm(xk-xk+1)/norm(xk)<= hv_tol_rel: stop.
By default it is set to 1e-09.
ineq_tolerance : <class 'float'>, optional
The inequality tolerance.
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_gen : <class 'int'>, optional
The maximum number of generations.
By default it is set to 10000000.
max_iter : <class 'int'>, optional
The maximum number of iterations.
By default it is set to 999.
max_time : <class 'float'>, optional
The maximum runtime in seconds, disabled if 0.
By default it is set to 0.0.
mutation : <MagicMock name='Mutation.__or__()' id='126848970018736'>, optional
The mutation operator. If None, the algorithm's default is used.
By default it is set to None.
n_offsprings : typing.Optional[typing.Annotated[int, Ge(ge=0)]], optional
Number of offspring that are created through mating. If None, it will be set equal to the population size.
By default it is set to None.
n_partitions : <class 'int'>, optional
The number of gaps between two consecutive points along an objective axis.
By default it is set to 20.
n_points : typing.Optional[typing.Annotated[int, Gt(gt=0)]], optional
The number of points on the unit simplex.
By default it is set to None.
n_processes : <class 'int'>, optional
Number of processes for multiprocess problems.
By default it is set to 1.
normalize_design_space : <class 'bool'>, optional
If True, scale the variables to the range [0, 1].
By default it is set to True.
partitions : gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[+_ScalarType_co]] | None, optional
The custom partitions.
By default it is set to None.
pop_size : <class 'int'>, optional
The population size.
By default it is set to 100.
ref_dirs_name : gemseo_pymoo.algos.opt._base_scaled_pymoo_algorithms_settings.RefDirsNames | None
The reference directions.
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 : typing.Any | None, optional
The sampling process that generates the initial population. If None, the algorithm's default is used
By default it is set to None.
scaling_1 : float | None, optional
The scaling of the first simplex.
By default it is set to None.
scaling_2 : float | None, optional
The scaling of the second simplex.
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.
seed : <class 'int'>, optional
The random seed to be used.
By default it is set to 1.
selection : <MagicMock name='Selection.__or__()' id='126848944415008'>, optional
The mating selection operator. If None, the algorithm's default is used.
By default it is set to None.
stop_crit_n_hv : <class 'int'>, optional
The number of generations to account for during the criterion check on the hypervolume indicator.
By default it is set to 5.
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.
PYOPTSPARSE_SLSQP#
Note
The plugin gemseo_pyoptsparse is required.
Module: gemseo_pyoptsparse.algos.opt.py_opt_sparse
Sequential Least-Squares Quadratic Programming (SLSQP) implemented in pyOptSparse library
from gemseo.settings.opt import SLSQP_Settings
More details about the algorithm and its settings on https://mdolab-pyoptsparse.readthedocs-hosted.com.
- 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-06.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-06.
i_file : <class 'str'>, optional
Output file path
By default it is set to SLSQP.out.
i_out : <class 'int'>, optional
Output unit number
By default it is set to 60.
i_print : <class 'int'>, optional
Output Level (<0 - None, 0 - Screen, 1 - File)
By default it is set to -1.
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.
options_file : str | None, optional
The file name where all options are written.
By default it is set to None.
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-06.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-06.
PYOPTSPARSE_SNOPT#
Note
The plugin gemseo_pyoptsparse is required.
Module: gemseo_pyoptsparse.algos.opt.py_opt_sparse
SNOPT implemented in PyOptSparse library
from gemseo.settings.opt import SNOPT_Settings
More details about the algorithm and its settings on https://mdolab-pyoptsparse.readthedocs-hosted.com.
- Optional settings
backup_basis_file : int | None, optional
None
By default it is set to None.
central_difference_interval : float | None, optional
None
By default it is set to None.
check_frequency : int | None, optional
None
By default it is set to None.
crash_option : int | None, optional
None
By default it is set to None.
crash_tolerance : float | None, optional
None
By default it is set to None.
debug_level : int | None, optional
None
By default it is set to None.
derivative_linesearch : dict[str, typing.Any] | None, optional
None
By default it is set to None.
difference_interval : float | None, optional
None
By default it is set to None.
dump_file : int | None, optional
None
By default it is set to None.
elastic_mode : str | None, optional
None
By default it is set to None.
elastic_weight : <class 'float'>, optional
The initial elastic weight associated to the elastic mode activation.
By default it is set to 10000.0.
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.
expand_frequency : int | None, optional
None
By default it is set to None.
factorization_frequency : int | None, optional
None
By default it is set to None.
ftol_abs : <class 'float'>, optional
The absolute tolerance on the objective function.
By default it is set to 1e-06.
ftol_rel : <class 'float'>, optional
The relative tolerance on the objective function.
By default it is set to 1e-06.
function_precision : float | None, optional
None
By default it is set to None.
hessian_flush : int | None, optional
None
By default it is set to None.
hessian_frequency : int | None, optional
None
By default it is set to None.
hessian_full_memory : dict[str, typing.Any] | None, optional
None
By default it is set to None.
hessian_limited_memory : dict[str, typing.Any] | None, optional
None
By default it is set to None.
hessian_updates : <class 'int'>, optional
Iteration frequency to start again the hessian updating process
By default it is set to 10.
i_print : <class 'int'>, optional
Print file output unit
By default it is set to 0.
i_summ : <class 'int'>, optional
Summary file output unit
By default it is set to 0.
ineq_tolerance : <class 'float'>, optional
The tolerance on the inequality constraints.
By default it is set to 0.0001.
infinite_bound : float | None, optional
None
By default it is set to None.
insert_file : int | None, optional
None
By default it is set to None.
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.
linesearch_tolerance : <class 'float'>, optional
Accuracy to control a steplength with the direction of search at each iteration
By default it is set to 0.9.
load_file : int | None, optional
None
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.
lu_complete_pivoting : dict[str, typing.Any] | None, optional
None
By default it is set to None.
lu_factor_tolerance : float | None, optional
None
By default it is set to None.
lu_partial_pivoting : dict[str, typing.Any] | None, optional
None
By default it is set to None.
lu_rook_pivoting : dict[str, typing.Any] | None, optional
None
By default it is set to None.
lu_singularity_tolerance : float | None, optional
None
By default it is set to None.
lu_update_tolerance : float | None, optional
None
By default it is set to None.
major_optimality_tolerance : <class 'float'>, optional
None
By default it is set to 1e-06.
major_print_level : int | None, optional
None
By default it is set to None.
major_step_limit : <class 'float'>, optional
Limitation of the change in design variables during a linesearch
By default it is set to 2.0.
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.
minor_feasibility_tolerance : <class 'float'>, optional
Fesibility tolerance of the minor problem
By default it is set to 1e-06.
minor_iterations_limit : <class 'int'>, optional
The iterations limit for the minor problem
By default it is set to 10000.
minor_print_level : int | None, optional
None
By default it is set to None.
new_basis_file : int | None, optional
None
By default it is set to None.
new_superbasics_limit : int | None, optional
None
By default it is set to None.
nonderivative_linesearch : dict[str, typing.Any] | None, optional
None
By default it is set to None.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
objective_row : int | None, optional
None
By default it is set to None.
old_basis_file : int | None, optional
None
By default it is set to None.
options_file : str | None, optional
The file name where all options are written.
By default it is set to None.
partial_price : int | None, optional
None
By default it is set to None.
penalty_parameter : float | None, optional
None
By default it is set to None.
pivot_tolerance : float | None, optional
None
By default it is set to None.
print_file : <class 'str'>, optional
None
By default it is set to SNOPT_print.out.
print_frequency : int | None, optional
None
By default it is set to None.
proximal_iterations_limit : <class 'int'>, optional
The iterations limit for solving the proximal point problem
By default it is set to 10000.
proximal_point_method : <class 'int'>, optional
The method for the proximal point procedure
By default it is set to 1.
punch_file : int | None, optional
None
By default it is set to None.
reduced_hessian_dimension : int | None, optional
None
By default it is set to None.
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.
save_frequency : int | None, optional
None
By default it is set to None.
save_major_iteration_variables : list[str], optional
The SNOPT internal variables that must be saved into the optimization database (specific to PyOptSparse wrapper).
By default it is set to [].
scale_option : int | None, optional
None
By default it is set to None.
scale_tolerance : float | None, optional
None
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.
solution : str | None, optional
None
By default it is set to None.
solution_file : int | None, optional
None
By default it is set to None.
start_constraint_check_at_column : int | None, optional
None
By default it is set to None.
start_objective_check_at_column : int | None, optional
None
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.
summary_file : <class 'str'>, optional
None
By default it is set to SNOPT_summary.out.
summary_frequency : int | None, optional
None
By default it is set to None.
superbasics_limit : int | None, optional
None
By default it is set to None.
suppress_options_listing : dict[str, typing.Any] | None, optional
None
By default it is set to None.
system_information : str | None, optional
None
By default it is set to None.
timing_level : int | None, optional
None
By default it is set to None.
unbounded_objective : float | None, optional
None
By default it is set to None.
unbounded_step_size : float | None, optional
None
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.
user_character_workspace : int | None, optional
None
By default it is set to None.
user_integer_workspace : int | None, optional
None
By default it is set to None.
user_real_workspace : int | None, optional
None
By default it is set to None.
verify_level : int | None, optional
None
By default it is set to None.
violation_limit : <class 'float'>, optional
The absolute limit on the magnitude of the maximum constraint violation after the linesearch
By default it is set to 10.0.
xtol_abs : <class 'float'>, optional
The absolute tolerance on the design parameters.
By default it is set to 1e-06.
xtol_rel : <class 'float'>, optional
The relative tolerance on the design parameters.
By default it is set to 1e-06.
SBO#
Note
The plugin gemseo_mlearning is required.
Module: gemseo_mlearning.algos.opt.surrogate_based_optimization
GEMSEO in-house surrogate-based optimizer.
from gemseo.settings.opt import SBOSettings
- Optional settings
acquisition_algorithm : <class 'str'>
- The name of the algorithm to optimize the data acquisition criterion.
If empty, use the default algorithm with its default settings.
By default it is set to .
acquisition_settings : collections.abc.Mapping[str, typing.Union[str, float, int, bool, list[str], numpy.ndarray, collections.abc.Iterable[collections.abc.Callable[[int, typing.Any], None]], collections.abc.Mapping[str, typing.Any]]], optional
- The settings of the algorithm
to optimize the data acquisition criterion. Ignored when acquisition_algorithm is empty.
By default it is set to {}.
batch_size : <class 'int'>, optional
The number of points to be acquired in parallel.
By default it is set to 1.
criterion : <enum 'AcquisitionCriterion'>, optional
The acquisition criterion.
By default it is set to EI.
doe_algorithm : <class 'str'>, optional
- The name of the DOE algorithm for the initial sampling.
This argument is ignored when regression_algorithm is a [BaseRegressor][gemseo.mlearning.regression.algos.base_regressor.BaseRegressor].
By default it is set to OT_OPT_LHS.
doe_settings : collections.abc.Mapping[str, typing.Union[str, float, int, bool, list[str], numpy.ndarray, collections.abc.Iterable[collections.abc.Callable[[int, typing.Any], None]], collections.abc.Mapping[str, typing.Any]]], optional
- The settings of the DOE algorithm for the initial sampling.
This argument is ignored when regression_algorithm is a [BaseRegressor][gemseo.mlearning.regression.algos.base_regressor.BaseRegressor].
By default it is set to {}.
doe_size : <class 'int'>, optional
- Either the initial DOE size or 0 if it is inferred from doe_settings.
This argument is ignored when regression_algorithm is a [BaseRegressor][gemseo.mlearning.regression.algos.base_regressor.BaseRegressor].
By default it is set to 10.
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.
mc_size : <class 'int'>, optional
The sample size to estimate the acquisition criteria in parallel.
By default it is set to 10000.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to False.
regression_algorithm : str | gemseo.mlearning.regression.algos.base_regressor.BaseRegressor, optional
- The regression algorithm.
Either the name of the regression algorithm approximating the objective function over the design space or the regression algorithm itself.
By default it is set to OTGaussianProcessRegressor.
regression_file_path : str | pathlib.Path
- The path to the file to save the regression model.
If empty, do not save the regression model.
By default it is set to .
regression_settings : collections.abc.Mapping[str, typing.Optional[typing.Any]], optional
- The settings of the regression algorithm.
This argument is ignored when regression_algorithm is a [BaseRegressor][gemseo.mlearning.regression.algos.base_regressor.BaseRegressor].
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.
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.
SMT_EGO#
Note
The plugin gemseo_mlearning is required.
Module: gemseo_mlearning.algos.opt.smt.smt_ego
Efficient Global Optimization
from gemseo.settings.opt import SMTEGOSettings
More details about the algorithm and its settings on https://smt.readthedocs.io/en/latest/_src_docs/applications/ego.html.
- Optional settings
criterion : <enum 'AcquisitionCriterion'>, optional
The acquisition criterion.
By default it is set to EI.
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.
enable_tunneling : <class 'bool'>, optional
Whether to enable the penalization of points that have been already evaluated in EI criterion.
By default it is set to False.
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_doe : <class 'int'>, optional
The number of points of the initial LHS DOE to train the surrogate.
By default it is set to 10.
n_max_optim : <class 'int'>, optional
The maximum number of iterations for each sub-optimization.
By default it is set to 20.
n_parallel : <class 'int'>, optional
The number of points to be acquired in parallel; if 1, acquire points sequentially.
By default it is set to 1.
n_start : <class 'int'>, optional
The number of sub-optimizations.
By default it is set to 50.
normalize_design_space : <class 'bool'>, optional
Whether to normalize the design space variables between 0 and 1.
By default it is set to True.
qEI : <enum 'ParallelStrategy'>, optional
The strategy to acquire points in parallel.
By default it is set to KBUB.
random_state : <class 'int'>, optional
The Numpy RandomState object or seed number which controls random draws.
By default it is set to 1.
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.
surrogate : <MagicMock name='SurrogateModel.__ror__()' id='126849253433344'>, optional
The SMT Kriging-based surrogate model used internally; either an instance of the surrogate before training or its class name.
By default it is set to KRG.
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.
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/generated/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.