I am trying to optimize two functions and where. The function is a subfunction of means the results of are input to .
I am curious whether it is better to optimize a sum of the functions e.g. or I can co-optimize the functions as additionally depends on w. I am inclined to co-optimization but not sure if optimizing the sum of functions is a better or mandatory approach for this problem. I would appreciate any guidance, comments or helpful literature references.

댓글 수: 5

Walter Roberson
Walter Roberson 2020년 3월 16일
What does it mean to you to optimize two functions at the same time?
You talk about max, so it sounds like you want to maximize something.
You propose maximizing the sum, but you are not certain if that is what you want to do.
Maximizing the sum is something that can be done, but maximizing the sum is not the same as maximizing either one of the functions.
For example, you could create f(x,y) and E(x,y,p(w,x,y)) such that E ignored its third parameter and calculated the exact negative of f(x,y) . The sum of the two functions would be 0 for all x, y, but it would not be possible to simultaneously maximize f(x,y) and E(x,y,p(w,x,y)) because they go against each other.
Saifullah Khalid
Saifullah Khalid 2020년 3월 16일
Sorry for poor description of my intent. By optimizing two functions at same time, I mean optiming both using multi-objective algorithm and reach a Pareto optimal solution. Second, option is to optimize sum of the two functions (sorry there was a mistake in math epression, now I have corredcted).
As an example, if we consider as system revenue and as expense to achieve that revenue, and their difference as profit . I am confused what difference does it make if we maximize profit or try to optimize profit through achieving Pareto optimal solution for revenue and expense functions.
Earlier you talked about maximizing sum f+E but here you talk about maximizing difference f-E . Typically expense would be stated as positive, so f-E would make the most sense. To maxize that you would want to maximize f while minimizing E. With gamultiobj, you maximize by minimizing the negative, so you can
gamultiobj(@(xyw) [-f(xyw(1),xyw(2)), E(xyw(1),xyw(2),p(xyw(1),xyw(2),xyw(3))))], ...)
This would find sets of values xyw such that the gradient of [-f, E] is locally 0
Or you could use a minimzer on
@(xyw) -f(xyw(1),xyw(2)) + E(xyw(1),xyw(2),p(xyw(1),xyw(2),xyw(3))))
gamultiobj can potentially give you multiple results; a minimizer would give you a single result. Minimizers tend to get stuck in local minima, especially if you use fmincon(), less so (but still a problem) with fminsearch(), and less yet with ga() . But ga() is not efficient, and fminsearch() does not permit constraints.
Why would you prefer one over the other? Well, getting the pareto front can tell you about multiple configurations that are each optimal, permitting you to choose the best one for your resources. A minimizer is not going to care about small issues like the optimal demanding more energy per second than the Sun puts out in a year -- not unless you put in constraints. fmincon() is the best organized for being rigourous about constriants.
Saifullah Khalid
Saifullah Khalid 2020년 3월 17일
Walter Roberson, thank you very much detailed asnswer. "Why would you prefer one over the other? Well, getting the pareto front can tell you about multiple configurations that are each optimal, permitting you to choose the best one for your resources."
The resonse is convincing and is what I am actually looking for. But, is there any mathematical limitation on optimizing the composit function (profit) becuase of the fact that E depends on or it does not has any bearing?
Walter Roberson
Walter Roberson 2020년 3월 17일
It doesn't matter. All gamultiobj cares about is that it can place a call through the function handle and get back a vector of results. It does not care how many function calls that uses.
Consider for example that
F = @(X, Y, W) X.^2 + Y.^2 + (X-Y-W).^2
can be rewritten as
P = @(X,Y,W) (X-Y-W).^2
F = @(X,Y,W) X.^2 + Y.^2 + P(X, Y, W)
which can in turn be rewritten as
F = @(X, Y, W, Q) X.^2 + Y.^2 + Q(X, Y, W)
Called with (x, y, w, P)
obviously this is just an implementation detail as far as the mathematics is concerned.

댓글을 달려면 로그인하십시오.

 채택된 답변

Alan Weiss
Alan Weiss 2020년 3월 17일

0 개 추천

You could use the approach in Generate and Plot a Pareto Front. Or you could try using a multiobjective solver, if you have a Global Optimization Toolbox license. As usual, Walter has good ideas.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글 수: 1

Saifullah Khalid
Saifullah Khalid 2020년 3월 17일
Alan Weiss, thank you very much for response. Luckily, I have licence for Global Optimization Tool Box and will utilize it as needed. can you please have a look on the last comment I posted in response to @Walter Roberson comment.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

질문:

2020년 3월 16일

댓글:

2020년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by