Main Content

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 field to 'iter' or 'iter-detailed' with optimoptions. For more information, see Iterative Display.

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     1275      -1.032                                 -0.2155            1    Stage 1 Local
     300     1377      -1.032         248.7      -0.2137                              Stage 2 Search
     400     1477      -1.032           278        1.134                              Stage 2 Search
     446     1561      -1.032           1.6        2.073      -0.2155            1    Stage 2 Local
     500     1615      -1.032         9.055       0.3214                              Stage 2 Search
     600     1715      -1.032       -0.7299      -0.7686                              Stage 2 Search
     700     1815      -1.032        0.3191      -0.7431                              Stage 2 Search
     800     1915      -1.032         296.4       0.4577                              Stage 2 Search
     900     2015      -1.032         10.68       0.5116                              Stage 2 Search
    1000     2115      -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   -1.980435e-02    0.000e+00    1.996e+00
    1       9   -6.970985e-02    0.000e+00    3.140e+00    2.533e-01
    2      13   -8.662720e-02    0.000e+00    2.775e+00    1.229e-01
    3      18   -1.176972e-01    0.000e+00    1.629e+00    1.811e-01
    4      21   -2.132377e-01    0.000e+00    2.097e-01    8.636e-02
    5      24   -2.153982e-01    0.000e+00    7.701e-02    1.504e-02
    6      27   -2.154521e-01    0.000e+00    1.547e-02    1.734e-03
    7      30   -2.154637e-01    0.000e+00    1.222e-03    1.039e-03
    8      33   -2.154638e-01    0.000e+00    1.543e-04    8.413e-05
    9      36   -2.154638e-01    0.000e+00    1.543e-06    6.610e-06
   10      39   -2.154638e-01    0.000e+00    1.686e-07    7.751e-08

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.

                                            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.

Related Topics