3

I am trying to find a minimum using fmincon in MATLAB, and I am facing a following problem:

Optimization completed because the size of the gradient at the initial point is less than the default value of the function tolerance.

My objective function's surface shows "steps", and therefore it has the same values over certain ranges of input variables (the size of the gradient is zero, if I am correct):

enter image description here

When moving from the initial point, the solver doesn't see any changes in the objective function's value, and finishes the optimization:

Iteration  Func-count       f(x)        Step-size       optimality

0           3          581.542                             0

Initial point is a local minimum.

Optimization completed because the size of the gradient at the initial point 
is less than the default value of the function tolerance.

Is there any way make the solver move forward when the objective function keeps its value unchanged (until the objective function starts to increase)?

Thanks for your help.

3
  • 2
    Probably you would get reasonable results with a non-gradient based solver, e.g. ga, if the evaluation of the objective function is not costly. how to choose solver Commented Nov 13, 2014 at 11:45
  • 3
    Thank you, guys. I followed your advice and used ga - the problem has gone! I also have studied your reference how to choose solver, and I realized, that I shouldn't use fmincon because my objective function is not smooth. Commented Nov 13, 2014 at 12:27
  • Great! I am glad I was able to help. Commented Nov 13, 2014 at 12:34

2 Answers 2

2

I post my extended comment as an answer in the hope that it will be easier for future answer seekers to find the solution:

Probably you would get reasonable results with a non-gradient based solver, e.g. ga, if the evaluation of the objective function is not costly. These are not dependent on the gradient and performing well on non-smooth functions. It is also worth to read the following guide before selecting solver algorithm: How to choose solver.

Sign up to request clarification or add additional context in comments.

Comments

-1

The answer is right there :

Initial point is a local minimum.

The point you are giving as the initial point is already a local minimum. So the algorithm finds that minimum and sticks there. In order to find other local minimum or maybe the global one, change the initial points to something else far from the local minimum. In order to find the global minimum use a global optimization technique.

2 Comments

Thanks for your help, however I can see the from the surface plot that the initial point is not local minimum (I used [0,0] as an initial point - I should have written it whendescribing my problem). Like Arpi wrote, it seems that I have to use another solver, as my objective function is non-smooth: it keeps the same value near the initial point (almost any point) (and the solver stucks there), and then changes its value like a Heaviside step function.
yes, GA (Genetic Algorithm) is a global optimization technique.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.