gemseo / algos / opt

Show inherited members

lib_scipy_global module

A wrapper for the global optimization algorithms of the SciPy library.

class gemseo.algos.opt.lib_scipy_global.SciPyGlobalAlgorithmDescription(algorithm_name, internal_algorithm_name, library_name='SciPy', description='', website='https://docs.scipy.org/doc/scipy/reference/optimize.html#global-optimization', handle_integer_variables=False, require_gradient=False, handle_equality_constraints=False, handle_inequality_constraints=False, handle_multiobjective=False, positive_constraints=False, problem_type=ProblemType.NON_LINEAR)[source]

Bases: OptimizationAlgorithmDescription

The description of a global optimization algorithm from the SciPy library.

Parameters:
  • algorithm_name (str) –

  • internal_algorithm_name (str) –

  • library_name (str) –

    By default it is set to “SciPy”.

  • description (str) –

    By default it is set to “”.

  • website (str) –

    By default it is set to “https://docs.scipy.org/doc/scipy/reference/optimize.html#global-optimization”.

  • handle_integer_variables (bool) –

    By default it is set to False.

  • require_gradient (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.

  • problem_type (OptimizationProblem.ProblemType) –

    By default it is set to “non-linear”.

algorithm_name: str

The name of the algorithm in GEMSEO.

internal_algorithm_name: str

The name of the algorithm in the wrapped library.

library_name: str = 'SciPy'

The name of the wrapped library.

website: str = 'https://docs.scipy.org/doc/scipy/reference/optimize.html#global-optimization'

The website of the wrapped library or algorithm.

class gemseo.algos.opt.lib_scipy_global.ScipyGlobalOpt[source]

Bases: OptimizationLibrary

A wrapper for the global optimization algorithms of the SciPy library.

Notes

The missing current values of the DesignSpace attached to the OptimizationProblem are automatically initialized with the method DesignSpace.initialize_missing_current_values().

iter_callback(x_vect)[source]

Call the objective and constraints functions.

Parameters:

x_vect (ndarray[Any, dtype[float64 | int32]]) – The input data with which to call the functions.

Return type:

None

real_part_obj_fun(x)[source]

Wrap the function and return the real part.

Parameters:

x (InputType) – The values to be given to the function.

Returns:

The real part of the evaluation of the objective function.

Return type:

int | float

LIBRARY_NAME: ClassVar[str | None] = 'SciPy'

The name of the interfaced library.

LIB_COMPUTE_GRAD = True
algo_name: str | None

The name of the algorithm used currently.

descriptions: dict[str, AlgorithmDescription]

The description of the algorithms contained in the library.

internal_algo_name: str | None

The internal name of the algorithm used currently.

It typically corresponds to the name of the algorithm in the wrapped library if any.

opt_grammar: JSONGrammar | None

The grammar defining the options of the current algorithm.

problem: OptimizationProblem

The optimization problem the driver library is bonded to.