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?