NlpSolve

From TomWiki
Jump to navigationJump to search

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