Inconsistent data in fmincon output structure

I'm using FMINCON to solve a constrained optimization problem. When I examine the output structure generated by FMINCON, I get inconsistent results for the first-order optimality measure.
For example, when I look in output.message, I see
'Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the optimality tolerance,
and constraints are satisfied to within the default value of the constraint tolerance.
Stopping criteria details:
Optimization completed: The relative first-order optimality measure, 9.417002e-07,
is less than options.OptimalityTolerance = 1.000000e-06, and the relative maximum constraint
violation, 1.110223e-16, is less than options.ConstraintTolerance = 1.000000e-06.
Optimization Metric Options
relative first-order optimality = 9.42e-07 OptimalityTolerance = 1e-06 (default)
relative max(constraint violation) = 1.11e-16 ConstraintTolerance = 1e-06 (default)'
This indicates a first-order optimality measure of 9.47e-07. However, if I look at output.firstorderopt, I see
>> out.firstorderopt
ans =
8.7505e-06
Does anyone have any idea what's going on? The code that generates this is a little complicated to summarise here, but I can upload it somewhere if someone would like to take a closer look.

 Réponse acceptée

Alan Weiss
Alan Weiss le 28 Août 2018

2 votes

The key word is "relative." The relative first-order optimality measure is (usually) the ratio of the final to the initial measure. So the initial first-order optimality measure was probably around 10.
Alan Weiss
MATLAB mathematical toolbox documentation

1 commentaire

Carlo Cabrera
Carlo Cabrera le 28 Août 2018
That certainly explains things. My relative first-order optimality measure consistently differs from the actual one by a factor of 10 for identical initial starting values.
I was under the mistaken impression that the firstorderopt field was also a relative measure, since I had run fmincon on a simpler problem and found that the measure reported in the message field matched the one reported in the firstorderopt field.
Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by