# Confusion over use of fmincon for an optimisation problem

1 view (last 30 days)
Cathie Wells on 30 Nov 2021
Commented: Cathie Wells on 3 Dec 2021
I have two optimisation problems.
In the first, I have a set number of equal time steps.
There are three state variables, longitude, latitude and mass. I integrate a dynamical system forward involving these. The heading angle is a control variable. The objective function is based on fuel burn rate, so that the aim is to make a journey burning as little fuel as possible. The final destination is a circular target set as an inequality constraint.
Fmincon is used to minimise the objective function given the inequality constraint. I keep the speed constant throughout each trajectory. The initial headings are taken as a set of headings round the Great Circle Route.
In the second version, I do much the same, but this time the speed is used as a second control. Initially the speed is set to a single value.
For some reason, my result for the single control uses less fuel, than my result from the two control problem, by a long way. I would have expected having the two controls would mean that I got at least the same as with one control if not better. The speeds that work best for the single control are about 20m/s slower than the average of the speed vector for the two control solution. Looking at the trajectories, I can see that they all 'work' in that they arrive at the right place and take the right time. It is just that higher speeds make the fuel burn rate higher, so more fuel is used for faster trips.
Can anyone think of any reasons why I might be getting these results please?

Alan Weiss on 30 Nov 2021
There could be several reasons for your results, in addition to the hard-to-diagnose bugs and other programming errors.
One is that there are several local optima, and you are reaching just one. To find out if that is the case, start your two-control optimization from several initial values so that it samples alternate trajectories. For example, see what happens if you start the two-control optimization from near the one-control solution.
The other possibility is that your integrator might be introducing noise into the system as described in Optimizing a Simulation or Ordinary Differential Equation. In particular, you might need to set fmincon options to take larger-than-default steps.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
##### 2 CommentsShowHide 1 older comment
Cathie Wells on 3 Dec 2021
i'm still getting some very odd answers. It looks as if the optimisation using two controls just can't get to the minimum that the single control optimisation has found. Even if started with the same or very similar initial values, the two control method always goes to higher speeds. I even tried using the global optimisation toolbox, but it still gives higher fuel burn and homes in to the same solution that the two control standard fmincon finds.
I have played with various tolerances as suggested, but I still don't get to the result I would expect, having seen the single control results.
Any more ideas anyone?