NlpSolve: Difference between revisions
(Created page with "==Purpose== Solve general constrained nonlinear optimization problems. ''nlpSolve ''solves problems of the form <math> \begin{array}{cccccc} \min\limits_{x} & f(x) & & & &...") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Solvers]] | |||
==Purpose== | ==Purpose== | ||
Line 16: | Line 17: | ||
where <math>x,x_{L},x_{U}\in \ | where <math>x,x_{L},x_{U}\in \mathbb{R}^{n}</math> , <math>c(x),c_{L},c_{U}\in \mathbb{R} ^{m_{1}}</math> , <math>A\in \mathbb{R}^{m_{2}\times n}</math> and <math>b_{L},b_{U}\in \mathbb{R}^{m_{2}}</math>. | ||
==Calling Syntax== | ==Calling Syntax== | ||
<source lang="matlab"> | |||
Result = nlpSolve(Prob, varargin) | Result = nlpSolve(Prob, varargin) | ||
Result = tomRun('nlpSolve', Prob); | Result = tomRun('nlpSolve', Prob); | ||
</source> | |||
== | ==Inputs== | ||
{| | {| class="wikitable" | ||
!''Prob''||colspan="2"|Problem description structure. The following fields are used: | |||
|- | |- | ||
|||''A''||Constraint matrix for linear constraints. | |||''A''||Constraint matrix for linear constraints. | ||
Line 52: | Line 54: | ||
|- | |- | ||
|||''FUNCS.H''||Name of m-file computing the Hessian matrix ''H ''(''x''). | |||''FUNCS.H''||Name of m-file computing the Hessian matrix ''H ''(''x''). | ||
|- | |-valign="top" | ||
|||''FUNCS.c''||Name of m-file computing the vector of constraint functions ''c''(''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''. | |||
|-valign="top" | |-valign="top" | ||
|||''FUNCS.d2c''||Name of m-file computing the second derivatives of the constraints, weighted by an input Lagrange vector | |||''FUNCS.d2c''||Name of m-file computing the second derivatives of the constraints, weighted by an input Lagrange vector | ||
Line 64: | Line 66: | ||
|- | |- | ||
|||''SolverQP''||Name of the solver used for QP subproblems. If empty, the default solver is used. See GetSolver.m and tomSolve.m. | |||''SolverQP''||Name of the solver used for QP subproblems. If empty, the default solver is used. See GetSolver.m and tomSolve.m. | ||
|- | |-valign="top" | ||
|||''SolverFP''||Name of the solver used for FP 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. | ||
|- | |-valign="top" | ||
|||''optParam''||Structure with special fields for optimization parameters, see | |||''optParam''||Structure with special fields for optimization parameters, see [[TOMLAB Appendix A]]. | ||
Fields used are: ''eps_g'', ''eps_x'', ''MaxIter'', ''wait'', ''size_x'', ''method'', ''IterPrint'', ''xTol'', ''bTol'', ''cTol'', and ''QN_InitMatrix''. | |||
|- | |- | ||
|''varargin''||colspan="2"|Other parameters directly sent to low level routines. | |''varargin''||colspan="2"|Other parameters directly sent to low level routines. | ||
|} | |} | ||
== | ==Outputs== | ||
{| | {| class="wikitable" | ||
!''Result''||colspan="2"|Structure with result from optimization. The following fields are changed: | |||
|- | |- | ||
|||''x_k''||Optimal point. | |||''x_k''||Optimal point. | ||
Line 106: | Line 108: | ||
|- | |- | ||
|||''ExitFlag''||Flag giving exit status. | |||''ExitFlag''||Flag giving exit status. | ||
|- | |-valign="top" | ||
|||''ExitText''||0: Convergence. Small step. Constraints fulfilled. | |||''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. | |||
|- | |-valign="top" | ||
|||''Inform''||1: Iteration points are close. | |||''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. | |||''Iter''||Number of iterations. | ||
Line 136: | Line 138: | ||
==Description== | ==Description== | ||
The routine ''nlpSolve ''implements the Filter SQP by Roger Fletcher and Sven Leyffer | The routine ''nlpSolve ''implements the Filter SQP by Roger Fletcher and Sven Leyffer. | ||
==M-files Used== | ==M-files Used== | ||
Line 144: | Line 146: | ||
==See Also== | ==See Also== | ||
*conSolve | |||
*sTrustr |
Latest revision as of 08:16, 16 January 2012
Purpose
Solve general constrained nonlinear optimization problems.
nlpSolve solves problems of the form
where , , and .
Calling Syntax
Result = nlpSolve(Prob, varargin)
Result = tomRun('nlpSolve', Prob);
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 TOMLAB Appendix A.
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. |
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.
M-files Used
tomSolve.m, ProbCheck.m, iniSolve.m, endSolve.m
See Also
- conSolve
- sTrustr