pysolver_view.optimization.backends.scipy module#
Native SciPy optimization adapter.
- pysolver_view.optimization.backends.scipy.convert_pygmo_to_scipy_bounds(pygmo_bounds)[source]#
Create a function that converts bounds from Pygmo format to SciPy format.
- Parameters:
- pygmo_methodcallable
A method that, when called, returns a tuple containing two lists: the first list of lower bounds and the second of upper bounds (Pygmo convention).
- Returns:
- callable
A function that, when called, returns a list of tuples where each tuple contains the lower and upper bound for each decision variable (Scipy convention).
- pysolver_view.optimization.backends.scipy.minimize_scipy(problem, x0, method, solver_options)[source]#
Optimize a given problem using the specified SciPy method.
- Parameters:
- problemOptimizationProblem
An object representing the problem.
- x0array_like
Initial guess for the decision variables.
- methodstr
The name of the Scipy solver to use. Must be one of the solvers defined in the SCIPY_SOLVERS list.
- optionsdict
Configuration options for the solver. Options vary depending on the solver used.
- Returns:
- scipy.optimize.OptimizeResult
The backend solution, including its authoritative coordinates, objective, termination status, and any available native diagnostics. Coordinates use the solver-space convention supplied by the caller.
- Raises:
- ValueError
If an invalid solver is specified.