Hi, I tried to use fmincon but I received the message. How I can overcome this problem?

조회 수: 144 (최근 30일)
" 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 "

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 24일

추가 답변 (2개)

Mark Stone
Mark Stone 2015년 5월 25일
편집: Mark Stone 2015년 5월 25일
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?
  댓글 수: 1
Muna Shehan
Muna Shehan 2015년 6월 28일
편집: Walter Roberson 2015년 6월 28일
Hi, I had downloaded a code from File exchange http://www.mathworks.com/matlabcentral/fileexchange/40504, and it had been executed efficiently first time. When I tried to re-execute it again, I faced an error message:
Local minimum possible. Constraints satisfied.
fmincon stopped because the size of the current step is less than the default value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance.
I am not sure how I can show you the result file, so I'll be thankful if you sent your email to attache the result file in order review the error message.
Best Regards

댓글을 달려면 로그인하십시오.


Muna Shehan
Muna Shehan 2015년 5월 25일
Thanks for your response. If the function suffers from numeric round-off can avoid this problem.
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 5월 25일
Note that when you recenter and rescale that you will need to adjust your constraints and you may need to adjust your function.
There are a lot of cases that recentering and rescaling will not fix, and a different approach is needed.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by