필터 지우기
필터 지우기

min and max optimization as a single minimization function

조회 수: 3 (최근 30일)
sastra university
sastra university 2021년 10월 15일
댓글: Matt J 2021년 10월 15일
Hello all..
I have two questions.
1) I have a minimization and maximization objective function. Am using pso to solve the problem. However, i have a confusion that how to merge the both the function together to solve it.
for example,
f1=maximization
f2=minimization
if i am adding these function together like as follows
min(f)=(1/f1)+f2;
will it be correct? can i get the proper result?
2) I have 15 variables that are ranges from 1 to 25. I am using PSO to solve the problem. I need a 15 unique numbers for a set to solve my problem. how can i ensure the unique values of the variables for each iterations?
if length(x)==length(unique(x))
%proceed with the function
else
f1=0;
end
I am using this logic for solving the problem. Will it be correct?
Please help me in this.
Thanks in advance.
Muthukannan

답변 (1개)

Matt J
Matt J 2021년 10월 15일
편집: Matt J 2021년 10월 15일
if i am adding these function together like as follows min(f)=(1/f1)+f2 will it be correct? can i get the proper result?
The solver can return only a single solution x. If you know that f1(x) is maximimized at the same solution x=xmin where f2(x) is minimized, then yes it will work. Otherwise, no, it will not work. Also, if you were fortunate enough for that to be true, you would not need to co-optimize the functions. You could simply minimize f2 and, if you needed the maximum value of f1, simply evaluate f1(xmin).
What you could do is have two sets of variables x and y and minimize
1/f1(x) +f2(y)
as a function of [x,y], but I doubt it will be better than just optimizing each function separately.
I need a 15 unique numbers for a set to solve my problem. how can i ensure the unique values of the variables for each iterations?
Such a constraint only makes sense if your variables are also integer constrained, and pso() does not allow you to impose integer constraints. If you use ga(), you could apply integer constraints and then possibly also the nonlinear constraint,
function [c,ceq]=nonlcon(x)
ceq=0;
c=1-diff(sort(x));
end
  댓글 수: 2
sastra university
sastra university 2021년 10월 15일
Thank you for the response..
Matt J
Matt J 2021년 10월 15일
You' re quite welcome, but please Accept-click the answer if the question is resolved.

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

카테고리

Help CenterFile Exchange에서 Particle Swarm에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by