NlpSolve
{{#switch: | left =
{{#switch:{{#if: | {{{smallimage}}} | }} | none =| #default =
}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}{{
#switch:left | left =| #default = }} {{#if:{{#if: | {{{smallimage}}} | }} | {{#if: | {{{smallimage}}} | }} | [[File:{{#switch:caution | critical = Ambox speedy deletion.png | important = Ambox deletion.png | warning = Ambox content.png | caution = Cleanup.png | move = Ambox move.png | protection = Ambox protection.png | notice | #default = Cleanup.png }} | {{#switch:left | left = 20x20px | #default = 40x40px }} |link=|alt=]] }}{{#switch:left | left =| #default = | {{#if:
| {{{smalltext}}} | Cleanup is needed}} | {{#switch:left
| left = {{#if: | {{{smallimageright}}} | }}| #default = {{#if:
}}| {{{smallimageright}}} |}} |
| #default =
{{#switch: | none =| #default =
}}{{#if: | {{#ifeq:|none
|| }} }}
{{
#switch: | left =| #default = }} {{#if: | | [[File:{{#switch:caution | critical = Ambox speedy deletion.png | important = Ambox deletion.png | warning = Ambox content.png | caution = Cleanup.png | move = Ambox move.png | protection = Ambox protection.png | notice | #default = Cleanup.png }} | {{#switch: | left = 20x20px | #default = 40x40px }} |link=|alt=]] }}{{#switch: | left =| #default = | Cleanup is needed Clean this article. |
{{#switch:
| left =| #default = |
}}
Purpose
Solve general constrained nonlinear optimization problems.
nlpSolve solves problems of the form
where Failed to parse (unknown function "\MATHSET"): {\displaystyle x,x_{L},x_{U}\in \MATHSET{R}^{n}}
, Failed to parse (unknown function "\MATHSET"): {\displaystyle c(x),c_{L},c_{U}\in \MATHSET{R} ^{m_{1}}}
, Failed to parse (unknown function "\MATHSET"): {\displaystyle A\in \MATHSET{R}^{m_{2}\times n}}
and Failed to parse (unknown function "\MATHSET"): {\displaystyle b_{L},b_{U}\in \MATHSET{R}^{m_{2}}}
.
Calling Syntax
Result = nlpSolve(Prob, varargin)
Result = tomRun('nlpSolve', Prob);
Description of Inputs
Prob | Problem description structure. The following fields are used: | |
A | Constraint matrix for linear constraints. | |
b_L | Lower bounds on the linear constraints. | |
b_U | Upper bounds on the linear constraints. | |
c_L | Lower bounds on the general constraints. | |
c_U | Upper bounds on the general constraints. | |
x_L | Lower bounds on the variables. | |
x_U | Upper bounds on the variables. | |
x_0 | Starting point. | |
PriLevOpt | Print level: 0 Silent, 1 Final result, 2 Each iteration, short, 3 Each iteration, more info, 4 Matrix update information. | |
FUNCS.f | Name of m-file computing the objective function f (x). | |
FUNCS.g | Name of m-file computing the gradient vector g(x). | |
FUNCS.H | Name of m-file computing the Hessian matrix H (x). | |
FUNCS.c | Name of m-file computing the vector of constraint functions c(x). | |
FUNCS.dc | Name of m-file computing the matrix of constraint normals ?c(x)/dx. | |
FUNCS.d2c | Name of m-file computing the second derivatives of the constraints, weighted by an input Lagrange vector | |
NumDiff | How to obtain derivatives (gradient, Hessian). | |
ConsDiff | How to obtain the constraint derivative matrix. | |
SolverQP | Name of the solver used for QP subproblems. If empty, the default solver is used. See GetSolver.m and tomSolve.m. | |
SolverFP | Name of the solver used for FP subproblems. If empty, the default solver is used. See GetSolver.m and tomSolve.m. | |
optParam | Structure with special fields for optimization parameters, see Table 141. | |
Fields used are: eps_g, eps_x, MaxIter, wait, size_x, method, IterPrint, xTol, bTol, cTol, and QN InitMatrix. | ||
varargin | Other parameters directly sent to low level routines. |
Description of Outputs
Result | Structure with result from optimization. The following fields are changed: | |
x_k | Optimal point. | |
f_k | Function value at optimum. | |
g_k | Gradient value at optimum. | |
c_k | Value of constraints at optimum. | |
H_k | Hessian value at optimum. | |
v_k | Lagrange multipliers. | |
x_0 | Starting point. | |
f_0 | Function value at start. | |
cJac | Constraint Jacobian at optimum. | |
xState | State of each variable, described in Table 150. | |
bState | State of each linear constraint, described in Table 151. | |
cState | State of each general constraint. | |
Inform | Type of convergence. | |
ExitFlag | Flag giving exit status. | |
ExitText | 0: Convergence. Small step. Constraints fulfilled. | |
1: Infeasible problem? | ||
2: Maximal number of iterations reached. | ||
3: No progress in either function value or constraint reduction. | ||
Inform | 1: Iteration points are close. | |
2: Small search direction | ||
3: Function value below given estimate. Restart with lower fLow if minimum not reached. | ||
4: Projected gradient small. | ||
10: Karush-Kuhn-Tucker conditions fulfilled. | ||
Iter | Number of iterations. | |
Solver | Solver used. | |
SolverAlgorithm | Solver algorithm used. | |
Prob | Problem structure used. |
Description
The routine nlpSolve implements the Filter SQP by Roger Fletcher and Sven Leyffer presented in the paper \[21\].
M-files Used
tomSolve.m, ProbCheck.m, iniSolve.m, endSolve.m