PSQP

This optimizer implements a sequential quadratic programming method with a BFGS variable metric update

Options

PSQP Default Options

Name

Type

Default value

Description

XMAX

float

1e+16

Maximum Stepsize

TOLX

float

1e-16

Variable Change Tolerance

TOLC

float

1e-06

Constraint Violation Tolerance

TOLG

float

1e-06

Lagrangian Gradient Tolerance

RPF

float

0.0001

Penalty Coefficient

MIT

int

1000

Maximum Number of Iterations

MFV

int

2000

Maximum Number of Function Evaluations

MET

int

2

Variable Metric Update (1 - BFGS, 2 - Hoshino)

MEC

int

2

Negative Curvature Correction (1 - None, 2 - Powell’s Correction)

IPRINT

int

2

Output Level (0 - None, 1 - Final, 2 - Iter)

IOUT

int

6

Output Unit Number

IFILE

str

PSQP.out

Output File Name

Informs

PSQP Informs

Code

Description

1

Change in design variable was less than or equal to tolerance

2

Change in objective function was less than or equal to tolerance

3

Objective function less than or equal to tolerance

4

Maximum constraint value is less than or equal to tolerance

11

Maximum number of iterations exceeded

12

Maximum number of function evaluations exceeded

13

Maximum number of gradient evaluations exceeded

-6

Termination criterion not satisfied, but obtained point is acceptable

-7

Positive directional derivative in line search

-8

Interpolation error in line search

-10

Optimization failed

API

class pyoptsparse.pyPSQP.pyPSQP.PSQP(*args, **kwargs)[source]

PSQP Optimizer Class - Inherited from Optimizer Abstract Class

This is the base optimizer class that all optimizers inherit from. We define common methods here to avoid code duplication.

Parameters:
namestr

Optimizer name

categorystr

Typically local or global

defaultOptionsdictionary

A dictionary containing the default options

informsdict

Dictionary of the inform codes

__call__(optProb, sens=None, sensStep=None, sensMode=None, storeHistory=None, hotStart=None, storeSens=True)[source]

This is the main routine used to solve the optimization problem.

Parameters:
optProbOptimization or Solution class instance

This is the complete description of the optimization problem to be solved by the optimizer

sensstr or python Function.

Specifiy method to compute sensitivities. To explictly use pyOptSparse gradient class to do the derivatives with finite differenes use ‘FD’. ‘sens’ may also be ‘CS’ which will cause pyOptSpare to compute the derivatives using the complex step method. Finally, ‘sens’ may be a python function handle which is expected to compute the sensitivities directly. For expensive function evaluations and/or problems with large numbers of design variables this is the preferred method.

sensStepfloat

Set the step size to use for design variables. Defaults to 1e-6 when sens is ‘FD’ and 1e-40j when sens is ‘CS’.

sensModestr

Use ‘pgc’ for parallel gradient computations. Only available with mpi4py and each objective evaluation is otherwise serial

storeHistorystr

File name of the history file into which the history of this optimization will be stored

hotStartstr

File name of the history file to “replay” for the optimziation. The optimization problem used to generate the history file specified in ‘hotStart’ must be IDENTICAL to the currently supplied ‘optProb’. By identical we mean, EVERY SINGLE PARAMETER MUST BE IDENTICAL. As soon as he requested evaluation point from PSQP does not match the history, function and gradient evaluations revert back to normal evaluations.

storeSensbool

Flag sepcifying if sensitivities are to be stored in hist. This is necessay for hot-starting only.