Should I treat this as a single or multiobjective optimization?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Felipe Toledo
el 19 de Mzo. de 2017
Comentada: Alan Weiss
el 30 de Mzo. de 2017
Hi!
I'm trying to solve a nonlinear programming problem in which I have to minimize functions k1 and k2. However, even though they are different functions, the values of k1 and k2 MUST be equal at the end.
I'm not quite sure on the best approach to solve this. Some options I've thought of:
Single objective:
- Consider both "k1" and "k2" as "k" and minimize "(k1 + k2)/2" = "2k/2" = k
or
- Consider both "k1" and "k2" as "k" and minimize "sqrt(k1*k2)" = sqrt(kˆ2) = k
or
Multiobjective:
- Minimize k1 AND k2. (maybe using generic algorithm?)
In this last case, it's not clear to me how I would set k1=k2. I thought I could maybe write this as constraint but I just don't know how, since k1 and k2 are not variables.
I'm new to MATLAB so if anyone could help me with this I'd really appreciate that!
Thanks
3 comentarios
Walter Roberson
el 19 de Mzo. de 2017
That would be the final value, but your starting points together with any constraints might potentially involve evaluating at points that are going to turn out to be outside that range, unless you know that is not possible with your nonlinear function under your constraints?
Respuesta aceptada
Alan Weiss
el 19 de Mzo. de 2017
Editada: Alan Weiss
el 19 de Mzo. de 2017
gamultiobj can solve a multiobjective function with nonlinear constraints since R2014b. Your nonlinear constraint is that k1 = k2. Make sure you write this constraint in the ceq form, and that c = []:
function [c,ceq] = nonlcon(x)
c = [];
% Calculate k1 and k2 here
ceq = k1 - k2;
Of course, you could just as well use fmincon to solve an optimization for k1 and have the nonlinear constraint be the same as the above, k1 = k2. In fact, that is likely to be faster and more reliable.
Alan Weiss
MATLAB mathematical toolbox documentation
2 comentarios
Alan Weiss
el 30 de Mzo. de 2017
For help, please show your call to gamultiobj and show your constraints, including any bounds.
Alan Weiss
MATLAB mathematical toolbox documentation
Más respuestas (0)
Ver también
Categorías
Más información sobre Multiobjective Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!