OpenSQP
The OpenSQP solver is a gradient-based optimization algorithm that uses
sequential quadratic programming (SQP) to solve general nonlinear programming problems.
It uses a damped BFGS algorithm to approximate the Hessian of the Lagrangian and
an augmented Lagrangian merit function for the line search.
The OpenSQP solver is fully implemented in modOpt.
The source code is available
here.
Note
For built-in algorithms like OpenSQP,
there are no “solver-specific” options,
as the entire solver is integrated within modOpt.
As a result, all solver options are set directly using keyword
arguments, rather than being passed separately in a
solver_options dictionary as in other performant algorithms.
To use the OpenSQP solver, start by importing it as shown in the following code:
from modopt import OpenSQP
Options could be set by passing them as kwargs when
instantiating the OpenSQP optimizer object.
For example, we can set the maximum number of iterations maxiter
and the optimality tolerance opt_tol shown below.
optimizer = OpenSQP(prob, maxiter=20, opt_tol=1e-8)
See the table below for the full list of options.
Option |
Type (default value) |
Description |
|---|---|---|
|
bool ( |
If |
|
str ( |
The record file from which to hot-start the optimization. |
|
float ( |
The absolute tolerance check for the inputs |
|
float ( |
The relative tolerance check for the inputs |
|
list ( |
The list of scalar variables to visualize during the optimization. |
|
bool ( |
If |
|
int ( |
If |
|
int ( |
Maximum number of major iterations. |
|
float( |
Optimality tolerance. |
|
float ( |
Feasibility tolerance. Terminate successfully only if the |
|
float ( |
Tolerance for the primal feasibility of the augmented QP subproblem. |
|
float ( |
Tolerance for the dual feasibility of the augmented QP subproblem. |
|
float ( |
Time limit for augmented QP solution in seconds. |
|
float ( |
Minimum step size for the line search. |
|
float ( |
Maximum step size for the line search. |
|
int ( |
Maximum number of iterations for the line search. |
|
float ( |
Armijo (sufficient decrease condition) parameter for the line search. |
|
float ( |
Wolfe (curvature condition) parameter for the line search. |
|
float ( |
Relative tolerance for an acceptable step in the line search. |
|
np.ndarray ( |
Initial symmetric and positive definite approximation of |
|
dict ( |
Initial Lagrange multiplier values for the bounds and constraints. |
|
list ( |
List of outputs to be written to readable text output files. |