When solving the global optimal solution with MATLAB fmincon function, is it to find several local optimal solutions and then compare them to choose the optimal solution?
조회 수: 4 (최근 30일)
이전 댓글 표시
When solving the global optimal solution with MATLAB fmincon function, is it to find several local optimal solutions and then compare them to choose the optimal solution?
댓글 수: 0
채택된 답변
Walter Roberson
2022년 3월 15일
fmincon() does not do that automatically. fmincon() stops at the first local minima it finds that satisfies the constraints -- but the process of determining whether it is a local minima involves probing other locations to see if it can find an improvement.
If you need to have several local minima compared automatically then you would use the Global Optimization Toolbox, probably using multistart() or similar.
댓글 수: 3
Walter Roberson
2022년 3월 15일
Yes, that code would automatically generate multiple starting points and would compare the results to select the best of them.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!