optimization based upon another optimization

2 vues (au cours des 30 derniers jours)
Leon Stolp
Leon Stolp le 14 Mai 2020
Modifié(e) : Matt J le 14 Mai 2020
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

Réponses (1)

Matt J
Matt J le 14 Mai 2020
Modifié(e) : Matt J le 14 Mai 2020
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 commentaires
Leon Stolp
Leon Stolp le 14 Mai 2020
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 le 14 Mai 2020
Modifié(e) : Matt J le 14 Mai 2020
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:

Connectez-vous pour commenter.

Catégories

En savoir plus sur Nonlinear Optimization dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by