How am I getting higher values for my objective function from a global search based on fmincon than I did from fmincon alone?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Cathie Wells
el 23 de Nov. de 2021
Comentada: Cathie Wells
el 23 de Nov. de 2021
I am using fmincon to find a minimum for an optimal control problem involving 3 states and 2 controls. It is based on a 2 stage dynamical system which I integrate numerically using an RK4 method. The objective function is based on a calculation for fuel burn which is not analytical. The whole problem is in a non-dimensional form.
When I run the problem with fmincon, I get values out that are local minima. To check these further I decided to run the global search based on the same fmincon code. I assumed that I would always get a lower value for my objective function, or the same value as for the fmincon code. However, I seem to have some answers coming back with larger global search values. The code initialises with the same conditions, so reading the global search information, I would expect the first run to mirror the original fmincon run. However, this cannot be the case as I am seeing larger minima coming out of the global search. Of the 50 runs I have completed (each uses weather data from a different day to feed into the dynamical system being solved), 33 had no change to the minimum found using fmincon and 10 showed improvements, but in 7 cases the result was larger than before. Is there a reason for this that I am missing? I had to set the number of trial points to 100 and the number of stage one points to 50 to reduce run time, but i wouldn't expect that to be a problem as the initial run should not be affected. Any idea what is going on here please?
0 comentarios
Respuesta aceptada
Alan Weiss
el 23 de Nov. de 2021
This does seem strange. If you look at the algorithm description in How GlobalSearch and MultiStart Work, you see that GlobalSearch runs fmincon from the initial point x0 first. It accepts the resulting value when fmincon converges. So I wonder whether those 7 cases had fmincon not converge. To investigate, check the exit flag that fmincon gives from those 7 start points. Also, is it possible that you are running fmincon with different options inside GlobalSearch? Otherwise, I am stumped.
Alan Weiss
MATLAB mathematical toolbox documentation
4 comentarios
Alan Weiss
el 23 de Nov. de 2021
Certainly a difference in MATLAB versions can account for the difference in results. I will be interested to hear the result of your experiment on your laptop without using the university machine.
Alan Weiss
MATLAB mathematical toolbox documentation
Más respuestas (0)
Ver también
Categorías
Más información sobre Global or Multiple Starting Point Search en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!