gemseo.algos.opt.base_optimization_library module#
Base class for libraries of optimizers.
- class BaseOptimizationLibrary(algo_name)[source]#
Bases:
BaseDriverLibrary
Base class for libraries of optimizers.
Typically used as:
Instantiate an
BaseOptimizationLibrary
.Select the algorithm with
_algo_name
.Solve an
OptimizationProblem
withexecute()
.
Notes
The missing current values of the
DesignSpace
attached to theOptimizationProblem
are automatically initialized with the methodDesignSpace.initialize_missing_current_values()
.- Parameters:
algo_name (str) -- The algorithm name.
- Raises:
KeyError -- When the algorithm is not in the library.
- ALGORITHM_INFOS: ClassVar[dict[str, OptimizationAlgorithmDescription]] = {}#
The description of the algorithms contained in the library.
- class OptimizationAlgorithmDescription(algorithm_name, internal_algorithm_name, library_name='', description='', website='', Settings=<class 'gemseo.algos.opt.base_optimizer_settings.BaseOptimizerSettings'>, handle_integer_variables=False, handle_equality_constraints=False, handle_inequality_constraints=False, handle_multiobjective=False, positive_constraints=False, for_linear_problems=False, require_gradient=False)[source]#
Bases:
DriverDescription
The description of an optimization algorithm.
- Parameters:
algorithm_name (str)
internal_algorithm_name (str)
library_name (str) --
By default it is set to "".
description (str) --
By default it is set to "".
website (str) --
By default it is set to "".
Settings (type[BaseOptimizerSettings]) --
By default it is set to <class 'gemseo.algos.opt.base_optimizer_settings.BaseOptimizerSettings'>.
handle_integer_variables (bool) --
By default it is set to False.
handle_equality_constraints (bool) --
By default it is set to False.
handle_inequality_constraints (bool) --
By default it is set to False.
handle_multiobjective (bool) --
By default it is set to False.
positive_constraints (bool) --
By default it is set to False.
for_linear_problems (bool) --
By default it is set to False.
require_gradient (bool) --
By default it is set to False.
- Settings#
The settings validation model.
alias of
BaseOptimizerSettings
- for_linear_problems: bool = False#
Whether the optimization algorithm is dedicated to linear problems.
- handle_equality_constraints: bool = False#
Whether the optimization algorithm handles equality constraints.
- handle_inequality_constraints: bool = False#
Whether the optimization algorithm handles inequality constraints.
- handle_multiobjective: bool = False#
Whether the optimization algorithm handles multiple objectives.