Hi, I tried to use fmincon but I received the message. How I can overcome this problem?
137 views (last 30 days)
" fmincon stopped because the size of the current step is less than the default value of the step size tolerance but constraints are not satisfied to within the default value of the constraint tolerance "
More Answers (2)
Mark Stone on 25 May 2015
Edited: Mark Stone on 25 May 2015
If you provide reproducible code, i.e., all input data, options, etc., perhaps someone can offer more concrete help.
As has been previously suggested, poor scaling may be at least part of your problem. But another possibility is that you are using incorrect derivatives (gradient of constraint and maybe objective function). Are you supplying gradients, or is it using numerical differentiation? Have you used the derivative check option (actually, I'm not sure that checks constraint gradient, though).
It may also be the case that you can succeed from a different starting point. In general, you may have better luck with tricky constraints if you use the active-set, or maybe better yet, SQP algorithm than the other algorithms.
Can you show the output using iter-detailed?