fmincon does not converge to the best solution?

13 visualizaciones (últimos 30 días)
Lu Huang
Lu Huang el 10 de Ag. de 2020
Respondida: Walter Roberson el 10 de Ag. de 2020
I have a question about fmincon. My optimization project is a 2-D problem.
I saved all the temporary function calls, and many temporary object values are better than the final solution, where all of these better variables are within the boundary.
The exitflag is 2. I have no idea why the final solution is not the best overall the function calls.
The setting for the 'options' are
options.FiniteDifferenceStepSize =1e-6;
options.FinDiffRelStep=1e-6;
Thank you so much.

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de Ag. de 2020
fmincon can return a value that is worse than the initial point in some cases, especially if you are using interior-point. It was suggested to me that sqp is better in this regards.
Mathworks sent me further explanation:
'fmincon' basically tries to "prove a point is optimal" by reducing the "first-order optimality" measure below the OptimalityTolerance option (default is 1e-6). This number is shown in the 5th column. 'fmincon' by-default uses 'interior-point' algorithm and the 'interior-point' algorithm does behave unexpectedly. The problem is poorly scaled bounds which causes it to move away from the current point.
Another point to note is that barrier function may get away from initial solution if it is near boundary (in this case it may appear to be near the boundary due to the scale of bounds). The details are a bit involved which are given in the below link:
For now, we can increase the OptimalityTolerance options (to say 1e-3 or higher) to reduce this effect. However, we must remember that the value of OptimalityTolerance is the measure of "certificate of local optimality".

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by