optimization based upon another optimization

1 次查看(过去 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

回答(1 个)

Matt J
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 个评论
Leon Stolp
Leon Stolp 2020-5-14
That makes sense to me. So it would propably be a better idea to assign the results from the first optimization to new variables and use them as input for the second one?
Matt J
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 CenterFile Exchange 中查找有关 Nonlinear Optimization 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by