optimization based upon another optimization
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Matt J
il 14 Mag 2020
Modificato: Matt J
il 14 Mag 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 Commenti
Matt J
il 14 Mag 2020
Modificato: Matt J
il 14 Mag 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:
Vedere anche
Categorie
Scopri di più su Nonlinear Optimization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!