optimization based upon another optimization
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I'm trying to figure out if its possible to base one optimization upon another.
I have a function that I want to minimize and then another function that uses the first Results from the first function as an Input. Everything is supposed to use globalSearch and fmincon.
In a perfect world I would like to make this happen in one script and with one input vector. Is this possible at all? I looked around the Documentation for a while but didn't find what I was looking for. Has somebody a hint?
Best wishes,
Leon
0 件のコメント
回答 (1 件)
Matt J
2020 年 5 月 14 日
編集済み: Matt J
2020 年 5 月 14 日
You can write anything you want inside the code for your objective function, including other optimization processes. However, fmincon assumes that the objective function and constraints are differentiable. Generally speaking, the optimum point and value of an inner optimization process will often not vary differentiably with the unknown parameters. To be reliable, therefore, the outer optimization would have to use a solver that does not utilize derivatives. That could be fminsearch if you have a small number of unknowns ... otherwise ga or one of the other non-derivative based solvers in the Global Optimization Toolbox.
2 件のコメント
Matt J
2020 年 5 月 14 日
編集済み: Matt J
2020 年 5 月 14 日
I'm not seeing how that's different from what your original question describes. If the results of the first optimization are independent of the unknown variables in your second optimization, then you would simply use the result of the first optimization as a fixed parameter in the second optimization, using techniques discussed here:
参考
カテゴリ
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!