The objective function is increased rather than decreased when fmincon is used

2 views (last 30 days)
Dear all, I used fmincon to solve an optimization problem. Interior-point algorithm was used with TolFun=-4. The question is: Is the results below reasonable (because the objective function is increased rather than decreased), and is TolFun=-4 an acceptable value to find the minimum objective? Thanks for all in advance
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 1 1.267119e+002 8.249e+000 7.573e+002
1 2 9.455037e+001 6.315e+000 3.974e+003 2.653e+001
2 3 8.079296e+001 5.386e+000 6.179e+003 1.298e+001
3 4 5.834199e+001 3.707e+000 1.178e+004 2.289e+001
4 5 5.356883e+001 3.329e+000 1.292e+004 4.986e+000
5 6 4.863383e+001 2.918e+000 1.421e+004 5.409e+000
6 7 2.315582e+001 2.419e-001 2.146e+004 3.541e+001
7 8 1.922367e+001 5.531e-002 2.510e+004 7.018e+000
8 9 1.652829e+001 8.892e-004 2.683e+004 4.761e+000
9 10 1.616538e+001 7.628e-003 2.993e+004 2.088e+000
10 12 1.574222e+001 3.441e-003 3.491e+004 2.900e+000
11 16 1.557995e+001 1.141e-002 3.871e+004 2.239e+000
12 20 1.551844e+001 2.017e-002 4.293e+004 2.490e+000
13 24 1.557486e+001 3.004e-002 4.752e+004 2.789e+000
14 28 1.573355e+001 3.907e-002 5.202e+004 2.950e+000
15 32 1.597043e+001 4.763e-002 5.613e+004 3.059e+000
16 36 1.624597e+001 5.369e-002 5.952e+004 3.035e+000
17 40 1.653425e+001 5.491e-002 6.202e+004 2.925e+000
18 44 1.680591e+001 5.332e-002 6.360e+004 2.691e+000
19 46 1.623598e+001 6.386e-002 6.254e+004 4.629e+000
20 47 1.731452e+001 2.031e-002 6.420e+004 3.053e+000
21 48 1.743835e+001 1.663e-002 6.411e+004 1.504e+000
22 49 1.753599e+001 2.050e-002 6.349e+004 3.083e+000
23 53 1.754284e+001 2.141e-002 6.300e+004 1.890e+000
24 58 1.755710e+001 2.295e-002 6.248e+004 1.577e+000
25 62 1.764624e+001 2.902e-002 6.145e+004 2.612e+000
26 64 1.730761e+001 2.459e-002 5.757e+004 6.899e+000
27 65 1.725259e+001 1.371e-002 5.634e+004 9.723e-001
28 67 1.739285e+001 1.757e-002 5.439e+004 3.704e+000
29 68 1.709089e+001 1.630e-003 5.361e+004 1.107e+000
30 70 1.689795e+001 3.910e-003 5.214e+004 2.514e+000
First-order Norm of
Iter F-count f(x) Feasibility optimality step
31 72 1.673228e+001 5.134e-003 1.391e+004 2.509e+000
32 74 1.663905e+001 5.796e-003 2.161e+004 2.714e+000
33 76 1.669077e+001 4.075e-003 1.947e+004 2.208e+000
34 78 1.686107e+001 3.313e-003 1.709e+004 2.066e+000
35 80 1.711979e+001 3.118e-003 1.637e+004 1.830e+000
36 82 1.745226e+001 2.712e-003 1.357e+004 1.657e+000
37 84 1.780765e+001 1.861e-003 1.186e+004 1.408e+000
38 86 1.811605e+001 8.373e-004 1.103e+004 1.085e+000
39 88 1.833220e+001 2.629e-004 1.164e+004 7.627e-001
40 90 1.847421e+001 9.214e-005 1.640e+004 5.617e-001
41 92 1.858397e+001 6.522e-005 1.938e+004 5.205e-001
42 94 1.868685e+001 9.598e-005 1.227e+004 5.935e-001
43 96 1.879185e+001 1.758e-004 1.066e+004 7.100e-001
44 98 1.889754e+001 2.661e-004 1.074e+004 7.827e-001
45 100 1.900088e+001 2.984e-004 1.766e+004 7.824e-001
46 102 1.910188e+001 2.788e-004 2.294e+004 7.395e-001
47 104 1.920181e+001 2.373e-004 1.605e+004 6.773e-001
48 106 1.930109e+001 1.881e-004 9.666e+003 6.062e-001
49 108 1.939901e+001 1.452e-004 3.851e+003 5.345e-001
50 110 1.949428e+001 1.115e-004 1.397e+003 4.681e-001
51 112 1.958544e+001 8.493e-005 6.107e+003 4.092e-001
52 114 1.967122e+001 6.331e-005 1.033e+004 3.580e-001
53 116 1.975091e+001 4.592e-005 1.411e+004 3.150e-001
54 118 1.982469e+001 3.284e-005 1.755e+004 2.809e-001
55 120 1.989361e+001 2.432e-005 2.073e+004 2.564e-001
56 122 1.995917e+001 1.897e-005 2.377e+004 2.409e-001
57 124 2.002281e+001 1.594e-005 2.675e+004 2.324e-001
58 126 2.008554e+001 1.441e-005 2.973e+004 2.279e-001
59 128 2.014770e+001 1.363e-005 3.271e+004 2.242e-001
60 130 2.020914e+001 1.304e-005 3.567e+004 2.193e-001
First-order Norm of
Iter F-count f(x) Feasibility optimality step
61 132 2.026951e+001 1.230e-005 3.859e+004 2.127e-001
62 134 2.032859e+001 1.133e-005 4.146e+004 2.054e-001
63 136 2.038643e+001 1.025e-005 4.426e+004 1.985e-001
64 138 2.044324e+001 9.177e-006 4.703e+004 1.929e-001
65 140 2.049919e+001 8.202e-006 4.977e+004 1.883e-001
66 142 2.055409e+001 7.328e-006 5.247e+004 1.834e-001
67 144 2.060718e+001 6.505e-006 5.511e+004 1.762e-001
68 146 2.065701e+001 5.662e-006 5.761e+004 1.645e-001
69 148 2.070174e+001 4.755e-006 5.988e+004 1.472e-001
70 150 2.073966e+001 3.779e-006 6.181e+004 1.249e-001
71 152 2.076983e+001 2.780e-006 6.338e+004 9.997e-002
72 156 2.077587e+001 1.556e-006 6.369e+004 2.011e-002
73 166 2.077452e+001 1.139e-007 4.386e+000 3.843e-004
74 172 2.077322e+001 1.484e-009 4.614e-002 2.886e-003
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 are satisfied to within the default value of the constraint tolerance.

Accepted Answer

Torsten
Torsten on 8 Jul 2015
You must not only look at the "f(x)"-column, but also at the "feasibility" column.
What is a "solution" good for if it is not feasible ?
Best wishes
Torsten.
  1 Comment
Muna Shehan
Muna Shehan on 8 Jul 2015
Edited: Walter Roberson on 6 Jun 2017
Thanks for your response, I understand your explanation, but when I tried to increase TolFun=-5, I get different exitflag (2) and different message and the results is shown below. Can you suggest any thing to increase the possibility to change the exit message from (Local minimum possible. Constraints satisfied minimum ) to (Local minimum found that satisfies the constraints.)
>> addpath(fullfile(pwd, 'solver'))
Direct Transcription
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 1 1.267119e+002 8.249e+000 7.573e+002
1 2 9.455037e+001 6.315e+000 3.974e+003 2.653e+001
2 3 8.079296e+001 5.386e+000 6.179e+003 1.298e+001
3 4 5.834199e+001 3.707e+000 1.178e+004 2.289e+001
4 5 5.356883e+001 3.329e+000 1.292e+004 4.986e+000
5 6 4.863383e+001 2.918e+000 1.421e+004 5.409e+000
6 7 2.315582e+001 2.419e-001 2.146e+004 3.541e+001
7 8 1.922367e+001 5.531e-002 2.510e+004 7.018e+000
8 9 1.652829e+001 8.892e-004 2.683e+004 4.761e+000
9 10 1.616538e+001 7.628e-003 2.993e+004 2.088e+000
10 12 1.574222e+001 3.441e-003 3.491e+004 2.900e+000
11 16 1.557995e+001 1.141e-002 3.871e+004 2.239e+000
12 20 1.551844e+001 2.017e-002 4.293e+004 2.490e+000
13 24 1.557486e+001 3.004e-002 4.752e+004 2.789e+000
14 28 1.573355e+001 3.907e-002 5.202e+004 2.950e+000
15 32 1.597043e+001 4.763e-002 5.613e+004 3.059e+000
16 36 1.624597e+001 5.369e-002 5.952e+004 3.035e+000
17 40 1.653425e+001 5.491e-002 6.202e+004 2.925e+000
18 44 1.680591e+001 5.332e-002 6.360e+004 2.691e+000
19 46 1.623598e+001 6.386e-002 6.254e+004 4.629e+000
20 47 1.731452e+001 2.031e-002 6.420e+004 3.053e+000
21 48 1.743835e+001 1.663e-002 6.411e+004 1.504e+000
22 49 1.753599e+001 2.050e-002 6.349e+004 3.083e+000
23 53 1.754284e+001 2.141e-002 6.300e+004 1.890e+000
24 58 1.755710e+001 2.295e-002 6.248e+004 1.577e+000
25 62 1.764624e+001 2.902e-002 6.145e+004 2.612e+000
26 64 1.730761e+001 2.459e-002 5.757e+004 6.899e+000
27 65 1.725259e+001 1.371e-002 5.634e+004 9.723e-001
28 67 1.739285e+001 1.757e-002 5.439e+004 3.704e+000
29 68 1.709089e+001 1.630e-003 5.361e+004 1.107e+000
30 70 1.689795e+001 3.910e-003 5.214e+004 2.514e+000
First-order Norm of
Iter F-count f(x) Feasibility optimality step
31 72 1.673228e+001 5.134e-003 1.391e+004 2.509e+000
32 74 1.663905e+001 5.796e-003 2.161e+004 2.714e+000
33 76 1.669077e+001 4.075e-003 1.947e+004 2.208e+000
34 78 1.686107e+001 3.313e-003 1.709e+004 2.066e+000
35 80 1.711979e+001 3.118e-003 1.637e+004 1.830e+000
36 82 1.745226e+001 2.712e-003 1.357e+004 1.657e+000
37 84 1.780765e+001 1.861e-003 1.186e+004 1.408e+000
38 86 1.811605e+001 8.373e-004 1.103e+004 1.085e+000
39 88 1.833220e+001 2.629e-004 1.164e+004 7.627e-001
40 90 1.847421e+001 9.214e-005 1.640e+004 5.617e-001
41 92 1.858397e+001 6.522e-005 1.938e+004 5.205e-001
42 94 1.868685e+001 9.598e-005 1.227e+004 5.935e-001
43 96 1.879185e+001 1.758e-004 1.066e+004 7.100e-001
44 98 1.889754e+001 2.661e-004 1.074e+004 7.827e-001
45 100 1.900088e+001 2.984e-004 1.766e+004 7.824e-001
46 102 1.910188e+001 2.788e-004 2.294e+004 7.395e-001
47 104 1.920181e+001 2.373e-004 1.605e+004 6.773e-001
48 106 1.930109e+001 1.881e-004 9.666e+003 6.062e-001
49 108 1.939901e+001 1.452e-004 3.851e+003 5.345e-001
50 110 1.949428e+001 1.115e-004 1.397e+003 4.681e-001
51 112 1.958544e+001 8.493e-005 6.107e+003 4.092e-001
52 114 1.967122e+001 6.331e-005 1.033e+004 3.580e-001
53 116 1.975091e+001 4.592e-005 1.411e+004 3.150e-001
54 118 1.982469e+001 3.284e-005 1.755e+004 2.809e-001
55 120 1.989361e+001 2.432e-005 2.073e+004 2.564e-001
56 122 1.995917e+001 1.897e-005 2.377e+004 2.409e-001
57 124 2.002281e+001 1.594e-005 2.675e+004 2.324e-001
58 126 2.008554e+001 1.441e-005 2.973e+004 2.279e-001
59 128 2.014770e+001 1.363e-005 3.271e+004 2.242e-001
60 130 2.020914e+001 1.304e-005 3.567e+004 2.193e-001
First-order Norm of
Iter F-count f(x) Feasibility optimality step
61 132 2.026951e+001 1.230e-005 3.859e+004 2.127e-001
62 134 2.032859e+001 1.133e-005 4.146e+004 2.054e-001
63 136 2.038643e+001 1.025e-005 4.426e+004 1.985e-001
64 138 2.044324e+001 9.177e-006 4.703e+004 1.929e-001
65 140 2.049919e+001 8.202e-006 4.977e+004 1.883e-001
66 142 2.055409e+001 7.328e-006 5.247e+004 1.834e-001
67 144 2.060718e+001 6.505e-006 5.511e+004 1.762e-001
68 146 2.065701e+001 5.662e-006 5.761e+004 1.645e-001
69 148 2.070174e+001 4.755e-006 5.988e+004 1.472e-001
70 150 2.073966e+001 3.779e-006 6.181e+004 1.249e-001
71 152 2.076983e+001 2.780e-006 6.338e+004 9.997e-002
72 156 2.077587e+001 1.556e-006 6.369e+004 2.011e-002
73 166 2.077452e+001 1.139e-007 4.386e+000 3.843e-004
74 172 2.077322e+001 1.484e-009 4.614e-002 2.886e-003
75 196 2.077322e+001 1.101e-009 4.614e-002 2.385e-005
76 203 2.077322e+001 5.689e-010 4.614e-002 7.720e-006
77 210 2.077322e+001 2.857e-010 4.614e-002 3.854e-006
78 217 2.077322e+001 1.428e-010 4.614e-002 1.926e-006
79 224 2.077322e+001 7.141e-011 4.614e-002 9.630e-007
80 231 2.077322e+001 3.571e-011 4.614e-002 4.815e-007
81 238 2.077322e+001 1.785e-011 4.614e-002 2.407e-007
82 245 2.077322e+001 8.925e-012 4.614e-002 1.204e-007
83 252 2.077322e+001 4.463e-012 4.614e-002 6.018e-008
84 259 2.077322e+001 2.232e-012 4.614e-002 3.009e-008
85 266 2.077322e+001 1.116e-012 4.614e-002 1.505e-008
86 273 2.077322e+001 5.585e-013 4.614e-002 7.523e-009
87 280 2.077322e+001 2.786e-013 4.614e-002 3.761e-009
Local minimum possible. Constraints satisfied.
fmincon stopped because the size of the current step is less than
the default value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
, please.
BestRegards

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!