필터 지우기
필터 지우기

Why does my optimization stop after the first iteration?

조회 수: 4 (최근 30일)
Rosi Marungu
Rosi Marungu 2016년 1월 25일
편집: Matt J 2016년 1월 26일
I do not know much about numerical optimization. My question is, what are possible reasons for fmincon to stop after 0 iterations. Here are the clues:
  • I do not provide a gradient or hessian.
  • It stops because:"size of the current step is less thanthe default value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance"
  • feasibility is 0.0000,First-order optimality is 1.206e+09
  • Using patternsearch works and it finds the optimum
Another question: I suspect, that patternsearch is much slower than fmincon when the number of arguments increases, right?
Thank you for your time.
  댓글 수: 3
Rosi Marungu
Rosi Marungu 2016년 1월 25일
Thank you for your answer. Some follow up questions: Isn't it odd that it stops even though First-order optimality is 1.206e+09? This should be a number as small as possible, right? So shouldn't there be a threshold above which the solver cannot declare to have found a solution?
Does that give a clue about what the function looks like at that point?
Thank you very much.
Matt J
Matt J 2016년 1월 26일
편집: Matt J 2016년 1월 26일
This should be a number as small as possible, right?
First order optimality isn't the only criterion that can trigger a stop. Also, to be considered small, a value for the first-order optimality measure need only be small relative to typical magnitudes of the function's derivative. Try this simple problem, for instance,
[x,fval,ef,out]=fmincon(@(x) 1e18*x^2,.5,[],[],[],[],0,1)
You will see that out.firstorderopt is ~1e9.
Bottom line -- we really need to see your code.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by