필터 지우기
필터 지우기

Mutliobjective optimization with linprogr

조회 수: 1 (최근 30일)
Victor Hugo Cantú
Victor Hugo Cantú 2019년 9월 26일
댓글: Victor Hugo Cantú 2019년 10월 1일
I'm trying to solve a linear programming with two objectives. For one objective the code works pretty good using "linprog".
For two objectives, I already coded the weighted sum approach and it works well. However, I would like to use another scalarization approach, e.g., Tchebycheff or AASF. For nonlinear functions, "fmincon" works well, but with "linprog" I'm having troubles to code it, mainly because the objective function is represented as the coefficients of the function. Is there any other way to send "f" to "linprog" instead of a vector of coefficients ?
Here I put an example of how Tcehebycheff works for "fmincon":
function f = fun(x,z,A)
f1 = sum(x.^2,2);
f2 = 3*x(:,1) + 2*x(:,2) - x(:,3)/3 + 0.01*(x(:,4) - x(:,5)).^3;
f = max((f1 - z(1))*A(1), (f2 - z(2))*A(2));
% f = f1*A(1) + f2*A(2); % for weighted sum approach
end
where z is the ideal point, a vector of objectives in which each element is the best solution found for every objective up to now (for being used for evolutionary algorithms), a constant for the optimizer. Even if one does not use the z, I see difficult how to transfert the f to "linprog":
f = max(f1*A(1), f2*A(2));
It is to note again, that f is a vector of coefficients.
Thank you in advance.

채택된 답변

Matt J
Matt J 2019년 9월 26일
편집: Matt J 2019년 9월 26일
The easiest approach would be to use fminimax, but optimization performance might improve if you recast as a linear program as in the example below. Note that for nonlinear objectives, your approach using fmincon will not be reliable because the max() operation renders the objective non-differentiable (see Limitations of Fmincon). You should definitely use fminimax for that.
Aineq=[1,1]; bineq=1;
f1=[1,0.2]; %objective 1
f2=[2,0.1]; %objective 2
x=optimvar('x',numel(f1),'LowerBound',0);
t=optimvar('t');
prob=optimproblem('ObjectiveSense','minimize');
prob.Constraints.AbCon=(Aineq*x>=bineq);
prob.Constraints.tbound=t>=[f1;f2]*x;
prob.Objective=t;
sol=solve(prob);
sol.x
  댓글 수: 1
Victor Hugo Cantú
Victor Hugo Cantú 2019년 10월 1일
Thank very much for your answer. It has been very useful. I didn't tried fminimax because, as you said, the performance could be poorer to the use of linprog.
Also, even if the code you proposed is not as fast as the "solver-based" code, it works, and I think is the only way to code scalarization functions using at the same time linprog.
I would like to share the version I use for Tchebycheff approach, based on your code:
prob.Constraints.tbound = t >= (A'.[f1;f2]*x - z')./(nadir - z)';

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by