Main Content

Iterative Display

Introduction

The iterative display is a table of statistics describing the calculations in each iteration of a solver. The statistics depend on both the solver and the solver algorithm. The table appears in the MATLAB®Command Window when you run solvers with appropriate options. For more information about iterations, seeIterations and Function Counts.

Obtain the iterative display by usingoptimoptionswith theDisplayoption set to'iter'or'iter-detailed'. For example:

options = optimoptions(@fminunc,'Display','iter','Algorithm','quasi-newton'); [x fval exitflag output] = fminunc(@sin,0,options);
First-order Iteration Func-count f(x) Step-size optimality 0 2 0 1 1 4 -0.841471 1 0.54 2 8 -1 0.484797 0.000993 3 10 -1 1 5.62e-05 4 12 -1 1 0 Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance.

The iterative display is available for all solvers except:

  • lsqlin'trust-region-reflective'algorithm

  • lsqnonneg

  • quadprog'trust-region-reflective'algorithm

Common Headings

This table lists some common headings of iterative display.

Heading Information Displayed

f(x)orFval

Current objective function value; forfsolve, the square of the norm of the function value vector

First-order optimality

First-order optimality measure (seeFirst-Order Optimality Measure)

Func-countorF-count

Number of function evaluations; seeIterations and Function Counts

IterationorIter

Iteration number; seeIterations and Function Counts

Norm of step

Size of the current step (size is the Euclidean norm, or 2-norm). For the'trust-region'and'trust-region-reflective'algorithms, when constraints exist,Norm of stepis the norm ofD*s. Here,sis the step andDis a diagonal scaling matrix described in the trust-region subproblem section of the algorithm description.

Function-Specific Headings

The tables in this section describe headings of the iterative display whose meaning is specific to the optimization function you are using.

fgoalattain, fmincon, fminimax, and fseminf

This table describes the headings specific tofgoalattain,fmincon,fminimax, andfseminf.

fgoalattain, fmincon, fminimax, or fseminf Heading Information Displayed

Attainment factor

Value of the attainment factor forfgoalattain

CG-iterations

Number of conjugate gradient iterations taken in the current iteration (seePreconditioned Conjugate Gradient Method)

Directional derivative

Gradient of the objective function along the search direction

Feasibility

Maximum constraint violation, where satisfied inequality constraints count as0

Line search steplength

Multiplicative factor that scales the search direction (seeEquation 29)

Max constraint

Maximum violation among all constraints, both internally constructed and user-provided; can be negative when no constraint is binding

Objective value

Objective function value of the nonlinear programming reformulation of the minimax problem forfminimax

Procedure

Hessian update procedures:

  • Infeasible start point

  • Hessian not updated

  • Hessian modified

  • Hessian modified twice

For more information, seeUpdating the Hessian Matrix.

QP subproblem procedures:

  • dependent— The solver detected and removed dependent (redundant) equality constraints.

  • Infeasible— The QP subproblem with linearized constraints is infeasible.

  • Overly constrained— The QP subproblem with linearized constraints is infeasible.

  • Unbounded— The QP subproblem is feasible with large negative curvature.

  • Ill-posed— The QP subproblem search direction is too small.

  • Unreliable— The QP subproblem seems to be poorly conditioned.

Steplength

Multiplicative factor that scales the search direction (seeEquation 29)

Trust-region radius

Current trust-region radius

fminbnd and fzero

This table describes the headings specific tofminbndandfzero.

fminbnd or fzero Heading Information Displayed

Procedure

Procedures forfminbnd:

  • initial

  • golden(golden section search)

  • parabolic(parabolic interpolation)

Procedures forfzero:

  • initial(initial point)

  • search(search for an interval containing a zero)

  • bisection

  • interpolation(linear interpolation or inverse quadratic interpolation)

x

当前点的算法

fminsearch

This table describes the headings specific tofminsearch.

fminsearch Heading Information Displayed

min f(x)

Minimum function value in the current simplex

Procedure

Simplex procedure at the current iteration. Procedures include:

  • initial simplex

  • expand

  • reflect

  • shrink

  • contract inside

  • contract outside

For details, seefminsearch Algorithm.

fminunc

This table describes the headings specific tofminunc.

fminunc Heading Information Displayed

CG-iterations

Number of conjugate gradient iterations taken in the current iteration (seePreconditioned Conjugate Gradient Method)

Line search steplength

Multiplicative factor that scales the search direction (seeEquation 11)

Thefminunc'quasi-newton'algorithm can issue askipped updatemessage to the right of theFirst-order optimalitycolumn. This message means thatfminuncdid not update its Hessian estimate, because the resulting matrix would not have been positive definite. The message usually indicates that the objective function is not smooth at the current point.

fsolve

This table describes the headings specific tofsolve.

fsolve Heading Information Displayed

Directional derivative

Gradient of the function along the search direction

Lambda

λkvalue defined inLevenberg-Marquardt Method

Residual

Residual (sum of squares) of the function

Trust-region radius

Current trust-region radius (change in the norm of the trust-region radius)

intlinprog

This table describes the headings specific tointlinprog.

intlinprog Heading Information Displayed

nodes explored

Cumulative number of explored nodes

total time (s)

Time in seconds sinceintlinprogstarted

num int solution

Number of integer feasible points found

integer fval

Objective function value of the best integer feasible point found. This value is an upper bound for the final objective function value

relative gap (%)

100 ( b a ) | b | + 1 ,

where

  • bis the objective function value of the best integer feasible point.

  • ais the best lower bound on the objective function value.

Note

Although you specifyRelativeGapToleranceas a decimal number, the iterative display andoutput.relativegapreport the gap as a percentage, meaning 100 times the measured relative gap. If the exit message refers to the relative gap, this value is the measured relative gap, not a percentage.

linprog

This table describes the headings specific tolinprog. Each algorithm has its own iterative display.

linprog Heading Information Displayed

Primal Infeas A*x-borPrimal Infeas

Primal infeasibility, a measure of the constraint violations, which should be zero at a solution.

For definitions, seePredictor-Corrector('interior-point') orMain Algorithm('interior-point-legacy') orDual-Simplex Algorithm.

Dual Infeas A'*y+z-w-forDual Infeas

Dual infeasibility, a measure of the derivative of the Lagrangian, which should be zero at a solution.

For the definition of the Lagrangian, seePredictor-Corrector. For the definition of dual infeasibility, seePredictor-Corrector('interior-point') orMain Algorithm('interior-point-legacy') orDual-Simplex Algorithm.

Upper Bounds {x}+s-ub

Upper bound feasibility.{x}means thosexwith finite upper bounds. This value is theruresidual inInterior-Point-Legacy Linear Programming.

Duality Gap x'*z+s'*w

Duality gap (seeInterior-Point-Legacy Linear Programming) between the primal objective and the dual objective.sandwappear in this equation only if the problem has finite upper bounds.

Total Rel Error

Total relative error, described at the end ofMain Algorithm

Complementarity

A measure of the Lagrange multipliers times distance from the bounds, which should be zero at a solution. See thercvariable inStopping Conditions.

Time

Time in seconds thatlinprog已经运行

lsqlin

Thelsqlin'interior-point'iterative display is inherited from thequadprogiterative display. The relationship between these functions is explained inLinear Least Squares: Interior-Point or Active-Set. For iterative display details, seequadprog.

lsqnonlin and lsqcurvefit

This table describes the headings specific tolsqnonlinandlsqcurvefit.

lsqnonlin or lsqcurvefit Heading Information Displayed

Directional derivative

Gradient of the function along the search direction

Lambda

λkvalue defined inLevenberg-Marquardt Method

Resnorm

Value of the squared 2-norm of the residual atx

Residual

Residual vector of the function

quadprog

This table describes the headings specific toquadprog. Only the'interior-point-convex'algorithm has the iterative display.

quadprog Heading Information Displayed

Primal Infeas

Primal infeasibility, defined asmax( norm(Aeq*x - beq, inf), abs(min(0, min(A*x-b))) )

Dual Infeas

Dual infeasibility, defined asnorm(H*x + f - A*lambda_ineqlin - Aeq*lambda_eqlin, inf)

Complementarity

的最大绝对值的测量滞后range multipliers of inactive inequalities, which should be zero at a solution. This quantity isginInfeasibility Detection.