fmincon minimum number of iterations
55 ビュー (過去 30 日間)
古いコメントを表示
Are there any way to set minimum number of iterations in fmincon.
I don't want to stop algorithm when
options.OptimalityTolerance = 0,
options.ConstraintTolerance = 0, and
options.StepTolerance = 0.
I want fmincon to stop at the desired iterations for comparing with other algorithms.
2 件のコメント
採用された回答
Ameer Hamza
2020 年 4 月 5 日
This shows how you can force fmincon to keep searching until a fixed number of iterations is reached. It uses a simple objective function, but fmincon still run to 1000 iterations.
opts = optimoptions('fmincon', ...
'OptimalityTolerance', 0, ...
'StepTolerance', 0, ...
'MaxFunctionEvaluations', inf,...
'MaxIterations', 1000);
[X,f,~,out] = fmincon(@(x) x.^2, 1, [], [], [], [], [], [], [], opts);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!