Should I treat this as a single or multiobjective optimization?

2 visualizaciones (últimos 30 días)
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
Felipe Toledo
Felipe Toledo el 19 de Mzo. de 2017
No, the final value has to be 0 <= k <= 1
Walter Roberson
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?

Iniciar sesión para comentar.

Respuesta aceptada

Alan Weiss
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
Felipe Toledo
Felipe Toledo el 30 de Mzo. de 2017
Sorry for the very late reply Alan and Walter! And thanks a lot, it did worked!!! :)
Now I have another question though, I'm trying to solve this same problem but now k1 and k2 CAN be different and all the other constraints are EXACTLY the same.
I'm trying to use gamultiobj (minimize k1 AND k2) for this but for some reason I get the exit flag -2 (no feasible point found). I don't understand why since the other constraints are exactly the same. Is the gamultiobj used only when both objective functions are nonlinear? In my case, one of the objectives is linear and the other one is nonlinear.
Any thoughts on this?
Alan Weiss
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

Iniciar sesión para comentar.

Más respuestas (0)

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!

Translated by