How am I getting higher values for my objective function from a global search based on fmincon than I did from fmincon alone?

3 views (last 30 days)
Cathie Wells
Cathie Wells on 23 Nov 2021
Commented: Cathie Wells on 23 Nov 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?

Accepted Answer

Alan Weiss
Alan Weiss on 23 Nov 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
Cathie Wells
Cathie Wells on 23 Nov 2021
This does seem to be the answer. The values are the same or less. I hadn't realised the versions would make a difference.
Thanks for your help.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!