How to store nonlcon value at solution using fmincon?
1 回表示 (過去 30 日間)
古いコメントを表示
Vinicius Belarmino Almeida
2021 年 8 月 4 日
コメント済み: Vinicius Belarmino Almeida
2021 年 8 月 4 日
Hi everyone,
Pretty much the question on the title. I am using fmincon to solve an optmization problem with several non linear constraints. I would like to know which constraint was active at the solution point, and its value if possible.
I know it's possible to use OutputFcn to call a function in each iteration, but I would prefer not to, as I only want the value at the solution point.
Many thanks,
Vinicius Almeida.
0 件のコメント
採用された回答
Walter Roberson
2021 年 8 月 4 日
編集済み: Walter Roberson
2021 年 8 月 4 日
fmincon() is permitted to evaluate at locations without passing that exact location through the nonlinear constraints before or after the evaluation. Therefore recording the results of the nonlinear constraint is not certain to give you the correct answer.
Instead, after you are given the location at the end, pass the location into the nonlinear constraint function yourself, and look at the results.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with Optimization Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!