Here is a list of typical problems and recommendations for dealing with them.
The solution found by
There is no guarantee that you have a global minimum
unless your problem is continuous and has only one minimum. Starting
the optimization from a number of different starting points (or intervals
in the case of
Sometimes an optimization problem has values of
Modify your function to include a penalty function to
give a large positive value to
The minimization routine appears to enter an infinite
loop or returns a solution that is not a minimum (or not a zero in
the case of
Your objective function (
options = optimset('FunValCheck', 'on')
and call the optimization function with
Optimization problems may take many iterations to converge. Most optimization problems benefit from good starting guesses. Providing good starting guesses improves the execution efficiency and may help locate the global minimum instead of a local minimum.
Sophisticated problems are best solved by an evolutionary approach, whereby a problem with a smaller number of independent variables is solved first. Solutions from lower order problems can generally be used as starting points for higher order problems by using an appropriate mapping.
The use of simpler cost functions and less stringent termination criteria in the early stages of an optimization problem can also reduce computation time. Such an approach often produces superior results by avoiding local minima.