|
TOMLAB OPTIMIZATION ENVIRONMENT: ucSolve |
|
ucSolve
Purpose
For solving unconstrained nonlinear optimization problems with simple bounds on the variables.
Syntax
Result = ucSolve(Prob, varargin);
Description
ucSolve is a solver implementing several algorithms for
unconstrained minimization with bound constraints,
ucSolve implements the following algorithms:
Algorithm:
BFGS or Newton) SVDBFGS with standard inverse Hessian update BFGS with Hessian update, and SVD
or LU to solveDFP with standard inverse Hessian update DFP with Hessian update, and SVD
or LU to solveCG CGCG-method
Set the field Prob.Solver.Alg to one of the numbers above
Note: The accuracy in the line search is critical for the performance
if quasi-Newton BFGS and DFP methods, as well as the
CG methods.
If the accuracy parameter, Prob.LineParam.sigma == 0.9
(standard default), it is changed by ucSolve to:
Prob.Solver.Alg == 4,5 => sigma = 0.2
Prob.Solver.Alg == 6,7,8 => sigma = 0.01
Bound constraints treated as described in Gill, Murray, Wright: Practical Optimization, Academic Press, 1981.
Solver.Method, method to solve equation system
(Solver.Alg in [0,5])
SVD (default).LU-decomposition.LU-decomposition with pivoting.MATLAB built in QR.MATLAB inversion.
Solver.Method, restart or not for C-G method:
(Solver.Alg in [6,8])
CG-method each n:th step.CG-method each n:th step.Problem
min f(x)
x_L <= x <= x_U
Input Parameters
Use tomMenu.m or tomGUI.m for interactive run
Use conAssign.m (or probAssign) to initialize the
Prob structure in the TOMLAB Quick format.
Fields used in structure Prob:
USER.f The routine to compute the function value, given as a string
USER.g The routine to compute the gradient vector, given as a string
If empty, or Prob.NumDiff ~=0 numerical differences are used
If Prob.AutoDiff > 0, automatic differentiation is used
USER.H The routine to compute the Hessian, given as a string
Only used for Newtons method.
If empty, or Prob.NumDiff < 0 numerical differences are used
If Prob.AutoDiff > 0, automatic differentiation is used
x_0 Starting point
x_L Lower bounds for x
x_U Upper bounds for x
PriLevOpt Print level
Solver.Alg Algorithm number
Solver.Method Search direction solution technique
optParam Structure with optimization parameters
eps_absf Absolute convergence tol on function value
eps_f Relative change in f, convergence tolerance
ucSolve will stop if the test is true for LowIts iterations
LowIts = 10; now, to change it, change on line 182.
eps_g Gradient convergence tolerance
eps_Rank Rank test tolerance
eps_x Convergence tolerance in x
MaxIter Maximal number of iterations
optParam.QN_InitMatrix Initial Quasi-Newton matrix, empty ==> eye(n),
IterPrint Print short information each iteration
size_x Approximate size of optimal variable values, normally 1
size_f Approximate size of optimal function value, normally 1
xTol Tolerance to judge if x is close to bounds
otherwise use identity matrix
LineParam Line search parameters, see LineSearch.m
PriLev: Print level: 0 None, 1 Final result, 2 Each iteration, short
3 Each iteration, more info, 4 Line search info and Hessian
The Prob structure could be created in the TOMLAB
Quick format with calls to conAssign.m (or
probAssign and mFiles),
or in the Init File format, see Users Guide.
Extra Parameters
VARARGIN: User defined parameters passed to f,g,H, r and J, and c and dc.
Output Parameters
Result Structure with results from optimization
x_k Optimal point
v_k Lagrange multipliers for bound constraints
f_k Function value at optimum
g_k Gradient vector at optimum
x_0 Starting value vector
H_k The Hessian matrix, if computed (Newtons method)
B_k The Quasi Newton matrix
xState Variable: Free==0; On lower == 1; On upper == 2; Fixed == 3;
Iter Number of iterations
ExitFlag Flag giving exit status
ExitTest Text string giving ExitFlag and Inform information
Inform Code telling type of convergence
1 Iteration points are close.
2 Projected gradient small.
3 Iteration points are close and projected gradient small.
4 Relative function value reduction low for 10 iterations.
5 Iteration points are close and relative function value
reduction low for 10 iterations.
6 Projected gradient small and relative function value
reduction low for 10 iterations.
7 Iteration points are close, projected gradient small and
relative function value reduction low for 10 iterations.
101 Max no of iterations reached.
102 Function value below given estimate.
103 Convergence to saddle point (eigenvalues computed)
![]() |
Tnnls |