optimization.optimizer.scipy.base
Optiland Scipy Optimization Module
This module contains classes for various optimization algorithms that can be used to solve optimization problems defined in the OptimizationProblem class. This module provides a generic optimizer class and several specific optimizers that utilize different algorithms from the SciPy library.
Kramer Harrison, 2024
Classes
|
Generic optimizer class for solving optimization problems. |
- class OptimizerGeneric(problem: OptimizationProblem)[source]
Generic optimizer class for solving optimization problems.
- Parameters:
problem (OptimizationProblem) – The optimization problem to be solved.
- problem
The optimization problem to be solved.
- Type:
- _x
List to store the values of the variables during optimization.
- Type:
list
- optimize(maxiter=1000, disp=True, tol=1e-3)[source]
Optimize the problem using the specified parameters.
- optimize(method: str | None = None, maxiter: int = 1000, disp: bool = True, tol: float = 0.001, callback: Callable | None = None, plot: bool = False) optimize.OptimizeResult[source]
Optimize the problem using the specified parameters.
- Parameters:
method (str, optional) – The optimization method to use. Default is chosen to be one of BFGS, L-BFGS-B, SLSQP, depending on whether contraints or bounds given. Follows scipy.optimize.minimize method.
maxiter (int, optional) – Maximum number of iterations. Default is 1000.
disp (bool, optional) – Whether to display optimization information. Default is True.
tol (float, optional) – Tolerance for convergence. Default is 1e-3.
callback (callable) – A callable called after each iteration.
plot – If True, update live plots during optimization.
- Returns:
The optimization result.
- Return type:
result (OptimizeResult)