Documentation Center

  • Trial Software
  • Product Updates

Iterative Display

Types of Iterative Display

Iterative display gives you information about the progress of solvers during their runs.

There are two types of iterative display:

  • Global solver display

  • Local solver display

Both types appear at the command line, depending on global and local options.

Obtain local solver iterative display by setting the Display option in the problem.options structure to 'iter' or 'iter-detailed' with optimoptions. For more information, see Iterative Display in the Optimization Toolbox™ documentation.

Obtain global solver iterative display by setting the Display property in the GlobalSearch or MultiStart object to 'iter'.

Global solvers set the default Display option of the local solver to 'off', unless the problem structure has a value for this option. Global solvers do not override any setting you make for local options.

    Note:   Setting the local solver Display option to anything other than 'off' can produce a great deal of output. The default Display option created by optimoptions(@solver) is 'final'.

Examine Types of Iterative Display

Run the example described in Run the Solver using GlobalSearch with GlobalSearch iterative display:

% % Set the random stream to get exactly the same output
% rng(14,'twister')
gs = GlobalSearch('Display','iter');
opts = optimoptions(@fmincon,'Algorithm','interior-point');
sixmin = @(x)(4*x(1)^2 - 2.1*x(1)^4 + x(1)^6/3 ...
    + x(1)*x(2) - 4*x(2)^2 + 4*x(2)^4);
problem = createOptimProblem('fmincon','x0',[-1,2],...
    'objective',sixmin,'lb',[-3,-3],'ub',[3,3],...
    'options',opts);
[xming,fming,flagg,outptg,manyminsg] = run(gs,problem);

 Num Pts                 Best       Current    Threshold        Local        Local                 
Analyzed  F-count        f(x)       Penalty      Penalty         f(x)     exitflag        Procedure
       0       34      -1.032                                  -1.032            1    Initial Point
     200     1291      -1.032                                 -0.2155            1    Stage 1 Local
     300     1393      -1.032         248.7      -0.2137                              Stage 2 Search
     400     1493      -1.032           278        1.134                              Stage 2 Search
     446     1577      -1.032           1.6        2.073      -0.2155            1    Stage 2 Local
     500     1631      -1.032         9.055       0.3214                              Stage 2 Search
     600     1731      -1.032       -0.7299      -0.7686                              Stage 2 Search
     700     1831      -1.032        0.3191      -0.7431                              Stage 2 Search
     800     1931      -1.032         296.4       0.4577                              Stage 2 Search
     900     2031      -1.032         10.68       0.5116                              Stage 2 Search
    1000     2131      -1.032       -0.9207      -0.9254                              Stage 2 Search

GlobalSearch stopped because it analyzed all the trial points.

All 3 local solver runs converged with a positive local solver exit flag.

Run the same example without GlobalSearch iterative display, but with fmincon iterative display:

gs.Display = 'final';
problem.options.Display = 'iter';
[xming,fming,flagg,outptg,manyminsg] = run(gs,problem);

                                            First-order      Norm of
 Iter F-count            f(x)  Feasibility   optimality         step
    0       3   4.823333e+001   0.000e+000   1.088e+002
    1       7   2.020476e+000   0.000e+000   2.176e+000   2.488e+000
    2      10   6.525252e-001   0.000e+000   1.937e+000   1.886e+000
    3      13  -8.776121e-001   0.000e+000   9.076e-001   8.539e-001
    4      16  -9.121907e-001   0.000e+000   9.076e-001   1.655e-001
    5      19  -1.009367e+000   0.000e+000   7.326e-001   8.558e-002
    6      22  -1.030423e+000   0.000e+000   2.172e-001   6.670e-002
    7      25  -1.031578e+000   0.000e+000   4.278e-002   1.444e-002
    8      28  -1.031628e+000   0.000e+000   8.777e-003   2.306e-003
    9      31  -1.031628e+000   0.000e+000   8.845e-005   2.750e-004
   10      34  -1.031628e+000   0.000e+000   8.744e-007   1.354e-006

Local minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in 
feasible directions, to within the selected value of the function tolerance,
and constraints were satisfied to within the selected value of the constraint tolerance.

<stopping criteria details>
                                            First-order      Norm of
 Iter F-count            f(x)  Feasibility   optimality         step
    0       3   -1.980435e-02    0.000e+00    1.996e+00

... MANY ITERATIONS DELETED ...

    8      33   -1.031628e+00    0.000e+00    8.742e-07    2.287e-07

Local minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in 
feasible directions, to within the selected value of the function tolerance,
and constraints were satisfied to within the selected value of the constraint tolerance.

<stopping criteria details>

GlobalSearch stopped because it analyzed all the trial points.

All 4 local solver runs converged with a positive local solver exit flag.

Setting GlobalSearch iterative display, as well as fmincon iterative display, yields both displays intermingled.

For an example of iterative display in a parallel environment, see Parallel MultiStart.

Was this topic helpful?